diff options
author | Vitaly Takmazov | 2017-12-10 12:52:02 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-12-10 12:52:02 +0300 |
commit | fe136b8c6b1e97fbc08f50265d41e1280c94afe3 (patch) | |
tree | 0bb221b9418f6c1cf7ca760975703e112529a40b /Juick/AppDelegate.m | |
parent | 38d16e9d26b4f8653063ef2c572ccfc803ab165b (diff) |
another push fix
Diffstat (limited to 'Juick/AppDelegate.m')
-rw-r--r-- | Juick/AppDelegate.m | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Juick/AppDelegate.m b/Juick/AppDelegate.m index e4056e6..43494cf 100644 --- a/Juick/AppDelegate.m +++ b/Juick/AppDelegate.m @@ -39,6 +39,15 @@ return YES; } +-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { + [self parseNotificationPayload:userInfo]; + if (application.applicationState == UIApplicationStateActive) { + UIStoryboard *main = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]]; + [main instantiateInitialViewController]; + } + completionHandler(UIBackgroundFetchResultNewData); +} + - (void)registerForRemoteNotifications { UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter]; center.delegate = self; |