In our project we are using multiple app extensions with multiple local targets and multiple packages. We are encountering with an issue where the local targets are not getting embedded with main application target if we use SPM packages and if we add the same target in app extensions as dependencies.
But if we don't add app extensions every target will embed/link properly. Or if we dont add SPM packages it will embed/link properly. But when both of them is integrated the above issue arise.
Strange thing is, the app builds properly but in run time it fails to link and gives Library not loaded error.
This wont happen with simulator. You will have to run in Device.
Attached a sample project with reproducible case. Please run it in device with automatic signing in with iOS >= 16.
XcodeGenImpl.zip
Please comment the app extension target and dependency both in project.yml to see a working application.
Note:
If you face any problem with XcodeF.xcodeproj file please checkout to Frameworks/XcodeF and run xcodegen command. And then run xcodegen command in main directory.
In our project we are using multiple app extensions with multiple local targets and multiple packages. We are encountering with an issue where the local targets are not getting embedded with main application target if we use SPM packages and if we add the same target in app extensions as dependencies.
But if we don't add app extensions every target will embed/link properly. Or if we dont add SPM packages it will embed/link properly. But when both of them is integrated the above issue arise.
Strange thing is, the app builds properly but in run time it fails to link and gives
Library not loaded
error.This wont happen with simulator. You will have to run in Device.
Attached a sample project with reproducible case. Please run it in device with automatic signing in with iOS >= 16. XcodeGenImpl.zip
Please comment the app extension target and dependency both in
project.yml
to see a working application.Note:
If you face any problem with XcodeF.xcodeproj file please checkout to Frameworks/XcodeF and run
xcodegen
command. And then runxcodegen
command in main directory.