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
iOS Permission Alerts - Removing or Suppressing
Calling Instance Method During Initialization in Swift
Xcode 5/iOS 7 - Localization Not Working in Simulator
iOS Unrecognized Selector Sent to Instance in Swift
How to Only Override a Method Depending on the Runtime System iOS Version
Swift - the Data Couldn't Be Read Because It Isn't in the Correct Format
iOS Uitableview with Dynamic Text and Images Rendered Together (Nsattributedstring + Images)
Programmatically Access Image Assets
Building Ffmpeg iOS Libraries for Armv7, Armv7S, Arm64, I386 and Universal
Navigationcontroller.Navigationitem VS Navigationitem
Accessibility for iOS, Voiceover Read Order Issue
Why Does "Try Catch" in Objective-C Cause Memory Leak
Setting Layoutmargins of Uiview Doesn't Work