Use the main bundle if the App bundle is not found (flutter/engine#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.
This commit is contained in:
Andy Weiss
2020-07-11 21:08:27 -07:00
committed by GitHub
parent b81f1d369c
commit d498287222

View File

@@ -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);
}