0

I have a flutter app that I'm porting to ios. After running flutter build ios -v, the process succesfully sets up, installs dependencies, and compiles, but something goes wrong during the build phases.

/Users/liamhp/Library/Developer/Xcode/DerivedData/Runner-aqpqbhigkgvvwqexwsikncfsedsl/Build/Interme diates.noindex/Runner.build/Release-iphoneos/Runner.build/Script-3B06AD1E1E4923F5004D2608.sh Unhandled exception: Null check operator used on a null value ... Result bundle written to path: /var/folders/51/2ypxj09x2tq8m09320t8ghlm0000gn/T/flutter_tools.pEfCUq/flutter_ios_build_temp_dirRNfKNo/temporary_xcresult_bundle The following build commands failed: PhaseScriptExecution Thin\ Binary /Users/liamhp/Library/Developer/Xcode/DerivedData/Runner-aqpqbhigkgvvwqexwsikncfsedsl/Build/Intermedia tes.noindex/Runner.build/Release-iphoneos/Runner.build/Script-3B06AD1E1E4923F5004D2608.sh (in target 'Runner' from project 'Runner') (1 failure) [+110053 ms] └─Compiling, linking and signing... (completed in 131.2s) [ ] Xcode build done. 1464.1s [ +16 ms] executing: xcrun xcresulttool get --path /var/folders/51/2ypxj09x2tq8m09320t8ghlm0000gn/T/flutter_tools.pEfCUq/flutter_ios_build_temp_dirRNfKNo/temporary_xcresult_bundl e --format json { ...(build results dict) ... ... ... "metrics" : { "_type" : { "_name" : "ResultMetrics" }, "errorCount" : { "_type" : { "_name" : "Int" }, "_value" : "1" }, "warningCount" : { "_type" : { "_name" : "Int" }, "_value" : "23" } } } } [ +48 ms] Failed to build iOS app 

I tried to look at the generated /var/folders/51/2ypxj09x2tq8m09320t8ghlm0000gn/T/flutter_tools.pEfCUq/flutter_ios_build_temp_dirRNfKNo/temporary_xcresult_bundle file, but the flutter_tools.pEfCUq folder is empty.

Looking for some insight on how best to debug this. Where should I look to figure out what's actually going wrong here?

    2 Answers 2

    0

    try to do flutter clean Also I recommend to reinstal pods

    sh script:

    flutter clean cd ios/ pod deintegrate pod cache clean --all rm -rf Pods rm Podfile.lock cd .. flutter pub get cd ios pod install --repo-update cd .. 
    1
    • Yeah I've already tried that and it doesn't fix the issue
      – liamhp
      CommentedJun 18, 2024 at 16:20
    0

    My guess is that the error was in some sort of file corruption- I recloned the repo and it's fine now.

      Start asking to get answers

      Find the answer to your question by asking.

      Ask question

      Explore related questions

      See similar questions with these tags.