From d9ab3cd09948739c01d2e5707162a0fda0d33923 Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Mon, 14 Dec 2020 12:01:39 -0800 Subject: [PATCH] Revert "Load iOS dart bundle by URL fallback (#22997)" This reverts commit 9df2157676abbdfbd3303327b59b1492a5d5769a. --- .../ios/framework/Source/FlutterDartProject.mm | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm b/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm index cb2e70bf96728..d22a9684f3b2a 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm @@ -43,11 +43,6 @@ if (bundle == nil) { bundle = [NSBundle bundleWithIdentifier:[FlutterDartProject defaultBundleIdentifier]]; } - if (bundle == nil) { - // The bundle isn't loaded and can't be found by bundle ID. Find it by path. - bundle = [NSBundle bundleWithURL:[NSBundle.mainBundle.privateFrameworksURL - URLByAppendingPathComponent:@"App.framework"]]; - } if (bundle == nil) { bundle = mainBundle; } @@ -244,16 +239,11 @@ + (NSString*)flutterAssetsName:(NSBundle*)bundle { bundle = [NSBundle bundleWithIdentifier:[FlutterDartProject defaultBundleIdentifier]]; } if (bundle == nil) { - // The bundle isn't loaded and can't be found by bundle ID. Find it by path. - bundle = [NSBundle bundleWithURL:[NSBundle.mainBundle.privateFrameworksURL - URLByAppendingPathComponent:@"App.framework"]]; + bundle = [NSBundle mainBundle]; } NSString* flutterAssetsName = [bundle objectForInfoDictionaryKey:@"FLTAssetsPath"]; - if (bundle == nil) { - bundle = [NSBundle mainBundle]; + if (flutterAssetsName == nil) { flutterAssetsName = @"Frameworks/App.framework/flutter_assets"; - } else if (flutterAssetsName == nil) { - flutterAssetsName = @"flutter_assets"; } return flutterAssetsName; }