INNER CODE UNIT · TypeScript

setConsentGiven

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

  export function setConsentGiven(granted: boolean) {
    if (!isNativeModuleLoaded(RNOneSignal)) return;

    RNOneSignal.setPrivacyConsentGiven(granted);
  }

  export namespace Debug {
    /**
     * Enable logging to help debug if you run into an issue setting up OneSignal.
     * @param {LogLevel} nsLogLevel - Sets the logging level to print to the Android LogCat log or Xcode log.
     */
    export function setLogLevel(nsLogLevel: LogLevel) {
      if (!isNativeModuleLoaded(RNOneSignal)) return;

      RNOneSignal.setLogLevel(nsLogLevel);
    }

    /**

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…