I have a library project which contains a resources folder with subfolders. I expected this to allow the app extension and app to share the exact same files. However, when I inspect the final .ipa file, folders in the Resources directory are copied to the application root and the root folder of the .appex plugin. Is there a way to share these files and images without duplicating them?
Answers
It seems like the answer is to use a framework, which has to be made with Xcode. This raises a few problems with Xamarin.
Isn't there something Xamarin could do to help us here? I think this is a horrible downside to using Xamarin for iOS development.
Have you looked at App Groups. Try this link
https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html
It talks about sharing a single set of pre rendered assets.
Would that be what you're trying to do
I reread that part of the documentation after you mentioned it. It seems to me that you can only write to NSUserDefaults at runtime. Then there is the option for the shared container. Do you know how to write to the shared container at compile time?
I've not done that before, but if I understand the document correctly, you don't need to share at compile time. The assets can reside in the app and the extension stares access to the assets.
I appreciate the response, but what I need is to know how to make them reside in the app.