flutter开发--打包上传TestFlight 构建版本报错

  • 报错信息
TMS-90034: Missing or invalid signature - The bundle 'xxxxxxxx' at bundle path 'Payload/[Runner.app](http://runner.app/)' is not signed using an Apple submission certificate.
或
ITMS-90338: Non-public API usage - The app references non-public symbols in Frameworks/Flutter.framework/Flutter: _ptrace. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information at [http://developer.apple.com/support/technical/](http://developer.apple.com/support/technical/)
  • 当前开发环境


    flutter环境

解决步骤:

一、检查证书配置是否有问题

1、先检查系统证书“WWDR Certificate”(Apple Worldwide Developer Relations Certificate Authority )有没有过期,如果过期,删掉(一定要删),再单击链接下载 https://developer.apple.com/certificationauthority/AppleWWDRCA.cer 新的“WWDR Certificate”证书并安装。 (注:”登录“和”系统“项下都要检查是否有过期证书)

证书

2、删除之前的证书,从新在你的开发者账号下载新的证书,安装上去。然后设置证书的信任模式,
设置为“使用系统默认”,如果是“总是信任”,这样是上传不了App Store的。(PS:钥匙串里双击证书,既可进入证书详细页面,“信任模式”在这)
证书信任模式

二、清除debug模式产物,然后release模式打包

在开发过程中,一直在构建、调试、测试debug版本。 就可能导致在打包的时候,在Xcode 里设置 release 模式时,此时,Flutter 的产物还是 debug 模式下的产物. 没有删除替换成 release 产物。
1、配置好Xcode相关证书,然后关闭Xcode工程;
2、输入命令:flutter clean
然后删除App.framework 和 Flutter.framework (手动删除即可,后续步骤会重新产生release版的);
3、输入命令:flutter pub get;
4、输入命令:flutter build ios --release;
5、进入Xcode 工程,clean 一遍,检查相关证书配置,版本号等;
6、直接 Xcode Archive 打包IPA 上传 苹果后台;

你可能感兴趣的:(flutter开发--打包上传TestFlight 构建版本报错)