Commit fe2116db by Sebastián Katzer

Added support for title property

parent 3e17f3cc
...@@ -103,6 +103,7 @@ ...@@ -103,6 +103,7 @@
{ {
double timestamp = [[options objectForKey:@"date"] doubleValue]; double timestamp = [[options objectForKey:@"date"] doubleValue];
NSString* msg = [options objectForKey:@"message"]; NSString* msg = [options objectForKey:@"message"];
NSString* title = [options objectForKey:@"title"];
NSString* sound = [options objectForKey:@"sound"]; NSString* sound = [options objectForKey:@"sound"];
NSString* repeat = [options objectForKey:@"repeat"]; NSString* repeat = [options objectForKey:@"repeat"];
NSInteger badge = [[options objectForKey:@"badge"] intValue]; NSInteger badge = [[options objectForKey:@"badge"] intValue];
...@@ -113,7 +114,7 @@ ...@@ -113,7 +114,7 @@
notification.fireDate = date; notification.fireDate = date;
notification.timeZone = [NSTimeZone defaultTimeZone]; notification.timeZone = [NSTimeZone defaultTimeZone];
notification.repeatInterval = [[[self repeatDict] objectForKey: repeat] intValue]; notification.repeatInterval = [[[self repeatDict] objectForKey: repeat] intValue];
notification.alertBody = ([msg isEqualToString:@""]) ? nil : msg; notification.alertBody = title ? [NSString stringWithFormat:@"%@\n%@", title, msg] : msg;
notification.soundName = sound; notification.soundName = sound;
notification.applicationIconBadgeNumber = badge; notification.applicationIconBadgeNumber = badge;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment