How to include a .bundle file in the resources folder when doing a extension [iOS]?

Hi everyone :smile:

i’m finishing up a UnityAds extension for OpenFL, i already have it working on android, but i’m having some problems with iOS. in this case, the test app i built crashes (not the build of the extension itself, that works perfectly) why is missing the UnityAds.bundle file with the following message in the xCode console:

   Please move the UnityAds.bundle into the Resource Directory of your Application!

i already tried using the tag <dependency> in the include.xml of the extension but doesn’t work. plus, i have <compilerflag value="-F../frameworks/"/> in the build.xml, where .framework and .bundle files are.

Any idea of how i can solve this?

Thanks !

I use a .bundle in an Mopub extension, all I had to do is manually adding the file in the Ressources folder in xcode. Didn’t find anyway to do it automaticaly with project.xml so you’ll have to do it every time you use update.

1 Like

buuu :frowning: well, i include it on the instructions then, if there is no other choice :sleepy:

Does it work if you copy it to the “assets” folder of the project, without modifying anything in Xcode?

i don’t have a assets folder in the extension ( the idea is to set something in the extension that would make available for the project that use it, like it does with .framework for example )

just for reference, even if you include the .bundle file in the assets folder in the final project, still doesn’t work. it must be drag and drop on Resources in xCode.

Didn’t work for me either.

My ressources files needs to be in the Resources folder, if I put them in assets they are in Resources/atssets , so the native lib i’m using doesn’t find its resources . In my case I could change the lib source code to change the path used, but there is other extension where you can’t change sources.

I think some of the comment in this issue are related : https://github.com/openfl/lime/issues/271 .

I’m currently trying to do the changes the xcodeproj template and lime tools need so that the file in Resources and Classes folder are added to the project when using update, but I don’t know how ressources files ID work and get a corrupted .xcodeproj… Why would someone use such a complicated format to store project structure >.<

1 Like

I know, it’s ridiculous. I tried doing the same for the “Resources” folder, but I think I can’t let files copy to the “Resources” directory (maybe it doesn’t like Resources/Resources?) and instead these need to be manually added, one file at a time, to the generated Xcode project :frowning:

This is tough, though, because sometimes it seems like it treats certain things as localization strings, and therefore generates other code for it… it’s a little bit of a nightmare, but it’s probably not impossible :confused:

1 Like

I managed to include UnityAds.bundle during the build, this process worked for me : https://github.com/ipsilondev/openfl-unityads/issues/8

Thanks for this

I’m interested in what we could do to automatically do this with our build tool