Skip to content

Commit 97d96bc

Browse files
authored
Eliminate obsolete FlutterDartProject initializers (flutter#6967)
Technically both of these are part of the public API exposed in Flutter.framework. Neither is used within Flutter itself, and both have been broken since the removal of Dart 1 support, so eliminating rather than marking unavailable.
1 parent 9434bb6 commit 97d96bc

File tree

2 files changed

+2
-43
lines changed

2 files changed

+2
-43
lines changed

shell/platform/darwin/ios/framework/Headers/FlutterDartProject.h

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,10 @@ FLUTTER_EXPORT
1616
@interface FlutterDartProject : NSObject
1717

1818
/**
19-
* Initializes with a specific
19+
* Initializes a Flutter Dart project from a bundle.
2020
*/
2121
- (instancetype)initWithPrecompiledDartBundle:(NSBundle*)bundle NS_DESIGNATED_INITIALIZER;
2222

23-
/**
24-
* Initializes with a specific set of Flutter Assets, with a specified location of
25-
* main() and Dart packages.
26-
*/
27-
- (instancetype)initWithFlutterAssets:(NSURL*)flutterAssetsURL
28-
dartMain:(NSURL*)dartMainURL
29-
packages:(NSURL*)dartPackages NS_DESIGNATED_INITIALIZER;
30-
31-
/**
32-
* Initializes from a specific set of Flutter Assets.
33-
*/
34-
- (instancetype)initWithFlutterAssetsWithScriptSnapshot:(NSURL*)flutterAssetsURL
35-
NS_DESIGNATED_INITIALIZER;
36-
3723
/**
3824
* Unavailable - use `init` instead.
3925
*/

shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ @implementation FlutterDartProject {
134134
#pragma mark - Override base class designated initializers
135135

136136
- (instancetype)init {
137-
return [self initWithFlutterAssets:nil dartMain:nil packages:nil];
137+
return [self initWithPrecompiledDartBundle:nil];
138138
}
139139

140140
#pragma mark - Designated initializers
@@ -150,33 +150,6 @@ - (instancetype)initWithPrecompiledDartBundle:(NSBundle*)bundle {
150150
return self;
151151
}
152152

153-
- (instancetype)initWithFlutterAssets:(NSURL*)flutterAssetsURL
154-
dartMain:(NSURL*)dartMainURL
155-
packages:(NSURL*)dartPackages {
156-
self = [super init];
157-
158-
if (self) {
159-
_settings = DefaultSettingsForProcess();
160-
}
161-
162-
return self;
163-
}
164-
165-
- (instancetype)initWithFlutterAssetsWithScriptSnapshot:(NSURL*)flutterAssetsURL {
166-
self = [super init];
167-
168-
if (self) {
169-
_settings = DefaultSettingsForProcess();
170-
171-
if (flutterAssetsURL != nil &&
172-
[[NSFileManager defaultManager] fileExistsAtPath:flutterAssetsURL.path]) {
173-
_settings.assets_path = flutterAssetsURL.path.UTF8String;
174-
}
175-
}
176-
177-
return self;
178-
}
179-
180153
#pragma mark - Settings accessors
181154

182155
- (const blink::Settings&)settings {

0 commit comments

Comments
 (0)