Difference between dragging frameworks into a frame folder and dragging and dropping a link with a library?

In Xcode, what is the difference between:

Drag and drop a framework (i.e. LoginWithAmazon.framework) to the framework folder in the project tree (left panel in Xcode)

compared with

drag the frame to "Link with Libraries" at target points → [Project Name]?

+3


source to share


1 answer


The difference is that dragging and dropping a struct into your project doesn't necessarily link it to your binary (or target). Dragging and dropping a framework into your project (which you see in the Project Navigator) basically just puts it there until you link it to a target. With Apple frameworks, some of the links are automatic, although for third party frameworks, you almost always need to link them to your target.

Here's an example: you might have a project that has multiple targets, such as version iOS

and version OS X

. The version iOS

may require a framework that it OS X

doesn't have, although you can still use it in your project. Since you would not want to use this framework with the target OS X

, you would need to bind it to the target iOS

.



You can think of the frames being pulled into your project as almost placeholders until you actually associate them with the goal.

+3


source







All Articles