diff --git a/shell/platform/darwin/macos/framework/Source/FlutterDartProject.mm b/shell/platform/darwin/macos/framework/Source/FlutterDartProject.mm index 0716c1a2ddc24..4081c44dbe8c7 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterDartProject.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterDartProject.mm @@ -32,6 +32,9 @@ - (instancetype)initWithPrecompiledDartBundle:(NSBundle*)bundle { _dartBundle = [NSBundle bundleWithURL:[NSBundle.mainBundle.privateFrameworksURL URLByAppendingPathComponent:@"App.framework"]]; } + if (!_dartBundle.isLoaded) { + [_dartBundle load]; + } _dartEntrypointArguments = [[NSProcessInfo processInfo] arguments]; // Remove the first element as it's the binary name _dartEntrypointArguments = [_dartEntrypointArguments