Xcode Convert to ARC, Create universal binary fail

2019-04-24 02:36发布

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!

3条回答
2楼-- · 2019-04-24 03:01

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楼-- · 2019-04-24 03:05

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)

查看更多
smile是对你的礼貌
4楼-- · 2019-04-24 03:07

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.
查看更多
登录 后发表回答