From 45ce7ba63f848307a90c9ee860504050ae679da8 Mon Sep 17 00:00:00 2001 From: Alexander Aprelev Date: Fri, 26 Jan 2018 13:45:04 -0800 Subject: [PATCH] Lookup FTLAssetsPath when deducing assets path on ios (flutter/engine#4593) * Lookup FTLAssetsPath when deducing assets path on ios * WS * Proper fix * Another whitespace fix --- .../darwin/ios/framework/Source/flutter_main_ios.mm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/flutter_main_ios.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/flutter_main_ios.mm index cec3668d84..9a6896d1e9 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/flutter_main_ios.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/flutter_main_ios.mm @@ -15,7 +15,12 @@ void FlutterMain() { NSBundle* mainBundle = [NSBundle mainBundle]; - NSString* flutterAssetsPath = [mainBundle pathForResource:@"flutter_assets" ofType:nil]; + NSString* flutterAssetsName = [mainBundle objectForInfoDictionaryKey:@"FLTAssetsPath"]; + if (flutterAssetsName == nil) { + // Default to "flutter_assets" + flutterAssetsName = @"flutter_assets"; + } + NSString* flutterAssetsPath = [mainBundle pathForResource:flutterAssetsName ofType:nil]; shell::PlatformMacMain(icuDataPath.UTF8String, libraryName != nil ? libraryName.UTF8String : "", flutterAssetsPath.UTF8String);