Rootless

Automate iOS, iPadOS, and macOS using plain JavaScript. Build custom widgets and interact directly with native APIs.

Download on the App Store
Rootless app interface

Plain JavaScript

Supports ES6. Scripts are stored as plain .js files on your disk.

Native APIs & Documentation

Integrate directly with iOS native APIs. Fully documented, available offline.

Siri Shortcuts

Trigger scripts via Siri. Present tables, websites, and custom HTML natively.

System Integration

Run from the Share Sheet, process inputs, and manage local files via Files.app.

x-callback-url

Communicate seamlessly and trigger workflows with other apps on your device.

Customizable & Ready

Tailor the code editor to your liking. Includes several example scripts to start immediately.

Documentation

Also inside the app, or as rootless.json.

Event

Calendar event creation and fetching

A calendar event. Use the constructor to make one, Event.fetch() to query existing ones, and save()/remove() on what you get back.

Properties

identifierString

Event identifier

titleString

Event title

locationString

Event location

notesString

Event notes

startDateDateTime ›

Event start date

Event end date

isAllDayBoolean

Whether this is an all-day event

availabilityString

Event availability

timeZoneString

Event time zone

calendarCalendar ›

Calendar this event belongs to

Event attendees

Methods

.save()Event ›

Save this event.

.remove()

Delete this event.

.setRecurrence(rule)

Set a recurrence rule on this event.

.clearRecurrences()

Remove all recurrence rules from this event.

.presentEdit()Event ›

Present the system event editor.

Event(config?)Event ›

Creates an event. Call save() on it to write it to the calendar.

  • config Any
    • title String required

      What it is called.

    • startDate DateTime required

      When it starts.

    • endDate DateTime

      When it ends.

    • isAllDay Boolean

      An all-day event ignores the times.

    • location String

      Where it is.

    • notes String

      Free text.

    • calendar Any

      Which calendar to write to. The default one when left out.

    • availability String

      busy, free, tentative or unavailable.

Event.fetch(query?, calendars?)[Event] ›

Events matching a query.

  • query Any
    • timeframe String

      today, tomorrow, thisWeek, nextWeek, thisMonth. Fills from and to for you.

    • from DateTime

      Start of the range, when timeframe is not given.

    • to DateTime

      End of the range.

    • limit Number

      Stop after this many.

  • calendars [Any]

    Only search these. Every calendar when left out.

Event.presentCreate()Event ›

Present the system event creation dialog.

Examples

Fetch today's events

const events = Event.fetch({
  timeframe: "today"
});
for (const e of events) {
  console.log(e.title, e.startDate.format("HH:mm"));
}

Create recurring event

const event = new Event({
  title: "Standup",
  startDate: DateTime.from({hour: 9, minute: 30}),
  endDate: DateTime.from({hour: 9, minute: 45})
});
event.setRecurrence({
  frequency: "weekly", interval: 1
});
event.save();