Hi, I’m trying to count the number of reminders I have in the Reminders App. I use this code (iOS 17)
let alert = new Alert();
alert.title = "Inbox reminders";
let num_reminders = 0
const allReminders = await Reminder.all();
for (const reminder of allReminders) {
// do stuff with them
num_reminders = num_reminders + 1
}
alert.message = "Incomplete reminders: " + num_reminders.toString();
alert.present();
I got this error:
2023-09-28 14:28:19: Error on line 5:40: -requestAccessToEntityType:completion: has been deprecated-calling this method is no longer allowed. Instead, use -requestFullAccessToEventsWithCompletion:, -requestWriteOnlyAccessToEventsWithCompletion:, or -requestFullAccessToRemindersWithCompletion:.
Any help?