Client code to send notif.
Depends on D12616
Differential D12617
[lib] implement sending APNs notifs using Tunnelbroker Authored by kamil on Jun 28 2024, 12:51 PM.
Details Client code to send notif. Depends on D12616 try {
const notif: TunnelbrokerAPNsNotif = {
type: 'APNsNotif',
headers: JSON.stringify({ 'apns-topic': 'app.comm' }),
clientMessageID: uuid.v4(),
deviceID: '[my device ID]',
payload:
'{"aps":{"alert":{"title":"your_title_here","body":"your_body_here"},"mutable-content":1}}',
};
await sendNotif(notif);
} catch (e) {
console.log(e);
}Testing this code multiple times with different TB configs and different headers. Note: Not testing different payloads, code to create that is now being moved from keyserver so assuming it should work, Tunnelbroker does not modify notif itself. (cc. @marcin)
Diff Detail
Event Timeline
Comment Actions remove callback
| ||||||||||||||||||||||