From f7ed04f787a3f931cb1c8a663fde2da722231df5 Mon Sep 17 00:00:00 2001 From: EddyVerbruggen Date: Tue, 15 Sep 2015 16:17:23 +0200 Subject: [PATCH] #231 Error on iOS when deleting event --- package.json | 2 +- plugin.xml | 2 +- src/ios/Calendar.m | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 93035414..6660d8bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-calendar", - "version": "4.4.1", + "version": "4.4.2", "description": "This plugin allows you to manipulate the native calendar.", "cordova": { "id": "cordova-plugin-calendar", diff --git a/plugin.xml b/plugin.xml index 8d734ac0..6f53c83e 100644 --- a/plugin.xml +++ b/plugin.xml @@ -3,7 +3,7 @@ xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-calendar" - version="4.4.1"> + version="4.4.2"> Calendar diff --git a/src/ios/Calendar.m b/src/ios/Calendar.m index 02bbed51..b22a55b2 100644 --- a/src/ios/Calendar.m +++ b/src/ios/Calendar.m @@ -279,7 +279,8 @@ - (void) deleteEventFromCalendar:(CDVInvokedUrlCommand*)command NSTimeInterval _endInterval = [endTime doubleValue] / 1000; // strip millis NSDate *myEndDate = [NSDate dateWithTimeIntervalSince1970:_endInterval]; - NSArray *matchingEvents = [self findEKEventsWithTitle:title location:location notes:notes startDate:myStartDate endDate:myEndDate calendar:calendar]; + NSArray *calendars = [NSArray arrayWithObject:calendar]; + NSArray *matchingEvents = [self findEKEventsWithTitle:title location:location notes:notes startDate:myStartDate endDate:myEndDate calendars:calendars]; NSError *error = NULL; for (EKEvent * event in matchingEvents) {