Commit e9da77ac by Sebastián Katzer

Renamed attribute type to trigger

parent 3c3147a7
...@@ -61,9 +61,9 @@ ...@@ -61,9 +61,9 @@
* *
* @return [ NSString* ] * @return [ NSString* ]
*/ */
- (NSString*) type - (NSString*) triggerType
{ {
NSString* type = [dict objectForKey:@"type"]; NSString* type = [dict objectForKey:@"trigger"];
return type.length ? type : @"normal"; return type.length ? type : @"normal";
} }
...@@ -276,12 +276,12 @@ ...@@ -276,12 +276,12 @@
*/ */
- (UNNotificationTrigger*) trigger - (UNNotificationTrigger*) trigger
{ {
NSString* type = [self type]; NSString* type = [self triggerType];
if ([type isEqualToString:@"location"]) if ([type isEqualToString:@"location"])
return [self triggerWithRegion]; return [self triggerWithRegion];
if (![type isEqualToString:@"normal"]) if (![type isEqualToString:@"date"])
NSLog(@"Unknown type: %@", type); NSLog(@"Unknown type: %@", type);
if ([self isRepeating]) if ([self isRepeating])
......
...@@ -21,16 +21,16 @@ var exec = require('cordova/exec'), ...@@ -21,16 +21,16 @@ var exec = require('cordova/exec'),
// Default values // Default values
exports._defaults = { exports._defaults = {
id: 0, id: 0,
type: 'normal',
text: '', text: '',
title: '', title: '',
sound: 'res://platform_default', sound: 'res://platform_default',
trigger: 'date',
badge: undefined, badge: undefined,
data: undefined, data: undefined,
every: undefined, every: undefined,
at: undefined, at: undefined,
actions: undefined, actions: undefined,
actionGroupId: undefined actionGroupId: undefined,
}; };
// Listener // Listener
......
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