Using the Calendar API


#1

Hi!

So I’m currently trying to use the new Calendar API, and I’m struggling to figure out how to use the permissions in conjunction with the getCalendarsAsync function. My code currently appears as follows for this:

const the_response = Expo.Permissions.askAsync(‘calendar’)
var obj = Expo.Calendar.getCalendarsAsync()

However, all getCalendarsAsync returns is the same Promise returned initially by Expo.Permissions.askAsync, and not the array of calendar ids.

Thanks!


#2

Nevermind, it has been solved!


#3

Glad to hear your issue is fixed. Was the problem the missing awaits? (The results of all async functions, i.e. promises, need to be awaited in some form.)


closed #4

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