SUMMARY:
If you open a project in Xcode 8 with \"Automatically manage signing\" enabled and a new bundle ID, it will automatically create and download a
Notice: This answer assumes that bundle ID and provisioning profiles are created manually. Only build process can be automated using this method.
Yes that is possible even without using third party tools. you should be comfortable using script file or a make file. I'm using 2 lines of code in a makefile on Mac Mini at work. And that gives us either ad-hoc or appstore version ready for upload according to our configuration.
teamID MY_TEAM_ID_XXYY //put your iPhone distribution team ID. in my case developer team ID is different than my distribution team ID. just wondering.method app-store // for appstore upload or usead-hoc for ad-hocuploadSymbols uploadBitcode
You should save plist configuration somewhere accessible, e.g., as options.plist just a reminder: make sure that you have your ad-hoc/distribution provisioning profile on your remote Mac.
xcodebuild will create an archive then we can export .app. In your make file or script file use these lines:4.1. First we create the archive file.
xcodebuild archive -derivedDataPath build/ -project myProject.xcodeproj -scheme myScheme -archivePath build/ios/myProject.xcarchive
derivedDataPath parameter is just a folder that can be deleted later after building the app. you know how much junk is produced in derived data.
project name is your project name, and scheme name is right after play|stop button in Xcode. You must choose an archive name and path for the next step.
4.2 After your archive has been built successfully, use this code to create the app:
xcodebuild -exportArchive -archivePath build/ios/myProject.xcarchive -exportPath build/ios/ -exportOptionsPlist build/ios/options.plist
Here you use the archive name and path that was used in previous step. exportOptionsPlist needs to know the path and name for your plist configuration that we created in step 3.
And that's it! You can run these commands in a terminal window it will build your app as well. You can put these 2 line in a script file / makefile and use variables for project name, path and options.plist, Then you can use that to build all of your apps.
PS: If anything is unclear please let me know and I will add more explanation.