I try to build Flutter iOS app and my workflow is as follows:
Flutter release build with --no-codesign option
Fastlane step:
register_devices
fastlane match for ad-hoc
build_app ✘
appcenter_upload
Fastlane’s build_app fails with following error even though match step indicates that all provisioning profiles are installed.
fastlane match finishes with success:
[21:21:31]: All required keys, certificates and provisioning profiles are installed
build_app executes and breaks with error:
[21:21:45]: ▸ Code Signing Error: There are no accounts registered with Xcode. Add your developer account to Xcode
[21:21:45]: ▸ Code Signing Error: No profiles for ‘pl.app.app.test’ were found: Xcode couldn’t find any iOS App Development provisioning profiles matching ‘pl.app.app.test’.
[21:21:45]: ▸ Code Signing Error: Code signing is required for product type ‘Application’ in SDK ‘iOS 12.2’
Also, when building locally with exactly the same commands on my machine (i.e. flutter build and fastlane copied from Bitrise log) everything works fine.
I’ve already connected my Apple Developer account to the Bitrise account but it didn’t help.
I tried to run Certificate and profile installer but with no success.
I also tried to archive the iOS app with Xcode Archive & Export for iOS step (xcode-archive@2.5.0), but it also fails with the error:
Code Signing Error: Code signing is required for product type ‘Application’ in SDK ‘iOS 12.2’
I tried a lot of things and frankly I don’t know what else I can try. Maybe different Apple Developer account? I can provide any further details if url to build is not sufficient.
Sorry to hear about the issue! Have you tried including a development type profile as well? You seem to be missing that in this build and that could likely cause this error
Ok, I exported my p12 file (according to this guide) and mobile provisioning files from Apple developer portal, and then imported them into Bitrise workflow.
One of the errors is as follows, but I connected my Apple account with Bitrise:
Ensure cookies for Apple Developer Portal
Failed to activate the Bitrise Apple Developer Portal connection: %!s(MISSING)
Read more: https://devcenter.bitrise.io/getting-started/signing-up/connecting-apple-dev-account/
errors
Falied to fetch portal data from Bitrise, error: Response status: 404 - Body: {“error_msg”:“No Apple developer account found for this build.”}
I don’t understand why fastlane match is able to download and install all the required profiles, but later when archiving with Xcode it doesn’t work. Maybe multiple schemes defined in my Xcode project are problematic?
I’ll try to switch to manual provisioning in Xcode and push changes to repository.
Oh I see, this message about your Developer Portal was printed out by the fastlane step as a bug, sorry about that!
But otherwise your fastlane match command seemed to have failed, also if I’m correct uploading your p12 on Bitrise wouldn’t have an effect on this build since you’re still using the match to import them from another repo