iosxcodeapp-store-connectcode-signingcodemagic

iOS Code Signing Error with manual signing


I am facing issues with iOS signing when building my app using Codemagic, but the build works perfectly on my local Mac using automatic code signing.

  1. Codemagic Configuration: Codemagic is connected to my developer portal, and I have created an iOS certificate directly through Codemagic. I also selected the correct provisioning profile available.
  2. Error Message: When trying to build the app in Codemagic, I encounter the following error:

Code Signing Error: "error: exportArchive "Runner.app" requires a provisioning profile with the Associated Domains, Push Notifications, and Sign in with Apple features."

  1. I’ve double-checked in the Apple Developer portal (developer.apple.com) under "Identifiers and Capabilities," and I can confirm that all the necessary capabilities — Associated Domains, Push Notifications, and Sign in with Apple — are activated for the app’s bundle identifier.

Steps I’ve Taken:

name: Initialize keychain
  script: |
    keychain initialize
name: Add certificates to keychain
  script: |
    keychain add-certificates
name: Set up code signing settings on Xcode project
  script: |
    xcode-project use-profiles
name: Install pods
  script: |
    find . -name "Podfile" -execdir pod install ;
name: Flutter build ipa and automatic versioning
  script: |
    flutter build ipa --flavor production --release \
--build-name=1.0.0 \
--build-number=$(($(app-store-connect get-latest-testflight-build-number "$APP_ID") + 1))
--export-options-plist=/Users/builder/export_options.plist

What am I missing or doing wrong here?


Solution

  • I fixed it adding a \ after the --build-number argument... that was missing