ios - How does Urban Airship gets a push token without implementing application:didRegisterForRemoteNotificationsWithDeviceToken: -
i've implemented urban airship's sdk ios8 , above.
everything ok, , i'm able send push messages device.
i have noticed wasn't required implement following method:
- (void)application:(uiapplication *)application didregisterforremotenotificationswithdevicetoken:(nsdata *)devicetoken { }
which typically used pass token apple remote server.
how possible?
thanks.
figured out.
all need create class inherits uiresponder, , conforms uiapplicationdelegate protocol.
at run time, need to:
[[uiapplication sharedapplication] setdelegate:somenewdelegate];
and foreword calls old delegate (so keep pointer it).
** edit **
there option of swizzling. have look: http://nshipster.com/method-swizzling/
Comments
Post a Comment