This was working before, but after I updated OpenFL, HaxeFlixel and Lime to the latest versions, it seems that any files that I reference from the assets folder aren’t found on iOS. Images aren’t loaded (except for the default HaxeFlixel image instead), and “file not found” errors appear. I tried with a basic template program and the problem persists. Also checked if the assets files are in the export folder, and the assets path in Project.xml. Any idea of what could be causing this?
Does this occur with OpenFL samples?
Yes, it seems that it does. The DisplayABitmap sample only shows a white screen.
BunnyMark crashes as soon as it’s launched with the following error:
Called from [Main.new](http://Main.new) (Main.hx line 52) Called from [DocumentClass.new](http://DocumentClass.new) (ApplicationMain.hx line 286) Null Object Reference libc++abi.dylib: terminating with uncaught exception of type Dynamic
And, Pirate Pig crashes with a Null Object Reference error too:
Called from piratepig.PiratePigGame.newGame (piratepig/PiratePigGame.hx line 437)
Called from piratepig.PiratePigGame.new (piratepig/PiratePigGame.hx line 70)
Called from piratepig.PiratePig.initialize (piratepig/PiratePig.hx line 50)
Called from piratepig.PiratePig.new (piratepig/PiratePig.hx line 26)
Called from DocumentClass.new (ApplicationMain.hx line 286)
Null Object Reference
libc++abi.dylib: terminating with uncaught exception of type Dynamic
This is the same exception I get when trying to load a file in my game (in my case, I’m trying to initialize FireTongue and a message appears saying “Couldn’t load index.xml!”).
Today i managed to build for ios the first time. Went into the same issue, all assets with embed="false"
cannot be loaded. I get an error event like
Error loading file "compress/TP.png" Cannot load file: assets/assets/compress/TP.png
Project.xml
<assets path="assets/compress" rename="compress" include="*.png|*.jpg" embed="false" type="image" />
Works fine in html, windows, android.
Awesome, it worked for me too. Thank you!
Thanks guys!
Here’s the fix:
AFAIK the defaultRootPath
logic is no longer needed since the asset manifest root logic has been improved to work relative to the loaded JSON file
Problem still not fixed with Lime 7.6.3, any time frame on fixed version, or should I also fix it manually?
I’m having this issue as well still.
We need a new Lime release with this patch
I did a workaround which was to alias to “” but strangely it only works if I change it to “assets”, update the xcode, then change it back.
<assets path="Assets" rename="" />
That works fine for me because I only have one assets directory
Yes the Xcode template is hard-coded to put all asset files under a directory called “assets” so <assets path="Assets" rename="assets" />
goes to “assets/assets” in the actual Xcode project and this is handled by the rootPath
value except when the value is wrong
Just be aware your asset files won’t copy over this way if you make any changes but you might be able to hack it using something like this?
<assets path="Assets" rename="assets" preload="false" />
<assets path="Assets" rename="" />