I don't want to get too detailed in what I'm using this for but basically I have a python script that will download content for an application into a linked folder in the Xcode project. This script also has information on what the name of the application should be along with other details.
Currently I just have the script download the files, and make changes to the Info.plist file, including the bundle identifier which I manually generate. After that I run
xcodebuild -workspace <workspace> -scheme <scheme> -configuration Release archive
I ran into this issue, which was causing it to build and archive the debug configuration so I basically deleted that configuration and now it builds with the release configuration.
The process does put a new item in my organizer in the Archives tab; however, if I try to install it on my device (which has a provision profile for any bundle for my team) I get the 'No valid provision file for this executable was found' error. I've tried signing it with my developer and distribution profiles (both are set to wildcards to match any bundle identifier)
Right now there's only 3 things I change in the Info.plist (I'll eventually have to modify the Icon files and possibly splash screen but that can wait for now)
Normally these values point to an environment variable like ${ProductName}
, I suppose I could try adding my team's prefix to the BundleIdentifier
I suppose what I'm mainly asking is, do I need to set anything else? Do I need to create/download provision files from Apple for the specific application? Should I look into creating new Targets for each application instead of hacking the project Info.plist to create a new application archive?
Any help would be appreciated. ~Thanks
It appears that when you archive you should sign with your developer certificate. XCode's archive tab will then sign it appropriately (probably overwriting any previous signing) when you click the Distribute... button (either App Store or Ad Hoc). It won't do App Store (not even Verify) until you have created and filled in the details at iTunesConnect and it is in the 'Ready for Binary Upload' state.
In short I haven't found an easy way to take an archive file and load it directly onto a test device. You will have use the distribute functionality with an Ad Hoc provision and then install that to the device. Fortunately, if you use wildcard provisions you can enter the bundle identifier manually at iTunesConnect so there's no need to create and download new provision files using this functionality.