How to use the react-native-onesignal.sendTag function in react-native-onesignal

To help you get started, we’ve selected a few react-native-onesignal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github flow-typed / flow-typed / definitions / npm / react-native-onesignal_v3.x.x / flow_v0.104.x- / test_react-native-onesignal.js View on Github external
it("must throw error when args aren't enough", () => {
      // $ExpectError
      OneSignal.sendTag();
      // $ExpectError
      OneSignal.sendTag('maybe tag');
    });
github flow-typed / flow-typed / definitions / npm / react-native-onesignal_v3.x.x / flow_v0.69.0-v0.103.x / test_react-native-onesignal.js View on Github external
it("must throw error when args aren't enough", () => {
      // $ExpectError
      OneSignal.sendTag();
      // $ExpectError
      OneSignal.sendTag("maybe tag");
    });
github Flaque / quirk / src / id / index.ts View on Github external
try {
    let userID = await idstore.getUserID();
    if (!userID) {
      userID = "user-" + uuidv4();
    }
    await idstore.storeUserID(userID);

    // Identify in RevenueCat
    Payments.alias(userID);

    // Identify in OneSignal
    OneSignal.init(ONESIGNAL_SECRET, {
      kOSSettingsKeyAutoPrompt: false,
      kOSSettingsKeyInFocusDisplayOption: 0,
    });
    OneSignal.sendTag("userID", userID);

    // Identify in Segment
    stats.identify(userID);
  } catch (err) {
    // Just capture the exception and continue, don't :rip:
    Sentry.captureException(err);
  }
}
github flow-typed / flow-typed / definitions / npm / react-native-onesignal_v3.x.x / flow_v0.104.x- / test_react-native-onesignal.js View on Github external
it('must call sendTag with key,value arguments', () => {
      OneSignal.sendTag('key', 'value');
    });
github jsappme / react-native-firebase-starter / src / components / login_screen / signIn_form.js View on Github external
.then((user) => {
        firebaseApp.database().ref('users').child(user.uid).once('value')
        .then((snapshot) => {
          this.props.appStore.post_count = parseInt(snapshot.val().post_count)
          this.props.appStore.order_count = parseInt(snapshot.val().order_count)
          this.props.appStore.chat_count = parseInt(snapshot.val().chat_count)
        })
        this.props.appStore.user = user
        this.props.appStore.username = user.displayName
        console.log("user displayName: " + user.displayName + " - " + user.uid)
        OneSignal.sendTag("username", user.displayName)
        OneSignal.sendTag("uid", user.uid)
        Actions.home({ type: 'replace' })
      })
      .catch((error) => {
github jsappme / react-native-firebase-starter / src / components / login_screen / signUp_form.js View on Github external
firebaseApp.database().ref('users/' + user.uid)
              .set({
                uid,
                username,
                post_count,
                chat_count,
                order_count,
                email,
              })
              this.props.appStore.username = user.displayName
              this.props.appStore.post_count = post_count
              this.props.appStore.order_count = order_count
              this.props.appStore.chat_count = chat_count
              this.props.appStore.user = user
              OneSignal.sendTag("username", user.displayName)
              OneSignal.sendTag("uid", user.uid)
              Actions.home({ type: 'replace' })
            }, function(error) {
              console.log(error);
github StoDevX / AAO-React-Native / source / redux / parts / notifications.js View on Github external
export function subscribe(
	channelName: NotificationChannelName,
): ChannelSubscribeAction {
	OneSignal.sendTag(channelName, 'active')
	return {type: CHANNEL_SUBSCRIBE, payload: channelName}
}
github jsappme / react-native-firebase-starter / src / views / setting_screen.js View on Github external
.then(() => {
                this.props.appStore.username = this.props.appStore.user.displayName
                OneSignal.sendTag("username", this.props.appStore.user.displayName)
                this.setState({ errMsg: "Name succesfully saved!" })
              })
              .catch((error) => {