Testing and QA

Verify your Zeta iOS SDK integration before shipping to production.

This guide walks you through verifying each SDK feature in a test environment, from initialization and push delivery to in-app messages and app inbox, with a pre-release debug checklist.

On this page

Sandbox vs production

The appEnvironment parameter in ZTConfig determines which APNS environment the SDK targets:

EnvironmentAPNS targetWhen to use
.SANDBOXAPNS sandboxDevelopment builds (Xcode)
.PRODUCTIONAPNS productionTestFlight, App Store, Ad Hoc

Important: If you test with .SANDBOX but your ZMP app registration uses a production certificate (or vice versa), push notifications will fail silently. Make sure the APNS environment matches your certificate type.

Verifying SDK initialization

Enable verbose logging before initialization to see all SDK activity:

ZTLogger.setLogLevel(.verbose)
ZTLogger.setLogPrivacy(.public)

After calling initialize(config:), check Console.app (filter by your app's bundle ID) for:

  • A successful initialization log entry
  • A BSIN assignment or retrieval
  • A network request to the Zeta backend

Testing push notifications

Pre-flight checklist

  1. Your app target has the Push Notifications capability enabled.
  2. Your app target has the correct App Group configured (matching appGroupId in ZTConfig).
  3. Your Notification Service Extension target links ZetaNotificationService.
  4. The APNS certificate uploaded to ZMP matches your build environment (sandbox or production).
  5. The device is registered for remote notifications and the token has been forwarded to the SDK.

Sending a test push

  1. In ZMP, navigate to Settings > Integrations > Keys.
  2. Select your app and click Test.
  3. Enter the BSIN of your test device (retrieve it via ZetaClient.shared.getCachedBSIN()).
  4. Click Test Integration.

Verifying delivery and click tracking

  • Check Console.app for a delivery receipt log from the Notification Service Extension.
  • Tap the notification and verify that a message_clicked event appears in ZMP reporting.
  • If delivery receipts are missing, see Push Troubleshooting.

Testing in-app messages

  1. Create a test campaign in ZMP with channel "Mobile InApp Push".
  2. Target a segment that includes your test device's BSIN.
  3. Activate the campaign.
  4. Open the app and wait for the in-app message to appear (the SDK polls periodically).
  5. Verify lifecycle callbacks fire in your delegate.

Testing app inbox

  1. Send an inbox message through a ZMP campaign.
  2. Call fetchMessages() and verify the message appears.
  3. Test mark-as-read, mark-as-deleted, and CTA click tracking.

Debug checklist

CheckHow to verify
SDK initializesVerbose logs show initialization success
BSIN is assignedgetCachedBSIN() returns a non-nil value
Events reach ZMPSend a custom event, check ZMP event logs
Push token registeredLogs show device token forwarded to backend
Push receivedNotification appears on device
Delivery trackeddelivered event in ZMP reporting
Click trackedmessage_clicked event in ZMP reporting
In-app displaysMessage appears in foreground
Inbox populatedfetchMessages() returns messages
Opt-out worksAfter opt-out, no events sent, local data cleared

Common issues

Push notifications not received on simulator.
APNS does not deliver to the iOS Simulator. Use a physical device.

Push delivery events missing.
Verify the Notification Service Extension is correctly configured. See Push Notifications / NSE.

In-app message not appearing.
Check that the campaign is active, the device's BSIN is in the target segment, and inApp.stop() has not been called.

Events not appearing in ZMP.
Verify optIn is true and clientSecret is set. Check network logs for failed requests.

See also