XCode Convert to ARC, Create universal binary fails with error of “can't figure out the architecture type of”

匿名 (未验证) 提交于 2019-12-03 08:41:19

问题:

I'm attempting to convert an iOS (pure Objective-C) project to ARC. The conversion fails at the octest target CreateUniversalBinary stage with the following error. The project and target architecture build settings look correct to me so I am struggling to understand why this is failing:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo: can't figure out the architecture type of: /Users/andybowskill/Library/Developer/Xcode/DerivedData/Make-Up_Kit-axtbxqtkmnlfmlcafkoetwqmeufc/Build/Intermediates/Make-Up Kit.build/Debug-iphoneos/Make-Up KitTests.build/Objects-normal/armv7/Make-Up KitTests Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo failed with exit code 1

The aforementioned CreateUniversalBinary command is as follows:

CreateUniversalBinary "/Users/andybowskill/Library/Developer/Xcode/DerivedData/Make-Up_Kit-axtbxqtkmnlfmlcafkoetwqmeufc/Build/Products/Debug-iphoneos/Make-Up KitTests.octest/Make-Up KitTests" normal "armv7 armv7s" cd "/Users/andybowskill/Development/iOS/Make-Up Kit" setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" lipo -create "/Users/andybowskill/Library/Developer/Xcode/DerivedData/Make-Up_Kit-axtbxqtkmnlfmlcafkoetwqmeufc/Build/Intermediates/Make-Up Kit.build/Debug-iphoneos/Make-Up KitTests.build/Objects-normal/armv7/Make-Up KitTests" "/Users/andybowskill/Library/Developer/Xcode/DerivedData/Make-Up_Kit-axtbxqtkmnlfmlcafkoetwqmeufc/Build/Intermediates/Make-Up Kit.build/Debug-iphoneos/Make-Up KitTests.build/Objects-normal/armv7s/Make-Up KitTests" -output "/Users/andybowskill/Library/Developer/Xcode/DerivedData/Make-Up_Kit-axtbxqtkmnlfmlcafkoetwqmeufc/Build/Products/Debug-iphoneos/Make-Up KitTests.octest/Make-Up KitTests"

Please could someone help to explain the error? Many thanks in advance!

回答1:

Removing "armv7" from "Valid Architectures" in the Target (leaving only "armv7s") solved this for me. My iOS Deployment Target is 4.3.

Adding "armv6" to "Valid Architectures" in the Target and updating my iOS Deployment Target to 6.1 did not work.

Encountered while converting to Objective-C ARC in XCode Version 4.6 (4H127)



回答2:

I trawled my project build settings again and noticed that I had removed armv6 architecture support but still had the deployment target set to an iOS version less than 4.3. Updating the deployment target to iOS 4.3 or above resolved the problem.



回答3:

I also encountered same problem while migrating to ARC from NON-ARC. and after digging and banging head I come to know 2 solutions

  1. Add armv6 in valid arch's in target, OR
  2. Set build Active Arch. only to NO.


易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!