getCalendarsAsync() not working on iOS 13

Please provide the following:

  1. SDK Version: 35 (didn’t work on SDK 33 either)
  2. Platforms(Android/iOS/web/all): iOS 13

So our app uses the calendars API and everything worked fine on a device running iOS 12, however, once I upgraded to iOS 13 I noticed that the ExpoCalendar.getCalendarsAsync() function just wasn’t working at all.

An exception was thrown while calling `ExpoCalendar.getCalendarsAsync` with arguments `(
    "<null>"
)`: *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[2]
- node_modules\react-native\Libraries\BatchedBridge\NativeModules.js:104:55 in <unknown>
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:414:4 in __invokeCallback
- ... 4 more stack frames from framework internals

This is the error that I’m constantly getting, I once had it not give me this error, but it then gave me an empty array (which isn’t the case either).

I’ve checked permissions and everything, I even upgraded all packages (expo-calendar) but still no luck there.

import * as ExpoCalendar from 'expo-calendar';

await ExpoCalendar.requestPermissionsAsync();
const localCalendars = await ExpoCalendar.getCalendarsAsync();

I also couldn’t find anyone else that had the problem, so that’s why I’m posting, been Googling for a while now.

Same here. Just updated to iOS 13 and my doesnt create an event. No error either. 3 days from that post, have you got a solution?

@evotec Nope! Still no solution and I really want to get this sorted as it is one of our main features of the app…

Is this within the Expo client or a standalone app?
Does it make a difference if you try it on the Simulator vs. a real device?
If you have a minimal reproduction recipe then it would probably be best to create an issue in the expo repository on GitHub.

It is within the expo client, I can’t test on the simulator because of this issue Problem with expo-localization - #5 by herbertlim

So it was tested on a real device, I’ll try and create an issue there then. Actually made the issue now, [iOS 13] Fetching calendars not working · Issue #5809 · expo/expo · GitHub you can follow it here.

1 Like

I tried both, managed and ejected. Same issue.

@evotec Try this, I recently found this out, does this help resolve the issue for you? Just try and reconnect all the accounts that you’ve connected as well as the subscribed calendars.

Okay I’ve got some more information, my agenda was being fetched from Google. It all works fine in the Calendar app, but I thought let’s just remove the Google account and reconnect it. And well, it actually worked… now I don’t really know if we’re able to reproduce this issue and if it’s an issue in the Expo SDK or if it’s an Apple bug…

1 Like

I did it on my device without luck. The simulator runs great. I disabled an reenabled my gmail calendar but still no error.

@evotec how did you disable and enable? Did you go to passwords and accounts, remove the account and re-add it there? Because that’s what I meant, (in settings of your iPhone)

@jordywijman Yes that’s exactly what i did and still nothing. Should i do that with all accounts? I will try that

@evotec yes it’s worth a try!

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