Can't install it? The video records the app's UI test from start to finish. The app appears at 0:23. The gallery picture "One report, start to finish" shows the three screens below.

One report, start to finish (a fictional one, from the video)

  1. You type: "About 10 minutes ago a man who said he was a prosecutor called and told me my account was used in a crime. I sent 3,200,000 won from my Shinhan account to Kookmin 110-234-567890. I also installed the app he sent me."
  2. The app highlights the words each fact came from: the prosecutor call, 3,200,000 won, Shinhan, Kookmin 110-234-567890, the installed app. How the money was sent isn't in the text, so that one stays at "Not sure" and the app asks you.
  3. After you check them, the steps appear. If their app is on this phone, you're told to call from another one. The call buttons are 1588-9999 (KB Kookmin, where the money went), 1599-8000 (Shinhan, your bank) and 112. Under them is a Korean script to read out or hold up, and the date the written form is due: Friday, 27 November 2026.

Inspiration

The Korean police's counter-scam unit puts losses from phone and message fraud at about 1.26 trillion won a year (its site, https://www.counterscam112.go.kr, doesn't say which year). In September 2026 the same unit reported 387 billion won lost from January to August, 56 percent less than a year before (https://www.counterscam112.go.kr/bbs002/board/boardDetail.do?pstSn=353). That's still a lot. People lose it a few million won at a time.

Under the law a victim can ask the bank to freeze the receiving account, and whatever is still in it can be returned. But in the first hour, people don't know which number to call or what to tell the bank. They also don't know a written form is due within three business days of the phone request.

This term, in a two-person database course project, I built a ledger that tracks the legal steps after a payment freeze. This app is for the victim, in the first hour of that same process.

What it does

You write what happened, in Korean or English. The app reads it into a small record: kind of fraud, amount, your bank, the receiving bank, when, whether you installed something, whether you gave out ID details. Each value is shown with the words it came from, highlighted in your own text, and you can correct it.

Then it lays out the steps from a sourced rulebook: call buttons, a Korean script to read out or show to bank staff, and the deadline for the written application. Goods you paid for that never arrived get a different path, since the freeze law doesn't cover them. Last, it drafts the written statement in formal Korean.

How I used Firebase AI Logic hybrid inference

If the app falls back to the cloud, your text leaves the phone. I'm fine with that for official wording, but not for what you wrote, so the app handles the two in separate lanes.

Official wording holds no personal data, so it goes through HybridModel(primary: on-device, secondary: Gemini). The sentences of the law are in Korean. In English, the step behind the urgent call is put in plain English straight away, and every other step has a button for it. The answer shows which model gave it; the app reads the model name from the response.

For anything you wrote, the app asks Apple's on-device model through FirebaseAI.SystemLanguageModel, with structured output. The cloud comes in only after you've seen the exact text, with account, phone, card and ID numbers replaced by placeholders, and what Google's terms allow Google to do with it. The real numbers are put back on the phone. I don't use HybridModel in this lane. Its fallback is silent, and after a failed cloud attempt the app would have no way to tell you whether your text had left the phone. Here the app logs the attempt before sending and tells you if it falls back.

A ledger screen lists each model request, on the device or in the cloud, with the number of characters sent. Failed requests show up there too. At launch it asks the on-device model for one word; if the system says the model is available but it doesn't answer, the first screen says so instead of "ready". App Check is installed before Firebase starts. I didn't add user accounts, a database or analytics.

Both lanes have run against a real Firebase project with App Check enforced, in the iOS 26.5 simulator on a Mac with Apple Intelligence on (the simulator uses the Mac's copy of Apple's model). The video is a recording of that. In it, the app reads your written account on the device. The on-device model also rewrites the official sentence, but names the wrong public body, so the app doesn't show it. The statement is drafted in the cloud after you see the masked text. One scene comes from a recording made earlier the same day with Apple Intelligence off, where the on-device attempt failed and Firebase AI Logic passed the same sentence to Gemini.

Technological implementation

  • When reading your account, the model doesn't give the app any numbers. It copies the words that state the amount, and my code parses them. A quote that isn't in your text, or that holds a number your text doesn't state, isn't used. When money was sent more than once, the model quotes each amount and the code adds them up.
  • The kind of fraud and the yes-or-no answers need a quote too. The on-device model often copied a sentence with its ending changed, so for the kind only, a quote also counts if its beginning is in your text word for word; the highlight shows your own words. A yes or no needs the exact words, with no "not" next to them that the quote leaves out. If the quoted words point to a different kind than the one the model picked, the app leaves the kind empty and asks.
  • A bank the model names goes on the sending or receiving side only when the words next to its name say which. Otherwise the app says it saw the bank and asks.
  • Bank numbers come only from a table: 19 banks, each number found on the bank's own website on 21 November 2026 and stored with that page and date. When I asked both models for the 19 numbers from memory, the on-device model matched none of the app's table and the cloud model matched 13.
  • Every rulebook step cites a source and the sentence relied on. A test fails if a step states a number its sources don't.
  • If a plain-words rewrite has a digit the original doesn't, or names a public body the original doesn't, the app doesn't show it. The on-device model called the Financial Supervisory Service (1332) the Financial Services Commission, a different body, so this check was added.
  • 79 unit tests cover parsing, masking, quote checking, the rule engine and the shipped data. A UI test walks through the whole flow and fails if a model answer doesn't come back. The video is a recording of that test.
  • Measured on 26 fictional fraud reports (208 fields) kept apart from rule-writing, though I did see their totals during development, counting wrong values apart from missing ones. Pattern code with no model: 129 correct, 76 missing, 3 wrong. On-device model, one run (it always gives its most likely answer; two runs on the development cases matched exactly): 154 correct, 47 missing, 7 wrong. Cloud model (gemini-3.5-flash-lite, masked text), three runs: 187 to 188 correct, 17 to 18 missing, and the same 3 wrong each time; the on-device model gets those 3 wrong too, and most of its other wrong values are the kind of fraud. Of the 24 reports with a kind of fraud to name, pattern code names none correctly, the on-device model 9 and the cloud model 21 to 22. A read took about 3.4 seconds on the device and 1.7 in the cloud, so the on-device model's part here is keeping your text on the phone, not speed.
  • The evaluation log in the repo lists the problems I hit. The default model's free limit was 20 requests a day. App Check refused my first request. Requests hung for three minutes until I added a timeout. A code review found my own account number could end up in the freeze script. On-device answers changed between runs until the app asked for the most likely one. A later review found that a looser quote check I'd added could let a wrong yes-or-no answer through, so I narrowed it and measured again.

Design

The first screen is for writing. You check the result on the review screen, and the call buttons are on the steps screen. The review screen shows your own text with the words behind each value highlighted. On the steps screen each step folds to three lines, so the first number to call is on screen without scrolling, and the Korean script is big enough to hold up to a teller. A counter shows the minutes since the transfer. The interface is in English and Korean, in light and dark mode. The official sentences are quoted in Korean, with the plain-words rewrite beside them.

Potential impact

It's built for South Korea, where the steps are set by law and have deadlines. I had two people in mind. One is a foreign resident, who can write in English and get the Korean words to say. The other is whoever is helping the victim: the app tells anyone who installed the scammer's app to stop using that phone and call from another one.

Nobody outside this project has used it yet. It needs iOS 26. On-device reading needs a phone with Apple Intelligence; on other phones the app works by pattern and, if you agree, the cloud. It gives information from official sources and isn't legal advice.

Challenges

Firebase iOS SDK 13 moved hybrid inference to an interface that needs Xcode 27. I pinned 12.19.3, which has HybridModel and builds with Xcode 26, and kept every model call in one file. The rules needed the most care. The Act was renamed in October 2026. Sales fraud got its own police route in June 2026. And if the written form is late, the bank must give notice of a further 14 days before the request lapses. The simulator also reported the model as ready when it wasn't, which is why the app now checks it at launch.

What's next

Next I want to try it on a real phone, since everything on-device so far ran in the simulator. I haven't measured the draft statement or the plain-words rewrite yet, and the rulebook needs a review by a practising lawyer. The project also needs billing turned on, so that the paid terms apply to text sent to the cloud.

Tools used

Swift, SwiftUI, Firebase AI Logic (firebase-ios-sdk 12.19.3), Firebase App Check, Firebase Remote Config, Apple Foundation Models, Gemini (gemini-3.5-flash-lite), XcodeGen, XCTest, ffmpeg, Claude Code (AI coding assistant).

I started on 20 November 2026 and the last commit is from 27 November. Freeze First was entered in Google's #BuildHybridAI 2026 hackathon and in GenHacks.

Built With

  • apple-foundation-models
  • claude-code
  • firebase-ai-logic
  • firebase-app-check
  • firebase-remote-config
  • gemini
  • swift
  • swiftui
Share this project:

Updates

Submission history