ARTPushProtocol
Objective-C
@protocol ARTPushProtocol
Swift
protocol ARTPushProtocol
The protocol upon which the ARTPush is implemented.
-
See iOS push notifications tutorial for details.
-
See iOS push notifications tutorial for details.
Declaration
Objective-C
+ (void)didRegisterForRemoteNotificationsWithDeviceToken: (nonnull NSData *)deviceToken realtime:(nonnull ARTRealtime *) realtime;Swift
static func didRegisterForRemoteNotifications(withDeviceToken deviceToken: Data, realtime: ARTRealtime) -
See iOS push notifications tutorial for details.
-
See iOS push notifications tutorial for details.
Declaration
Objective-C
+ (void) didFailToRegisterForRemoteNotificationsWithError:(nonnull NSError *)error realtime: (nonnull ARTRealtime *)realtime;Swift
static func didFailToRegisterForRemoteNotificationsWithError(_ error: any Error, realtime: ARTRealtime) -
Registers location device token within Ably service. You obtain it by calling
CLLocationManager.startMonitoringLocationPushes(completion:). -
Registers location device token within Ably service. You obtain it by calling
CLLocationManager.startMonitoringLocationPushes(completion:).Declaration
Objective-C
+ (void)didRegisterForLocationNotificationsWithDeviceToken: (nonnull NSData *)deviceToken realtime: (nonnull ARTRealtime *) realtime;Swift
static func didRegisterForLocationNotifications(withDeviceToken deviceToken: Data, realtime: ARTRealtime) -
Call this method if you got an error calling
CLLocationManager.startMonitoringLocationPushes(completion:). -
Call this method if you got an error calling
CLLocationManager.startMonitoringLocationPushes(completion:).Declaration
Objective-C
+ (void) didFailToRegisterForLocationNotificationsWithError:(nonnull NSError *)error realtime:(nonnull ARTRealtime *) realtime;Swift
static func didFailToRegisterForLocationNotificationsWithError(_ error: any Error, realtime: ARTRealtime) -
Activates the device for push notifications with APNS, obtaining a unique identifier from it. Subsequently registers the device with Ably and stores the
ARTLocalDevice.identityTokenDetailsin local storage. You should implement-[ARTPushRegistererDelegate didActivateAblyPush:]to handle success or failure of this operation.Declaration
Objective-C
- (void)activate;Swift
func activate() -
Deactivates the device from receiving push notifications with Ably. You should implement
-[ARTPushRegistererDelegate didDeactivateAblyPush:]to handle success or failure of this operation.Declaration
Objective-C
- (void)deactivate;Swift
func deactivate()