简体   繁体   中英

Internal Linking of Cocoa Frameworks

In my open-source Cocoa project, I have two Xcode projects -- one framework and one application. I want to link the framework in the application, and whenever I build the framework, I want the linked framework in the application to be updated automatically as well.

What is the correct way to set this up, especially so that someone else who clones my project can easily build both the framework and the application?

Drag the Framework project into the App project's source list (on the left). I make a "Projects" folder in the source list for that exact purpose.

Then, you can simply select your App Target, Get Info, and add the Framework as a Direct Dependency.

Now, whenever you build your App, your Framework will be built as well.

It's recommended to use a common Build Folder as well (Xcode->Preferences->Building) to help with linking.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM