ARTPushRegistererDelegate
Objective-C
@protocol ARTPushRegistererDelegate
Swift
protocol ARTPushRegistererDelegate
The interface for handling Push activation/deactivation-related actions.
-
Ably will call the implementation of this method when the activation process is completed with success or with failure.
Declaration
Objective-C
- (void)didActivateAblyPush:(nullable ARTErrorInfo *)error;
Swift
func didActivateAblyPush(_ error: ARTErrorInfo?)
-
Ably will call the implementation of this method when the deactivation process is completed with success or with failure.
Declaration
Objective-C
- (void)didDeactivateAblyPush:(nullable ARTErrorInfo *)error;
Swift
func didDeactivateAblyPush(_ error: ARTErrorInfo?)
-
Ably will call the implementation of this method when the token update process is completed with success or with failure.
Declaration
Objective-C
- (void)didUpdateAblyPush:(nullable ARTErrorInfo *)error;
Swift
optional func didUpdateAblyPush(_ error: ARTErrorInfo?)
-
Same as
didUpdateAblyPush:
, but called only in case of failure for backward compatibility.Declaration
Objective-C
- (void)didAblyPushRegistrationFail:(nullable ARTErrorInfo *)error;
Swift
optional func didAblyPushRegistrationFail(_ error: ARTErrorInfo?)
-
Optional method. If you want to activate devices from your server, then you should implement this method (including the
ablyPushCustomDeregister:deviceId:callback
method) where the network request completion should call the callback argument to continue with the registration process.Declaration
Objective-C
- (void)ablyPushCustomRegister:(ARTErrorInfo *_Nullable)error deviceDetails:(nonnull ARTDeviceDetails *)deviceDetails callback:(nonnull void (^)( ARTDeviceIdentityTokenDetails *_Nullable, ARTErrorInfo *_Nullable))callback;
Swift
optional func ablyPushCustomRegister(_ error: ARTErrorInfo?, deviceDetails: ARTDeviceDetails, callback: @escaping (ARTDeviceIdentityTokenDetails?, ARTErrorInfo?) -> Void)
-
Optional method. If you want to deactivate devices from your server, then you should implement this method (including the
ablyPushCustomRegister:deviceDetails:callback
method) where the network request completion should call the callback argument to continue with the registration process.Declaration
Objective-C
- (void)ablyPushCustomDeregister:(ARTErrorInfo *_Nullable)error deviceId:(nonnull ARTDeviceId *)deviceId callback:(nonnull ARTCallback)callback;
Swift
optional func ablyPushCustomDeregister(_ error: ARTErrorInfo?, deviceId: String, callback: @escaping ARTCallback)