title: Automating iOS builds with different Bundle Identifiers
body: <p>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.</p>
  
  <p>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</p>
  
  <pre><code>xcodebuild -workspace &lt;workspace&gt; -scheme &lt;scheme&gt; -configuration Release archive
  </code></pre>
  
  <p>I ran into <a href="https://stackoverflow.com/questions/8562031/xcodebuild-arguments-ignored-when-using-archive">this issue</a>, 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.</p>
  
  <p>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)</p>
  
  <p>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)</p>
  
  <ul>
  <li><strong>CFBundleDisplayName</strong></li>
  <li><strong>CFBundleName</strong></li>
  <li><strong>CFBundleIdentifier</strong> </li>
  </ul>
  
  <p>Normally these values point to an environment variable like <code>${ProductName}</code>, I suppose I could try adding my team's prefix to the BundleIdentifier</p>
  
  <p>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?</p>
  
  <p>Any help would be appreciated.
  ~Thanks</p>