On iOS we recommend doing the registration (with UP server) on the "didRegisterForRemoteNotificationsWithDeviceToken" callback: https://github.com/aerogear/aerogear.org/blob/master/docs/guides/aerogear-push-ios/iOS-app.asciidoc
However, in AeroDoc-iOS, we just stash the token: https://github.com/aerogear/aerogear-push-quickstart-ios/blob/master/AeroDoc/AeroDoc/AGAppDelegate.m#L58
And submit it, with the entire metadata, AFTER a successful login: https://github.com/aerogear/aerogear-push-quickstart-ios/blob/master/AeroDoc/AeroDoc/Classes/Controllers/AGLoginViewController.m#L144
On iOS we recommend doing the registration (with UP server) on the
"didRegisterForRemoteNotificationsWithDeviceToken" callback:
https://github.com/aerogear/aerogear.org/blob/master/docs/guides/aerogear-push-ios/iOS-app.asciidoc
However, in AeroDoc-iOS, we just stash the token:
https://github.com/aerogear/aerogear-push-quickstart-ios/blob/master/AeroDoc/AeroDoc/AGAppDelegate.m#L58
And submit it, with the entire metadata, AFTER a successful login:
https://github.com/aerogear/aerogear-push-quickstart-ios/blob/master/AeroDoc/AeroDoc/Classes/Controllers/AGLoginViewController.m#L144