Flutter build error for IOS, Command PhaseScriptExecution failed with a nonzero exit code

Viewed 348

I'm trying to build an archive using flutter build ipa command but it throws an error

Logs

flutter build ipa

Running Xcode build...                                                  
Xcode archive done.                                         170.1s
Failed to build iOS app
Error output from Xcode build:
↳
    objc[32852]: Class AppleTypeCRetimerRestoreInfoHelper is implemented in both /usr/lib/libauthinstall.dylib (0x1f6201eb0) and
    /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1069584f8). One of the two will be used. Which one is undefined.
    objc[32852]: Class AppleTypeCRetimerFirmwareAggregateRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x1f6201f00) and
    /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x106958548). One of the two will be used. Which one is undefined.
    objc[32852]: Class AppleTypeCRetimerFirmwareRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x1f6201f50) and
    /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x106958598). One of the two will be used. Which one is undefined.
    objc[32852]: Class ATCRTRestoreInfoFTABFile is implemented in both /usr/lib/libauthinstall.dylib (0x1f6201fa0) and
    /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1069585e8). One of the two will be used. Which one is undefined.
    objc[32852]: Class AppleTypeCRetimerFirmwareCopier is implemented in both /usr/lib/libauthinstall.dylib (0x1f6201ff0) and
    /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x106958638). One of the two will be used. Which one is undefined.
    objc[32852]: Class ATCRTRestoreInfoFTABSubfile is implemented in both /usr/lib/libauthinstall.dylib (0x1f6202040) and
    /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x106958688). One of the two will be used. Which one is undefined.
    ** ARCHIVE FAILED **


Xcode's output:
↳
/// lots of warning logs
/// lots of warning logs
    error: the following command failed with exit code 0 but produced no further
    output
    CompileC
    /Users/sajad/Library/Developer/Xcode/DerivedData/Runner-ecujwaxhibdtbnaqbhdn
    srezcqzv/Build/Intermediates.noindex/ArchiveIntermediates/Runner/Intermediat
    eBuildFilesPath/Pods.build/Release-iphoneos/agora_rtc_engine.build/Objects-n
    ormal/arm64/CallApiMethodCallHandler.o
    /Users/sajad/.pub-cache/hosted/pub.dartlang.org/agora_rtc_engine-5.1.1/ios/C
    lasses/CallApiMethodCallHandler.mm normal arm64 objective-c++
    com.apple.compilers.llvm.clang.1_0.compiler (in target 'agora_rtc_engine'
    from project 'Pods')
    In file included from
    /Users/sajad/.pub-cache/hosted/pub.dartlang.org/agora_rtc_engine-5.1.1/ios/C
    lasses/AgoraTextureViewFactory.mm:3:
    /Users/sajad/Library/Developer/Xcode/DerivedData/Runner-ecujwaxhibdtbnaqbhdn
    srezcqzv/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProduc
    tsPath/Release-iphoneos/XCFrameworkIntermediates/AgoraIrisRTC_iOS/AgoraRtcWr
    apper.framework/Headers/iris_video_processor.h:77:13: warning: parameter
    'uid' not found in the function declaration [-Wdocumentation]
       * @param uid The user ID you want to cache.
                ^~~
    /Users/sajad/Library/Developer/Xcode/DerivedData/Runner-ecujwaxhibdtbnaqbhdn
    srezcqzv/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProduc
    tsPath/Release-iphoneos/XCFrameworkIntermediates/AgoraIrisRTC_iOS/AgoraRtcWr
    apper.framework/Headers/iris_video_processor.h:77:13: note: did you mean
    'config'?
       * @param uid The user ID you want to cache.
                ^~~
                config
    /Users/sajad/Library/Developer/Xcode/DerivedData/Runner-ecujwaxhibdtbnaqbhdn
    srezcqzv/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProduc
    tsPath/Release-iphoneos/XCFrameworkIntermediates/AgoraIrisRTC_iOS/AgoraRtcWr
    apper.framework/Headers/iris_video_processor.h:78:13: warning: parameter
    'channel_id' not found in the function declaration [-Wdocumentation]
       * @param channel_id The channel ID.
                ^~~~~~~~~~
    /Users/sajad/Library/Developer/Xcode/DerivedData/Runner-ecujwaxhibdtbnaqbhdn
    srezcqzv/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProduc
    tsPath/Release-iphoneos/XCFrameworkIntermediates/AgoraIrisRTC_iOS/AgoraRtcWr
    apper.framework/Headers/iris_video_processor.h:78:13: note: did you mean
    'config'?
       * @param channel_id The channel ID.
                ^~~~~~~~~~

/// lots of warning logs


    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in parallel

    Result bundle written to path:
        /var/folders/73/dmwgl2ks3j19zj0n43l_1mkh0000gn/T/flutter_tools.czQYfU/flutter_ios_build_temp_dir0ORaS7/temporary_xcresult_bundle


What I've tried

  • flutter clean
  • Cleaning Xcode derived data
  • Updating flutter to 3.0.1
  • Reimporting GoogleService-Info.plist
  • Removing Pods, Podfile.lock
  • Updating IOS minimum version to 13
  • sudo arch -x86_64 gem install ffi
  • pod install, pod deintegrate, pod update
  • Updating firebase configuration using flutterfire_cli and adding a new flutter app in firebase
  • Adding platform package to pubspec

Environment

  • Cpu M1
  • Xcode 13.1
0 Answers
Related