在Xcode

时间:2018-04-23 06:18:10

标签: ios objective-c xcode cordova

我正在尝试构建一个非常古老的iOS Cordova应用程序。

它为Simulator成功构建,但是当我尝试为任何真实硬件构建时,它显示错误:

  

Ld的   /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos/MIND_MIS.app/MIND_MIS   正常的armv7s       cd" / Users / atif / Desktop / Atif / Projects / MIS / MIND_MIS Ver 02.00.0002 Final"       export IPHONEOS_DEPLOYMENT_TARGET = 7.0       export PATH =" /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/ usr / local /箱:在/ usr / bin中:/ bin中:/ usr / sbin目录:/ sbin目录"       /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang   -arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk   -L /用户/与Atif /库/开发商/ Xcode中/ DerivedData / MIND_MIS-cccdiojxhigimnewheisujbzuhyk /编译/产品/调试-的iPhoneOS   -F /用户/与Atif /库/开发商/ Xcode中/ DerivedData / MIND_MIS-cccdiojxhigimnewheisujbzuhyk /编译/产品/调试-的iPhoneOS   -filelist /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Intermediates.noindex/MIND_MIS.build/Debug-iphoneos/MIND_MIS.build/Objects-normal/armv7s/MIND_MIS.LinkFileList   -miphoneos-version-min = 7.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Intermediates.noindex/MIND_MIS.build/Debug-iphoneos/MIND_MIS.build /Objects-normal/armv7s/MIND_MIS_lto.o   -Xlinker -no_deduplicate -fobjc-link-runtime -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation   -weak_framework CoreMedia -weak-lSystem -force_load /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos/libCordova.a   -ObjC -framework MessageUI -weak_framework CoreMotion -framework CoreLocation -framework ImageIO -framework OpenAL -framework   AssetsLibrary   /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos/libCordova.a   -framework Foundation -weak_framework UIKit -framework CoreGraphics -framework AddressBook -framework AddressBookUI -framework AudioToolbox -weak_framework AVFoundation -framework CFNetwork   -framework MediaPlayer -framework QuartzCore -framework SystemConfiguration -framework MobileCoreServices -weak_framework   CoreMedia -framework CoreLocation -Xlinker -dependency_info -Xlinker   /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Intermediates.noindex/MIND_MIS.build/Debug-iphoneos/MIND_MIS.build/Objects-normal/armv7s/MIND_MIS_dependency_info.dat   -o /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos/MIND_MIS.app/MIND_MIS

     

错误:无效的bitcode签名clang:错误:链接器命令失败   退出代码1(使用-v查看调用)

我甚至尝试使用Xcode 7,8和9但是,我仍然得到同样的错误。

3 个答案:

答案 0 :(得分:1)

尝试:

  • 清除派生数据,然后重新打开Xcode。
  • 选择正确的登录/证书,或尝试在Xcode中重新添加帐户。
  • 如果你的pod支持bitcode,那么你需要将bitcode设置为NO(转到Project Build设置搜索bitcode并将其设置为NO。 尝试此操作可能会对您有所帮助:
    enter image description here
  • 打开Podfile
  • 取消注释此行〜>平台:ios,'x.0'
  • 从命令行运行Podfile所在的以下命令
  • pod update
  • 在xcode中选择产品>清洁,然后产品>构建

答案 1 :(得分:0)

转到项目>目标>一般>部署信息。确保您的部署目标与硬件的ios版本相同

答案 2 :(得分:0)

我之前遇到过这个错误。

试试这个解决方案:

转到构建设置>仅构建活动架构

Make changes on the selected target

a) Set it as 'YES' if you're building/pushing the app directly to a device

b) Set it as 'NO' if you're trying to build the app as IPA

希望它有所帮助!