I am trying to implement remote notifications. However i want to do so after the user has logged into the app.
I am using the code from:
Instead of being in the app did finish launching i have created a new method in the app delegate that holds all the code and is called from another VC after the user logs in.
As i am out side did finish launching this line had issues:
to clear the issue i added
UIApplication *application = [UIApplication sharedApplication];
but the registration fails every time because its not calling from the main thread.
Any help will be most appreciated. I am working in Objective C.