summaryrefslogtreecommitdiff
path: root/Juick
diff options
context:
space:
mode:
Diffstat (limited to 'Juick')
-rw-r--r--Juick/AppDelegate.m18
-rw-r--r--Juick/Supporting Files/Juick-Info.plist2
2 files changed, 15 insertions, 5 deletions
diff --git a/Juick/AppDelegate.m b/Juick/AppDelegate.m
index 04a441c..26b10a8 100644
--- a/Juick/AppDelegate.m
+++ b/Juick/AppDelegate.m
@@ -17,6 +17,10 @@
#import "DeviceRegistration.h"
#import "NewPostViewController.h"
+@interface AppDelegate()
+-(void) parseNotificationPayload:(NSDictionary *)userInfo;
+@end
+
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
@@ -30,9 +34,7 @@
[self registerForRemoteNotifications];
NSDictionary *userInfo = launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey];
- if (userInfo != nil) {
- self.pushedThread = [userInfo objectForKey:@"mid"];
- }
+ [self parseNotificationPayload:userInfo];
return YES;
}
@@ -68,7 +70,9 @@
//Called when a notification is delivered to a foreground app.
-(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler{
- NSLog(@"User Info : %@",notification.request.content.userInfo);
+ NSDictionary *userInfo = notification.request.content.userInfo;
+ NSLog(@"User Info : %@", userInfo);
+ [self parseNotificationPayload:userInfo];
completionHandler(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge);
}
@@ -78,4 +82,10 @@
completionHandler();
}
+-(void) parseNotificationPayload:(NSDictionary *)userInfo {
+ if (userInfo != nil) {
+ self.pushedThread = [userInfo objectForKey:@"mid"];
+ }
+}
+
@end
diff --git a/Juick/Supporting Files/Juick-Info.plist b/Juick/Supporting Files/Juick-Info.plist
index 7aabcda..f544bf8 100644
--- a/Juick/Supporting Files/Juick-Info.plist
+++ b/Juick/Supporting Files/Juick-Info.plist
@@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.0.28</string>
+ <string>1.0.29</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>