"Do Not Embed", "Embed & Sign", "Embed Without Signing". What are they?. What they do?

Shreeram Bhat picture Shreeram Bhat · Aug 28, 2019 · Viewed 14.7k times · Source

We have 3 new options in "Frameworks, Libraries, and Embedded Content" section of Xcode11 Beta for adding libraries.

Xcode Libraries section screenshot

enter image description here

Can anyone explain what they do?

Answer

agirault picture agirault · Nov 14, 2019

As already stated by @przemyslaw-jablonski, this is similar to what was in XCode 10, but in only one screen (which I personally like!).


Embedding

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

Signing (only if shared/embedded)

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
  • anything else: already properly signed, select Embed Without Signing