From 4942e7faad2e385c9507540ccd388a71fa51acc2 Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Mon, 21 Dec 2020 13:51:58 -0800 Subject: [PATCH] Load App.framework in macOS app (flutter/engine#23221) --- .../darwin/macos/framework/Source/FlutterDartProject.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterDartProject.mm b/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterDartProject.mm index 0716c1a2ddc..4081c44dbe8 100644 --- a/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterDartProject.mm +++ b/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterDartProject.mm @@ -32,6 +32,9 @@ static NSString* const kAppBundleIdentifier = @"io.flutter.flutter.app"; _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