Link to VS Embed Frameworks library binaries

What is the difference in build phases between putting the framework in "Link binary with libraries" or in "Embed frameworks"?

+65
frameworks xcode
Nov 19 '14 at 10:59
source share
3 answers

Associate a binary file with libraries Link structures and libraries with project object files to create a binary file. You can link target source files to libraries in target active SDKs or to external libraries.

Paste frameworks You can create a built-in infrastructure for code sharing between your application extension and the application containing it.

-

Timeline (Look at this sentence) - "If your application contains links for the embedded infrastructure , it must include the arm64 architecture or be rejected in the App Store."

+38
Nov 19 '14 at 11:13
source share

I searched for some answers here and there and would like to change this study if someone comes across this question again.

In any case, if we want to use any of the resources of the framework (that is, the API), we need to refer to it. In this case, we need to add it to the “Associated frameworks and libraries” section at the bottom of the general target settings.

If we embed a library, we ship the library — as it is — with our suite of applications. This can be convenient, for example, on computers running macOS, which, of course, do not have a special third-party library.

So what about iOS? In fact, there is no way to install third-party libraries on your iOS device - plus Apple is very strict about thick frameworks (libraries created for multiple platforms). So should there be a way to deliver libraries anyway? Since it’s not enough for the user of our application to simply link them, what other possibilities do we have?

This is where a special build phase comes into play. In the project settings in the Build Phases section, there is a link to a binary section with libraries. This step removes unnecessary parts from thick platforms and leaves the necessary parts together with the package so that it can work on a device that is independent of application dependencies.

+2
Oct 26 '18 at 12:52
source share

For target application

  • Static Library - Link
  • Static Framework - Link
  • Dynamic Framework - Embed

How does it work

0
Aug 14 '19 at 19:09
source share



All Articles