Codemagic iOS Flutter deploy fails on archive

2.1k Views Asked by At

I have a question where and how to add allowProvisioningUpdates in Xcode? My Codemagic account is connected with App Store Connect, bundle id and app are also created.

Build process fails on the app archive, but Xcode build is successfully done.

Can I somehow add allowProvisioningUpdates to this command?

Execute "xcodebuild -workspace /Users/builder/clone/ios/Runner.xcworkspace -scheme Runner -config Release -archivePath build/ios/xcarchive/Runner_1pxkp9aq.xcarchive archive COMPILER_INDEX_STORE_ENABLE=NO"

Every time build process returns me this message after fail:

  Error: No profiles for 'com.xxx.xxx' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.xxx.xxx'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'Runner' from project 'Runner')

Do you have some suggestions, on how to resolve this?

Thanks.

1

There are 1 best solutions below

1
On BEST ANSWER

The error itself is probably actually unrelated, and adding the flag will not change much.

If you're using .yaml and are trying to set up automatic code signing I would encourage you to add xcode-project use-profiles before your build step.

For automatic .yaml code signing with Flutter iOS the workflow should include:

a) keychain initialize

b) app-store-connect fetch-signing-files "your.bundle.id" --type IOS_APP_STORE --create

If you wish to use development certificate then IOS_APP_DEVELOPMENT as type.

d) keychain add-certificates

e) xcode-project use-profiles

f) flutter build ios

g) xcode-project build-ipa --workspace "ios/Runner.xcworkspace" --scheme "Runner" (change to your workspace and scheme)

In addition you should implement versioning, if you do not want to do it manually for each build.

If you're not using automatic code signing, then you will need to upload your provisioning profile and the process will be a bit different. But the process is somewhat similar, you can take a look at the documentation: https://docs.codemagic.io/code-signing-yaml/signing-ios/