What is the sourceID parameter for creating an OS calendar?

I am trying to create an OS calendar through my app to allow users to bring the app’s calendar to their default calendar (iCal for ios). There is a required parameter called “sourceID” in the function Calendar.createCalendarAsync(details) in the expo docs.

I followed the advice of this stack overflow question to get the correct sourceID of the device.

However, I still receive the error that the “Calendar has no source”.

If anyone knows anything I could try please let me know.

My code to create the calendar is this:

const iCalID = await Calendar.createCalendarAsync({
      title: 'Ahead',
      color: colors.mainRed,
      entityType: Calendar.EntityTypes.EVENT,
      sourceID: this.props.iCalSourceID
    });

and in my case this.props.iCalSourceID is this: AB55FD7A-A77F-4285-BBA4-C7CD92128A5A

Can anyone please help with what I am doing wrong? By all accounts, it looks like I am doing it right. I know on expo’s github for calendar they grab it by finding the “default” calendar but I don’t believe that exists anymore, and when I print out all of the calendars there is nothing that resembles what they used to find the sourceID.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.