summaryrefslogtreecommitdiff
path: root/Juick/AppDelegate.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-12-05 02:03:05 +0300
committerGravatar Vitaly Takmazov2017-12-05 02:03:05 +0300
commit659c8741b35b9ed59c46de9af06064d7a645c602 (patch)
tree476fc2722ea82b927ef3fc1e69d854618bfdfc1c /Juick/AppDelegate.m
parenta228ce07cc5413a6ba164c12042ab1e4028aa5b3 (diff)
deep link
Diffstat (limited to 'Juick/AppDelegate.m')
-rw-r--r--Juick/AppDelegate.m11
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;
}