Test the SDK integration

This article provides brief information on methods that you can use to test the integration of the SDK with your iOS app.

These are some of the guidelines to verify the correctness of the SDK integration. The most important thing is to ensure that the app is working as it was before integrating with the SDK.

1. SDK initialized correctly

Look at the SDK logs and ensure that the Blueshift SDK is initialized correctly and check that app fires certain events, such as identify, app_open, etc., correctly. To enable the SDK logs, refer to this section of SDK initialization.

2. Identify events

Ensure that you set the user info using the BlueshiftUserInfo class as described in this section and fire the identify event after that. This event will register the user on Blueshift with given user details such as email id, customer id, phone number, etc.

You can search the user on Blueshift using email, customer id from the Customer Data > Attributes page.

3. Custom events

Ensure that your app fires custom events correctly. Confirm that the events show up correctly on the Dashboard, under the [Customer Data > Attributes](https://app.getblueshift.com/dashboard#/app/customer/index) > User profile activity.

4. Opt-in/out from push and in-app notifications

You can opt-in/out from push and in-app notifications at any moment based on your use case. Consider a scenario where you want to send push and in-apps only in the user logged-in state. You can use the SDK enablePush and enableInApp flags to enable notifications after login and disable them on logout.

Ensure that you fire the identify event after changing the flags to update notification settings on the Blueshift platform.

5. Push notifications

Verify that the device token is sent to the Blueshift platform and it appears inside the identify event under attribute name device_token. In case the device token is not sent to Blueshift, check if you have integrated SDK for the remote notification methods correctly. Ensure that the user has accepted the push notification permission.

Integrate the Notification Service Extension in order to support image-based notifications and push notification delivered stats.
Integrate Notification content extension to support the carousel-based push notifications. Ensure that you set the appGroupId. The appGroupId is required to share the deep links for the carousel notifications.

Use the Push Studio editor to create different types of push messages, send them using test sends, and ensure that the notifications render correctly on the device.

6. In-app notifications

Ensure that you have enabled the flag for in-app notifications and registered your screens to receive the in-app notifications.

Use the In-App Studio editor to create different types of in-app messages, send them using test sends, and ensure that the in-app notifications render correctly on the device.

7. Campaigns

Create a test campaign for push and in-app notifications for the test users and run a campaign against them. Ensure that you see the delivered and click stats for push notifications and delivered, open, and click stats for in-app notifications. You can verify these stats, from the User Profile > Campaigns page or from the campaign report.

If you don't see the above mentioned stats, then something is wrong with the SDK integration. Verify that your SDK is configured properly.

8. Blueshift Deep Links

To test the Blueshift deep links/universal Links, use the Email studio editor to create an email template and use the test send option to send an email with Blueshift deep links/universal links. You can also try sending an email using a campaign. Refer to this document to know more email links. Make sure the deep links open inside the app and the web-only links open in the browser.

Refer to this troubleshooting guide in case anything goes wrong.


Did this page help you?