Change FlutterDartProject to keep precedence when looking for the ass… (flutter/engine#6305)
* Change FlutterDartProject to keep precedence when looking for the assets bundle * Change assetsPath to fallback to mainBundle when the defined bundle does not contain assets
This commit is contained in:
committed by
James D. Lin
parent
68476cc445
commit
f74596d2b3
@@ -96,7 +96,11 @@ static blink::Settings DefaultSettingsForProcess(NSBundle* bundle = nil) {
|
||||
// Checks to see if the flutter assets directory is already present.
|
||||
if (settings.assets_path.size() == 0) {
|
||||
NSString* assetsName = [FlutterDartProject flutterAssetsName:bundle];
|
||||
NSString* assetsPath = [mainBundle pathForResource:assetsName ofType:@""];
|
||||
NSString* assetsPath = [bundle pathForResource:assetsName ofType:@""];
|
||||
|
||||
if (assetsPath.length == 0) {
|
||||
assetsPath = [mainBundle pathForResource:assetsName ofType:@""];
|
||||
}
|
||||
|
||||
if (assetsPath.length == 0) {
|
||||
NSLog(@"Failed to find assets path for \"%@\"", assetsName);
|
||||
|
||||
Reference in New Issue
Block a user