Created
July 2, 2018 07:25
-
-
Save vineetchoudhary/f6d2dc82f16e68bd931a3e42ff264672 to your computer and use it in GitHub Desktop.
Build script which use to create a multi-architecture shared library that will work on an iOS device and the simulator for the any library. (Xamarin.iOS)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#xcodebuild location | |
XBUILD=/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild | |
#Project root | |
PROJECT_ROOT=/Volumes/LongTime/Shared/RESideMenu/ | |
#Complete Project Path | |
PROJECT=/Volumes/LongTime/Shared/RESideMenu/RESideMenu.xcodeproj | |
#Target Name | |
TARGET=RESideMenu | |
#build for i386 (iPhone Simulator) | |
${XBUILD} -project ${PROJECT} -target ${TARGET} -sdk iphonesimulator -configuration Release clean build | |
mv ${PROJECT_ROOT}/build/Release-iphonesimulator/lib${TARGET}.a ${PROJECT_ROOT}/lib${TARGET}-i386.a | |
#build for arm64.a (iPhone) | |
${XBUILD} -project ${PROJECT} -target ${TARGET} -sdk iphoneos -arch arm64 -configuration Release clean build | |
mv ${PROJECT_ROOT}/build/Release-iphoneos/lib${TARGET}.a $PROJECT_ROOT/lib${TARGET}-arm64.a | |
#build combine i386 and arm64 | |
xcrun -sdk iphoneos lipo ${PROJECT_ROOT}/lib${TARGET}-i386.a ${PROJECT_ROOT}/lib${TARGET}-arm64.a -create -output ${PROJECT_ROOT}/lib${TARGET}.a | |
#Check arch | |
xcrun -sdk iphoneos lipo -info lib${TARGET}.a | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment