| Flutter iOS Embedder |

Instance Methods | Class Methods | Properties | List of all members
FlutterDartProject Class Reference

`#import <FlutterDartProject.h>`

Inheritance diagram for FlutterDartProject:

## Instance Methods
(instancetype) | - initWithPrecompiledDartBundle:
("Use -init instead.") | - FLUTTER_UNAVAILABLE
(NSArray< NSString * > *dartEntrypointArguments) | - API_UNAVAILABLE
(instancetype) | - initWithSettings:`[implementation]`
(const flutter::Settings &) | - settings`[implementation]`
(const flutter::PlatformData) | - defaultPlatformData`[implementation]`
(flutter::RunConfiguration) | - runConfiguration`[implementation]`
(flutter::RunConfiguration) | - runConfigurationForEntrypoint:`[implementation]`
(flutter::RunConfiguration) | - runConfigurationForEntrypoint:libraryOrNil:`[implementation]`
(flutter::RunConfiguration) | - runConfigurationForEntrypoint:libraryOrNil:entrypointArgs:`[implementation]`

## Class Methods
(NSString *) | + defaultBundleIdentifier
(NSString *) | + lookupKeyForAsset:
(NSString *) | + lookupKeyForAsset:fromBundle:
(NSString *) | + lookupKeyForAsset:fromPackage:
(NSString *) | + lookupKeyForAsset:fromPackage:fromBundle:
(NSString *) | + flutterAssetsName:`[implementation]`
(NSString *) | + domainNetworkPolicy:`[implementation]`
(bool) | + allowsArbitraryLoads:`[implementation]`

## Properties
BOOL | isWideGamutEnabled`[implementation]`
BOOL | isImpellerEnabled`[implementation]`

## Detailed Description

A set of Flutter and Dart assets used by a `FlutterEngine` to initialize execution.

Definition at line 262 of file FlutterDartProject.mm.

## Method Documentation

## ◆ allowsArbitraryLoads:

+ (bool) allowsArbitraryLoads: |  | (NSDictionary *) | appTransportSecurity |
| implementation

## ◆ API_UNAVAILABLE

- (NSArray<NSString*>* dartEntrypointArguments) API_UNAVAILABLE |  | (ios) |  |

An NSArray of NSStrings to be passed as command line arguments to the Dart entrypoint.

If this is not explicitly set, this will default to the contents of [NSProcessInfo arguments], without the binary name.

Set this to nil to pass no arguments to the Dart entrypoint.

## ◆ defaultBundleIdentifier

+ (NSString *) defaultBundleIdentifier |  |  |

Returns the default identifier for the bundle where we expect to find the Flutter Dart application.

Definition at line 409 of file FlutterDartProject.mm.

409 {
410 return @"io.flutter.flutter.app";
411 }

## ◆ defaultPlatformData

- (const PlatformData FlutterDartProject()): |  |  |
| implementation

## ◆ domainNetworkPolicy:

+ (NSString*) domainNetworkPolicy: |  | (NSDictionary *) | appTransportSecurity |
| implementation

## ◆ FLUTTER_UNAVAILABLE

- ("Use -init instead.") FLUTTER_UNAVAILABLE |  |  |

Unavailable - use `init` instead.

## ◆ flutterAssetsName:

+ (NSString*) flutterAssetsName: |  | (NSBundle *) | bundle |
| implementation

Referenced by lookupKeyForAsset:fromBundle:.

## ◆ initWithPrecompiledDartBundle:

- (instancetype) initWithPrecompiledDartBundle: |  | (nullable NSBundle*) | NS_DESIGNATED_INITIALIZER |

Initializes a Flutter Dart project from a bundle.

The bundle must either contain a flutter_assets resource directory, or set the Info.plist key FLTAssetsPath to override that name (if you are doing a custom build using a different name).

Parameters

  bundle | The bundle containing the Flutter assets directory. If nil, the App framework created by Flutter will be used.

Definition at line 279 of file FlutterDartProject.mm.

279 :(nullable NSBundle*)bundle {
280 self = [super init];
281
282 if (self) {
283 _settings = FLTDefaultSettingsForBundle(bundle);
284 }
285
286 return self;
287 }

References FLTDefaultSettingsForBundle().

## ◆ initWithSettings:

- (instancetype) initWithSettings: |  | (const flutter::Settings &) | settings |
| implementation

This is currently used for only for tests to override settings.

## ◆ lookupKeyForAsset:

+ (NSString *) lookupKeyForAsset: |  | (NSString*) | asset |

Returns the file name for the given asset. If the bundle with the identifier "io.flutter.flutter.app" exists, it will try use that bundle; otherwise, it will use the main bundle. To specify a different bundle, use `+lookupKeyForAsset:fromBundle`.

Parameters

  asset | The name of the asset. The name can be hierarchical.

Returns
  the file name to be used for lookup in the main bundle.

Definition at line 389 of file FlutterDartProject.mm.

389 :(NSString*)asset {
390 return [self lookupKeyForAsset:asset fromBundle:nil];
391 }

References lookupKeyForAsset:fromBundle:.

Referenced by FlutterViewController::lookupKeyForAsset:.

## ◆ lookupKeyForAsset:fromBundle:

+ (NSString *) lookupKeyForAsset: |  | (NSString*) | asset
fromBundle: |  | (nullable NSBundle*) | bundle

Returns the file name for the given asset. The returned file name can be used to access the asset in the supplied bundle.

Parameters

  asset | The name of the asset. The name can be hierarchical.
  bundle | The `NSBundle` to use for looking up the asset.

Returns
  the file name to be used for lookup in the main bundle.

Definition at line 393 of file FlutterDartProject.mm.

393 :(NSString*)asset fromBundle:(nullable NSBundle*)bundle {
394 NSString* flutterAssetsName = [FlutterDartProject flutterAssetsName:bundle];
395 return [NSString stringWithFormat:@"%@/%@", flutterAssetsName, asset];
396 }

References flutterAssetsName:.

Referenced by lookupKeyForAsset:, and lookupKeyForAsset:fromPackage:fromBundle:.

## ◆ lookupKeyForAsset:fromPackage:

+ (NSString *) lookupKeyForAsset: |  | (NSString*) | asset
fromPackage: |  | (NSString*) | package

Returns the file name for the given asset which originates from the specified package. The returned file name can be used to access the asset in the application's main bundle.

Parameters

  asset | The name of the asset. The name can be hierarchical.
  package | The name of the package from which the asset originates.

Returns
  the file name to be used for lookup in the main bundle.

Definition at line 398 of file FlutterDartProject.mm.

398 :(NSString*)asset fromPackage:(NSString*)package {
399 return [self lookupKeyForAsset:asset fromPackage:package fromBundle:nil];
400 }

References lookupKeyForAsset:fromPackage:fromBundle:.

Referenced by FlutterViewController::lookupKeyForAsset:fromPackage:.

## ◆ lookupKeyForAsset:fromPackage:fromBundle:

+ (NSString *) lookupKeyForAsset: |  | (NSString*) | asset
fromPackage: |  | (NSString*) | package
fromBundle: |  | (nullable NSBundle*) | bundle

Returns the file name for the given asset which originates from the specified package. The returned file name can be used to access the asset in the specified bundle.

Parameters

  asset | The name of the asset. The name can be hierarchical.
  package | The name of the package from which the asset originates.
  bundle | The bundle to use when doing the lookup.

Returns
  the file name to be used for lookup in the main bundle.

Definition at line 402 of file FlutterDartProject.mm.

402 :(NSString*)asset
403 fromPackage:(NSString*)package
404 fromBundle:(nullable NSBundle*)bundle {
405 return [self lookupKeyForAsset:[NSString stringWithFormat:@"packages/%@/%@", package, asset]
406 fromBundle:bundle];
407 }

References lookupKeyForAsset:fromBundle:.

Referenced by lookupKeyForAsset:fromPackage:.

## ◆ runConfiguration

- (RunConfiguration FlutterDartProject()): |  |  |
| implementation

## ◆ runConfigurationForEntrypoint:

- (RunConfiguration FlutterDartProject()): |  | (nullable NSString *) | entrypointOrNil |
| implementation

## ◆ runConfigurationForEntrypoint:libraryOrNil:

- (RunConfiguration FlutterDartProject()): |  | (nullable NSString *) | entrypointOrNil
libraryOrNil: |  | (nullable NSString *) | dartLibraryOrNil
| implementation

## ◆ runConfigurationForEntrypoint:libraryOrNil:entrypointArgs:

- (RunConfiguration FlutterDartProject()): |  | (nullable NSString *) | entrypointOrNil
libraryOrNil: |  | (nullable NSString *) | dartLibraryOrNil
entrypointArgs: |  | (nullable NSArray< NSString * > *) | entrypointArgs
| implementation

## ◆ settings

- (const Settings& FlutterDartProject()): |  |  |
| implementation

## Property Documentation

## ◆ isImpellerEnabled

- (BOOL) isImpellerEnabled
| read nonatomic assign implementation

Definition at line 22 of file FlutterDartProject_Internal.h.

## ◆ isWideGamutEnabled

- (BOOL) isWideGamutEnabled
| read nonatomic assign implementation

Definition at line 21 of file FlutterDartProject_Internal.h.

The documentation for this class was generated from the following files:

- shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm
- shell/platform/darwin/common/framework/Headers/FlutterDartProject.h

+[FlutterDartProject flutterAssetsName:]
NSString * flutterAssetsName:(NSBundle *bundle)
FLTDefaultSettingsForBundle
flutter::Settings FLTDefaultSettingsForBundle(NSBundle *bundle, NSProcessInfo *processInfoOrNil)
Definition: FlutterDartProject.mm:55
FlutterDartProject
Definition: FlutterDartProject.mm:262