公告

👇 微信 👇

图片

欢迎私信交流

Skip to content

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 ​

2. 打包时使用 ExportOptions.plist ​

flutter build ipa --export-options-plist=path/to/ExportOptions.plist

参考资料 ​