简体   繁体   English

使用swift发布OS X和iOS项目的发布构建配置的Lipo错误

[英]Lipo error for release build config for OS X and iOS project with swift

I have a project (Flappy Thing) which has iOS (Flappy-Thing-iOS) and OS X (Flappy-Thing-OSX) targets using entirely swift (no obj-c). 我有一个项目(Flappy Thing),它有iOS(Flappy-Thing-iOS)和OS X(Flappy-Thing-OSX)目标,使用完全swift(没有obj-c)。 I am using Xcode 6.1.1. 我正在使用Xcode 6.1.1。 When I run the app on my mac or the simulator it compiles and runs fine without any errors. 当我在我的Mac或模拟器上运行应用程序时,它编译并运行正常,没有任何错误。 But when I try and profile the app (which I think uses the release build config rather than debug), I get a bunch of errors: 但是,当我尝试配置应用程序(我认为使用发布版本配置而不是调试)时,我收到了一堆错误:

When I profile on iOS (on the simulator): 当我在iOS上(在模拟器上)进行配置时:

1. 1。

Lipo error
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: 
can't open input file: 
/Users/Dan/Library/Developer/Xcode/DerivedData/Flappy_Thing-cjnzzxiecdblbkcftlklzfplyfny/Build/Intermediates/Flappy Thing.build/Release-iphonesimulator/Flappy-Thing-iOS.build/Objects-normal/i386/Flappy-Thing-iOS (No such file or directory)

2. 2。

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc 
failed with exit code 1

3. 3。

Command /usr/bin/ditto failed with exit code 1

4. 4。

clang: error: linker command failed with exit code 1 (use -v to see invocation)

5. 5。

Dsymutil error
(null): error: unable to open executable '/Users/Dan/Library/Developer/Xcode/DerivedData/Flappy_Thing-cjnzzxiecdblbkcftlklzfplyfny/Build/Products/Release-iphonesimulator/Flappy-Thing-iOS.app/Flappy-Thing-iOS'

And when I profile for OS X: 当我为OS X配置文件时:

1. 1。

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

2. 2。

Command /usr/bin/ditto failed with exit code 1

3. 3。

clang: error: linker command failed with exit code 1 (use -v to see invocation)

4. 4。

Dysmutil error
(null): error: unable to open executable '/Users/Dan/Library/Developer/Xcode/DerivedData/Flappy_Thing-cjnzzxiecdblbkcftlklzfplyfny/Build/Products/Release/Flappy-Thing-OSX.app/Contents/MacOS/Flappy-Thing-OSX'

I have read other solutions for Lipo errors such as setting build active architecture only to yes for release config. 我已经阅读了其他针对Lipo错误的解决方案,例如将build build architecture设置为yes for release config。 But none of them have worked 但他们都没有奏效

Can someone please explain what these errors mean, what is causing them and how to fix them. 有人可以解释这些错误的含义,导致它们的原因以及解决方法。

Thanks in advance :] 提前致谢 :]

Edit: these are the current architecture build settings: 编辑:这些是当前的体系结构构建设置:

iOS target: iOS目标: 架构构建设置iOS

OS X target: OS X目标: 体系结构构建设置OS X.

Edit 2: I have only run and profiled the iOS target on the simulator. 编辑2:我只在模拟器上运行并分析了iOS目标。 The OS X target also gets these errors (but not the lipo one) when I profile it (but it builds fine normally) 当我对它进行分析时,OS X目标也会得到这些错误(但不会出现这个错误)(但它正常构建正常)

Maybe because you profile the simulator (which is i386) while valid archs are arm only in your build settings (thus, no i386 obj files available to link and run). 也许是因为你描绘了模拟器(i386),而有效的archs只是你的构建设置中的arm(因此,没有可用于链接和运行的i386 obj文件)。

When you profile for MAC, you automatically build for i386. 在配置MAC时,您将自动为i386构建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM