我有一个使用XCode 6.0.1创建的XCode工作区。它拥有2个(Swift)库和一个依赖于这2个库的iOS应用程序(Swift)。我有稳定的设置,允许我在iPhone和模拟器上运行iOS应用程序:2个库项目被添加为应用程序的嵌入式二进制文件(见图片)。
I have an XCode workspace created with XCode 6.0.1. It constains 2 (Swift) libraries and one iOS app (Swift) that depends on those 2 libraries. I had stable setup that allowed me to run the iOS app on both iPhone and simulators: The 2 library projects were added as Embedded Binaries (see picture) of the app.
现在,我有XCode 6.1。最近,我在XCode运行时删除了〜/ Library / Developer / Xcode 文件夹中的 DerivedData 文件夹。之后我的工作区不起作用 - iOS应用程序无法编译,我收到链接器错误,说它无法找到库项目。
Now, I have XCode 6.1. Recently, I deleted DerivedData folder in ~/Library/Developer/Xcode folder while XCode was running. After that my workspace did not work - the iOS app would fail to compile and I got linker error saying it cannot find the library projects.
我试图通过删除来解决它我的应用程序项目的嵌入式二进制文件中的2个库 - 我无法添加它们。在项目设置中单击嵌入式二进制文件下的+按钮可正确显示工作区项目,但选择和添加我的库项目不会将它们添加到嵌入式二进制文件列表中。我通过创建新工作区解决了链接器错误。该应用程序编译,但它如何链接库对我来说是一个谜:它们不在列出嵌入式二进制文件或链接框架和库不在框架搜索路径中。应用程序和它需要的库之间似乎没有任何联系(显然有编译时),除了库项目在同一个工作区。
I tried to solve it by removing my the 2 libraries from Embedded Binaries of the app project - and I cannot add them back. Clicking + button under Embedded Binaries in project settings displays workspace projects correctly but selecting and adding my library project does not add them to the list of Embedded Binaries. I have solved the linker error by creating new workspace. The app compiles but how it links the libraries is a mystery to me: They are not in listed Embedded Binaries or Linked Frameworks and Libraries not in the Frameworks search path. There appears to be no link between the app and the libraries it needs (and obviously have as it compiles) except that libraries projects are in the same workspace.
为什么我不能将库项目添加到嵌入式二进制文件?在XCode 6.1中,依赖项目是否正常编译并嵌入到应用程序中而不在任何地方列出或链接是否正常?
Why I cannot add library projects to Embedded Binaries? Is it normal in XCode 6.1 that dependency projects just compile and gets embedded into an app without being listed or linked anywhere?
推荐答案
这是我的摘要回答问题删除DerivedData后,Xcode不会添加嵌入式二进制文件,查看原始问题并回答更多上下文和信息:
This is a summary of my answer to the question Xcode won't add "Embedded binary" after deleting "DerivedData", see the original question and answer for more context and information:
更多推荐
无法在XCode中将嵌入式二进制文件(其他项目)添加到项目依赖项中
发布评论