Flutter signature invalid when tried on an iOS device
EDIT: This is fixed on iOS 13.4, which was released March 24.
This is an iOS 13.3.1 regression unrelated to Flutter. I was able to reproduce the crash without any Flutter or CocoaPods code by creating a new Xcode project, adding a framework target, and choosing a Personal Team provisioning profile.
See GitHub issue: https://github.com/flutter/flutter/issues/49504#issuecomment-581554697.
The bug should not impact Developer Account team provisioning profiles or apps that are already signed and distributed on the App Store.
Unfortunately the only workaround may be to avoid upgrading development devices to 13.3.1 until this is resolved.
- Did you agree to xcode license agreement? if not, try
sudo xcodebuild -license
. - Are your pods updated? if not, navigate to ios folder in the flutter project in your terminal and type
pod install
thenpod update
If this doesn't work, go to the ios folder in your flutter project and open Runner.xcworkspace by double-tapping on it. It should look like this:
When xcode opens, click on Runner on the top left.
Then go to Signing and Capabilities and under the "Team" dropdown, select a field. If none exists, create an account.
Then in the "Bundle Identifier", your app's bundle name should be showing. Add .app in the end. For example, if its "com.example.yourapp" make it "com.example.yourapp.app" and press enter.
Press the play button on top left to run the app on selected device.
As far as I can see it's a Flutter compatibility issue with iOS 13.3.1. In my case, my app runs perfectly fine on iPhone XR with iOS 13.3 but crashes on launch on another iPhone XR with iOS 13.3.1. Can not test in simulator as it's a camera app but it does work on both physical Android devices and Android emulators.