Manos Chorianopoulos

push notifications fix

...@@ -43,6 +43,9 @@ ...@@ -43,6 +43,9 @@
43 NSString *_alert; 43 NSString *_alert;
44 NSString *_sound; 44 NSString *_sound;
45 45
46 + NSUInteger _mutable_content;
47 + NSString *_category;
48 +
46 // Test code for push 49 // Test code for push
47 // NSString *_category; 50 // NSString *_category;
48 // NSInteger _mutable_content; 51 // NSInteger _mutable_content;
...@@ -63,6 +66,9 @@ ...@@ -63,6 +66,9 @@
63 */ 66 */
64 @property (nonatomic, copy) NSString *sound; 67 @property (nonatomic, copy) NSString *sound;
65 68
69 +@property (nonatomic) NSUInteger mutable_content;
70 +@property (nonatomic, copy) NSString *category;
71 +
66 /*! 72 /*!
67 @methodgroup Initializing a WLAPSItem Object 73 @methodgroup Initializing a WLAPSItem Object
68 */ 74 */
......
...@@ -52,9 +52,15 @@ ...@@ -52,9 +52,15 @@
52 if ([idx isKindOfClass:[NSNull class]] ) 52 if ([idx isKindOfClass:[NSNull class]] )
53 continue; 53 continue;
54 54
55 + if ([key isEqualToString:@"mutable-content"]) {
56 + [self setValue:idx forKey:@"mutable_content"];
57 + } else {
55 [self setValue:idx forKey:key]; 58 [self setValue:idx forKey:key];
56 } 59 }
57 - @catch (NSException *e) { WLLOG(@"%@: UnKnown Key:%@ - Value:%@", [e name], key, idx); } 60 + }
61 + @catch (NSException *e) {
62 + WLLOG(@"%@: WLAPSItem UnKnown Key:%@ - Value:%@", [e name], key, idx);
63 + }
58 @finally { } 64 @finally { }
59 } 65 }
60 } 66 }
......
...@@ -46,6 +46,11 @@ ...@@ -46,6 +46,11 @@
46 NSString *_message; 46 NSString *_message;
47 WLAPSItem *_apsItem; 47 WLAPSItem *_apsItem;
48 NSDictionary *_customData; 48 NSDictionary *_customData;
49 +
50 + NSString *_EXTRA_FIELDS;
51 + NSString *_attachment_url;
52 + NSString *_data;
53 + NSString *_url;
49 } 54 }
50 /*! 55 /*!
51 @property action 56 @property action
...@@ -90,6 +95,11 @@ ...@@ -90,6 +95,11 @@
90 */ 95 */
91 @property (nonatomic, strong) NSDictionary *customData; 96 @property (nonatomic, strong) NSDictionary *customData;
92 97
98 +@property (nonatomic, copy) NSString *EXTRA_FIELDS;
99 +@property (nonatomic, copy) NSString *attachment_url;
100 +@property (nonatomic, copy) NSString *data;
101 +@property (nonatomic, copy) NSString *url;
102 +
93 /*! 103 /*!
94 @methodgroup Initializing a WLBaseItem Object 104 @methodgroup Initializing a WLBaseItem Object
95 */ 105 */
......
...@@ -55,13 +55,15 @@ ...@@ -55,13 +55,15 @@
55 [self setValue:idx forKey:@"action"]; 55 [self setValue:idx forKey:@"action"];
56 else if ([key isEqualToString:@"aps"]) 56 else if ([key isEqualToString:@"aps"])
57 _apsItem = [[WLAPSItem alloc] initWithAttributes:(NSDictionary*)idx]; 57 _apsItem = [[WLAPSItem alloc] initWithAttributes:(NSDictionary*)idx];
58 + else if ([key isEqualToString:@"attachment-url"])
59 + [self setValue:idx forKey:@"attachment_url"];
58 else 60 else
59 [self setValue:idx forKey:key]; 61 [self setValue:idx forKey:key];
60 } 62 }
61 @catch (NSException *e) { 63 @catch (NSException *e) {
62 [_customData setValue:idx forKey:key]; 64 [_customData setValue:idx forKey:key];
63 - WLLOG(@"%@: UnKnown Key:%@ - Value:%@", [e name], key, idx); } 65 + WLLOG(@"%@: WLBaseItem UnKnown Key:%@ - Value:%@", [e name], key, idx); }
64 - @finally { } 66 + @finally {}
65 } 67 }
66 } 68 }
67 69
......