skip to Main Content

I built a flutter app and am struggling to upload ipa file for testflight now. I built ipa file with following steps:

  1. $ flutter build ios -t lib/main_stg.dart
  2. Get Runner.app from step 1
  3. Create ProjectName folder and put the app file in it
  4. Zip ProjectName folder and rename it ProjectName.ipa
  5. $ xcrun altool –upload-app -f ProjectName.ipa -t ios -u username -p pass

Then got the error after step 5.

*** Error: Error uploading 'ProjectName.ipa'.
*** Error: ERROR ITMS-90174: "Missing Provisioning Profile - Apps must contain a provisioning profile in a file named embedded.mobileprovision." (-18000)

I saw below page and changed "New build system" to "Legacy Build System" at Build System, but am still getting the same error:

Missing Provisioning Profile :Apps must contain a provisioning profile in a file named embedded.mobileprovision

I checked the contents of Runner.app generated at step 2 and found "embedded.mobileprovision" there. However not sure where to check for provisioning profile and how to add it if its missing.

I’m using MacOS Big sur, xcode 12.5.1, flutter 2.3.0-17.0.

2

Answers


  1. Chosen as BEST ANSWER

    After reading Einzeln's answer, I checked xcode settings.

    Firstly, I unticked "Automatically manage signing" and noticed similar error message "Provisioning profile xxx doesn't include signing certiicate" at "Signing Certificate" part.

    I added "Apple Distribution" in Xcode->Preferences->Manage Certificates. Then added profile with "Apple Distribution" in Apple Developer Portal. At this stage (or rebooted mac was necessary?) error message was gone on xcode.

    I still got the same error with xcrun command somehow. However, building from xcode GUI worked this time(It didn't work before so I decided to use command. probably because Provisioning Profile wasn't set). Then build the app->distribute done successfully.


  2. You can check the Provisioning profile in Xcode like image below
    enter image description here

    I’m using Fastlane which will handle sharing provisioning profiles to your team but anyways You can go check in Xcode to see if you download and install provisioning profile correctly. If it’s correct it shouldn’t show any warning or errors

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search