Flutter 错误:找不到“xxx"的配置文件:Xcode 找不到任何与“xxx"匹配的 iOS 应用开发配置文件 [英] Flutter error: No profiles for ‘xxx’ were found: Xcode couldn’t find any iOS App Development provisioning profiles matching ‘xxx’

查看:102
本文介绍了Flutter 错误:找不到“xxx"的配置文件:Xcode 找不到任何与“xxx"匹配的 iOS 应用开发配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 iPhone 上测试 Flutter 应用,但出现如下所示的错误,此错误发生在构建步骤中.

 错误:找不到xxx"的配置文件:Xcode 找不到任何与xxx"匹配的 iOS 应用开发配置文件.自动签名已禁用且无法生成配置文件.要启用自动签名,请将 -allowProvisioningUpdates 传递给 xcodebuild.(在项目Runner"的目标Runner"中)

运行时遇到这个错误

在调试模式下在测试的 iPhone 上启动 lib/main.dart...警告:缺少构建名称 (CFBundleShortVersionString).警告:缺少内部版本号 (CFBundleVersion).使用Xcode项目中指定的开发团队自动签署iOS设备部署:FF3XTSVPAA需要采取的行动:在提交到 App Store 之前,您必须在 pubspec.yaml 文件版本字段中设置构建名称和编号.运行 Xcode 构建...Xcode 构建完成.7.1s无法构建 iOS 应用程序Xcode 构建的错误输出:↳2020-12-07 16:43:22.754 xcodebuild[58078:524500] DTDeviceKit:来自 49f62dac6f1da634e5d71981db4d591dc9126e4b 的 deviceType 为 NULL2020-12-07 16:43:22.848 xcodebuild[58078:524500] DTDeviceKit:来自 49f62dac6f1da634e5d71981db4d591dc9126e4b 的 deviceType 为 NULL2020年12月7日16:43:27.506 XCBBuildService [58089:524662]无法移除:/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)目录(没有此类文件或构建)** 构建失败 **Xcode 的输出:↳注意:使用新的构建系统注意:规划构建注意:构建构建描述错误:未找到com.duytq.flutterchatdemo"的配置文件:Xcode 找不到任何与com.duytq.flutterchatdemo"匹配的 iOS 应用开发配置文件.自动签名已禁用且无法生成配置文件.要启用自动签名,请将 -allowProvisioningUpdates 传递给 xcodebuild.(在项目Runner"的目标Runner"中)警告:iOS 部署目标IPHONEOS_DEPLOYMENT_TARGET"设置为 7.0,但支持的部署目标版本范围为 8.0 到 13.2.99.(在项目 'Pods' 的目标 'abseil' 中)警告:iOS 部署目标IPHONEOS_DEPLOYMENT_TARGET"设置为 4.3,但支持的部署目标版本范围为 8.0 到 13.2.99.(在项目Pods"的目标nanopb"中)警告:iOS 部署目标IPHONEOS_DEPLOYMENT_TARGET"设置为 7.0,但支持的部署目标版本范围为 8.0 到 13.2.99.(在来自项目Pods"的目标gRPC-C++-gRPCCertificates-Cpp"中)无法为设备构建预编译的应用程序.在 Test 的 iPhone 上启动应用程序时出错.

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

解决方案

其实有几个步骤可以解决这个问题:

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

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

  1. 打开终端并运行这些命令来安装用于将 Flutter 应用程序部署到 iOS 设备的工具.通过运行以下命令

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

  2. 通过运行 flutter run 或单击 Xcode 中的运行"按钮来启动您的应用.

要创建配置文件,请按照 Apple 帮助页面上的说明进行操作.

下载手动配置文件,下载配置文件.>

有关更多信息,请参阅:https://flutter.dev/文档/入门/安装/macos#ios-setup

I am trying to test a Flutter app on an iPhone but I am getting the error shown below, This error happens during a build step.

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')

on run I face this error

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.

How do I make a provisioning profile? What should I do for my app run in iPhone?

解决方案

There are actually steps to solve this:

A provisioning profile is a binary file that you can use to run an app on a device and use its services while it is being developed. To distribute your app to the App Store, you need to create a Distribution Provisioning Profile in order to get it approved by Apple. In this case, your build will be signed with the Production gateway. 

To deploy your Flutter app to a physical iOS device you’ll need to set up physical device deployment in Xcode and an Apple Developer account. If your app is using Flutter plugins, you will also need the third-party CocoaPods dependency manager.

  1. Open the terminal and run these commands to install the tools for deploying Flutter apps to iOS devices. Install and set up CocoaPods by running the following commands:

    sudo gem install cocoapods
    

  2. Follow the Xcode signing flow to provision your project:

    a. Open the default Xcode workspace in your project by running open ios/Runner.xcworkspace in a terminal window from your Flutter project directory.

    b.Select the device you intend to deploy to in the device drop-down menu next to the run button.

    c.Select the Runner project in the left navigation panel.

    d.In the Runner target settings page, make sure your Development Team is selected. The UI varies depending on your version of Xcode.

    • For Xcode 11 and newer, look under Signing & Capabilities > Team.

    When you select a team, Xcode creates and downloads a Development Certificate, registers your device with your account, and creates and downloads a provisioning profile (if needed).

    • To start your first iOS development project, you might need to sign into Xcode with your Apple ID.

    Development and testing is supported for any Apple ID. Enrolling in the Apple Developer Program is required to distribute your app to the App Store. For details about membership types, see Choosing a Membership.

    Then, go to the Settings app on the iOS device, select General > Device Management and trust your Certificate. For first time users, you may need to select General > Profiles > Device Management instead.

    • If automatic signing fails in Xcode, verify that the project’s General > Identity > Bundle Identifier value is unique.

  3. Start your app by running flutter run or clicking the Run button in Xcode.

To create a provisioning profile, follow the instructions on the Apple help page.

Download manual provisioning profiles, download the provisioning profile.

For more info, see: https://flutter.dev/docs/get-started/install/macos#ios-setup

这篇关于Flutter 错误:找不到“xxx"的配置文件:Xcode 找不到任何与“xxx"匹配的 iOS 应用开发配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆