mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Decorate UIApplicationDelegate wrappers with matching UIKit deprecation (flutter/engine#9304)
This commit is contained in:
parent
c913c07e29
commit
23b2997ec0
@ -120,11 +120,11 @@ typedef void (*FlutterPluginRegistrantCallback)(NSObject<FlutterPluginRegistry>*
|
||||
/**
|
||||
* Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
- (void)application:(UIApplication*)application
|
||||
didRegisterUserNotificationSettings:(UIUserNotificationSettings*)notificationSettings;
|
||||
#pragma GCC diagnostic pop
|
||||
didRegisterUserNotificationSettings:(UIUserNotificationSettings*)notificationSettings
|
||||
API_DEPRECATED(
|
||||
"See -[UIApplicationDelegate application:didRegisterUserNotificationSettings:] deprecation",
|
||||
ios(8.0, 10.0));
|
||||
|
||||
/**
|
||||
* Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
@ -145,7 +145,10 @@ typedef void (*FlutterPluginRegistrantCallback)(NSObject<FlutterPluginRegistry>*
|
||||
* Calls all plugins registered for `UIApplicationDelegate` callbacks.
|
||||
*/
|
||||
- (void)application:(UIApplication*)application
|
||||
didReceiveLocalNotification:(UILocalNotification*)notification;
|
||||
didReceiveLocalNotification:(UILocalNotification*)notification
|
||||
API_DEPRECATED(
|
||||
"See -[UIApplicationDelegate application:didReceiveLocalNotification:] deprecation",
|
||||
ios(4.0, 10.0));
|
||||
|
||||
/**
|
||||
* Calls all plugins registered for `UNUserNotificationCenterDelegate` callbacks.
|
||||
|
||||
@ -67,11 +67,11 @@ FLUTTER_EXPORT
|
||||
/**
|
||||
* Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
- (void)application:(UIApplication*)application
|
||||
didRegisterUserNotificationSettings:(UIUserNotificationSettings*)notificationSettings;
|
||||
#pragma GCC diagnostic pop
|
||||
didRegisterUserNotificationSettings:(UIUserNotificationSettings*)notificationSettings
|
||||
API_DEPRECATED(
|
||||
"See -[UIApplicationDelegate application:didRegisterUserNotificationSettings:] deprecation",
|
||||
ios(8.0, 10.0));
|
||||
|
||||
/**
|
||||
* Calls all plugins registered for `UIApplicationDelegate` callbacks.
|
||||
@ -90,7 +90,10 @@ FLUTTER_EXPORT
|
||||
* Calls all plugins registered for `UIApplicationDelegate` callbacks.
|
||||
*/
|
||||
- (void)application:(UIApplication*)application
|
||||
didReceiveLocalNotification:(UILocalNotification*)notification;
|
||||
didReceiveLocalNotification:(UILocalNotification*)notification
|
||||
API_DEPRECATED(
|
||||
"See -[UIApplicationDelegate application:didReceiveLocalNotification:] deprecation",
|
||||
ios(4.0, 10.0));
|
||||
|
||||
/**
|
||||
* Calls all plugins registered for `UNUserNotificationCenterDelegate` callbacks.
|
||||
|
||||
@ -92,10 +92,13 @@ static NSString* kBackgroundFetchCapatibility = @"fetch";
|
||||
didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
- (void)application:(UIApplication*)application
|
||||
didReceiveLocalNotification:(UILocalNotification*)notification {
|
||||
[_lifeCycleDelegate application:application didReceiveLocalNotification:notification];
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
- (void)userNotificationCenter:(UNUserNotificationCenter*)center
|
||||
willPresentNotification:(UNNotification*)notification
|
||||
|
||||
@ -228,6 +228,8 @@ static BOOL isPowerOfTwo(NSUInteger x) {
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
- (void)application:(UIApplication*)application
|
||||
didReceiveLocalNotification:(UILocalNotification*)notification {
|
||||
for (id<FlutterPlugin> plugin in _pluginDelegates) {
|
||||
@ -239,6 +241,7 @@ static BOOL isPowerOfTwo(NSUInteger x) {
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
- (void)userNotificationCenter:(UNUserNotificationCenter*)center
|
||||
willPresentNotification:(UNNotification*)notification
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user