Rishikrishna
Rishikrishna

Reputation: 323

Unable to perform flutter build ios

I was facing a dependency issue while trying to run the application. So, I cleaned the project through flutter clean and I tried to build the ios project by running flutter build ios, but I got this error even though I'm running in my ios emulator. I would be glad to receive any solution.

No valid code signing certificates were found
You can connect to your Apple Developer account by signing in with your Apple ID
in Xcode and create an iOS Development Certificate as well as a Provisioning 
Profile for your project by:
  1- Open the Flutter project's Xcode target with
       open ios/Runner.xcworkspace
  2- Select the 'Runner' project in the navigator then the 'Runner' target
     in the project settings
  3- Make sure a 'Development Team' is selected. 
     - For Xcode 10, look under General > Signing > Team.
     - For Xcode 11 and newer, look under Signing & Capabilities > Team.
     You may need to:
         - Log in with your Apple ID in Xcode first
         - Ensure you have a valid unique Bundle ID
         - Register your device with your Apple Developer Account
         - Let Xcode automatically provision a profile for your app
  4- Build or run your project again
  5- Trust your newly created Development Certificate on your iOS device
     via Settings > General > Device Management > [your new certificate] > Trust

For more information, please visit:
  https://developer.apple.com/library/content/documentation/IDEs/Conceptual/
  AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html

Or run on an iOS simulator without code signing
════════════════════════════════════════════════════════════════════════════════
No development certificates available to code sign app for device deployment

flutter doctor:

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.5.0, on macOS 11.5.2 20G95 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.60.0)
[✓] Connected device (2 available)

• No issues found!

I've also editing the signing capabilities as the error recommends enter image description here

Upvotes: 15

Views: 21578

Answers (3)

Muhammad Faisal
Muhammad Faisal

Reputation: 906

You are trying to run a project by signing the application, even though you don't have an Apple Developer account, even though this is required. You just need to run flutter run --debug in the terminal, and it should run smoothly and run in debug mode

In my case, the application code was already signed with the previous application signature and it stuck. You can run the command flutter config to see all the options, and run the command flutter config --clear-ios-signing-cert to clear the previous signature via the terminal

Upvotes: 1

Ankit Dhattarwal
Ankit Dhattarwal

Reputation: 1

Signing for "Runner" requires a development team. Select a development team in the Signing & Capabilities editor.

Upvotes: 0

user14280337
user14280337

Reputation:

You should do exactly as the error states.

  1. Open /{ProjectName}/ios/Runner.xcworkspace
  2. Click the top level runner file on the left
  3. Go to signing & capabilities
  4. Change your team and bundle identifier accordingly.

Xcode image

Upvotes: 18

Related Questions