Help to convert to new library backendless.messaging

How to convert this to swift 3???

backendless?.messaging.notificationTypes = UIUserNotificationType.alert.rawValue | UIUserNotificationType.sound.rawValue | UIUserNotificationType.badge.rawValue

ERROR>>> messaging service has no member notificationTypes…

You should use UNUserNotificationCenter in iOS10:

if #available(iOS 10.0, *) {
 let center = UNUserNotificationCenter.current()
 center.requestAuthorization(options: [.alert, .sound, .badge]) { (granted, error) in
 }
 }
 else {
 let settings = UIUserNotificationSettings(types:[.alert, .sound, .badge], categories: nil)
 UIApplication.shared.registerUserNotificationSettings(settings)
 }

And you should implement UNUserNotificationCenterDelegate (in AppDelegate, for example) to receive the push messages.

Please investigate our sample project in attachment.

TestS3PushNotify.zip (19.31MB)