A repo to practice building apps manually...
xcodebuild -scheme "Simple" -project "Simple.xcodeproj" build
xcodebuild -scheme "Simple" -project "Simple.xcodeproj" -destination "name=iPhone 11 Pro" test
xcodebuild clean
Or add clean
to xcodebuild build
command:
xcodebuild -scheme "Simple" -project "Simple.xcodeproj" clean build
xcodebuild analyze
First, build using generic platform:
xcodebuild -scheme "Simple" -project "Simple.xcodeproj" -destination generic/platform=iOS build
Second, build the xcarchive
:
xcodebuild -scheme "Simple" -project "Simple.xcodeproj" \
-archivePath ./Simple.xcarchive \
archive
Third, generate the proper exportOptions.plist
:
Note: This example uses manual signing with a development build:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>development</string>
<key>provisioningProfiles</key>
<dict>
<key>ENTER YOUR BUNDLE ID HERE</key>
<string>ENTER YOUR PROVISIONING PROFILE HERE</string>
</dict>
<key>signingStyle</key>
<string>manual</string>
</dict>
</plist>
Lastly, export the ipa
:
xcodebuild -exportArchive \
-archivePath ./Simple.xcarchive \
-exportOptionsPlist ./exportOptions.plist \
-exportPath ./Simple.ipa
Testing with specific device and iOS version with multiple destinations:
xcodebuild -scheme "Simple" -project "Simple.xcodeproj" \
-destination "name=iPad Pro (12.9-inch) (3rd generation),OS=13.0" \
-destination "name=iPhone 11,OS=13.3" \
test
Testing without building:
xcodebuild -scheme "Simple" -project "Simple.xcodeproj" -destination "name=iPhone 11 Pro" test-without-building
List simulators
instruments -s devices
Since this is an iOS Application, in order to run build or archive commands, it is required to create a real "App ID" and development provisioning profile.
These commands can all currently be used using the "Simple" Xcode project.