开发者

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开发者_C百科 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?


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜