I've got some materials in an app's bundle (some info.plist values, and some images in .xcassets files etc.)
If I access them from within an app extension (a notification service extension, notification content extension for example), then it appears to work. However while running the extensions in the debugger, there were some messages in the console saying the app bundle wasn't loaded. So despite it working, this message made me wonder if its not a safe practice and it working was luck and/or timing etc. and if the materials should instead be duplicated within the extension bundle and obtained from there instead of accessing them from the app bundle?
I would consider this to be safe.
However, my advice is that you put these assets into a framework. An appex accessing a framework from its container app is pretty fundamental to how appexes work, so I can’t imagine how it could ever break.
ps Note that the above is trickier for system extensions, because on macOS they get copied to a secure location. So if your app and sysex have to share a framework, you must embed that framework in the sysex, not the app. However, that’s not a concern for appexes and, critically, on iOS and its child platforms you can only place frameworks at the app level within your bundle. See Placing Content in a Bundle.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"