【问题标题】:Flutter error: No profiles for ‘xxx’ were found: Xcode couldn’t find any iOS App Development provisioning profiles matching ‘xxx’Flutter 错误:没有找到“xxx”的配置文件:Xcode 找不到任何匹配“xxx”的 iOS 应用程序开发配置文件
【发布时间】:2021-03-19 09:30:19
【问题描述】:

我正在尝试在 iPhone 上测试 Flutter 应用,但我收到如下所示的错误,此错误发生在构建步骤期间。

error: No profiles for 'xxx' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'xxx'.  Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'Runner' from project 'Runner')

在运行时我遇到了这个错误

Launching lib/main.dart on Test’s iPhone in debug mode...
Warning: Missing build name (CFBundleShortVersionString).
Warning: Missing build number (CFBundleVersion).
Automatically signing iOS for device deployment using specified development team in Xcode project: FF3XTSVPAA
Action Required: You must set a build name and number in the pubspec.yaml file version field before submitting to the App Store.
Running Xcode build...
Xcode build done.                                            7.1s
Failed to build iOS app
Error output from Xcode build:
↳
    2020-12-07 16:43:22.754 xcodebuild[58078:524500]  DTDeviceKit: deviceType from 49f62dac6f1da634e5d71981db4d591dc9126e4b was NULL
    2020-12-07 16:43:22.848 xcodebuild[58078:524500]  DTDeviceKit: deviceType from 49f62dac6f1da634e5d71981db4d591dc9126e4b was NULL
    2020-12-07 16:43:27.506 XCBBuildService[58089:524662] Failed to remove: /Users/pkimac/Library/Developer/Xcode/DerivedData/Runner-aeyppfmredercraizkomsbeyvogn/Build/Intermediates.noindex/XCBuildData/8a97fdf5f2a949e7c436c417eb175882-desc.xcbuild: unlink(/Users/pkimac/Library/Developer/Xcode/DerivedData/Runner-aeyppfmredercraizkomsbeyvogn/Build/Intermediates.noindex/XCBuildData/8a97fdf5f2a949e7c436c417eb175882-desc.xcbuild): No such file or directory (2)
    ** BUILD FAILED **


Xcode's output:
↳
    note: Using new build system
    note: Planning build
    note: Constructing build description
    error: No profiles for 'com.duytq.flutterchatdemo' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.duytq.flutterchatdemo'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'Runner' from project 'Runner')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.2.99. (in target 'abseil' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of supported deployment target versions is 8.0 to 13.2.99. (in target 'nanopb' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.2.99. (in target 'gRPC-C++-gRPCCertificates-Cpp' from project 'Pods')

Could not build the precompiled application for the device.
Error launching application on Test’s iPhone.

如何制作配置文件?我的应用在 iPhone 上运行应该怎么做?

【问题讨论】:

    标签: ios iphone xcode flutter provisioning-profile


    【解决方案1】:

    实际上有解决这个问题的步骤:

    配置文件是一个二进制文件,您可以使用它在设备上运行应用并在开发过程中使用其服务。 要将您的应用程序分发到 App Store,您需要创建分发配置文件以使其获得 Apple 的批准。在这种情况下,您的构建将使用生产网关进行签名。

    要将 Flutter 应用部署到物理 iOS 设备,您需要在 Xcode 和 Apple 开发者帐户中设置物理设备部署。如果您的应用使用 Flutter 插件,您还需要第三方 CocoaPods 依赖管理器。

    1. 打开终端并运行这些命令以安装将 Flutter 应用程序部署到 iOS 设备的工具。 Install and set up CocoaPods 通过运行以下命令:

      sudo gem install cocoapods
      
    2. 按照 Xcode 签名流程配置您的项目:

      一个。通过在 Flutter 项目目录的终端窗口中运行 open ios/Runner.xcworkspace,打开项目中的默认 Xcode 工作区。

      b。在运行按钮旁边的设备下拉菜单中选择您要部署到的设备。

      c。在左侧导航面板中选择Runner 项目。

      d。在 Runner 目标设置页面中,确保选择了您的开发团队。 UI 因您的 Xcode 版本而异。

      • 对于 Xcode 11 和更新版本,请查看Signing & Capabilities > Team.

      当您选择一个团队时,Xcode 会创建并下载开发证书,使用您的帐户注册您的设备,并创建和下载配置文件(如果需要)。

      • 要开始您的第一个 iOS 开发项目,您可能需要使用您的 Apple ID 登录 Xcode。

      任何 Apple ID 都支持开发和测试。需要注册 Apple Developer Program 才能将您的应用程序分发到 App Store。有关会员类型的详细信息,请参阅Choosing a Membership。

      然后,转到 iOS 设备上的“设置”应用,选择 General > Device Management 并信任您的证书。对于初次使用的用户,您可能需要选择General > Profiles > Device Management。

      • 如果在 Xcode 中自动签名失败,请验证项目的 General > Identity > Bundle Identifier 值是否唯一。

    3. 通过运行 flutter run 或单击 Xcode 中的“运行”按钮来启动您的应用程序。

    要创建配置文件,请按照Apple help page 上的说明进行操作。

    下载手动配置文件,下载provisioning profile。

    欲了解更多信息,请参阅:https://flutter.dev/docs/get-started/install/macos#ios-setup

    【讨论】:

      【解决方案2】:

      在 Xcode 中,您需要在单击左侧栏中的项目后在常规设置下添加一个团队。对于其他错误,您需要将项目和包的最低构建目标设置为 8.0,因为最新的 Xcode 和 iOS 版本不支持 iOS 8。希望 Flutter 团队尽快将最低构建更改为 iOS 9,以便手动步骤不是必需的。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-01-28
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-12-25
        • 1970-01-01
        • 2021-10-02
        • 2015-03-16
        相关资源
        最近更新 更多