简体   繁体   中英

Combine Two Xcode Projects with common files

I have two xcodeprojects named as Master.xcodeproj and Slave.xcodeproj .I had added static library on Slave.xcodeproj and added that as a sub project in Master.xcodeproj. Slave.xcodeproj has a viewcontroller SlaveViewController and Master.xcodeproj have a viewcontroller MasterViewController .

Now, if I want to load SlaveViewController from a button click of a MastViewcontroller.m is that possible?

UPDATE:

Ok you can reference the files of Slave project with #import"SlaveLibraryName/SlaveViewController.h" . But the problem now I am facing is that I am getting duplicate symbols messages from the library since the Slave had files that were referenced from Master project and those files were added to static library. how to overcome that ?

Yes. All the code from each project can be available so you can do this normally by importing the header of SlaveViewController and instantiating it (or by segueing to one in a storyboard). One complication with a static library is that it will not automatically add resources such as images, xibs, or storyboards to your target project.

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