We have 3 new options in "Frameworks, Libraries, and Embedded Content" section of Xcode11 Beta for adding libraries.
Xcode Libraries section screenshot
Can anyone explain what they do?
Do Not Embed option is basically Linking given . framework into project. Embed & Sign and Embed Without Signing is old Embedding option.
While debugging in the simulator, Xcode would load all frameworks needed even if they're set as "Do Not Embed". However, if you directly run app or debug in the real device, "image not load" would occur for those frameworks set as "Do Not Embed". So, we should embed all third-party frameworks I think.
Static and Dynamic Frameworks:Static frameworks contain a static library packaged with its resources. Dynamic frameworks contain the static/dynamic library with its resources. In addition to that, dynamic frameworks may conveniently include different versions of the same dynamic library in the same framework.
As already stated by @przemyslaw-jablonski, this is similar to what was in XCode 10, but in only one screen (which I personally like!).
Do not embed static frameworks and libraries (linking happens at build time), only shared ones (dynamic linking happens at run time, so they need to be in your bundle).
file frameworkToLink.framework/frameworkToLink
will return:
current ar archive
: static library, select Do not embed
Mach-O dynamically linked
: shared library, select Embed
Not required if it already has a proper signature (adhoc doesn't count).
codesign -dv frameworkToLink.framework
will return:
code object is not signed at all
or adhoc
: select Embed and sign
Embed Without Signing
Basically in Xcode 10 in project settings (upon clicking on .xcodeproj file, with the blue icon) you had two framework-oriented sections visible - Embedded Binaries and Linked Frameworks and Libraries. Now they are merged into one.
Do Not Embed
option is basically Linking given .framework into project.
Embed & Sign
and Embed Without Signing
is old Embedding option.
I am not entirely sure what is the functional difference between the last two, apart from the fact that framework will or will not be signed during assembly. If you want to know the difference between Linking and Embedding then here you can find SO answer on this.
Pics:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With