How to compile xcode4 project to use as framework

2019-07-23 14:31发布

问题:

If I have project in xcode4 for the iphone, How can I use it as framework for other project ?

thanks.

回答1:

Have a look at Creating a Framework chapter in XCode docs.

The main thing is to add the framework file to your project and setting up the header file include path. Take care about debug and release builds. It is a little bit annoying and confusing if you have to switch between them from time to time. To get this more transparent I installed a build post-action (menu Product/Edit Scheme) that just copies both libs to one location with different names.