Skip to content

Instantly share code, notes, and snippets.

@SongJiaqiang
Created March 7, 2019 02:55
Show Gist options
  • Save SongJiaqiang/fe18984b0cd826c9baffd88932af8949 to your computer and use it in GitHub Desktop.
Save SongJiaqiang/fe18984b0cd826c9baffd88932af8949 to your computer and use it in GitHub Desktop.
# TARGET_NAME = "MyApp"
# Clean and Building both architectures.
xcodebuild -configuration "Release" -target "${TARGET_NAME}" -sdk iphoneos clean build
xcodebuild -configuration "Release" -target "${TARGET_NAME}" -sdk iphonesimulator clean build
# Uses the Lipo Tool to merge both binary files (i386 + armv6/armv7) into one Universal final product.
lipo -create "${DEVICE_DIR}/${FMK_NAME}.a" "${SIMULATOR_DIR}/${FMK_NAME}.a" -output "${INSTALL_DIR}/${FMK_NAME}.a"
# Search supported architectures of library
lipo -info "/library/file/path"
## For example
#xcodebuild -configuration "Release" -target "MyApp" -sdk iphoneos clean build
#xcodebuild -configuration "Release" -target "MyApp" -sdk iphonesimulator clean build
#lipo -create "/First/library/file/path" "/Second/library/file/path" -output "/Result/library/file/path"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment