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

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

问题描述

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

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

在运行中,我会遇到此错误

 在调试模式下在Test的iPhone上启动lib/main.dart ...警告:缺少版本名称(CFBundleShortVersionString).警告:缺少内部版本号(CFBundleVersion).使用Xcode项目中的指定开发团队为设备部署自动签名的iOS:FF3XTSVPAA必需的操作:在提交到App Store之前,必须在pubspec.yaml文件版本字段中设置内部版本名称和编号.正在运行Xcode构建...Xcode构建完成.7.1秒无法构建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-07 16:43:27.506 XCBBuildService [58089:524662]无法删除:/Users/pkimac/Library/Developer/Xcode/DerivedData/Runner-aeyppfmredercraizkomsbeyvogn/Build/Intermediates.noindex/XCBuildData/8a97fdf5f2a949e7c436:取消链接(/Users/pkimac/Library/Developer/Xcode/DerivedData/Runner-aeyppfmredercraizkomsbeyvogn/Build/Intermediates.noindex/XCBuildData/8a97fdf5f2a949e7c436c417eb175882-desc.xcbuild):没有此类文件或目录(2)**建立失败**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 Developer帐户中设置物理设备部署.如果您的应用程序使用Flutter插件,则还需要第三方CocoaPods依赖项管理器.

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

    任何Apple ID均支持开发和测试.必须注册Apple Developer Program才能将您的应用分发到App Store.有关会员类型的详细信息,请参见

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

要创建配置文件,请遵循 Apple帮助页面.

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

有关更多信息,请参见: https://flutter.dev/docs/get-started/install/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 App Development设置配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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