exportArchive Runnerapp requires a provisioning profile with the Push Notifications feature
问题描述
- flutter 项目,使用
ad hoc类型配置文件 - 目标为打包生成 ipa 安装包,上传至蒲公英分发平台,以供测试人员使用
- 运行命令
flutter build ipa,报错信息如下
error: exportArchive "Runner.app" requires a provisioning profile with the Push Notifications feature.原因分析
ad hoc配置文件关联的应用没有启用 Push Notifications 功能;no- 使用
ad hoc配置文件时,打包的命令为flutter build ipa --export-method ad-hoc;no
使用 ad hoc 配置文件打包时,必须使用 ExportOptions.plist 文件
解决方案
1. 生成 ExportOptions.plist
- 执行下述教程中的第四步
4.重新打包 IPA,使用 xcode 手动打包,生成 ExportOptions.plist 文件 - 蒲公英 - 文档中心 - 向安装包中添加设备 UDID
2. 打包时使用 ExportOptions.plist
flutter build ipa --export-options-plist=path/to/ExportOptions.plist
