Plugin iOS using asset catalog provided by the plugin

images
ios

#1

I’m currently developing a plugin and I need to load an image from an asset catalog in the plugin itself. So I don’t want to pass the image from outside the plugin, I need to provide it in the plugin itself.

Where do I need to place the Assets.xcassets?
I’ve tried to put it into the platforms/ios/App_Resources but that did not work. Any suggestions?


#2

Did you try platforms/ios/Assets.xcassets? Also you might have to configure build.xcconfig.


#3

Hi thanks for your reply. Unfortunately moving it directly to platforms/ios/Assets.xcassets did not work… it seems like it is not copied at all to the demo project…

What do you mean by configure build.xconfig?


#4

As I already mentioned only Assets.xcassets may not help. build.xcconfig is a configuration file, you should find one similar in your App_Resources/iOS.


#5

Yes I found the build.xcconfig file. It is empty by default. I also had a look at the one in App_resources/iOS but there it only defines the launch image and the app icon. I’ve also check what possible configurations are available for the build.xcconfig (found a list here: https://pewpewthespells.com/blog/buildsettings.html)

Do you know by any chance what I would need to change in the build.xcconfig file?