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.

Location

Location and geocoding services

The device's coordinates, plus geocoding, distance and opening a place in Maps. Needs location access.

Properties

latitudeNumber

Latitude

longitudeNumber

Longitude

altitudeNumber

Altitude

accuracy.horizontalNumber
accuracy.verticalNumber

Methods

.reverseGeocode(locale?)[GeoResult] ›

Reverse geocode this coordinate to get address information.

  • locale String
.formattedAddress(locale?)String

Get a formatted address string for this coordinate.

  • locale String
.distanceTo(other)Number

Distance to another coordinate in kilometers.

  • other Coordinate required
.isWithin(radiusKm, center)Boolean

Check if this coordinate is within a radius of another.

  • radiusKm Number required
  • center Coordinate required
.bearingTo(other)Number

Bearing in degrees (0-360) to another coordinate.

  • other Coordinate required
.openInMaps(label?)

Open this coordinate in Apple Maps.

  • label String
Location.current(options?)Coordinate

Get the current device location.

  • options Any
    • accuracy String

      "best", "nearest10Meters", "hundredMeters", "kilometer" or "threeKilometers". Coarser is faster and uses less battery.

Location.create(latitude, longitude)Coordinate

Create a coordinate from latitude and longitude.

  • latitude Number required
  • longitude Number required

Examples

Current location & address

const loc = Location.current({accuracy: "100m"});
const address = loc.formattedAddress();
console.log(address);

Distance calculation

const home = Location.create(40.7128, -74.0060);
const office = Location.create(40.7589, -73.9851);
const km = home.distanceTo(office);
console.log(`${km.toFixed(1)} km away`);