diff options
author | Vitaly Takmazov | 2017-12-05 02:03:05 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-12-05 02:03:05 +0300 |
commit | 659c8741b35b9ed59c46de9af06064d7a645c602 (patch) | |
tree | 476fc2722ea82b927ef3fc1e69d854618bfdfc1c /Juick/AppDelegate.m | |
parent | a228ce07cc5413a6ba164c12042ab1e4028aa5b3 (diff) |
deep link
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; } |