2.2.0 • Published 1 month ago

scriptable-utils v2.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 month ago

Scriptable is a wonderful iOS/iPadOS app that provides a JavaScript IDE and access to system APIs like reminders, calendar, and notifications. Although it works great out-of-the-box, this set of guides will walk you through setting up a more mature environment that will enable you to quickly create interactive applications.

This package contains a bunch of utilities to make it easier to build interactive elements and use iOS API bridges in Scriptable.

My development experience is primarily with React & RxJS; if you're familiar with these frameworks, you'll notice a lot of inspiration taken from them.

Example utils

getTable

Creates a UITable with optional state and props. Calling this function returns utilities for working with the table, e.g.:

  • present - Presents the table. The return value of this function is Promise<State> (i.e. if your table has state, the final state is returned).
  • connect - A helper function for composing components used in the table.
  • isTableActive - A function to check whether the table is currently active.

UITable components

A number of premade components you can use for table layout. These components, and any table generated using getTable, have appropriate light mode/dark mode styling.

Some examples:

  • Button
  • DetailCard
  • H1, H2
  • Span
  • P (paragraph)
  • ProgressBar
  • Table (table inception)
  • Toast (notification banners)

User input components

Many of these are just wrappers on top of the input options available in Scriptable (e.g. different flavors of the Alert class), and some are UITables.

Some examples:

  • form - A form component that supports validation and 13 field types. The form fields are also available for individual use (e.g. DropdownField).
  • confirm - Dialog to prompt user to confirm an action
  • OK - Simple dialog to acknowledge a message
  • listChoose - Fullscreen option selection
  • textArea - Fullscreen text input box
  • textInput - Regular text input

What is this for?

For a long time I used iOS Reminders as my primary task tracker. There are some apps that add functionality on top of Reminders, like GoodTask (it's great), but beyond that, you're essentially stuck with what Apple gives you.

With Scriptable, you have full access to your reminders; you can delete all of them, search for what you want, display them how you like, or even build a sync between Reminders and a 3rd-party task manager with an API (like Todoist).

Same with your calendar, files in iCloud, photos...etc. Scriptable provides a bridge to data that is otherwise very locked down by Apple.

2.2.0

1 month ago

2.1.6

2 months ago

2.1.5

2 months ago

2.1.4

3 months ago

2.1.3

3 months ago

2.1.2

4 months ago

2.0.6

8 months ago

2.1.1

8 months ago

2.1.0

8 months ago

2.0.3

9 months ago

2.0.2

9 months ago

2.0.5

8 months ago

2.0.4

8 months ago

2.0.1

9 months ago

2.0.0

9 months ago

1.0.44

11 months ago

1.0.43

11 months ago

1.0.42

11 months ago

1.0.47

9 months ago

1.0.46

9 months ago

1.0.45

11 months ago

1.0.41

1 year ago

1.0.40

1 year ago

1.0.39

1 year ago

1.0.38

1 year ago

1.0.37

1 year ago

1.0.36

1 year ago

1.0.35

1 year ago

1.0.33

1 year ago

1.0.32

1 year ago

1.0.31

1 year ago

1.0.30

1 year ago

1.0.29

1 year ago

1.0.28

1 year ago

1.0.27

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago