Inspiration

Travel is when you most need help, and it's also when you're most likely to be offline: on a plane, roaming without data, or in a subway station. Most AI travel apps stop working the moment the signal does. We wanted a companion that splits the work: the cloud does the heavy lifting while you have Wi-Fi, and the iPhone handles the moments that matter when you don't.

What it does

Travel Copilot follows a trip through three stages:

  • Prepare (online, cloud): paste your booking emails once. Gemini reads them into a short Vault of bookings, builds a phrase and safety pack, finds your places and saves an offline map. An AI trip planner can also suggest a destination, a day-by-day outline and real places, and friends can plan together in a shared trip room with Blue.
  • Survive (anywhere, on the device first):
    • Blue, the trip chat, answers questions about your flights and hotel with Apple's on-device model.
    • Say translates for you in the local language, with context such as politeness level and medicine names.
    • The taxi card, emergency card (also as an Apple Wallet pass), journey Live Activity, reminders and map all work with no signal.
  • Catch up (back online, cloud): translations made offline are drafts. When a good connection returns, Gemini reviews them and the same chat bubble improves itself. Questions you asked offline get answered.
  • Live Look: point the camera at a menu or sign and talk. Online it streams voice and camera to the Gemini Live API. Offline, Vision reads the text and the on-device model answers out loud.
  • The Routing Log: shows every AI request with where it actually ran and how long it took.

How we built it

  • SwiftUI + SwiftData. Everything personal stays on the phone.
  • Firebase AI Logic is used in all three of its iOS setups, behind one gateway (AIService) and a unit-tested routing policy:
    • Hybrid: .hybridModel(primary: .systemModel(), secondary: .geminiModel(...)). Survive tasks online try Apple's on-device model first, and Firebase falls back to Gemini if the device model can't start or fails.
    • Device only: Survive tasks offline, or when roaming with data saver on.
    • Cloud only: gemini-3.5-flash-lite for Prepare, catch-up, open questions and the one-time emergency-card translation, with Google Maps grounding in the planner (and an Apple Maps fallback).
    • Gemini Live API for Live Look's voice and camera.
  • Structured output (@Generable) on both the device and the cloud.
  • Firebase App Check (App Attest), Firebase Authentication, and Firestore for the optional shared trip rooms.

The harness around the models

  • Blue never writes booking facts. The on-device model only picks which booking and which field. Code shows the stored value, and rules make sure it never shows a value that doesn't answer the question.
  • Safety check on catch-up: if Gemini's review changes a number, dose or medicine name, the app keeps the draft and asks you to check.
  • No AI in the emergency path: emergency numbers are a bundled table. Only your own words are translated, once, and the translation is kept only if every number survives.
  • Redaction before any prompt leaves the gateway: card numbers, security codes and passport numbers are hidden on both routes, because a hybrid call can fall back to the cloud.
  • Live Look pauses the camera if it sees a passport or ID card.

Challenges we ran into

  • Small context, wrong answers delivered confidently. The on-device model has a small context, and it guessed wrong values. Moving fact lookup into code took Blue from 28/40 correct (6 wrong values) to 67/67 with no wrong values on our question set.
  • The on-device model can't compare numbers reliably. For "the cheapest dish", the app sorts prices in code before asking it.
  • Testing AI that is meant to run offline. Making that testable took App Check debug tokens, real-device runs, and a log of where each call actually ran.
  • Live audio on iPhone. Voice processing could stop the audio engine, so we added a fallback that restarts it.

Accomplishments that we're proud of

  • The same chat bubble starts as an offline draft and gets better once you're back online. Device and cloud visibly work together on one answer.
  • 192 unit tests covering routing, Blue's rules, the safety check, redaction, the planner and Live Look's parsing.
  • An emergency card that opens from the Lock Screen through Apple Wallet with no app and no signal.

What we learned

Hybrid isn't "cloud with an offline mode". It means choosing per task where it should run, and making that choice visible. The Routing Log turned out to be as useful for us as for judges.

What's next

  • Clearer messages and a better fallback on iPhones without Apple Intelligence.
  • More languages in the phrase packs.
  • Sharing the trip plan with friends who don't have the app.

Built With

  • activitykit
  • apple-foundation-models
  • apple-intelligence
  • firebase
  • firebase-ai-logic
  • firebase-app-check
  • firebase-authentication
  • firestore
  • gemini
  • gemini-live-api
  • healthkit
  • mapkit
  • passkit
  • swift
  • swiftdata
  • swiftui
  • vision
  • xcode
Share this project:

Updates

Submission history