Created
July 23, 2019 05:24
-
-
Save MacularDegenerate/466f7446176ba93708a1725cb6ef1a06 to your computer and use it in GitHub Desktop.
Delete all Reminders from the "Completed Archive" list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// listsToClear: defines the iOS reminders list(s) from which completed reminders will be removed. Additional lists can be added to this this array if you wish. | |
let listsToClear = ["Completed Archive"] | |
for ( j = 0; j < listsToClear.length; j++ ) { | |
let reminderList = listsToClear[j] | |
let cal = await Calendar.forRemindersByTitle( reminderList ) | |
let reminders = await Reminder.all( [cal] ) | |
for( var i = 0; i < reminders.length; i++ ) { | |
let reminder = reminders[i] | |
console.log( reminder.title ) | |
reminder.remove() | |
} | |
} | |
Script.complete() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment