How to get the device token from new xCode 8, Swift 3 in iOS 10?
Here is the code to register notification:
var pushToken = String(format: "%@", deviceToken as CVarArg) pushToken = pushToken.trimmingCharacters(in: CharacterSet(charactersIn: "<>")) pushToken = pushToken.replacingOccurrences(of: " ", with: "")