Flutter构建IPA时返回:exportArchive:“Runner.app”需要一个配置文件。

7
== Building for iOS ==

> xcode-project use-profiles
Configure code signing settings
Searching for files matching /Users/builder/Library/MobileDevice/Provisioning Profiles/*.mobileprovision
Searching for files matching /Users/builder/Library/MobileDevice/Provisioning Profiles/*.provisionprofile
List available code signing certificates in keychain /Users/builder/Library/codemagic-cli-tools/keychains/10-08-22_lujifhgh.keychain-db
Searching for files matching /Users/builder/clone/ios/**/*.xcodeproj
Completed configuring code signing settings
 - Using profile "codemaProfile" [cbbc5bb6-06f7-40cf-9559-50e8663dee93] for target "Runner" [Debug] from project "Runner"
 - Using profile "codemaProfile" [cbbc5bb6-06f7-40cf-9559-50e8663dee93] for target "Runner" [Profile] from project "Runner"
 - Using profile "codemaProfile" [cbbc5bb6-06f7-40cf-9559-50e8663dee93] for target "Runner" [Release] from project "Runner"
Generated options for exporting the project
 - Method: app-store
 - Provisioning Profiles:
     - com.globaltekne.dollsplasticsurgeryapp: codemaProfile
 - Signing Certificate: Apple Distribution
 - Signing Style: manual
 - Team Id: 7T9LTCB672
Saved export options to /Users/builder/export_options.plist

> flutter build ipa --release --export-options-plist /Users/builder/export_options.plist
Running "flutter pub get" in clone...                            1,916ms
Archiving com.golbaltekne.dollsplasticsurgeryapp...
Automatically signing iOS for device deployment using specified development team in Xcode project: 7T9LTCB672
Running pod install...                                           2,605ms
Running Xcode build...                                          
Xcode archive done.                                         107.6s
Built /Users/builder/clone/build/ios/archive/Runner.xcarchive.

 Building with sound null safety 

Building App Store IPA...                                        1,793ms
Encountered error while creating the IPA:
error: exportArchive: "Runner.app" requires a provisioning profile.

Try distributing the app in Xcode: "open /Users/builder/clone/build/ios/archive/Runner.xcarchive"

你能否检查一下你是否使用与本地相同的Xcode和Flutter版本进行构建?并更新帖子中的版本信息。 - Mikhail Tokarev
我正在使用VSCode。 - Adrian Pérez Zaldivar
1个回答

5

在Xcode中打开xcworkspace文件。选择runner并选择应用程序目标。然后选择相关的签名团队。保持启用自动签名选项。然后点击产品->归档。完成后,应该会出现一个窗口(如果没有,请转到Xcode中的窗口-组织器),显示存档。点击分发应用程序,然后选择导出或分发。您可以在分发时选择发布或调试模式。

preview


7
因为我选择了模拟器设备,导致我的“存档”菜单项被禁用。当我选择“任何 iOS 设备”后,该项目变为可用。花了一些时间才发现了我的错误。 - AustrianDude

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接