builttoroam / device_calendar

A cross platform plugin for modifying calendars on the user's device
https://pub.dev/packages/device_calendar
BSD 3-Clause "New" or "Revised" License
269 stars 267 forks source link

Error when retrieving events on iOS #255

Open guilhermeagostinelli opened 4 years ago

guilhermeagostinelli commented 4 years ago

The following error occurs when calling retrieveEvents on iOS:

[EventKit] Error getting shared calendar invitations for entity types 3 from daemon: Error Domain=EKCADErrorDomain Code=1014 "(null)"

Here's the relevant code:

final deviceCalendarPlugin = DeviceCalendarPlugin();
final eventsRes = await deviceCalendarPlugin.retrieveEvents(
    'C56AB255-BB3C-4340-8E05-8F28523A5C1B',
    RetrieveEventsParams(
      eventIds: [
        '8AF734E7-5DD0-4D5E-B2A4-BEAE16F6FCAC:806C0D27-52E3-42D3-A609-EC5960AEA156'
      ],
      startDate: DateTime.now(),
      endDate: DateTime.now().add(const Duration(days: 7)),
    ),
);

$ flutter doctor -v

[✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.6 19G73, locale en)
    • Flutter version 1.17.5 at /Users/user179517/flutter
    • Framework revision 8af6b2f038 (5 weeks ago), 2020-06-30 12:53:55 -0700
    • Engine revision ee76268252
    • Dart version 2.8.4

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, set ANDROID_SDK_ROOT to that location.
      You may also want to add it to your PATH environment variable.

[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.6, Build version 11E708
    • CocoaPods version 1.8.4

[!] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[!] IntelliJ IDEA Community Edition (version 2019.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.dev/intellij-setup/#installing-the-plugins

[✓] VS Code (version 1.47.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.13.1

[✓] Connected device (1 available)
    • iPhone SE (2nd generation) • D091AD3F-FA9D-469F-A8A1-6C3B391DB27C • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-6
      (simulator)

! Doctor found issues in 3 categories.
guilhermeagostinelli commented 4 years ago

Not sure if it is because of this error, but the plugin is not working properly on release mode (iOS only, android is working fine).

Could it be related to https://github.com/builttoroam/device_calendar/issues/186?

thomassth commented 2 years ago

Is this still happening in v4?