Skip to content

Commit

Permalink
Revert "Load iOS dart bundle by URL fallback (flutter#22997)" (flutte…
Browse files Browse the repository at this point in the history
…r#23054)

This reverts commit 9df2157.
  • Loading branch information
jmagman committed Dec 14, 2020
1 parent 360a16a commit 2bc94c4
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 2bc94c4

Please sign in to comment.