From 015f2ea765e7520c109ff8c485b1d686887cef4c Mon Sep 17 00:00:00 2001 From: Andy Weiss <831355+rokob@users.noreply.github.com> Date: Sat, 11 Jul 2020 21:08:27 -0700 Subject: [PATCH] Use the main bundle if the App bundle is not found (#18749) It looks like half the code in this function was updated to use the main bundle but this one line was still only using the _dartBundle. I am pretty sure that is a mistake and instead we want to use the mainBundle as a backup both to find the plist and to find the assets. --- .../darwin/macos/framework/Source/FlutterDartProject.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/platform/darwin/macos/framework/Source/FlutterDartProject.mm b/shell/platform/darwin/macos/framework/Source/FlutterDartProject.mm index 5fc590a4b..1226d392b 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterDartProject.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterDartProject.mm @@ -47,7 +47,7 @@ static NSString* const kAppBundleIdentifier = @"io.flutter.flutter.app"; if (flutterAssetsName == nil) { flutterAssetsName = @"flutter_assets"; } - NSString* path = [_dartBundle pathForResource:flutterAssetsName ofType:@""]; + NSString* path = [assetBundle pathForResource:flutterAssetsName ofType:@""]; if (!path) { NSLog(@"Failed to find path for \"%@\"", flutterAssetsName); } -- GitLab