首页 > 解决方案 > 尝试使用 codemagic 构建我的颤振应用程序时,“App.framework 不支持配置文件”

问题描述

我正在尝试使用codemagic(因为我使用的是Windows机器)构建和发布我的flutter应用程序以用于开发目的(用testmagic对其进行测试)。但是每次我构建应用程序时,该步骤build都会失败,并且会出现以下错误:

Unable to export archive: 2020-01-05 05:46:47.914 xcodebuild[1398:9643] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/r7/d9twdq011sb8d3q1p8f39cdr0000gn/T/Runner_2020-01-05_05-46-47.912.xcdistributionlogs'. error: exportArchive: App.framework does not support provisioning profiles. Error Domain=IDEProvisioningErrorDomain Code=10 "App.framework does not support provisioning profiles." UserInfo={IDEDistributionIssueSeverity=3, NSLocalizedDescription=App.framework does not support provisioning profiles., NSLocalizedRecoverySuggestion=App.framework does not support provisioning profiles, but provisioning profile {Name of the App + ID} has been manually specified. Remove this item from the "provisioningProfiles" dictionary in your Export Options property list.} ** EXPORT FAILED **

provisioningProfiles错误消息中有一部分说我应该从字典中删除和项目:

 Remove this item from the "provisioningProfiles" dictionary in your Export Options property list.

我不明白这是什么意思。我尝试从我的苹果开发者帐户中删除自动生成的配置文件,但这不起作用。


构建设置:

代码魔术构建设置

代码签名设置:

codemagic 代码签名设置

我不知道为什么会这样。我在互联网上发现了一些关于类似问题的 github 问题,但每个问题仍然是开放的并且不活跃,或者对于 xcode 用户,我没有使用 xcode。

标签: iosfluttercodemagic

解决方案


老问题,但我认为这个解决方案应该适用于再次偶然发现这个问题的人。通常这只影响那些试图在没有 Mac 的情况下构建的用户,然后他们编辑他们可以找到的每个“BundleIdentifier”实例。

修复方法是打开您的 AppFrameworksInfo.plist 文件并将 CFBundleIdentifier 更改为 io.flutter.flutter.app 而不是您的包 ID。

<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>

推荐阅读