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 命令"appcenter分发版本"需要一个登录用户.使用"appcenter login"命令登录 Command 'appcenter distribute release' requires a logged in user. Use the 'appcenter login' command to log in推荐答案 从CLI推送到App Center测试 1.手动获取API令牌 App Center CLI 要求用户要登录,我们可以通过提供登录令牌从构建服务器登录.Push to App Center Test from CLI1. Manually Retrieve an API TokenThe App Center CLI requires the user to be logged in, and we can log in from our build server by providing a login token.使用App Center CLI,输入以下命令,将[Name Of Token]替换为您要为其命名的令牌Using the App Center CLI, enter the following command, replacing [Name Of Token] with whatever you want to name this tokenappcenter loginappcenter tokens create -d "[Name Of Token]"它将提供如下响应: ID:[唯一向导] ID: [Unique Guid] API令牌:[唯一API令牌]API Token: [Unique API Token]说明:[令牌名称]创建于:[时间戳记]Created at: [Time Stamp]复制API令牌结果.我们将在CI脚本中使用它.Copy the API Token result. We will use this in our CI script.在您的持续集成管道中,使用此bash脚本将IPA文件推送到App Center分发In your Continuous Integration pipeline, use this bash script to push the IPA File to App Center Distribute bash脚本执行以下操作:The bash script does the following:找到IPA文件安装appcenter cli使用API​​令牌登录到App Center将IPA推送到App Center分发#!/usr/bin/env bashIPAFile=`find . -name *.ipa | head -1`npm install -g appcenter-cliappcenter login --token [login token]appcenter distribute release -f $IPAFile -g Collaborators --app Punday/mondaypundayapp--ios 这篇关于如何从持续集成服务器将IPA推送到App Center分发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-15 13:37
查看更多