INNER CODE UNIT · TypeScript

setConsentRequired

OneSignal/react-native-onesignal · src/index.ts:139

  export function setConsentRequired(required: boolean) {
    if (!isNativeModuleLoaded(RNOneSignal)) return;

    RNOneSignal.setPrivacyConsentRequired(required);
  }

  /**
   * If your application is set to require the user's privacy consent, you can provide this consent using this method.
   * Indicates whether privacy consent has been granted. This field is only relevant when the application has opted
   * into data privacy protections.
   */
  export function setConsentGiven(granted: boolean) {
    if (!isNativeModuleLoaded(RNOneSignal)) return;

    RNOneSignal.setPrivacyConsentGiven(granted);
  }

  export namespace Debug {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…