Skip to content

Commit 2f39dd4

Browse files
committed
bridge: remove deprecated api registerForRemoteNotifications
1 parent 9fe1bca commit 2f39dd4

File tree

8 files changed

+0
-28
lines changed

8 files changed

+0
-28
lines changed

dist/src/android/interop/Action.java

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ public enum Action
2121
MESSAGING_SET_DO_NOT_DISTURB_ENABLED("messaging.setDoNotDisturbEnabled"),
2222
MESSAGING_SHOW_PENDING_MESSAGE("messaging.showPendingMessage"),
2323
PUSH_GET_LAST_KNOWN_TOKEN("push.getLastKnownPushToken"),
24-
PUSH_REGISTER("push.register"),
2524
PUSH_SET_GCM_SENDER_ID("push.setGCMSenderID"),
2625
PUSH_CLEAR_BADGE("push.clearBadge"),
2726
PUSH_DISMISS_NOTIFICATIONS("push.dismissNotifications"),

dist/src/android/interop/Bridge.java

-3
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,6 @@ private static SimplePromise<String> doAction(String actionName, Map<String, Obj
139139
case PUSH_DISMISS_NOTIFICATIONS:
140140
dismissNotifications();
141141
break;
142-
case PUSH_REGISTER:
143-
// iOS only, do nothing
144-
return null;
145142
case PUSH_CLEAR_BADGE:
146143
// iOS only, do nothing
147144
return null;

dist/src/ios/interop/BatchBridge.m

-10
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,6 @@ + (NSString *)boolToBridgeString:(BOOL)value
274274
{
275275
// Do nothing
276276
}
277-
else if ([action caseInsensitiveCompare:REGISTER_NOTIFS] == NSOrderedSame)
278-
{
279-
[BatchBridge registerForRemoteNotifications];
280-
}
281277
else if ([action caseInsensitiveCompare:DISMISS_NOTIFS] == NSOrderedSame)
282278
{
283279
[BatchBridge dismissNotifications];
@@ -483,12 +479,6 @@ + (void)setNotificationTypes:(BatchNotificationType)type
483479
[BatchPush setRemoteNotificationTypes:type];
484480
}
485481

486-
+ (void)registerForRemoteNotifications
487-
{
488-
[BatchPush requestNotificationAuthorization];
489-
[BatchPush refreshToken];
490-
}
491-
492482
+ (void)clearBadge
493483
{
494484
[BatchPush clearBadge];

dist/src/ios/interop/BatchBridgeShared.h

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ if (error == NULL) {\
2828
#define PUSH_REQUEST_AUTHORIZATION @"push.requestAuthorization"
2929
#define PUSH_REQUEST_PROVISIONAL_AUTH @"push.iOS.requestProvisionalAuthorization"
3030

31-
#define REGISTER_NOTIFS @"push.register"
3231
#define DISMISS_NOTIFS @"push.dismissNotifications"
3332
#define CLEAR_BADGE @"push.clearBadge"
3433

src/actions.ts

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export enum Push {
1414
SetIOSShowForegroundNotifications = "push.setIOSShowForegroundNotifications",
1515
SetIOSNotifTypes = "push.setIOSNotifTypes",
1616
SetAndroidNotifTypes = "push.setAndroidNotifTypes",
17-
Register = "push.register",
1817
DismissNotifications = "push.dismissNotifications",
1918
ClearBadge = "push.clearBadge",
2019
RefreshToken = "push.iOS.refreshToken",

src/batchStub.ts

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class PushStub implements BatchSDK.PushModule {
1919
this.iOSNotificationTypes = iOSNotificationTypes;
2020
}
2121

22-
public registerForRemoteNotifications() {}
2322
public refreshToken() {}
2423
public requestNotificationAuthorization() {}
2524
public requestProvisionalNotificationAuthorization() {}

src/modules/push.ts

-4
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ export class PushModule implements BatchSDK.PushModule {
3434
this.iOSNotificationTypes = iOSNotificationTypes;
3535
}
3636

37-
public registerForRemoteNotifications(): void {
38-
sendToBridge(null, PushActions.Register, null);
39-
}
40-
4137
public refreshToken(): void {
4238
sendToBridge(null, PushActions.RefreshToken, null);
4339
}

types/index.d.ts

-7
Original file line numberDiff line numberDiff line change
@@ -362,13 +362,6 @@ export declare namespace BatchSDK {
362362
AndroidNotificationTypes: typeof AndroidNotificationTypes;
363363
iOSNotificationTypes: typeof iOSNotificationTypes;
364364

365-
/**
366-
* Ask iOS users if they want to accept push notifications. Required to be able to push users.
367-
* No effect on Android.
368-
* @deprecated Use requestNotificationAuthorization/requestProvisionalNotificationAuthorization and refreshToken
369-
*/
370-
registerForRemoteNotifications(): void;
371-
372365
/**
373366
* Ask iOS to refresh the push token. If the app didn't prompt the user for consent yet, this will not be done.
374367
* You should call this at the start of your app, to make sure Batch always gets a valid token after app updates.

0 commit comments

Comments
 (0)