mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Load macOS dart bundle by URL fallback (flutter/engine#22979)
This commit is contained in:
parent
f128a93e70
commit
99bfdc65ed
@ -27,6 +27,11 @@ static NSString* const kAppBundleIdentifier = @"io.flutter.flutter.app";
|
||||
NSAssert(self, @"Super init cannot be nil");
|
||||
|
||||
_dartBundle = bundle ?: [NSBundle bundleWithIdentifier:kAppBundleIdentifier];
|
||||
if (_dartBundle == nil) {
|
||||
// The bundle isn't loaded and can't be found by bundle ID. Find it by path.
|
||||
_dartBundle = [NSBundle bundleWithURL:[NSBundle.mainBundle.privateFrameworksURL
|
||||
URLByAppendingPathComponent:@"App.framework"]];
|
||||
}
|
||||
_dartEntrypointArguments = [[NSProcessInfo processInfo] arguments];
|
||||
// Remove the first element as it's the binary name
|
||||
_dartEntrypointArguments = [_dartEntrypointArguments
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user