Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force Flutter to use new developer certificate?

I am currently developing an application with Flutter. I used to be able to run the code directly using VS code or the command flutter run. Ever since I revoked my developer certificate and generated a new one, the above options when executed, the app crashes on my iPhone. If, however, I run it on the simulator, it works as expected.

I suspect that this is due to the change in certificates. Xcode says my app is signed with the certificate B39****** where as flutter run says it is signing with 578*******

I have even tried flutter config --clear-ios-signing-cert as well as flutter upgrade and it still signs with 578.

How can I force flutter to sign my app with the new certificate? Currently, this means I cannot use the hot reload feature on my physical devices.

like image 253
iProgram Avatar asked Sep 09 '18 11:09

iProgram


2 Answers

I think check this file vim ~/.flutter_settings will be well.

{
  "ios-signing-cert": "Apple Development: [email protected] (XXXXXXXX)",
  "enable-macos-desktop": true
}
like image 161
Serendipity Avatar answered Sep 19 '22 13:09

Serendipity


Run flutter config to see your current settings and a certificate choice applied.

To clear the choice according to the documentation you can run:

flutter config --clear-ios-signing-cert.

--clear-ios-signing-cert Clear the saved development certificate choice used to sign apps for iOS device deployment.

Flutter 2.0.5.

like image 22
Kyrylo Zapylaiev Avatar answered Sep 19 '22 13:09

Kyrylo Zapylaiev