title: Specify Provisioning Profile for AdHoc IPA export with Xcode 8.3.2
body: <p>Yesterday I have upgraded from Xcode 8.1 to 8.3.2 and of course all my CI build infrastructure failed again (thanks Apple, you always know how to make me even more busier!).</p>
  
  <p>So, the main destructive change is that <code>-exportProvisioningProfile</code> is no longer a valid option. As I understand they're now forcing us to use <code>-exportOptionsPlist</code> instead.</p>
  
  <p>I already configured exporting for one of my apps to use .plist file with <code>app-store</code> method for market only.
  For any AdHoc exports I was happy to use <code>-exportProvisioningProfile "$PROVISIONING_PROFILE"</code>. No idea why Apple decided it is bad.</p>
  
  <p>Hence, now I have to modify my automated build script to use .plist file for ANY exports.</p>
  
  <p>I was able to find out from <code>xcodebuild -help</code> and from other questions here on SO that I need to set method to <code>ad-hoc</code> for internal distribution. Okay, this is easy, but...</p>
  
  <p><strong>how the hell can I specify the exact provisioning profile to be used for IPA export?</strong></p>
  
  <p>I am able to choose the desired profile when exporting from GUI, so I believe there should be some way to pass it to <code>xcodebuild</code>. However, I still haven't found any ways to do this on the web.</p>
  
  <p>Thanks in advance guys.</p>
  
  <hr>
  
  <p>p.s. please don't suggest to use automatic profile management, I have several profiles for exporting dedicated to their own purposes, I need to say which one of them to use in particular situation explicitly (my bash script defines it when build process starts).</p>