从iPhone切换到平板电脑(反之亦然)时,XCode构建失败 [英] XCode build fails when switching from iphone to pad or vice versa
问题描述
在Xcode中进行构建和测试并在ipad上运行应用程序,然后想切换到iphone时,出现以下构建错误:
When building and testing in Xcode and running the app on let's say, ipad and then want to switch to iphone, I get the following build errors:
ld:警告:忽略文件/ xxx / Build / Products / Debug- iphoneos / libCTCheckbox.a,该文件是为不是链接架构的归档文件而构建的(arm64):/ xxx / Library / Developer / Xcode /DerivedData/xxx/Build/Products/Debug-iphoneos/libCTCheckbox.a
ld: warning: ignoring file /xxx/Build/Products/Debug- iphoneos/libCTCheckbox.a, file was built for archive which is not the architecture being linked (arm64): /xxx/Library/Developer/Xcode/DerivedData/xxx/Build/Products/Debug-iphoneos/libCTCheckbox.a
对于我所有的pod库。
for all my pod libraries.
然后:
体系结构arm64的未定义符号:
_OBJC_CLASS _ $ _ RKObjectMapping ,引用自:MappingGenerator.o中的
objc-class-ref $ o SyncingManager.o中的
objc-class-ref
一堆文件。
这是在我将Cocoapods升级到1.0.1版本并运行pod安装之后开始的。
This started happening after I did a Cocoapods upgrade to version 1.0.1 and ran a pod install.
在XCode(8.0版中)我的构建设置项目,项目目标和Pods项目的s设置为:
In XCode (version 8.0 ) my build settings for the project, project target and Pods project are set to:
- 体系结构:标准体系结构(armv7,arm64)
- 仅构建活动架构:调试->是,发布->否
- 有效架构:armv7,armv7s,arm64
- 目标设备系列:1,2
- 库搜索路径:$(继承), $ {PODS_ROOT} / GoogleAnalytics / Libraries
- 框架搜索路径:$(继承)
- Architectures: Standard architectures(armv7, arm64)
- Build Active Architectures Only: Debug -> YES, Release -> NO
- Valid Architectures: armv7, armv7s, arm64
- Target Device Family: 1,2
- Library Search Path: $(inherited), "${PODS_ROOT}/GoogleAnalytics/Libraries"
- Framework Search Paths: $(inherited)
当我使用仅构建活动架构设置并清理项目并重新启动XCode时,最终构建再次成功,但是我还没有找到可靠的有效操作顺序。当我想切换回ipad时,同样的事情再次发生。
When I play around with the "Build Active Architectures Only" setting and Clean the Project and restart XCode, eventually the build succeeds again but I haven't found a reliable order of actions that works. When I want to switch back to ipad the same thing happens again.
推荐答案
为重复的问题表示歉意,看来我已经解决了通过删除DerivedData中的所有内容,请参阅为以下项目构建的CocoaPods库错误一些iOS模拟器
Apologies for the duplicate issue, looks like I solved it by deleting everything in DerivedData, see CocoaPods libraries errors building for some iOS simulators
这篇关于从iPhone切换到平板电脑(反之亦然)时,XCode构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!