EkoUserNotificationsManager
@interface EkoUserNotificationsManager : NSObject
@abstract Responsible to manage the user level push notification settings.
-
@abstract Updates the user level push notification setting.
Note
This setting will take effect on every device used by the user. If the user wishes to stop receiving notifications only on this device, then unregister push notifications with this device instead.
Declaration
Objective-C
- (void)setIsAllowed:(BOOL)isAllowed completion:(nullable EkoRequestCompletion)completion;
Swift
func setIsAllowed(_ isAllowed: Any!, completion: EkoRequestCompletion? = nil)
Parameters
isAllowed
Whether or not the user would like to receive any push notifications.
completion
A block executed when the request has completed.
-
@abstract Retrieve the current user level push notification state.
Note
This setting is per user, not per device.
Declaration
Objective-C
- (void)isAllowedWithCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))completion;
Swift
func isAllowed(completion: @escaping (Int32, UnsafeMutablePointer<Int32>?) -> Void)
Parameters
completion
A block executed when the request has completed.
-
Unavailable
Block call of
init
andnew
because this object cannot be created directlyDeclaration
Objective-C
- (nonnull instancetype)init;
Swift
init()