Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit fc0825a

Browse files
committed
iOS: Migrate FlutterAppDelegate to ARC
Migrates the FlutterAppDelegate.mm translation unit to be compiled with the `-fobjc-arc` compiler flag. Issue: flutter/flutter#137801
1 parent 9d1566d commit fc0825a

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

shell/platform/darwin/ios/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ source_set("flutter_framework_source_arc") {
5959
public_configs = [ "//flutter:config" ]
6060

6161
sources = [
62+
"framework/Source/FlutterAppDelegate.mm",
6263
"framework/Source/FlutterCallbackCache.mm",
6364
"framework/Source/FlutterCallbackCache_Internal.h",
6465
"framework/Source/FlutterChannelKeyResponder.h",
@@ -179,7 +180,6 @@ source_set("flutter_framework_source") {
179180
# iOS embedder is migrating to ARC.
180181
# New files are highly encouraged to be in ARC.
181182
# To add new files in ARC, add them to the `flutter_framework_source_arc` target.
182-
"framework/Source/FlutterAppDelegate.mm",
183183
"framework/Source/FlutterEngine.mm",
184184
"framework/Source/FlutterEngineGroup.mm",
185185
"framework/Source/FlutterEngine_Internal.h",

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ - (instancetype)init {
3131
return self;
3232
}
3333

34-
- (void)dealloc {
35-
[_lifeCycleDelegate release];
36-
[_rootFlutterViewControllerGetter release];
37-
[_window release];
38-
[super dealloc];
39-
}
40-
4134
- (BOOL)application:(UIApplication*)application
4235
willFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
4336
return [_lifeCycleDelegate application:application willFinishLaunchingWithOptions:launchOptions];
@@ -286,7 +279,7 @@ - (id)forwardingTargetForSelector:(SEL)aSelector {
286279
- (void)logCapabilityConfigurationWarningIfNeeded:(SEL)selector {
287280
NSArray* backgroundModesArray =
288281
[[NSBundle mainBundle] objectForInfoDictionaryKey:kUIBackgroundMode];
289-
NSSet* backgroundModesSet = [[[NSSet alloc] initWithArray:backgroundModesArray] autorelease];
282+
NSSet* backgroundModesSet = [[NSSet alloc] initWithArray:backgroundModesArray];
290283
if (selector == @selector(application:didReceiveRemoteNotification:fetchCompletionHandler:)) {
291284
if (![backgroundModesSet containsObject:kRemoteNotificationCapabitiliy]) {
292285
NSLog(

0 commit comments

Comments
 (0)