Errors Building Xcode Project After Adding in Run Script Fatal Error: Lipo: Input File

Errors building Xcode Project after adding in Run Script fatal error: lipo: input file

Well it seems that Bolts framework is not a fat binary (i.e. Does not contain multiple architectures binaries) hence the extraction and merging fails. I guess the simplest solution will be to run the script only for specific frameworks that comes with a binary for x86_64 arch. You can identify fat binaries using the 'file' command.

Lipo Error!! can't open input file

I got it to work, I just made a simple change in my Project target-> Build setting-> Build Active Architecture only and set this Build Active Architecture only to YES. And it's working fine now..

update After 6 months:

Again i face this issue after updating to Xcode5. This time i have to update Project target-> Build setting->Valid Architecture to armv7. I removed armv7s and arm64.

XCode universal library build phase - Lipo can't find files

This is a bash problem/mistake.

You're passing all the file names as a single argument to lipo, so it's gonna look for a single file named /Users/username/Projects/project/plugins/build/Release-iphoneos/libproject-plugins.a /Users/username/Projects/project/plugins/build/Release-macos/libproject-plugins.a.

You should use an array for the file names instead.

  • Initialise it with () instead of "".
  • Add elements with +=(...) instead of ="$var ...".
  • Pass every element separately to lipo with "${var[@]}" instead of "$var".

Applied to your script:

targets=$(xcodebuild -list | sed -n '/Targets/,/^$/p' | grep -v -e 'Targets:\|all\|^$');
target_results=();

for target in $targets; do
xcodebuild ${ACTION} -target $target -configuration ${CONFIGURATION};
target_results+=("${PROJECT_DIR}/build/${CONFIGURATION}-$target/libproject-plugins.a");
done;

xcrun lipo -create "${target_results[@]}" -o "${PROJECT_DIR}/plugins-universal.a";


Related Topics



Leave a reply



Submit