Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
306 views
in Technique[技术] by (71.8m points)

ios - What is the difference between Embedded Binaries and Linked Frameworks

When using external framework Xcode now has an Embedded Binaries as well as Linked Frameworks section.

enter image description here

When you download an external framework and Finder->drag it into Xcode, it will place the framework into the Linked Frameworks and Libraries section.

When you build a library with Carthage it recommends dragging into the Embedded Binaries section.

Both seem to be working in terms of linkage, as the API becomes available either way, further more when adding a framework into the Embedded Binaries section is it also automatically gets added into the Linked Frameworks and Libraries section.

So, who is right? Carthage or the rest of the internet? and why are there 2 options for including external resources into Xcode projects?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
  1. Linking- We must link a framework if we use any API defined in it.

  2. Embedding - This process will ensure the added framework will be embedded within the App bundle, and potentially will help sharing code between the app, and any extension bundles. We embed only third party frameworks and not the ones provided by iOS as they are readily available in the device. If we are embedding, that means that, we will need to link to them too so that Xcode can compile and create the build. When the app runs in the device, then the embedded framework will be loaded into memory when needed.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...