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
|`OneSignal.User.setLanguage("en")`|`[OneSignal.User setLanguage:@"en"]`|*Set the 2-character language for this user.*|
294
-
|`let pushSubscription: OSPushSubscription = OneSignal.User.pushSubscription`|`id<OSPushSubscription> pushSubscription = OneSignal.User.pushSubscription`|*The push subscription associated to the current user.*|
298
+
|`let pushSubscriptionProperty = OneSignal.User.pushSubscription.<PROPERTY>`|`id pushSubscriptionProperty = OneSignal.User.pushSubscription.<PROPERTY>`|*The push subscription associated to the current user.*|
295
299
|`OneSignal.User.addAlias(label: "ALIAS_LABEL", id: "ALIAS_ID")`|`[OneSignal.User addAliasWithLabel:@"ALIAS_LABEL" id:@"ALIAS_ID"]`|*Set an alias for the current user. If this alias label already exists on this user, it will be overwritten with the new alias id.*|
296
300
|`OneSignal.User.addAliases(["ALIAS_LABEL_01": "ALIAS_ID_01", "ALIAS_LABEL_02": "ALIAS_ID_02"])`|`[OneSignal.User addAliases:@{@"ALIAS_LABEL_01": @"ALIAS_ID_01", @"ALIAS_LABEL_02": @"ALIAS_ID_02"}]`|*Set aliases for the current user. If any alias already exists, it will be overwritten to the new values.*|
297
301
|`OneSignal.User.removeAlias("ALIAS_LABEL")`|`[OneSignal.User removeAlias:@"ALIAS_LABEL"]`|*Remove an alias from the current user.*|
298
302
|`OneSignal.User.removeAliases(["ALIAS_LABEL_01", "ALIAS_LABEL_02"])`|`[OneSignal.User removeAliases:@[@"ALIAS_LABEL_01", @"ALIAS_LABEL_02"]]`|*Remove aliases from the current user.*|
299
303
|`OneSignal.User.addEmail("[email protected]")`|`[OneSignal.User addEmail:@"[email protected]"]`|*Add a new email subscription to the current user.*|
300
-
|`let success: Bool = OneSignal.User.removeEmail("[email protected]")`|`BOOL success = [OneSignal.User removeEmail:@"[email protected]"]`|*Remove an email subscription from the current user. Returns `false` if the specified email does not exist on the user within the SDK, and no request will be made.*|
301
-
|`OneSignal.User.addSmsNumber("+15558675309")`|`[OneSignal.User addSmsNumber:@"+15558675309"]`|*Add a new SMS subscription to the current user.*|
302
-
|`let success: Bool = OneSignal.User.removeSmsNumber("+15558675309")`|`BOOL success = [OneSignal.User removeSmsNumber:@"+15558675309"]`|*Remove an SMS subscription from the current user. Returns `false` if the specified SMS number does not exist on the user within the SDK, and no request will be made.*|
304
+
|`OneSignal.User.removeEmail("[email protected]")`|`[OneSignal.User removeEmail:@"[email protected]"]`|*Remove an email subscription from the current user. Returns `false` if the specified email does not exist on the user within the SDK, and no request will be made.*|
305
+
|`OneSignal.User.addSms("+15558675309")`|`[OneSignal.User addSms:@"+15558675309"]`|*Add a new SMS subscription to the current user.*|
306
+
|`OneSignal.User.removeSms("+15558675309")`|`[OneSignal.User removeSms:@"+15558675309"]`|*Remove an SMS subscription from the current user. Returns `false` if the specified SMS number does not exist on the user within the SDK, and no request will be made.*|
303
307
|`OneSignal.User.addTag(key: "KEY", value: "VALUE")`|`[OneSignal.User addTagWithKey:@"KEY" value:@"VALUE"]`|*Add a tag for the current user. Tags are key:value pairs used as building blocks for targeting specific users and/or personalizing messages. If the tag key already exists, it will be replaced with the value provided here.*|
304
308
|`OneSignal.User.addTags(["KEY_01": "VALUE_01", "KEY_02": "VALUE_02"])`|`[OneSignal.User addTags:@{@"KEY_01": @"VALUE_01", @"KEY_02": @"VALUE_02"}]`|*Add multiple tags for the current user. Tags are key:value pairs used as building blocks for targeting specific users and/or personalizing messages. If the tag key already exists, it will be replaced with the value provided here.*|
305
309
|`OneSignal.User.removeTag("KEY")`|`[OneSignal.User removeTag:@"KEY"]`|*Remove the data tag with the provided key from the current user.*|
@@ -319,7 +323,7 @@ The Push Subscription name space is accessible via `OneSignal.User.pushSubscript
319
323
|`let optedIn: Bool = OneSignal.User.pushSubscription.optedIn`|`BOOL optedIn = OneSignal.User.pushSubscription.optedIn`|*Gets a boolean value indicating whether the current user is opted in to push notifications. This returns `true` when the app has notifications permission and `optedOut` is called. ***Note:*** Does not take into account the existence of the subscription ID and push token. This boolean may return `true` but push notifications may still not be received by the user.*|
320
324
|`OneSignal.User.pushSubscription.optIn()`|`[OneSignal.User.pushSubscription optIn]`|*Call this method to receive push notifications on the device or to resume receiving of push notifications after calling `optOut`. If needed, this method will prompt the user for push notifications permission.*|
321
325
|`OneSignal.User.pushSubscription.optOut()`|`[OneSignal.User.pushSubscription optOut]`|*If at any point you want the user to stop receiving push notifications on the current device (regardless of system-level permission status), you can call this method to opt out.*|
322
-
|`addObserver(_ observer: OSPushSubscriptionObserver) → OSPushSubscriptionState?`<br><br>***See below for usage***|`(OSPushSubscriptionState * _Nullable)addObserver:(id <OSPushSubscriptionObserver> _Nonnull)observer`<br><br>***See below for usage***|*The `OSPushSubscriptionObserver.onOSPushSubscriptionChanged` method will be fired on the passed-in object when the push subscription changes. This method returns the current `OSPushSubscriptionState` at the time of adding this observer.*|
326
+
|`addObserver(_ observer: OSPushSubscriptionObserver)`<br><br>***See below for usage***|`(void)addObserver:(id <OSPushSubscriptionObserver> _Nonnull)observer`<br><br>***See below for usage***|*The `OSPushSubscriptionObserver.onOSPushSubscriptionChanged` method will be fired on the passed-in object when the push subscription changes. This method returns the current `OSPushSubscriptionState` at the time of adding this observer.*|
323
327
|`removeObserver(_ observer: OSPushSubscriptionObserver)`<br><br>***See below for usage***|`(void)removeObserver:(id <OSPushSubscriptionObserver> _Nonnull)observer`<br><br>***See below for usage***|*Remove a push subscription observer that has been previously added.*|
324
328
325
329
### Push Subscription Observer
@@ -338,7 +342,7 @@ Any object implementing the `OSPushSubscriptionObserver` protocol can be added a
|`OneSignal.Debug.setLogLevel(.LL_VERBOSE)`|`[OneSignal.Debug setLogLevel:ONE_S_LL_VERBOSE]`|*Sets the log level the OneSignal SDK should be writing to the Xcode log.*|
725
-
|`OneSignal.Debug.setVisualLevel(.LL_NONE)`|`[OneSignal.Debug setVisualLevel:ONE_S_LL_NONE]`|*Sets the logging level to show as alert dialogs.*|
720
+
|`OneSignal.Debug.setAlertLevel(.LL_NONE)`|`[OneSignal.Debug setAlertLevel:ONE_S_LL_NONE]`|*Sets the logging level to show as alert dialogs.*|
0 commit comments