Skip to content

findEvent and findEventWithOptions does not work properly on iOS (limitation) #573

@AlBevi

Description

@AlBevi

Calls to functions according to the documentation

window.plugins.calendar.findEvent(title,eventLocation,notes,startDate,endDate,success,error);
window.plugins.calendar.findEventWithOptions(title,eventLocation,notes,startDate,endDate,calOptions,success,error);

If the start date is very old, two problems are generated in iOS.

  1. The first is that it does not return the event ID.
  2. The second is that it generates the following error in Xcode.

Error getting calendar item with UUID XXXXX: Error Domain=EKCADErrorDomain Code=1010 "Object not found. It may have been deleted." UserInfo={NSLocalizedDescription=Object not found. It may have been deleted.}

Through testing, I have found that the startDate is limited to three years. An older date causes the above problems.

So, you must do the following before making the call:

var startDate = new Date();
startDate.setFullYear( startDate.getFullYear() - 3 );

cordova-plugin-calendar 5.1.6 "Calendar"
iOS 26.2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions