Skip to content

Commit

Permalink
refactor(ios)!: move AppDelegate to CDVAppDelegate
Browse files Browse the repository at this point in the history
  • Loading branch information
erisu committed Sep 10, 2024
1 parent 4839447 commit 2f1ec53
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@
<string>production</string>
</config-file>

<source-file src="src/ios/AppDelegate+notification.m"/>
<source-file src="src/ios/CDVAppDelegate+notification.m"/>
<source-file src="src/ios/PushPlugin.m"/>
<header-file src="src/ios/AppDelegate+notification.h"/>
<header-file src="src/ios/CDVAppDelegate+notification.h"/>
<header-file src="src/ios/PushPlugin.h"/>

<framework src="PushKit.framework"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
//
// AppDelegate+notification.h
// pushtest
// CDVAppDelegate+notification.h
//
// Created by Robert Easterday on 10/26/12.
//
//

#import "AppDelegate.h"
#import "Cordova/CDVAppDelegate.h"
@import UserNotifications;

@interface AppDelegate (notification) <UNUserNotificationCenterDelegate>
@interface CDVAppDelegate (notification)

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
//
// AppDelegate+notification.m
// pushtest
// CDVAppDelegate+notification.m
//
// Created by Robert Easterday on 10/26/12.
//
//

#import "AppDelegate+notification.h"
#import "CDVAppDelegate+notification.h"
#import "PushPlugin.h"

@implementation AppDelegate (notification)
@implementation CDVAppDelegate (notification)

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
[NSNotificationCenter.defaultCenter postNotificationName:@"CordovaPluginPushDidRegisterForRemoteNotificationsWithDeviceToken" object:deviceToken];
Expand Down

0 comments on commit 2f1ec53

Please sign in to comment.