Swift · iOS 15+
Request notification permission, register APNs tokens, refresh tokens without losing identity, identify or log out users, parse HoneyNotify payload fields, and track received/opened actions.
Swift Package ManagerHoneyNotify keeps secret send credentials on your backend and gives apps a tightly scoped public client key for registration and event reporting.
The checked-in implementations match the HTTP API directly, so behaviour stays inspectable.
Request notification permission, register APNs tokens, refresh tokens without losing identity, identify or log out users, parse HoneyNotify payload fields, and track received/opened actions.
Swift Package ManagerRegister the current Firebase token, handle token refresh, identify and log out users, parse notification data, and report events with sync and async helpers.
FirebaseMessagingRegister the service worker, request permission, create a VAPID-backed subscription, store the device ID, submit events, and unsubscribe cleanly.
ES module + service workerUse the ready-to-build iOS and Android projects to load your HTTPS website full screen and test native push registration, token refresh, notification events, and click URLs.
APP_DISPLAY_NAME = Your App WEBVIEW_URL = https:/$()/your-site.example HONEYNOTIFY_CLIENT_KEY = ps_public_... app_name=Your App webview_url=https://your-site.example honeynotify_client_key=ps_public_...
Every notification creation request requires title, body, a target object, and a unique idempotency key. Retry the same business event with the same key to receive the original notification ID instead of sending twice.
curl --request POST \
--url https://api.honeynotify.com/v1/notifications \
--header "Authorization: Bearer $HONEYNOTIFY_API_KEY" \
--header "Idempotency-Key: welcome-customer-123-v1" \
--header "Content-Type: application/json" \
--data '{
"title": "Welcome to the hive",
"body": "Your account is ready.",
"target": {
"type": "user",
"external_user_id": "customer_123"
}
}'Register and list devices, inspect and update user profiles, attach aliases, and deactivate registrations.
Version reusable resources, estimate audiences, submit idempotent sends, cancel pending work, and inspect results.
Create and version graphs, inspect execution statistics, configure signed destinations, and test delivery.
Record lifecycle or business events, aggregate outcomes, and create short-lived data exports.
Use least-privilege keys, handle HTTP 429 with Retry-After, and keep durable idempotency keys for send retries.
Update app safeguards, manage frequency caps, configure retention, and audit administrative changes.
Follow the quickstart, target one controlled device, and confirm the full lifecycle before expanding your audience.