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
- Verifying SDK initialization
- Testing push notifications
- Testing in-app messages
- Testing app inbox
- Debug checklist
- Common issues
Sandbox vs production
The appEnvironment parameter in ZTConfig determines which APNS environment the SDK targets:
| Environment | APNS target | When to use |
|---|---|---|
.SANDBOX | APNS sandbox | Development builds (Xcode) |
.PRODUCTION | APNS production | TestFlight, App Store, Ad Hoc |
Important: If you test with
.SANDBOXbut 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
- Your app target has the Push Notifications capability enabled.
- Your app target has the correct App Group configured (matching
appGroupIdinZTConfig). - Your Notification Service Extension target links
ZetaNotificationService. - The APNS certificate uploaded to ZMP matches your build environment (sandbox or production).
- The device is registered for remote notifications and the token has been forwarded to the SDK.
Sending a test push
- In ZMP, navigate to Settings > Integrations > Keys.
- Select your app and click Test.
- Enter the BSIN of your test device (retrieve it via
ZetaClient.shared.getCachedBSIN()). - 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_clickedevent appears in ZMP reporting. - If delivery receipts are missing, see Push Troubleshooting.
Testing in-app messages
- Create a test campaign in ZMP with channel "Mobile InApp Push".
- Target a segment that includes your test device's BSIN.
- Activate the campaign.
- Open the app and wait for the in-app message to appear (the SDK polls periodically).
- Verify lifecycle callbacks fire in your delegate.
Testing app inbox
- Send an inbox message through a ZMP campaign.
- Call
fetchMessages()and verify the message appears. - Test mark-as-read, mark-as-deleted, and CTA click tracking.
Debug checklist
| Check | How to verify |
|---|---|
| SDK initializes | Verbose logs show initialization success |
| BSIN is assigned | getCachedBSIN() returns a non-nil value |
| Events reach ZMP | Send a custom event, check ZMP event logs |
| Push token registered | Logs show device token forwarded to backend |
| Push received | Notification appears on device |
| Delivery tracked | delivered event in ZMP reporting |
| Click tracked | message_clicked event in ZMP reporting |
| In-app displays | Message appears in foreground |
| Inbox populated | fetchMessages() returns messages |
| Opt-out works | After 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
- Push Troubleshooting -- APNS error codes and common push issues.
- Logging -- configuring SDK log output.
