How to get device id of a user in Swift

I am developing a messaging app (ios) and want to send a push notification to receiver once a message is sent. Could you please show me how to get the Device Id from devices list.

Dinesh,

Mapping of device IDs to users would need to be done at the application level. For example, you could create a table in Data service called UserDeviceMapping to store user information and device IDs there.

Regards,
Mark

I assume deviceId in the messaging API = deviceToken in

 
 
 
 
 
 
 
 
func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData)


, right?

Now I understand, the device id is an id of the device in Backendless and I get if from:Backendless.sharedInstance().messagingService.currentDevice()

So I only need to map it into UserDeviceMapping.

Thank you Mark!