iPhone apps can't read your SMS. There's no permission for it, no API, nothing. That's great for privacy, and a real problem if you're building an expense tracker for India or the UAE, where every UPI payment, card swipe and EMI debit arrives as a bank text.

Android trackers solved this years ago by reading the SMS inbox. On iOS I needed a different route for PayPilot, my personal finance app. This post explains the approach that works today, its limits, and what I learned building it.

The only door Apple leaves open: Shortcuts automations

Since iOS 17, the Shortcuts app can run a personal automation when a message arrives, without asking each time. The user sets it up once:

  1. Trigger: "When I receive a message" where Message contains a word.
  2. Action: your app's action, receiving the message Content (and optionally the Sender).
  3. Confirm Before Run: off, so it runs silently.

Your app never touches the inbox. iOS hands it only the texts that match the user's own filter. For a finance app that's a feature, not a workaround: users can see exactly what you receive.

Exposing an action to Shortcuts

Third-party actions show up in Shortcuts through App Intents. A minimal version looks roughly like this:

import AppIntents struct LogBankMessage: AppIntent { static var title: LocalizedStringResource = "Log bank message" static var openAppWhenRun = false @Parameter(title: "Message") var message: String @Parameter(title: "Sender") var sender: String? func perform() async throws -> some IntentResult { if let expense = BankSMSParser.parse(message, sender: sender) { try await ExpenseStore.shared.save(expense) } // Not a payment? Drop it. Nothing is stored. return .result() } } 

Keep openAppWhenRun false so the automation runs in the background, and keep perform() fast.

One trigger word to catch most payments

A message automation filters on one word. The trick that made this usable: use ited. It's the shared part of deb*ited, credited* and depos*ited*, so a single automation catches money going out and coming in from almost every bank in India and the UAE.

It also matches words like "limited" and "invited". That's fine: the parser runs on the phone, sees there's no amount or account, and drops the text. A few banks write "spent" or "UPI debit:" instead, so those users add one more automation with that word.

Parsing on the device

Bank SMS formats vary a lot, but most contain the same pieces: a currency and amount, a direction, an account or card ending, and a payee. A simplified version of the first pass:

let amount = #/(?:INR|Rs\.?|₹|AED)\s*([\d,]+(?:\.\d{1,2})?)/# let isDebit = #/debited|spent|withdrawn|debit:/# let isCredit = #/credited|received|deposited|refund/# let account = #/(?:A\/c|card)\s*(?:no\.?|ending)?\s*[Xx*]*(\d{3,4})/# 

Real messages need more than this (merchant cleanup, duplicate alerts for the same payment, multi-currency cards), but everything stays on the phone. Two rules I'd recommend to anyone doing this:

  • Discard one-time passwords immediately. Never store or log them.
  • Keep only the result (amount, merchant, date, last 4 digits), not the message text.

Apple Pay: a second automation

Wallet has its own trigger, "When any card is tapped", which passes Amount, Merchant and Card. A second App Intent receives those, so in-store Apple Pay taps are logged even when the bank's SMS is slow. Apple Pay inside apps and websites doesn't fire this trigger, but the bank SMS still covers it.

The trade-offs

  • Setup takes about two minutes per automation. Clear step-by-step screenshots matter more than any code. I wrote a full guide and a page explaining how SMS expense tracking works on iPhone, with an in-browser SMS checker.
  • One keyword per automation, so unusual bank wording needs another automation.
  • iOS 17 or later.

In return you get automatic expense logging on iPhone with no bank login, no server reading messages, and a privacy story users can verify themselves.

If you're building something similar, I'm happy to compare notes in the comments. And if you track money in India or the UAE, you can try it in PayPilot.

I'm Naveen, an indie developer in Dubai building apps under AppGenie.