func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {}
I want deviceToken
to string
but:
let str = String.init(data: deviceToken, encoding: .utf8)
str
is nil
swift 3.0
how can I let data
to string
?
Registering for Push Notifications in Xcode 8/Swift 3.0? not working and the answer is a few months ago, I had tried it:
and print: