Manos Chorianopoulos

push notifications fix

......@@ -43,6 +43,9 @@
NSString *_alert;
NSString *_sound;
NSUInteger _mutable_content;
NSString *_category;
// Test code for push
// NSString *_category;
// NSInteger _mutable_content;
......@@ -63,6 +66,9 @@
*/
@property (nonatomic, copy) NSString *sound;
@property (nonatomic) NSUInteger mutable_content;
@property (nonatomic, copy) NSString *category;
/*!
@methodgroup Initializing a WLAPSItem Object
*/
......
......@@ -52,9 +52,15 @@
if ([idx isKindOfClass:[NSNull class]] )
continue;
if ([key isEqualToString:@"mutable-content"]) {
[self setValue:idx forKey:@"mutable_content"];
} else {
[self setValue:idx forKey:key];
}
@catch (NSException *e) { WLLOG(@"%@: UnKnown Key:%@ - Value:%@", [e name], key, idx); }
}
@catch (NSException *e) {
WLLOG(@"%@: WLAPSItem UnKnown Key:%@ - Value:%@", [e name], key, idx);
}
@finally { }
}
}
......
......@@ -46,6 +46,11 @@
NSString *_message;
WLAPSItem *_apsItem;
NSDictionary *_customData;
NSString *_EXTRA_FIELDS;
NSString *_attachment_url;
NSString *_data;
NSString *_url;
}
/*!
@property action
......@@ -90,6 +95,11 @@
*/
@property (nonatomic, strong) NSDictionary *customData;
@property (nonatomic, copy) NSString *EXTRA_FIELDS;
@property (nonatomic, copy) NSString *attachment_url;
@property (nonatomic, copy) NSString *data;
@property (nonatomic, copy) NSString *url;
/*!
@methodgroup Initializing a WLBaseItem Object
*/
......
......@@ -55,13 +55,15 @@
[self setValue:idx forKey:@"action"];
else if ([key isEqualToString:@"aps"])
_apsItem = [[WLAPSItem alloc] initWithAttributes:(NSDictionary*)idx];
else if ([key isEqualToString:@"attachment-url"])
[self setValue:idx forKey:@"attachment_url"];
else
[self setValue:idx forKey:key];
}
@catch (NSException *e) {
[_customData setValue:idx forKey:key];
WLLOG(@"%@: UnKnown Key:%@ - Value:%@", [e name], key, idx); }
@finally { }
WLLOG(@"%@: WLBaseItem UnKnown Key:%@ - Value:%@", [e name], key, idx); }
@finally {}
}
}
......