How to install HAT on iPhone using a Mac

HAT does what RescueTime, Toggl, Gyroscope, ScreenZen, Opal does, and RescueTime, Toggl, Gyroscope, ScreenZen, Opal costs Paid. This guide gets you the free one.

What you end up with

HAT running on your iPhone. It is free, and it stays free — there is no account, no trial and no subscription at the end of this.

Time
About 56 minutes
Steps
15
Cost
Free

Before you start

These are one-time installs. If you have used Terminal before, you may have them already — the first step checks.

  1. Install Git

    Apple opens a small installer.

    Type this into Terminal, then press Return.

    xcode-select --install

    You know this worked when: Git responds with a version number

  2. Install Node LTS

    Choose the macOS Installer (.pkg).

    Open download

    You know this worked when: Node responds with a version number

Install HAT

  1. Open Terminal

    Keep it open beside this page.

    You know this worked when: Terminal is open

  2. Check Git and Node

    Git and the current Node LTS are required.

    Type this into Terminal, then press Return.

    git --version
    node --version

    You know this worked when: Git and Node respond with version numbers

  3. Copy HAT to this Mac

    Type this into Terminal, then press Return.

    cd ~
    if [ ! -d HAT/.git ]; then
    git clone https://github.com/andromedvn/HAT.git
    fi

    You know this worked when: A HAT folder appears

  4. Open the HAT folder

    Type this into Terminal, then press Return.

    cd HAT

    You know this worked when: Your terminal prompt is inside the HAT folder

  5. Use the reviewed version

    Type this into Terminal, then press Return.

    git checkout b0342d85e0b7f44e63e86f2fd9e47b7cac10c109

    You know this worked when: Git reports the reviewed commit

  6. Build the native project

    This can take a few minutes the first time.

    Type this into Terminal, then press Return.

    cargo build --release

    You know this worked when: The command finishes without an error

  7. Install Xcode

    Large — start it early. Open it once afterwards so it finishes installing.

    Open the App Store page

    You know this worked when: Xcode opens without asking to finish setup

  8. Open the iPhone project

    In Xcode choose Open, then pick the ios folder inside HAT.

    You know this worked when: Xcode opens with the HAT project

  9. Sign the app with your Apple ID

    Signing & Capabilities, then Team. A free Apple ID works.

    You know this worked when: Signing & Capabilities shows no red error

  10. Plug in your iPhone

    Unlock it, tap Trust, then pick it from the device menu.

    You know this worked when: Your iPhone is selected as the run destination

  11. Press Run

    The ▶ button. The first build takes a few minutes.

    You know this worked when: Xcode finishes with Build Succeeded

  12. Trust yourself on the iPhone

    Settings, General, VPN & Device Management, your Apple ID, then Trust.

    You know this worked when: Your Apple ID shows as trusted

  13. Open HAT on your phone

    You know this worked when: HAT opens on your phone

If something goes wrong

Nothing here can damage your computer, and every step can be run again safely. If a command fails, the usual cause is the step before it not having finished.

Still stuck? Tell us what happened and we will fix the guide. Include the step number and we can usually reproduce it.

Have a different setup?

This guide follows andromedvn/HAT at the reviewed version b0342d8. Pinning the version is why the commands here keep working after the project changes.

Back to HAT