How do you push an iOS IPA file to App Center Distribute from the command line?
I'm using a CI (Continuous Integration) server to build my app, and I tried using the following command, given by the App Center Test portal, but it isn't working and outputs the error, below:
appcenter distribute release -f ~/Desktop/MondayPundayApp.ipa -g Collaborators --app Punday/mondaypundayapp--ios
Command 'appcenter distribute release' requires a logged in user. Use the 'appcenter login' command to log in
Click on the Distribute new release button in the portal and upload your build of the app. Once the upload has finished, click Next and select the Distribution group that you created as the Destination of that app distribution. Review the Distribution and distribute the build to your in-app testing group.
The App Center CLI requires the user to be logged in, and we can log in from our build server by providing a login token.
Using the App Center CLI, enter the following command, replacing [Name Of Token]
with whatever you want to name this token
appcenter login
appcenter tokens create -d "[Name Of Token]"
It will provide a response like this:
ID: [Unique Guid]
API Token: [Unique API Token]
Description: [Name of Token]
Created at: [Time Stamp]
Copy the API Token result. We will use this in our CI script.
In your Continuous Integration pipeline, use this bash script to push the IPA File to App Center Distribute
The bash script does the following:
#!/usr/bin/env bash
IPAFile=`find . -name *.ipa | head -1`
npm install -g [email protected]
appcenter login --token [login token]
appcenter distribute release -f $IPAFile -g Collaborators --app Punday/mondaypundayapp--ios
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With