为某些iOS模拟器构建CocoaPods库错误 [英] CocoaPods libraries errors building for some iOS simulators

查看:166
本文介绍了为某些iOS模拟器构建CocoaPods库错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

短错误:

file was built for archive which is not the architecture being linked (i386)

扩展:

对于某些模拟器,在构建项目时会收到​​以下错误消息:

Expanded:
For some simulators, I receive these errors when building my project:


ld:警告:忽略文件
/ Users / admin / Library / Developer / Xcode / DerivedData / myApp-ekwldvjyuxwkykbareyvvydbtero / Build / Products / Debug -iphonesimulator / libFSCalendar.a,
文件是为存档构建的,而不是链接的体系结构
(i386):
/ Users / admin / Library / Developer / Xcode / DerivedData / myApp- ekwldvjyuxwkykbareyvvydbtero / Build / Products / Debug-iphonesimulator / libFSCalendar.a
ld:警告:忽略文件
/ Users / admin / Library / Developer / Xcode / DerivedData / myApp-ekwldvjyuxwkykbareyvvydbtero iphonesimulator / libGBDeviceInfo.a,
文件是为存档而构建的,不是链接的体系结构
(i386):
/ Users / admin / Library / Developer /Xcode/DerivedData/myApp-ekwldvjyuxwkykbareyvvydbtero/Build/Products/Debug-iphonesimulator/libGBDeviceInfo.a
ld:警告:忽略文件
/ Users / admin / Library / Developer / Xcode / DerivedData / myApp-ekwldvyyuww / Build / Products / Debug-iphonesimulator / libSCLAlertView-Objective-Ca,
文件用于存档,而不是链接到的体系结构
(i386):
/ Users / admin / Library / Developer / Xcode / DerivedData / myApp-ekwldvjyuxwkykbareyvvydbtero / Build / Products / Debug-iphonesimulator / libSCLAlertView-Objective-Ca
ld:警告:忽略文件
/ Users / admin / Library / Developer / Xcode / DerivedData / myApp-ekwldvjyuxwkykbareyvvydbtero / Build / Products / Debug-iphonesimulator / libSSKeychain.a,
文件用于归档,而不是链接到的体系结构
(i386):
/ Users / admin / Library /Developer/Xcode/DerivedData/myApp-ekwldvjyuxwkykbareyvvydbtero/Build/Products/Debug-iphonesimulator/libSSKeychain.a
拱形的未定义符号项目i386: _ OBJC_CLASS _ $ _ FSCalendar,从
引用:VCalendarView.o中的
objc-class-ref。o _OBJC_CLASS _ $ _ GBDeviceInfo,从VEMailView中引用:
objc-class-ref。 o DataClass.o中的
objc-class-ref。VAlerts.o中的
objc-class-ref。o _OBJC_CLASS _ $ _ SCLAlertViewBuilder,引用自:
objc VAlerts.o _OBJC_CLASS _ $ _ SCLAlertViewShowBuilder中的-class-ref,引用自:VAlerts.o _OBJC_CLASS _ $ _ SSKeychain中的
objc-class-ref,引用:VDescriptionView中的
objc-class-ref .o ld:未为体系结构i386叮当找到符号:错误:链接器命令失败,退出代码为1
(使用-v查看调用)

ld: warning: ignoring file /Users/admin/Library/Developer/Xcode/DerivedData/myApp-ekwldvjyuxwkykbareyvvydbtero/Build/Products/Debug-iphonesimulator/libFSCalendar.a, file was built for archive which is not the architecture being linked (i386): /Users/admin/Library/Developer/Xcode/DerivedData/myApp-ekwldvjyuxwkykbareyvvydbtero/Build/Products/Debug-iphonesimulator/libFSCalendar.a ld: warning: ignoring file /Users/admin/Library/Developer/Xcode/DerivedData/myApp-ekwldvjyuxwkykbareyvvydbtero/Build/Products/Debug-iphonesimulator/libGBDeviceInfo.a, file was built for archive which is not the architecture being linked (i386): /Users/admin/Library/Developer/Xcode/DerivedData/myApp-ekwldvjyuxwkykbareyvvydbtero/Build/Products/Debug-iphonesimulator/libGBDeviceInfo.a ld: warning: ignoring file /Users/admin/Library/Developer/Xcode/DerivedData/myApp-ekwldvjyuxwkykbareyvvydbtero/Build/Products/Debug-iphonesimulator/libSCLAlertView-Objective-C.a, file was built for archive which is not the architecture being linked (i386): /Users/admin/Library/Developer/Xcode/DerivedData/myApp-ekwldvjyuxwkykbareyvvydbtero/Build/Products/Debug-iphonesimulator/libSCLAlertView-Objective-C.a ld: warning: ignoring file /Users/admin/Library/Developer/Xcode/DerivedData/myApp-ekwldvjyuxwkykbareyvvydbtero/Build/Products/Debug-iphonesimulator/libSSKeychain.a, file was built for archive which is not the architecture being linked (i386): /Users/admin/Library/Developer/Xcode/DerivedData/myApp-ekwldvjyuxwkykbareyvvydbtero/Build/Products/Debug-iphonesimulator/libSSKeychain.a Undefined symbols for architecture i386: "_OBJC_CLASS_$_FSCalendar", referenced from: objc-class-ref in VCalendarView.o "_OBJC_CLASS_$_GBDeviceInfo", referenced from: objc-class-ref in VEMailView.o objc-class-ref in DataClass.o "_OBJC_CLASS_$_SCLAlertView", referenced from: objc-class-ref in VAlerts.o "_OBJC_CLASS_$_SCLAlertViewBuilder", referenced from: objc-class-ref in VAlerts.o "_OBJC_CLASS_$_SCLAlertViewShowBuilder", referenced from: objc-class-ref in VAlerts.o "_OBJC_CLASS_$_SSKeychain", referenced from: objc-class-ref in VDescriptionView.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

例如,它适用于iPhone 6 Plus模拟器9.3.0,但不适用于iPhone 5s。为什么?我为 Other Linker Flags (其他链接器标志)选项设置了 $(继承)

It works for, say, iPhone 6 Plus simulator 9.3.0 but not for iPhone 5s. Why? I have got $(inherited) for the Other Linker Flags option.

推荐答案

我找到了解决方案。

我删除了目录
/ Users / admin / Library / Developer / Xcode / DerivedData / myApp-ekwldvjyuxwkykbareyvvydbtero / Build (右键单击CocoaPods库>在Finder中显示,然后找到其父目录)并重新构建所有内容。 Xcode重新创建了所有现在可以使用的库。所有构建首选项都与默认首选项相同。

I removed the directory /Users/admin/Library/Developer/Xcode/DerivedData/myApp-ekwldvjyuxwkykbareyvvydbtero/Build (right click on the library of CocoaPods > Show in Finder, then find its parent directory) and rebuild all again. Xcode recreated all libraries which works right now. All build preferences are the same as default.

这篇关于为某些iOS模拟器构建CocoaPods库错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆