Commit e9da77ac by Sebastián Katzer

Renamed attribute type to trigger

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