I am developing the application into which I need to get devicetoken when app is running with AdHoc profile. Because I am not able to debug with AdHoc profile. I need to see log into which I print device token with println(). But, I doesn't show anything into it.
Finally, I got solution for it. We can also user NSLog() into swift code. so, where we want to print log there you use NSLog() function. Example ,
func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {
var deviceTokenOrigin = deviceToken.description.stringByTrimmingCharactersInSet(NSCharacterSet(charactersInString: "<>"))
var deviceTokenFiltered = deviceTokenOrigin.stringByReplacingOccurrencesOfString(" ", withString: "")
self.deviceTocken = deviceTokenFiltered
NSLog("DeviceToken : %@", deviceTokenFiltered)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With