提交 5c285787 编写于 作者: C Chinmay Garde

Merge pull request #2551 from chinmaygarde/master

Directly load the bundle at a known path instead of doing a search by identifier.
......@@ -34,10 +34,13 @@ NSURL* URLForSwitch(const char* name) {
dartMain:URLForSwitch(sky::shell::switches::kMainDartFile)
packageRoot:URLForSwitch(sky::shell::switches::kPackageRoot)];
#else
FlutterDartProject* project = [[FlutterDartProject alloc]
initWithPrecompiledDartBundle:
[NSBundle bundleWithIdentifier:
@"io.flutter.application.FlutterApplication"]];
NSString* bundlePath =
[[NSBundle mainBundle] pathForResource:@"FlutterApplication"
ofType:@"framework"
inDirectory:@"Frameworks"];
NSBundle* bundle = [NSBundle bundleWithPath:bundlePath];
FlutterDartProject* project =
[[FlutterDartProject alloc] initWithPrecompiledDartBundle:bundle];
#endif
CGRect frame = [UIScreen mainScreen].bounds;
......
......@@ -24,7 +24,7 @@
self = [super init];
if (self) {
_precompiledDartBundle = [bundle copy];
_precompiledDartBundle = [bundle retain];
[self checkReadiness];
}
......@@ -108,7 +108,7 @@ static NSString* NSStringFromVMType(VMType type) {
return;
case VMTypePrecompilation:
[self runFromPrecompiledSourceInEngine:engine result:result];
break;
return;
case VMTypeInvalid:
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册