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>
- 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.
source share