We have an application which have multiple extension targets also. We are using multiple Internal & External Frameworks via Carthage. These all frameworks using by App target as well as App Extension targets. When we migrating from Carthage to SPM ipa size increased more than double size. Compared the content of ipa size from Carthage & SPM found that in case of SPM in PlugIns folder(there are list of .appex files corresponding to Extension targets) containing Framework.bundle file.
For better understanding of this issue I am just creating one Demo App with below details.
I have an app ( SPM Test App ) which have a framework target( SunKit ) & this Sunkit using by one of Extension.
Earlier while using Carthage for all Frameworks we have set " Framework Search Paths " as "$(PROJECT_DIR)/Carthage/Build/iOS" for both app & app's framework(SunKit) target. Now I am migrating from Carthage to Swift package manager. After adding all framework using SPM when trying to make build its giving error in my app's framework(SunKit) target.
If I add frameworks in app's framework(SunKit) target like below then its building the app but its ipa size increasing
Below are the screenshot of ipa contents of PlugIns using SPM (PlugIns -> SunCaller.appex -> Show Package Contents
Below are the screenshot of ipa contents of PlugIns using Carthage (PlugIns -> .appex -> Show Package Contents
Can we get any solution so that framework.bundle should not embed in .appex (PlugIns -> App's Extension .appex) same like in case of Carthage.