I'm trying to build and export an IPA for an Testflight release. I'm running the build pipeline on iMac This is what happens during my build steps:
I install the "Distribution" certificate and "app profile" on the build machine. ("app profile" was generated using the "Distribution" certificate in Apple developer portal)
Run the "xcodebuild archive" command on the .xcworkspace Step 3 succeeds with ** ARCHIVE SUCCEEDED **
Run the "xcodebuild -exportArchive" command with "-exportOptionsPlist exportOptions.plist". In exportOptions I include that it is an enterprise cert with method enterprise
Step 4 fails with following error:
...Error Domain=IDEProfileQualificationErrorDomain Code=3 "Provisioning profile "app profile" is not an "iOS App Development" profile." UserInfo={IDEProfileQualification... For some reason it's complaining about my "app profile" not being a "development" profile. It was generated by an enterprise cert so I know its not a dev profile
one thing I did notice was that in archive step it was being signed with iOS App Development profile rather than distribution profile
Error came from mismatch in production profile used in exportArchive vs iOS App Development Profile used in archive; solution was to ensure that production profile was used in previous step