My problem is the following,
In one of my ViewControllers, when the user taps a button , I register the device for notifications with this code.
[[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)]; Then, in the AppDelegte, there are two methods. One that receives the token and one that gets the error.
- (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken - (void)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error And now comes the problem, in didRegisterForRemoteNotificationsWithDeviceToken I need to send the token to my server, and with it some data that the user has entered in the View, like its username.
How can I get this data?