是否可以從命令行更新 iOS 配置文件? (Can iOS Provisioning Profiles be renewed from the command-line?)


問題描述

是否可以從命令行更新 iOS 配置文件? (Can iOS Provisioning Profiles be renewed from the command‑line?)

I've got a build script that I will be running on a Mac mini as a build server. It should work just fine but I still need to renew and get the latest provisioning profile manually. Is there a way this can be done from the command‑line?

‑‑‑‑‑

參考解法

方法 1:

I used the Automator to record and create an app that renews the provisioning profiles.

The steps are (copying from the Watch Me Do list):

  • Click Xcode in Dock (make sure to pin XCode to the doc)
  • Click the "Window" menu
  • Organizer
  • Click the "Refresh" button
  • Click the "Log in" button (save the credentials in your key chain)

Then save it to your desktop as RefreshProvisionProfile.app (or somewhere else).

To run it from any terminal or from a build script as follows: /Users/User_name/Desktop/RefreshProvisionProfile.app/Contents/MacOS/Application\ Stub RefreshProvisionProfile.app/

Seems to work for me.

Here is some code we use to identify the profile we want to ship to QA with the project:

#Copy profile from $ProfileName
cd "/Users/macbuild/Library/MobileDevice/Provisioning Profiles/"
ProfileFile="`grep ‑al $ProfileName *.mobileprovision`"
echo "Also copy $ProfileFile to the network"
if cp ‑fv $ProfileFile /Volumes/shared/Builds/$buildid/
then
    echo "Matching Provisioning Certificate: shared/Builds/$buildid/$ProfileFile"
fi

For XCode 5.0.2 the order is as follows:

  • Click the Xcode menu, choose Preferences
  • Select the Accounts tab
  • Select an Apple ID in the left pane
  • Click the View Details... button in the right pane
  • Click the Refresh button at the bottom left of the new window

方法 2:

Don't think so. Pretty sure you have to do that via the Web Portal.

(by BrennanDanny SchoemannPatrick Perini)

參考文件

  1. Can iOS Provisioning Profiles be renewed from the command‑line? (CC BY‑SA 3.0/4.0)

#iOS #build-automation






相關問題

將 jpg UIImage 轉換為位圖 UIImage? (convert jpg UIImage to bitmap UIImage?)

C++ Xcode iOS 項目錯誤 (C++ Xcode iOS project errors)

如何將以下行添加到我的 plist 文件中? (How can I add the following lines to my plist file?)

XCode 4.6 顯示方法 + (void)beginAnimations:(NSString *)animationID context:(void *)context; 的內存洩漏警告 (XCode 4.6 shows a warning of memory leak for method + (void)beginAnimations:(NSString *)animationID context:(void *)context;)

隨機分佈精靈 (randomly distribute sprites)

在 iOS 9 的 alert.addAction 中按下 OK 時如何打開另一個視圖控制器 (How to open another view controller when OK is pressed in alert.addAction in iOS 9)

在復選框上單擊獲取表行 ID - 目標 c (On check box click get the table Row ID - Objective c)

提交應用程序 - 添加本地化,但我的語言未列在組合框中? (Submitting app - Add Localizations, but my language is not listed in the combo box?)

是否可以從命令行更新 iOS 配置文件? (Can iOS Provisioning Profiles be renewed from the command-line?)

如何為collectionviewcell的刪除自定義動畫? (How to custom animation for collectionviewcell's deletion?)

由 LPLinkView 和 UIImageView 組成的單元格的 CollectionView 速度很慢,並且在滾動時會重新加載數據 (CollectionView with Cells made up of LPLinkView's and UIImageView's is Slow and Reloads Data While Scrolling)

刪除 tableview 單元格不會更新索引 (Deleting tableview cells won't update index)







留言討論