Test Your Integration

Confirm the device is subscribed, send a test push, and check every app state.

Test in 6 steps#

  1. Enable debug logging

    Pass debug: true (or __DEV__) to initialize() so SDK activity shows in your console.

    javascript
    await NotifySphere.initialize({
      // ...
      debug: __DEV__, // logs SDK activity to the console
    });
  2. Confirm the device is subscribed

    Launch the app, then open the app in the dashboard and check Users / Subscriptions. Your device should appear with an active status. See Subscriptions.

  3. Send a test push

    In the dashboard go to Campaigns → Push Notification, write a title and body, target yourself or a small segment, and send.

  4. Test each app state

    Send a push in each of these states and confirm it arrives:

    • Foreground — app open on screen
    • Background — app minimized
    • Killed — app swiped away
    javascript
    NotifySphere.onNotification((notification, type) => {
      // type: 'received' | 'press' | 'opened' | 'initial'
      console.log(type, notification);
    });

    Your onNotification callback reports received, press, opened, or initial depending on the state.

  5. Check the delivery report

    Open Sent Messages for the send and confirm delivered and opened counts moved. See Sent Messages.

  6. Test conversion attribution

    If you use campaign deep links, open the link and call postEvent() with the nsClick token, then confirm the event is attributed to the campaign.

Stuck or something unclear? Contact us and we'll help.