Where can I store the iOS device token for later use?
问题 Right now I'm getting the device token via didRegisterForRemoteNotificationsWithDeviceToken . However, I need to use the device token later on in my application after my user logs in. How can I access the deviceToken from elsewhere in application later on, and if I cannot, how/where can I store it in didRegisterForRemoteNotificationsWithDeviceToken so I can retrieve it later on? 回答1: The most simple way is to use NSUserDefaults Saving: NSUserDefaults * ud = [NSUserDefaults