#include <Foundation/Foundation.h>
#import "flutter/shell/platform/darwin/common/framework/Headers/FlutterMacros.h"
Go to the source code of this file.
◆ FLTAssetPath()
NSString * FLTAssetPath |
( |
NSBundle * |
bundle | ) |
|
◆ FLTAssetsPathFromBundle()
NSString * FLTAssetsPathFromBundle |
( |
NSBundle * |
bundle | ) |
|
Definition at line 61 of file FlutterNSBundleUtils.mm.
61 {
64 if (flutterAssetsPath.length == 0) {
66 }
67 return flutterAssetsPath;
68}
static NSString * GetFlutterAssetsPathFromBundle(NSBundle *bundle, NSString *relativeAssetsPath)
NSString * FLTAssetPath(NSBundle *bundle)
◆ FLTFrameworkBundleInternal()
NSBundle * FLTFrameworkBundleInternal |
( |
NSString * |
flutterFrameworkBundleID, |
|
|
NSURL * |
searchURL |
|
) |
| |
Definition at line 14 of file FlutterNSBundleUtils.mm.
14 {
15 NSDirectoryEnumerator<NSURL*>* frameworkEnumerator = [NSFileManager.defaultManager
16 enumeratorAtURL:searchURL
17 includingPropertiesForKeys:nil
18 options:NSDirectoryEnumerationSkipsSubdirectoryDescendants |
19 NSDirectoryEnumerationSkipsHiddenFiles
20
21 errorHandler:nil];
22
23 for (NSURL* candidate in frameworkEnumerator) {
24 NSBundle* flutterFrameworkBundle = [NSBundle bundleWithURL:candidate];
25 if ([flutterFrameworkBundle.bundleIdentifier isEqualToString:flutterFrameworkBundleID]) {
26 return flutterFrameworkBundle;
27 }
28 }
29 return nil;
30}
◆ FLTFrameworkBundleWithIdentifier()
NSBundle * FLTFrameworkBundleWithIdentifier |
( |
NSString * |
flutterFrameworkBundleID | ) |
|
Definition at line 43 of file FlutterNSBundleUtils.mm.
43 {
45 NSBundle* flutterFrameworkBundle =
47 if (flutterFrameworkBundle == nil) {
48
49 flutterFrameworkBundle = [NSBundle bundleWithIdentifier:flutterFrameworkBundleID];
50 }
51 if (flutterFrameworkBundle == nil) {
52 flutterFrameworkBundle = NSBundle.mainBundle;
53 }
54 return flutterFrameworkBundle;
55}
NSBundle * FLTGetApplicationBundle()
NSBundle * FLTFrameworkBundleInternal(NSString *flutterFrameworkBundleID, NSURL *searchURL)
◆ FLTGetApplicationBundle()
NSBundle * FLTGetApplicationBundle |
( |
| ) |
|
Definition at line 32 of file FlutterNSBundleUtils.mm.
32 {
33 NSBundle* mainBundle = NSBundle.mainBundle;
34
35 if ([mainBundle.bundleURL.pathExtension isEqualToString:@"appex"]) {
36
37 return [NSBundle bundleWithURL:mainBundle.bundleURL.URLByDeletingLastPathComponent
38 .URLByDeletingLastPathComponent];
39 }
40 return mainBundle;
41}
◆ GetFlutterAssetsPathFromBundle()
static NSString * GetFlutterAssetsPathFromBundle |
( |
NSBundle * |
bundle, |
|
|
NSString * |
relativeAssetsPath |
|
) |
| |
|
static |
Definition at line 70 of file FlutterNSBundleUtils.mm.
70 {
71
72
73 NSString* assetsPath = [bundle pathForResource:relativeAssetsPath ofType:nil];
74 if (assetsPath.length == 0) {
75
76
77
78 assetsPath = [bundle pathForResource:@"flutter_assets" ofType:nil];
79 }
80 return assetsPath;
81}
◆ kDefaultAssetPath
FLUTTER_ASSERT_ARC const NSString* kDefaultAssetPath = @"@"Frameworks/App.framework/flutter_assets" |