summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-02-03 14:14:03 +0100
committerGitHub <noreply@github.com>2021-02-03 14:14:03 +0100
commitc2c0536ea8cc9182417c8fc0494e8990b88c9fbb (patch)
tree89b2546b4f291c8fa65a0165e8324457205601e2 /platform
parent468d75bf6b5d1b0bc6aaf2afe62c71278e118bc5 (diff)
parent4fda1ae6b881f305dc594d9c43fa2a49a89f5cb1 (diff)
Merge pull request #45682 from naithar/fix/ios-notifications-4.0
[iOS] Remove remote notifications code
Diffstat (limited to 'platform')
-rw-r--r--platform/iphone/godot_app_delegate.h24
-rw-r--r--platform/iphone/godot_app_delegate.m32
2 files changed, 1 insertions, 55 deletions
diff --git a/platform/iphone/godot_app_delegate.h b/platform/iphone/godot_app_delegate.h
index 76d8aa409f..6335ada50e 100644
--- a/platform/iphone/godot_app_delegate.h
+++ b/platform/iphone/godot_app_delegate.h
@@ -31,7 +31,6 @@
#import <UIKit/UIKit.h>
typedef NSObject<UIApplicationDelegate> ApplicationDelegateService;
-typedef void (^APNSNotification)(UIBackgroundFetchResult);
@interface GodotApplicalitionDelegate : NSObject <UIApplicationDelegate>
@@ -39,27 +38,4 @@ typedef void (^APNSNotification)(UIBackgroundFetchResult);
+ (void)addService:(ApplicationDelegateService *)service;
-- (void)godot:(UIApplication *)application receivedNotificationToken:(NSData *)deviceToken;
-- (void)godot:(UIApplication *)application receivedNotificationError:(NSError *)error;
-- (void)godot:(UIApplication *)application receivedNotification:(NSDictionary *)userInfo completion:(APNSNotification)completionHandler;
-
@end
-
-#define GODOT_ENABLE_PUSH_NOTIFICATIONS \
- @interface GodotApplicalitionDelegate (PushNotifications) \
- @end \
- @implementation GodotApplicalitionDelegate (PushNotifications) \
- -(void)application : (UIApplication *)application \
- didRegisterForRemoteNotificationsWithDeviceToken : (NSData *)deviceToken { \
- [self godot:application receivedNotificationToken:deviceToken]; \
- } \
- -(void)application : (UIApplication *)application \
- didFailToRegisterForRemoteNotificationsWithError : (NSError *)error { \
- [self godot:application receivedNotificationError:error]; \
- } \
- -(void)application : (UIApplication *)application \
- didReceiveRemoteNotification : (NSDictionary *)userInfo \
- fetchCompletionHandler : (APNSNotification)completionHandler { \
- [self godot:application receivedNotification:userInfo completion:completionHandler]; \
- } \
- @end
diff --git a/platform/iphone/godot_app_delegate.m b/platform/iphone/godot_app_delegate.m
index 9d298162f3..3ce9bffc79 100644
--- a/platform/iphone/godot_app_delegate.m
+++ b/platform/iphone/godot_app_delegate.m
@@ -302,37 +302,7 @@ static NSMutableArray<ApplicationDelegateService *> *services = nil;
// MARK: Remote Notification
-- (void)godot:(UIApplication *)application receivedNotificationToken:(NSData *)deviceToken {
- for (ApplicationDelegateService *service in services) {
- if (![service respondsToSelector:_cmd]) {
- continue;
- }
-
- [service application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
- }
-}
-
-- (void)godot:(UIApplication *)application receivedNotificationError:(NSError *)error {
- for (ApplicationDelegateService *service in services) {
- if (![service respondsToSelector:_cmd]) {
- continue;
- }
-
- [service application:application didFailToRegisterForRemoteNotificationsWithError:error];
- }
-}
-
-- (void)godot:(UIApplication *)application receivedNotification:(NSDictionary *)userInfo completion:(APNSNotification)completionHandler {
- for (ApplicationDelegateService *service in services) {
- if (![service respondsToSelector:_cmd]) {
- continue;
- }
-
- [service application:application didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
- }
-
- completionHandler(UIBackgroundFetchResultNoData);
-}
+// Moved to the iOS Plugin
// MARK: User Activity and Handling Quick Actions