Invalid Provisioning Profile

Hi, I’m trying to publish my app but there is a problem. I get an error like below when I try to upload the ipa file using Transforter. (’****’ is the name of my app)

ERROR ITMS-90161: "Invalid Provisioning Profile. The provisioning profile included in the bundle com.***.*** [Payload/****.app] is invalid. [Missing code-signing certificate]. A Distribution Provisioning profile should be used when submitting apps to the App Store. For more information, visit the iOS Developer Portal."

I followed below step:

  1. Copied “embedded.mobileprovision” to Defold project folder from an archive which was uploaded successfully for previous release in Xcode.

  2. Bundled iOS Application in Defold with that “embedded.mobileprovision”. The code signing identity is “iPhone Distribution” that I was used for previous release. Checked “Sign application”, 32-bit, 64-bit. Variant is “Release”.

  3. Got a bundle successfully. In the bundle folder, I executed below commands:

    security cms -D -i “embedded.mobileprovision” > provision.plist
    /usr/libexec/PlistBuddy -x -c ‘Print :Entitlements’ provision.plist > entitlement.plist
    cp -f “embedded.mobileprovision” “armv7-darwin/****.app/embedded.mobileprovision”
    rm -rf “armv7-darwin/ ****.app/_CodeSignature”
    codesign -s “iPhone Distribution” -f --entitlements entitlement.plist “armv7-darwin/ ****.app”

    cd armv7-darwin
    mkdir Payload
    cp -r ****.app Payload/
    zip -r ****.ipa Payload

  4. The new ipa created successfully. I tried to upload the ipa file then I got the invalid provisioning error.

What step is wrong in this scenario?

Why aren’t you downloading it from the Apple Developer page?

When you bundle in Defold for distribution it should be enough for you to use a valid code signing identity and a distribution profile. There should be no need for any manual steps like you’re doing.

1 Like