Push Registration and Privacy Consent
Delaying Push Notification Registration
<a onclick="gonative.onesignal.register()">Enable Push Notifications</a>
Note: This functionality is only applicable for iOS and Android 13+.
Initialization vs Push Registration
Even if you delay push registration the device will still initialize with OneSignal and obtain a
oneSignalUserId. To defer initialization and communication with OneSignal refer to the following section on privacy.
Explicitly grant OneSignal permission to transmit device data
By default your app will automatically send device data to OneSignal to initialize. This includes obtaining a
oneSignalUserId which can be used to associate the device and user. To facilitate GDPR compliance you may optionally defer sending data until consent is received from the user.
oneSignalUserId will be assigned and sent to the device.
To grant privacy consent run the following command. If Automatic Registration is not Disabled (see above) the push notification prompt will then be displayed to the user.
To revoke push notification consent run the following command:
<a onclick="gonative.onesignal.userPrivacyConsent.revoke()">Revoke Push Notification Privacy Consent</a>
Revoking Privacy Consent
Revoking OneSignal privacy consent stops your app from sending additional data to OneSignal but does not prevent receiving push notifications.
To control which users receive which notifications consider using Tags within OneSignal
Updated 8 months ago