How can I get Xcode 8 to automatically generate provisioning profiles from the command line?

I just created my projects in Xcode 8 to use the new automatic software. I am trying to execute my builds on the command line (using xcodebuild to build .xcarchive and .ipa files like this ). However, for every project that I have not actually opened in Xcode 8, the command line file does not work with invalid initialization. When I open a project in Xcode 8 and go to the General tab in the project editor, for a moment it shows a spinner in the code signing section and says something about creating a preparation profile, and then shows everything that is ready to go. Then I run xcodebuild again and it works fine.

My question is: is there a way to run the auto-generation / configuration macro from the command line?

+5
source share
1 answer

You can use Fastlane Tools .

In particular, if you want to create a training profile, you need to follow these steps:

  • through produce create an application identifier in Dev Center;

fastlane produce app_name <APP_ID> -u <USERNAME_DEV_CENTER> -a <BUNDLE_ID> -q <APP_ID>

  1. through sigh you can create, download and set up a training profile

fastlane sigh -u <USERNAME_DEV_CENTER> -a <BUNDLE_ID> -q <FILE_NAME>.mobileprovision

In theory, you can only follow the second step, but if there is no application identifier, an invitation to create it is launched.

In your case, when you open Xcode, a provisioning profile is created and installed using your template. Thus, when creating the system, this valid training profile was found.

0
source

All Articles