diff options
Diffstat (limited to 'Juick/AppDelegate.m')
-rw-r--r-- | Juick/AppDelegate.m | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Juick/AppDelegate.m b/Juick/AppDelegate.m index 049e42e..4a8d762 100644 --- a/Juick/AppDelegate.m +++ b/Juick/AppDelegate.m @@ -28,7 +28,16 @@ [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDefault; - [self registerForRemoteNotifications]; + [self registerForRemoteNotifications]; + NSDictionary *userInfo = launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey]; + if (userInfo != nil) { + NSString *payload = [userInfo objectForKey:@"mid"]; + if (payload != nil) { + NSNumberFormatter *f = [NSNumberFormatter new]; + f.numberStyle = NSNumberFormatterOrdinalStyle; + self.pushedThread = [f numberFromString:payload]; + } + } return YES; } |