I have to get the device token from the Apple Push Notification server in the static library.
This means that the user does not need to implement the DeRegisterForRemoteNotificationsWithDeviceToken method in AppDelegate, I have to handle it myself, and get the device token.
-
This is where the device is possible to get another token in the program?
-
Is there a way that will inform me when the device token is generated?
Because I have to register a device token after the user logs-in. So I have implemented my code such as
-
didRegisterForRemoteNotificationsWithDeviceToken I am speaking static library method to save device token (This will save device token in NSUSerDefault)
-
After the user logs in, I am sending the device token to the server to add the device token to the database.
I do not have to save the device token and then to register, I have to log the device token once the user has to log in and send it to the server.
So, is this possible?
Thanks & amp; Push is the only way to get the device token: Regards, Abbas Mulani
didRegisterForRemoteNotificationsWithDeviceToken
After registration for the information from Apple (by calling NSUSerDefault
) can do.
If you want to get the device token form Apple only when the user logs in, you should call registerForRemoteNotificationTypes:
only when
Comments
Post a Comment