You need to register the devices before sending them push notifications.
It is suggested that you register a device with remote server on every launch. Since the container remembers the device ID when the device is registered on the remote server, it will reuse an existing device ID whenever you try to register the current device.
You should also request a remote notification token at some point in the program. If it is appropriate to ask the user for permission for remote notification, you can also do so when the application launches.
When a device token is registered with Apple Push Notification Service, you should register the device once again by updating the registration with a device token.
When the device is registered on the remote server, a device ID will be
available to the client application. If you register the current device
using the above convenient methods, the device ID is returned from
registeredDeviceID property on the container.
To send push notifications through cloud code, please refer to the Cloud Code Guide: Push Notifications.
sendCompletionHandleris always of
NSStringIn the case of sending to users, it would be expected to be an array of