I have a working application which relies on several static libraries, which I've added as dependencies to the application and added to the link with static libraries bit in build phases. Everything builds and runs fine in the simulator and on my attached iPad.
我有一个工作的应用程序,它依赖于几个静态库,我将它们作为依赖项添加到应用程序中,并在构建阶段添加到带有静态库位的链接中。在模拟器和我附带的iPad上,一切都运行良好。
I wanted to create an .ipa for use with test flight so I followed the instructions on test flight's site (http://support.testflightapp.com/kb/tutorials/how-to-create-an-ipa-xcode-4) and some other tutorials relating to creating an archive with an app that uses static libraries (http://diaryofacodemonkey.ruprect.com/2011/03/18/ad-hoc-app-distribution-with-xcode-4/, http://www.musicalgeometry.com/?p=1237).
我想要创建一个.ipa用于测试飞行,所以我遵循了测试飞行站点上的说明(http://support.testflightapp.com/kb/tutorials/howto -create-an-ipa-xcode-4)和其他一些教程,这些教程都是关于使用静态库创建归档的应用程序(http://diaryofaco.testflightapp.com/kb/tutorials/tutorials/tutorials/howtorials/howtocreate - creative -ip -ipa- ipa- ipa-xcode- xcode- xcode- xcode- xcode- xcode- xcode- xcode- 37)。
Following these tutorials, when I create an archive I get linker errors about not being able to find various libraries, for example: ld: library not found for -lOAuthTouch
在这些教程之后,当我创建一个归档文件时,我就会因为不能找到各种各样的库而产生链接错误,例如:ld:没有找到-lOAuthTouch的库。
(I've also tried using a new project and a new static library project to make sure it's not some setting I've changed and I get the same problem).
(我还尝试过使用一个新的项目和一个新的静态库项目,以确保它不是我修改过的某个设置,并得到相同的问题)。
This seems to be because I added a build configuration called "Ad Hoc" to my app for creating an archive, and based on the linker command and the fact that adding an "Ad Hoc" configuration to all the static libraries I use allows the archive to be created I'm assuming that the static libraries are being built to a different directory.
这似乎是因为我添加了一个称为“临时”的构建配置应用程序创建一个归档文件,并根据链接器命令,添加一个“临时”配置所有我使用的静态库允许创建存档我假设静态库被构建到一个不同的目录。
I'd rather not have to add a new build configuration to all the libraries I use, so my question is, what should I do to create an archive of my app without tinkering with every library I use?
我不希望在我使用的所有库中添加新的构建配置,所以我的问题是,在不修改我使用的每个库的情况下,如何创建应用的存档呢?
A second related question: all the tutorials I mentioned say to set the "Skip install" build setting to yes for static libraries, but the Apple documentation (http://developer.apple.com/library/mac/#documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/DistApps/DistApps.html) seems to indicate setting it for the application, rather than the libraries. Anyone know which is right?
第二个相关的问题是:我提到的所有教程都将“跳过安装”设置为yes用于静态库,但是苹果文档(http://developer.apple.com/library/mac/#文档/ toolslanguage /概念/Xcode4UserGuide/ DistApps.html)似乎表明将其设置为应用程序,而不是库。有人知道哪个是对的吗?
1 个解决方案
#1
3
It will work, you must simply get the paths correct and make sure you have set Skip install to NO on each of the static libraries in the workspace. I recently went through this and ended up deleting the existing Ad hoc distribution configuration from both my main target and each of the static library targets. The I created a new ad hoc configuration on the main project and each static library project and verified all of the settings in each of them.
它将会工作,您必须简单地获得正确的路径,并确保在工作空间中的每个静态库上都将Skip install设置为NO。我最近经历了这一过程,最终从我的主要目标和每个静态库目标中删除了现有的临时分发配置。我在主项目和每个静态库项目上创建了一个新的临时配置,并对每个项目中的所有设置进行了验证。
See this link, this, and this all of which helped with sort through this.
看看这个链接,这个,以及所有这些都帮助我们解决了这个问题。
#1
3
It will work, you must simply get the paths correct and make sure you have set Skip install to NO on each of the static libraries in the workspace. I recently went through this and ended up deleting the existing Ad hoc distribution configuration from both my main target and each of the static library targets. The I created a new ad hoc configuration on the main project and each static library project and verified all of the settings in each of them.
它将会工作,您必须简单地获得正确的路径,并确保在工作空间中的每个静态库上都将Skip install设置为NO。我最近经历了这一过程,最终从我的主要目标和每个静态库目标中删除了现有的临时分发配置。我在主项目和每个静态库项目上创建了一个新的临时配置,并对每个项目中的所有设置进行了验证。
See this link, this, and this all of which helped with sort through this.
看看这个链接,这个,以及所有这些都帮助我们解决了这个问题。