Application: remoteNotifications property
The remoteNotifications property is the entry point for remote notifications: registering with Apple, getting the device token, and receiving silent pushes. It only exists in projects that install @nacrejs/push.
Value
A RemoteNotifications. For its members, see RemoteNotifications.
- Read-only. Assigning to it throws
TypeError. - Every read returns the same object (measured).
- Without
@nacrejs/pushinstalled, the property doesn't exist:'remoteNotifications' in applicationisfalse, and the types don't include it either. - After installing it, add the line
/// <reference types="@nacrejs/push" />at the top of the entry file so the types include it.
Examples
js
/// <reference types="@nacrejs/push" />
console.log('remoteNotifications' in application);Result: prints true in projects with @nacrejs/push installed, and false in projects without it.
Corresponding iOS API
The members of UIApplication for registering for remote notifications, and the app delegate methods that report the results; see RemoteNotifications.
See also
RemoteNotifications- Remote notifications
- Capability packages: available only when installed