Skip to main content

Notification relay

notify sends a title, an optional body, an optional severity and optional key–value fields to the app's configured messaging integrations and webhooks — without creating a bug report. There is no recording, no issue, and nothing attached beyond what you pass.

When to use it​

A full bug report — video, network traffic, logs, view hierarchy, upload — is a lot of machinery when all you need is to get a line of text into Slack or a ticket tracker. If your code already knows what happened and just needs to tell a person ("payment provider returned 502 for order A-1721"), notify is one call that delivers it to the destinations your team already set up.

It is not a replacement for bug reports: there is nothing to open in the dashboard and investigate afterwards. If you need a session someone can replay, use bug reporting or crash & error reporting.

API​

[Bugsee notifyWithTitle:@"Checkout failed"];

[Bugsee notifyWithTitle:@"Checkout failed"
body:@"Payment provider returned 502"];

[Bugsee notifyWithTitle:@"Checkout failed"
body:@"Payment provider returned 502"
severity:BugseeSeverityHigh];

[Bugsee notifyWithTitle:@"Checkout failed"
body:@"Payment provider returned 502"
severity:BugseeSeverityHigh
fields:@{@"orderId": @"A-1721", @"provider": @"stripe"}];

[Bugsee notifyWithTitle:@"Checkout failed"
body:@"Payment provider returned 502"
severity:BugseeSeverityHigh
fields:@{@"orderId": @"A-1721"}
urgent:YES];
ParameterNotes
titleRequired. A call with an empty title is ignored
bodyOptional text
severityBugseeSeverityLow … BugseeSeverityBlocker. The overloads without it send no severity
fieldsOptional string keys and string values
urgentSee Urgent notifications. The shorter overloads are not urgent
  • There is no option to turn relay on or off in the SDK: it is available once the SDK has launched, including while it is still Launching. Calls made before launch, while a launch still waits for the app to become active, or after stop:, are ignored.
  • notify returns nothing and takes no completion, so the app cannot tell whether a notification has reached the server.

Urgent notifications​

With urgent:YES, Bugsee posts that one notification right away, ahead of anything already queued — if the SDK already has its server session and the network is reachable at that moment, honoring BugseeOptionConfigWifiOnlyUpload. Otherwise it is queued like any other notification. urgent never sends the older queued notifications along with it; it only lets this one skip the line. Delivery is at least once: an urgent notification can be posted twice, and the server drops the duplicate by its id.

Offline behavior and batching​

Every notification is written to an on-device queue before anything is sent, so it survives the app being killed, and stays there while the device is offline. The queue is flushed when connectivity returns, and failed uploads are retried with an increasing delay, up to a minute apart. A batch the server rejects as invalid (a 4xx response other than 408 and 429) is dropped, not retried. Notifications are uploaded in batches of up to 50, or 256 KB.

The queue is bounded: at most 500 notifications or 1 MB, the oldest being dropped first, and a notification not sent within 72 hours is dropped.

BugseeOptionConfigNotifyFlushDelay (BugseeOptions.notifyFlushDelay, in milliseconds, default 0) sets how long Bugsee waits before flushing the queue. With 0, it flushes as soon as a notification is on disk. A positive value lets notify calls made close together go out in one upload. The delay does not apply to urgent notifications.

BugseeOptions *options = [BugseeOptions defaultOptions];
options.notifyFlushDelay = 2000;

[Bugsee launchWithToken:@"<your_app_token>" options:options];

Delivery​

Calling notify delivers nothing on its own. Notification relay has to be turned on for the application, and its destinations chosen, before any notification is sent — until then notify succeeds on the device and nothing arrives.

A subscribed webhook receives a relayed notification as the notification.relayed event — see notification.relayed for its payload.

Privacy​

A relayed notification carries what you pass to notify, plus the user identifier if one is set, the global attributes, and a snapshot of the environment (app, platform and device information), all taken at the moment of the call. It never includes video, logs, network traffic or the view hierarchy.

Nothing scrubs the title, body or fields before they are sent, so do not put anything in them that should not leave the device.

Found an issue, typo, or wrong statement on this page? Report it now →