I'm trying to build and export an IPA for TestFlight release. I'm running the build pipeline on Azure DevOps hosted Mac agent so I cannot use Automatic signing. (this is a Flutter app but I'm not sure that's relevant for the specific issue I'm having) This is what happens during my build steps:
CODE_SIGN_IDENTITY= "iPhone Distribution: XXXXX PTY LTD (XXXXXXXXXX)";
PROVISIONING_PROFILE_SPECIFIER = "AppStore Profile";
Step 3 succeeds with ** ARCHIVE SUCCEEDED **
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>signingStyle</key>
<string>manual</string>
<key>teamID</key>
<string>XXXXXXXX</string>
<key>signingCertificate</key>
<string>iPhone Distribution: XXXXX PTY LTD (XXXXXXXXXX)</string>
<key>provisioningProfiles</key>
<dict>
<key>com.myproj.app</key>
<string>AppStore Profile</string>
<key>method</key>
<string>app-store</string>
</dict>
</dict>
</plist>
Step 4 fails with following error:
...Error Domain=IDEProfileQualificationErrorDomain Code=3
"Provisioning profile "AppStore Profile" is not an "iOS App Development" profile."
UserInfo={IDEProfileQualification...
For some reason it's complaining about my "AppStore profile" not being a "development" profile. Obviously I'm trying to create an AppStore IPA for TestFlight release so I don't want to use any "development" certificates or profiles. I can't figure out what I'm doing wrong here. Appreciate any help with this. Thanks!
OK I figured out the mistake. It was due to a wrong format I was using in XcodeTaskExportOptions.plist. I had put the key "method" inside "provisioningProfiles". It should be moved to root level.
The corrected plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>signingStyle</key>
<string>manual</string>
<key>method</key>
<string>app-store</string>
<key>teamID</key>
<string>XXXXXXXX</string>
<key>signingCertificate</key>
<string>iPhone Distribution: XXXXX PTY LTD (XXXXXXXXXX)</string>
<key>provisioningProfiles</key>
<dict>
<key>com.myproj.app</key>
<string>AppStore Profile</string>
</dict>
</dict>
</plist>