I just moved to Xcode 7.2 and am trying to compile a dynamic framework using xcodebuild
and lipo
xcodebuild -project ProjectName.xcodeproj -scheme ProjectName -sdk iphonesimulator
This command fails with strange errors like Unsupported architecture
(in frameworks like CoreText). The issue has also been discussed here but I don't see a solution which would work. Any help?
This is due to a bug in Xcode 7.2 (and 7.2.1).
A workaround suggestion has been provided in the supplied link since this question was asked. To sum up, you can add the parameter PLATFORM_NAME=iphonesimulator
, and then it magically works. For example:
xcodebuild -project ProjectName.xcodeproj -scheme ProjectName -sdk iphonesimulator -arch i386 PLATFORM_NAME=iphonesimulator build
See also my answer here (where there is also another suggestion for a workaround)