Search code examples
iosfluttercodemagic

Codemagic publish IOS app failed because of "Asset validation failed codemagic ios"


I am creating a workflow in Codemagic for my flutter app.

I have enabled automatic code signing for IOS.

I am able to build the app for both Android and IOS.

In codemagic the android publish is successful but the IOS publish is failing.

Below is the error message in the log. Please help me to resolve this issue.

    {
        "tool-version": "5.4211.13411",
        "tool-path": "\/Applications\/Xcode-13.4.app\/Contents\/SharedFrameworks\/ContentDeliveryServices.framework\/Versions\/A\/Frameworks\/AppStoreService.framework",
        "os-version": "12.5.0",
        "product-errors": [
            {
                "message": "Invalid Provisioning Profile. The provisioning profile included in the bundle *com.project.package.name* [Payload\/Runner.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. With error code STATE_ERROR.VALIDATION_ERROR.90161 for id ######################",
                "userInfo": {
                    "NSLocalizedDescription": "Invalid Provisioning Profile. The provisioning profile included in the bundle *com.project.package.name* [Payload\/Runner.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. With error code STATE_ERROR.VALIDATION_ERROR.90161 for id #####################",
                    "NSLocalizedFailureReason": "Asset validation failed"
                },
                "code": -19208
            }
        ]
    }

Solution

  • you probably use incorrect provisioning profile. Most probably you trying to upload to App Store with Developer Provisioning Profile. Try to change to Distribution Provisioning Profile and see if it helps.