Skip to content

Commit

Permalink
#231 Error on iOS when deleting event
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Sep 15, 2015
1 parent 16c94b5 commit f7ed04f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">

<name>Calendar</name>

Expand Down
3 changes: 2 additions & 1 deletion src/ios/Calendar.m
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f7ed04f

Please sign in to comment.