xcode – 如何将私有框架添加到目标依赖项?

前端之家收集整理的这篇文章主要介绍了xcode – 如何将私有框架添加到目标依赖项?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试使用XCode 4在我的应用程序包中嵌入一个 private framework(最后一段),并遵循Apple(看似)过时的 instructions.

就我而言,我正在为每个目标使用单独的Xcode项目.这是最后一步:

In the General tab of the inspector window,add your framework as a dependency for the application. Adding this dependency causes Xcode to
build the framework target before building the application target.

The build dependency you establish in the application target causes the framework to be built before the application. This is important because it guarantees that a built version of your framework will be available to link against and to embed in the application. Because of this dependency,you can set the active target of your Xcode project to your application and leave it there. Building the application now builds the framework and copies it to the application bundle directory,creating the necessary linkage between the two.

然而,当单击Target Dependencies中的按钮时,框架不会显示.如何在Xcode 4中的私有框架和应用程序目标之间建立构建依赖关系?

编辑:我应该澄清一点,我已经让私有框架工作了.我只是想避免每次更改框架时都清理项目,并确保框架是在应用程序目标之前构建的.

解决方法

通过将私有框架项目添加为子项目来管理解决此问题,然后在Target Dependencies中添加框架目标.

但是,在我的情况下,在删除DerivedData之前,框架目标没有显示为Target Dependencies中的选项.那个讨厌的小虫子让我发疯了.

猜你在找的iOS相关文章