Xcode 26.2 fails building Flutter iOS app – xcode_backend.dart null exception

Hello,

after updating macOS to 26.2 and Xcode to 26.2 (Build 17C52), I am unable to build a Flutter iOS application for the simulator. Environment:

macOS 26.2 (darwin-arm64)

Xcode 26.2 (17C52)

Flutter 3.38.7 (stable)

Dart 3.10.7

CocoaPods 1.16.2

Target device: iPhone 16e Simulator (iOS 26.x)

Issue:

The build fails during the Flutter Xcode build phase with this error:

Unhandled exception: Null check operator used on a null value #0 Context._embedNativeAssets (file:///opt/homebrew/share/flutter/packages/flutter_tools/bin/xcode_backend.dart:341) Command PhaseScriptExecution failed with a nonzero exit code.

Additional info: Runner target uses Pods-Runner.debug/profile/release.xcconfig correctly SUPPORTED_PLATFORMS = iphoneos iphonesimulator SDKROOT resolves to iPhoneOS26.2.sdk even when building for simulator Build Settings and Run Script phases are default Flutter-generated Issue occurs both via flutter run and directly from Xcode Project worked before macOS/Xcode update It appears Xcode 26.2 may be resolving SDKROOT or build environment incorrectly for Flutter projects, causing Flutter’s xcode_backend.dart to crash.

Could you please advise whether this is a known issue or requires a workaround?

Thank you. Best regards

David

Thanks for the post. And thank you for providing such a detailed description of your issue, including the exact error message and your environment setup. This is very helpful.

Looking at the error and doing some quick research. Please note I do not know anything about Flutter. Unhandled exception: Null check operator used on a null value #0 Context._embedNativeAssets (file:///opt/homebrew/share/flutter/packages/flutter_tools/bin/xcode_backend.dart:341) Command PhaseScriptExecution failed with a nonzero exit code. seems to indicates a problem within Flutter's build script (xcode_backend.dart) when it tries to embed native assets? This type of error often arises when Flutter expects a certain value or environment variable to be present during the Xcode build phase, but it's either missing or null, possibly due to a change in Xcode's build environment or a cached state?

You should check with the support resources provided by the 3rd party to get assistance with their software.

Unless another developer in the forums has experience with the third-party and can provide assistance. But I think this question is better directed to their support channels.

Albert Pascual
  Worldwide Developer Relations.

Xcode 26.2 fails building Flutter iOS app – xcode_backend.dart null exception
 
 
Q