Commit e2b67790 authored by Bertrand Presles's avatar Bertrand Presles Committed by bpresles

Added instruction to build IPA and upload to Apple Store Connect through command line

parent 59ed131f
......@@ -107,6 +107,7 @@
</edit-config>
</platform>
<engine name="android" spec="^6.2.3" />
<engine name="ios" spec="^4.5.5" />
<plugin name="cordova-plugin-camera" spec="^2.4.1" />
<plugin name="cordova-plugin-console" spec="^1.0.7" />
<plugin name="cordova-plugin-device" spec="^1.1.6" />
......@@ -124,5 +125,4 @@
<plugin name="phonegap-plugin-barcodescanner" spec="git+https://github.com/phonegap/phonegap-plugin-barcodescanner.git">
<variable name="CAMERA_USAGE_DESCRIPTION" value=" " />
</plugin>
<engine name="ios" spec="~4.5.5" />
</widget>
......@@ -102,7 +102,7 @@ ionic state reset
ionic run ios
```
6. Build binaries :
6. Build binaries for emulator :
```bash
ionic build ios
......@@ -111,4 +111,54 @@ ionic build ios
## Publishing to Apple store
- Follow this steps (section `iOS Publishing`): https://ionicframework.com/docs/v1/guide/publishing.html
\ No newline at end of file
### Pre-requisite
Ensure you have a valid Certificate (with your private key)
and Distribution Provisioning Profile associated to it in the OSX Keychain.
See: https://help.apple.com/developer-account/#/devbfa00fef7
### Archive and upload to Apple Store Connect
1. Prepare for iOS in release mode:
```bash
ionic prepare ios --release --prod
```
2. Generate archive for iOS generic device
```bash
cd platforms/ios
mkdir build
xcodebuild -workspace Cesium.xcworkspace -scheme Cesium -sdk iphoneos -configuration AppStoreDistribution archive -archivePath $PWD/build/Cesium.xcarchive
```
4. Create an `export.plist` file with the following content
```xml
<?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>app-store</string>
<key>teamID</key>
<string>YOUR_TEAM_ID</string>
</dict>
</plist>
```
Replace `YOUR_TEAM_ID` by the Team ID associated to your Apple Developer Account (see Membership section on https://developer.apple.com/account/)
3. generate IPA for Apple Store
```bash
xcodebuild -exportArchive -archivePath $PWD/build/Cesium.xcarchive -exportOptionsPlist $PWD/export.plist -exportPath $PWD/build
```
4. Upload to Apple Store Connect:
```bash
/Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool --upload-app -f "CLI.ipa" -u YOUR_APPLE_ID
```
The prompt for your password, if you use two-factor authentication, you'll need to generate an application specific password for this command (see: https://appleid.apple.com/account/manage)
5. Go to `https://appstoreconnect.apple.com/`, then `My Apps` and publish your App from there.
\ No newline at end of file
......@@ -151,4 +151,4 @@
"ios"
]
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment