简体   繁体   English

无法执行 flutter build ios

[英]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.因此,我通过flutter clean清理了项目,并尝试通过运行flutter build ios来构建 ios 项目,但是即使我在 ios 模拟器中运行,我也遇到了这个错误。 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 医生:

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我还按照错误建议编辑了签名功能在此处输入图像描述

You should do exactly as the error states.您应该完全按照错误状态进行操作。

  1. Open /{ProjectName}/ios/Runner.xcworkspace打开 /{ProjectName}/ios/Runner.xcworkspace
  2. Click the top level runner file on the left单击左侧的顶级运行器文件
  3. Go to signing & capabilities Go 到签名和功能
  4. Change your team and bundle identifier accordingly.相应地更改您的团队和捆绑包标识符。

Xcode图像

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM