Fixing `No profiles for my_app were found: Xcode couldn't find any iOS App Development provisioning profiles matching my_app.`
After finally managing to compile my Flutter app again in iOS, now it's the publishing process that fails:
error: No profiles for [my_app] were found: Xcode couldn't find any iOS App Development provisioning profiles matching [my_app]. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'Runner' from project 'Runner')
Running XCode, and going into the Signing config tab, I see that I got signed out because the last sign in expired. I sign in, and here's what I get:
So I go to https://appstoreconnect.apple.com/, sign in, and see this popup.
Turns out I should have gone to https://developer.apple.com/account instead!
So it turns out the big change in the policy was:
iPhone and iPad apps on Mac. All iPhone apps and iPad apps that run on Apple silicon Macs will be published automatically on the Mac App Store, unless you edit their availability.
That's actually really cool. One day I might be able to run my native iOS app on a MacBook with the right chip.
So I go back to XCode, click "Try again". And after spinning for a few seconds, the red is gone!
I try to upload again with FastLane. This time, it goes a bit further, but still fails, with this error:
error: exportArchive: No signing certificate "iOS Distribution" found
I go back to XCode, disable automatic signing, and pick a Provisioning Profile I created long ago.
It says my profile is missing a "Apple Distributon" signing certificate. I go to https://developer.apple.com/account/resources/profiles/list, and check, and indeed, it only has an iOS Distribution signing certificate. Is this also related to the fact that in the future, my app may be published to the Mac App Store? So, I add this, go back to XCode, and this time it's happy. Let's try to deploy it again.
Yep, it worked!!