Skip to main content

Posts

Showing posts with the label XCode

Userful xcodebuild command lines

I setup Jenkins jobs to build iOS project for QA and release. Here are some useful xcodebuild commands that I use. Tested with XCode 9. Create a xcarchive file xcodebuild -project ${APPNAME}.xcodeproj -scheme ${APPSCHEME} -configuration Release clean -archivePath "${WORKSPACE}/${APPNAME}.xcarchive" archive Create an IPA from xcarchive file with exportOptions. xcodebuild -exportArchive -archivePath "${APPNAME}.xcarchive" -exportPath "${WORKSPACE}" -exportOptionsPlist exportOptions.plist -allowProvisioningUpdates If the above command doesn't create an IPA, try putting xcrun in front. To generate an IPA with the correct certificate and provision profile, you must set them correctly in exportOptions.plist. See example below. Create an APP file for simulator xcodebuild -project ${APPNAME}.xcodeproj -scheme ${APPSCHEME} -configuration Debug -sdk iphonesimulator clean build Sample exportOptions.plist <?xml version="1.0" encoding=&