Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion failure #10

Closed
grasshoppermouse opened this issue Oct 29, 2016 · 6 comments
Closed

Assertion failure #10

grasshoppermouse opened this issue Oct 29, 2016 · 6 comments
Assignees
Labels
Milestone

Comments

@grasshoppermouse
Copy link

Everything works great until I try and add an event to a new calendar, at which point I get:

*** Assertion failure in +[EKCalendar calendarForEntityType:eventStore:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/EventKit_Sim/EventKit-672/EventKit/iOS/src/EKCalendar.m:52

Here is my code:

  toggleFavorite(e) {

      var options = {
          calendar: {name: "AAPA 2017"}, \\ Works fine until I add this line
          title: this.session.title,
          startDate: new Date(new Date().getTime() + (60 * 60 * 1000)),
          endDate: new Date(new Date().getTime() + (2 * 60 * 60 * 1000)),
          location: this.session.location,
          reminders: {first: 10},
          id: "0"
      };

      let a = this.session
      if (!this.session.favorite) {

          Calendar.createEvent(options).then(
              function(createdId) {
                  console.log("Created Event with ID: " + createdId);
                  a.cal_id = createdId;
                  a.favorite = true;
              },
              function(error) {
                  console.log("Error creating an Event: " + error);
              }
          );

      } else {

          options.id = this.session.cal_id

          Calendar.deleteEvents(options).then(
              function(deletedEventIds) {
                  console.log('Event deleted');
                  a.cal_id = "0";
                  a.favorite = false;
              },
              function(error) {
                  console.log("Error deleting Events: " + error);
              }
          )
      }
  }
@EddyVerbruggen
Copy link
Owner

Could it be the space in the Calendar name?

@grasshoppermouse
Copy link
Author

Changed the name to aapa. Got the same error:

Oct 29 07:23:46 iMac aapaconferenceapp[3927]: *** Assertion failure in +[EKCalendar calendarForEntityType:eventStore:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/EventKit_Sim/EventKit-672/EventKit/iOS/src/EKCalendar.m:52
Oct 29 07:23:46 iMac com.apple.CoreSimulator.SimDevice.1B06A134-C3EC-4578-A0F7-F4A3423B4A6E.launchd_sim[1561] (UIKitApplication:org.nativescript.aapaconferenceapp[0x3caf][3927]): Service exited due to Segmentation fault: 11

@EddyVerbruggen
Copy link
Owner

Thanks for testing that, I'll take a look!

@EddyVerbruggen EddyVerbruggen self-assigned this Oct 29, 2016
@EddyVerbruggen
Copy link
Owner

Am I right concluding this test was in the Simulator? On my sim it crashes with the same error, on an actual device all is fine (even with the space in the Calendar name).

@grasshoppermouse
Copy link
Author

Yes, I'm developing in the Simulator. I haven't tried it on an actual device yet.

EddyVerbruggen added a commit that referenced this issue Oct 29, 2016
@EddyVerbruggen
Copy link
Owner

Thanks for confirming that so quickly - I've found the issue that pops up on Sim but not on a real device (which is a bit weird). Fixed in 1.1.3.

@EddyVerbruggen EddyVerbruggen added this to the 1.1.3 milestone Oct 29, 2016
EddyVerbruggen added a commit that referenced this issue Apr 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants