ios - Flutter 在 Xcode 上运行,但不能在 VS Code 上运行

标签 ios xcode flutter

我正在尝试在 VS Code 中的真实 iOS 设备中运行我的应用程序,但我遇到了有关配置文件的错误,我已经将我的配置文件设置为自动,并设置了我的开发团队,一切都在 Xcode 中运行,但是不在 VS Code 中。

这里是错误:

No Provisioning Profile was found for your project's Bundle Identifier or your 
device. You can create a new Provisioning Profile for your project in Xcode for 
your team 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- In the 'General' tab, make sure a 'Development Team' is selected. 
    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

It's also possible that a previously installed app with the same Bundle 
Identifier was signed with a different certificate.

For more information, please visit:
 https://flutter.dev/setup/#deploy-to-ios-devices

Or run on an iOS simulator without code signing
════════════════════════════════════════════════════════════════════════════════
2020-01-09 10:18:45.163 ios-deploy[43201:5238881] [ !! ] Error 0xe8008015: A valid provisioning profile for this executable was not found. AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)
Could not install build/ios/iphoneos/Runner.app on 2fd298b64f27b47f0917050a9f7ec70cdc98f033.
Try launching Xcode and selecting "Product > Run" to fix the problem:
 open ios/Runner.xcworkspace

Xcode 版本 11.3

我已经选中自动管理签名

enter image description here


解决方案

  1. 在 flutter 项目上运行“flutter clean”
  2. 在 xcode 中 -> 构建 -> 清理
  3. 运行“flutter构建包”

最佳答案

这些步骤效果很好

  1. 运行“flutter clean”
  2. 在 xcode 中的 flutter 项目上 -> 构建 -> 清理
  3. 运行“flutter构建包”

关于ios - Flutter 在 Xcode 上运行,但不能在 VS Code 上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59668369/

相关文章:

android - 带有操作按钮的 Flutter 本地通知

flutter - 如何在Flutter中创建轮廓过滤芯片

objective-c - 使用 Facebook Scrumptious 应用示例代码

ios - NSUserDefaults-保存UIImageView位置

c - 从 UITextField 获取文本然后将其放入外部类的最佳方法是什么?

Swift - 获取当前在另一个应用程序中打开的文档的文件路径

flutter - 如何在 flutter 中动态降低 bottomsheet 高度?

ios - Xcode 6 按键绑定(bind)目录

ios - XCode4 使用接口(interface)生成器声明变量

iphone - 在标签栏 Controller 中制作几乎相似的标签的最佳方法