dart Flutter:无法构建iOS应用程序“ARCHIVE FAQUE”,在为设备存档时遇到错误

uqzxnwby  于 5个月前  发布在  Flutter
关注(0)|答案(2)|浏览(86)

我试图生成ipa文件上传到应用程序商店,但不幸的是,它失败了,并说“遇到错误,而存档设备”.我也尝试了从Xcode的插件,但,存档失败了.它在iOS模拟器中工作得很好(13)
无法构建iOS应用程序Xcode生成错误输出:ARCHIVE FAQURY
Xcode的输出:写入结果包的路径:

/var/folders/8s/2st2j0d97k7cm80h3968jnx80000gn/T/flutter_tools.ph1v
            kd/flutter_ios_build_temp_dirZbRdRw/temporary_xcresult_bundle
    
        error: the following command failed with exit code 0 but produced no
        further output
        CompileC
        
Failed to package /Users/sunsoft/Downloads/alifpet-app-master.
    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order
    /Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
    set to 8.0, but the range of supported deployment target versions is
    9.0 to 15.2.99. (in target 'Sodium' from project 'Pods')
    /Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
    set to 8.0, but the range of supported deployment target versions is
    9.0 to 15.2.99. (in target 'ReachabilitySwift' from project 'Pods')
    /Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
    set to 8.0, but the range of supported deployment target versions is
    9.0 to 15.2.99. (in target 'Starscream' from project 'Pods')
    /Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
    set to 6.0, but the range of supported deployment target versions is
    9.0 to 15.2.99. (in target 'Reachability' from project 'Pods')
    /Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
    set to 7.0, but the range of supported deployment target versions is
    9.0 to 15.2.99. (in target 'AppAuth' from project 'Pods')
    /Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
    set to 8.0, but the range of supported deployment target versions is
    9.0 to 15.2.99. (in target 'PusherSwiftWithEncryption' from project
    'Pods')
    /Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
    set to 8.0, but the range of supported deployment target versions is
    9.0 to 15.2.99. (in target 'GoogleSignIn' from project 'Pods')
    /Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
    set to 8.0, but the range of supported deployment target versions is
    9.0 to 15.2.99. (in target 'AgoraRtcEngine_iOS' from project 'Pods')

    Result bundle written to path:
        /var/folders/8s/2st2j0d97k7cm80h3968jnx80000gn/T/flutter_tools.ph1v
        kd/flutter_ios_build_temp_dirZbRdRw/temporary_xcresult_bundle
    
    Encountered error while archiving for device.

字符串

yhuiod9q

yhuiod9q1#

这里的问题是,Flutter模板默认创建的Podfile没有特定的iOS版本设置。
请执行以下操作以解决此问题:
1.在项目的ios/文件夹中,打开Podfile
1.在Podfile的顶部,确保这一行被not注解掉,并将iOS版本更改为12.0。
变更自:

#platform :ios, '8.0'

字符串
收件人:

platform :ios, '12.0'


1.在项目的ios/文件夹中的Terminal中运行pod deintegrate
1.在ios/文件夹中运行pod install --repo-update
这应该可以了!
如果在此之后,您得到以下错误
CocoaPods未设置项目的基本配置,因为您的项目已经有自定义配置集。为了使CocoaPods集成工作,请设置目标的基本配置
然后你需要在Xcode中打开你的iOS工作区,在左上角选择你的根项目,然后在Info选项卡中选择你的配置(在本例中是configuration)并将其更改为None。之后,再次执行pod install。
x1c 0d1x的数据

ig9co6j1

ig9co6j12#

我的情况有点不同,我甚至不能构建它,错误消息是“PhaseScriptExecution failed with a nonzero exit code”,而我使用Xcode构建它,所以我从https://stackoverflow.com/a/75976213/1603455遵循@Taimoor Sikander解决方案
然后flutter build ipa在VSCode终端上成功运行。希望对您有帮助。

相关问题