You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: android/src/main/kotlin/uk/orth/push/serialization/PushApi.kt
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -316,6 +316,14 @@ interface PushHostApi {
316
316
* will get an error: `Requested entity was not found.`
317
317
*/
318
318
fundeleteToken(callback: (Result<Unit>) ->Unit)
319
+
/**
320
+
* iOS only
321
+
* Registration is done automatically when the application starts.
322
+
* This is only useful if you previously called [PushHostApi.unregisterForRemoteNotifications].
323
+
* You'll get the next token from [PushFlutterApi.onNewToken]. Unfortunately, this would most likely be
324
+
* the same token as before you called [PushHostApi.unregisterForRemoteNotifications].
325
+
*/
326
+
funregisterForRemoteNotifications()
319
327
/**
320
328
* iOS only
321
329
* Temporary disable receiving push notifications until next app restart. You can re-enable immediately with [PushHostApi.registerForRemoteNotifications].
@@ -325,14 +333,6 @@ interface PushHostApi {
325
333
* Warning: on IOS simulators, no notifications will be delivered when calling unregisterForRemoteNotifications and then `registerForRemoteNotifications`
326
334
*/
327
335
fununregisterForRemoteNotifications()
328
-
/**
329
-
* iOS only
330
-
* Registration is done automatically when the application starts.
331
-
* This is only useful if you previously called [PushHostApi.unregisterForRemoteNotifications].
332
-
* You'll get the next token from [PushFlutterApi.onNewToken]. Unfortunately, this would most likely be
333
-
* the same token as before you called [PushHostApi.unregisterForRemoteNotifications].
334
-
*/
335
-
funregisterForRemoteNotifications()
336
336
funbackgroundFlutterApplicationReady()
337
337
/**
338
338
* Pass true for the option you want permission to use
@@ -402,11 +402,11 @@ interface PushHostApi {
402
402
}
403
403
}
404
404
run {
405
-
val channel =BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.push.PushHostApi.unregisterForRemoteNotifications$separatedMessageChannelSuffix", codec)
405
+
val channel =BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.push.PushHostApi.registerForRemoteNotifications$separatedMessageChannelSuffix", codec)
406
406
if (api !=null) {
407
407
channel.setMessageHandler { _, reply ->
408
408
val wrapped:List<Any?> =try {
409
-
api.unregisterForRemoteNotifications()
409
+
api.registerForRemoteNotifications()
410
410
listOf(null)
411
411
} catch (exception:Throwable) {
412
412
wrapError(exception)
@@ -418,11 +418,11 @@ interface PushHostApi {
418
418
}
419
419
}
420
420
run {
421
-
val channel =BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.push.PushHostApi.registerForRemoteNotifications$separatedMessageChannelSuffix", codec)
421
+
val channel =BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.push.PushHostApi.unregisterForRemoteNotifications$separatedMessageChannelSuffix", codec)
/// Temporary disable receiving push notifications until next app restart. You can re-enable immediately with [PushHostApi.registerForRemoteNotifications].
145
151
/// This might be useful if you're logging someone out or you want to completely disable all notifications.
146
152
/// Trying to send an APNs message to the token will fail, until `registerForRemoteNotifications` is called.
147
153
/// For iOS details, see https://developer.apple.com/documentation/uikit/uiapplication/1623093-unregisterforremotenotifications
148
154
/// Warning: on IOS simulators, no notifications will be delivered when calling unregisterForRemoteNotifications and then `registerForRemoteNotifications`
/// Temporary disable receiving push notifications until next app restart. You can re-enable immediately with [PushHostApi.registerForRemoteNotifications].
379
-
/// This might be useful if you're logging someone out or you want to completely disable all notifications.
380
-
/// Trying to send an APNs message to the token will fail, until `registerForRemoteNotifications` is called.
381
-
/// For iOS details, see https://developer.apple.com/documentation/uikit/uiapplication/1623093-unregisterforremotenotifications
382
-
/// Warning: on IOS simulators, no notifications will be delivered when calling unregisterForRemoteNotifications and then `registerForRemoteNotifications`
378
+
/// Registration is done automatically when the application starts.
379
+
/// This is only useful if you previously called [PushHostApi.unregisterForRemoteNotifications].
380
+
/// You'll get the next token from [PushFlutterApi.onNewToken]. Unfortunately, this would most likely be
381
+
/// the same token as before you called [PushHostApi.unregisterForRemoteNotifications].
NSCAssert([api respondsToSelector:@selector(unregisterForRemoteNotificationsWithError:)], @"PUPushHostApi api (%@) doesn't respond to @selector(unregisterForRemoteNotificationsWithError:)", api);
389
+
NSCAssert([api respondsToSelector:@selector(registerForRemoteNotificationsWithError:)], @"PUPushHostApi api (%@) doesn't respond to @selector(registerForRemoteNotificationsWithError:)", api);
/// Registration is done automatically when the application starts.
402
-
/// This is only useful if you previously called [PushHostApi.unregisterForRemoteNotifications].
403
-
/// You'll get the next token from [PushFlutterApi.onNewToken]. Unfortunately, this would most likely be
404
-
/// the same token as before you called [PushHostApi.unregisterForRemoteNotifications].
400
+
/// Temporary disable receiving push notifications until next app restart. You can re-enable immediately with [PushHostApi.registerForRemoteNotifications].
401
+
/// This might be useful if you're logging someone out or you want to completely disable all notifications.
402
+
/// Trying to send an APNs message to the token will fail, until `registerForRemoteNotifications` is called.
403
+
/// For iOS details, see https://developer.apple.com/documentation/uikit/uiapplication/1623093-unregisterforremotenotifications
404
+
/// Warning: on IOS simulators, no notifications will be delivered when calling unregisterForRemoteNotifications and then `registerForRemoteNotifications`
NSCAssert([api respondsToSelector:@selector(registerForRemoteNotificationsWithError:)], @"PUPushHostApi api (%@) doesn't respond to @selector(registerForRemoteNotificationsWithError:)", api);
412
+
NSCAssert([api respondsToSelector:@selector(unregisterForRemoteNotificationsWithError:)], @"PUPushHostApi api (%@) doesn't respond to @selector(unregisterForRemoteNotificationsWithError:)", api);
Copy file name to clipboardExpand all lines: lib/src/serialization/push_api.dart
+13-13Lines changed: 13 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -363,14 +363,13 @@ class PushHostApi {
363
363
}
364
364
365
365
/// iOS only
366
-
/// Temporary disable receiving push notifications until next app restart. You can re-enable immediately with [PushHostApi.registerForRemoteNotifications].
367
-
/// This might be useful if you're logging someone out or you want to completely disable all notifications.
368
-
/// Trying to send an APNs message to the token will fail, until `registerForRemoteNotifications` is called.
369
-
/// For iOS details, see https://developer.apple.com/documentation/uikit/uiapplication/1623093-unregisterforremotenotifications
370
-
/// Warning: on IOS simulators, no notifications will be delivered when calling unregisterForRemoteNotifications and then `registerForRemoteNotifications`
/// Temporary disable receiving push notifications until next app restart. You can re-enable immediately with [PushHostApi.registerForRemoteNotifications].
396
+
/// This might be useful if you're logging someone out or you want to completely disable all notifications.
397
+
/// Trying to send an APNs message to the token will fail, until `registerForRemoteNotifications` is called.
398
+
/// For iOS details, see https://developer.apple.com/documentation/uikit/uiapplication/1623093-unregisterforremotenotifications
399
+
/// Warning: on IOS simulators, no notifications will be delivered when calling unregisterForRemoteNotifications and then `registerForRemoteNotifications`
0 commit comments