Skip to content

Instantly share code, notes, and snippets.

@fatbattk
Created February 10, 2021 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fatbattk/451e5508619288ecc6c8bac8343da1ad to your computer and use it in GitHub Desktop.
Save fatbattk/451e5508619288ecc6c8bac8343da1ad to your computer and use it in GitHub Desktop.
Automate deleting completed iOS Reminders w/o confirmation prompt.
// NOTE: to be used with Scriptable + iOS Shortcuts.
// Using this skips reminder removal confirmation prompts.
// uncomment to debug. QuickLook.present(JSON.stringify(args.shortcutParameter));
// expects the Reminder List name.
const argsFirst =
typeof args.shortcutParameter === 'object'
? args.shortcutParameter[0]
: args.shortcutParameter;
const reminderList = argsFirst;
const cal = await Calendar.forRemindersByTitle(reminderList);
const reminders = await Reminder.allCompleted([cal]);
for (let i = 0; i < reminders.length; i++) {
let reminder = reminders[i];
reminder.remove();
}
Script.complete();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment