> For the complete documentation index, see [llms.txt](https://docs.snapfix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snapfix.com/how-the-apps-work/screens/account/splash.md).

# Splash screen

{% hint style="info" %}
Draft, written by an agent and not yet checked by a person ([how to read these docs](https://docs.snapfix.com/how-to-read.md)). Platforms: iOS and Android. [Source on GitHub](https://github.com/snapfix/docs/blob/main/spec/screens/account/splash.md).
{% endhint %}

The logo screen the mobile apps show at launch while they decide whether to open the walkthrough, sign-in, the data download or Home.

* **Where:** iOS and Android: app launch. On Android it is the launcher activity and also the target of the links the app handles (`snapfixapp.page.link` paths `/mkt`, `/onboarding`, `/opnLogin`, and `https://dl.snapfix.com/`), so a link opens this screen first.
* **Who:** everyone who opens the app. A jailbroken iPhone never reaches it: `AppDelegate` opens [Device blocked](https://docs.snapfix.com/how-the-apps-work/screens/account/device-blocked.md) first. On a rooted Android device the splash shows, then [Device blocked](https://docs.snapfix.com/how-the-apps-work/screens/account/device-blocked.md) opens on top; debug builds skip the root check.
* **Feature:** [App launch](https://docs.snapfix.com/product/features/account/app-launch.md)

## Layout

Only the Snapfix logo shows, centred, on both apps.

* **iOS:** the storyboard also holds a date label, the slogan "If you can Snap it," / "you can Fix it !" and a detail text, but all three are hidden. The code fills the hidden date ("Tuesday, August 22, 2023" format) and slogan, and sets the detail text to empty (ios @ aa31967ac8, `SnapFix/SplashScreen/SplashScreenVC.swift:32-100`).
* **Android:** the layout holds the slogan, today's date and "and Plan it, Track it, and Comply with it", all hidden. A second block with another logo, the wordmark and a tagline is gone too; the bounce animation runs on that hidden logo, so nothing visibly moves (`SplashActivity.java:464-500`). On a screen 480 px wide or less, or 800 px tall or less, Android also marks the device as a small-screen device.
* **iOS status bar:** one second after the splash appears, iOS lays a strip over the status bar that stays for the session; the test build's strip looks different, so testers can tell the builds apart (`AppUtility.swift:5196-5222`).

## Inputs

None.

## Actions

Nothing on the screen is tappable. The app moves on by itself.

| Action                   | Who                                                       | What happens                                                                                                                                                                                                                                                                                                          | API                                                                                                     |
| ------------------------ | --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| Continue (iOS)           | Automatic, after 1 second                                 | See [Where iOS goes](#where-ios-goes).                                                                                                                                                                                                                                                                                |                                                                                                         |
| Continue (Android)       | Automatic, after 2.5 seconds                              | See [Where Android goes](#where-android-goes). While no push token is stored, the app first deletes the Firebase token and requests a new one, and only then starts the 2.5-second wait. If deleting the token fails, the splash never continues. This first-launch path also ignores the launch link's query values. |                                                                                                         |
| Log the launch (iOS)     | Automatic, signed in, with a site                         | Looks up the public IP address, then sends it with the app version and user.                                                                                                                                                                                                                                          | `save_pri_log_startappuser` on [Users API](https://docs.snapfix.com/engineering-reference/api/users.md) |
| Database changes (iOS)   | Automatic                                                 | Adds two columns to the local database (`addFUserBusinessNameColumn`, `addNeedsBulkAssignmentColumn`) while the splash loads, with no progress shown.                                                                                                                                                                 |                                                                                                         |
| Store an alert (Android) | Automatic, when the launch extras include `alert_message` | Joins `alert_message` with `alert_message_1` to `_3` and saves it with a flag that an alert is waiting. The splash does not show it.                                                                                                                                                                                  |                                                                                                         |

### Where iOS goes

The first match wins (`SplashScreenVC.swift:115-293`).

1. The password must be replaced: [Set password](https://docs.snapfix.com/how-the-apps-work/screens/account/set-password.md).
2. The app was opened from a notification:
   * chat (type 97): the Fix tab and the chat;
   * type 51: the Fix tab;
   * any other type below 100: the task, when its group is on the phone and not still syncing. An asset group opens the Plan tab, the asset list and the task; another group opens the Fix tab and the task, downloading it first when it is not on the phone ([`GET /v4/{user_uuid}/job/{job_uuid}`](https://docs.snapfix.com/engineering-reference/api/tasks.md#get-v4user_uuidjobjob_uuid)). Otherwise the steps below run.
   * A notification whose `body` is not JSON crashes the app here. One with no `body` shows an alert with the notification text and "Ok", and the steps below still run.
3. The walkthrough has not been seen: [Walkthrough](https://docs.snapfix.com/how-the-apps-work/screens/account/walkthrough.md).
4. Signed in and the account must create a site: the post-registration (start-or-join) flow. iOS sign-in always stores this flag as 0, and Android does the same after a password sign-in, so in practice this step does not run after sign-in \[[ASK-39](https://github.com/snapfix/docs/blob/main/ASK.md#ask-39-is-the-apps-setup-flow-retired)].
5. Signed in and a reload is pending: [Reloading Snapfix](https://docs.snapfix.com/how-the-apps-work/screens/account/download-data.md).
6. Signed in: the home tabs, on the tab last selected.
7. Otherwise: [Sign in](https://docs.snapfix.com/how-the-apps-work/screens/account/sign-in.md).

### Where Android goes

Before the normal order, a stored push token lets the app read the launch link after the wait (`SplashActivity.java:278-417`):

* `BusinessUUID` and `JobUUID`: that group's task list, on that task.
* `BusinessUUID` alone: that group's task list.
* `JobUUID` alone: the task, when it is on the phone; otherwise the normal order.
* `groupSearchText`, when signed in: the group list with that search.
* `parentUUID`, when signed in and that site is on the phone: the group list for that site; otherwise the normal order.
* A `ctx` value is saved for the deep-link handler as soon as the splash opens.

The resolved Firebase dynamic link is handled in a separate callback that can run after the splash has already moved on: a path with "opnLogin" opens [Sign in](https://docs.snapfix.com/how-the-apps-work/screens/account/sign-in.md); "onboarding", when signed out, saves the `TOKEN` value; `campaignID` is saved; a link with `fName`, `lName` and `email` opens [Sign up by QR invitation](https://docs.snapfix.com/how-the-apps-work/screens/account/qr-sign-up.md) with those values. A dynamic link with no path segment throws.

The normal order (`goToNextScreen`, `SplashActivity.java:503-545`):

1. The stored live or test mode differs from the build's: the local database and preferences are wiped, the user is signed out, and the walkthrough or [Sign in](https://docs.snapfix.com/how-the-apps-work/screens/account/sign-in.md) opens.
2. Signed out, and a local database migration is pending: the walkthrough or [Sign in](https://docs.snapfix.com/how-the-apps-work/screens/account/sign-in.md), without the wipe.
3. Signed in:
   * a temporary password: [Set password](https://docs.snapfix.com/how-the-apps-work/screens/account/set-password.md);
   * the account must create a site (`shouldCreateBusiness` is "1"): the start-or-join flow;
   * a saved `ctx` link: the deep-link handler;
   * a local database migration is pending: [Loading your Snapfix account](https://docs.snapfix.com/how-the-apps-work/screens/account/data-migration.md);
   * a reload or database update is pending: [Reloading Snapfix](https://docs.snapfix.com/how-the-apps-work/screens/account/download-data.md);
   * otherwise the sync service starts and the group list opens.
4. Signed out: the walkthrough if it has not been shown, otherwise [Sign in](https://docs.snapfix.com/how-the-apps-work/screens/account/sign-in.md).

## States

* **Loading:** the splash itself is the wait; there is no spinner or text. Android cancels the wait when the splash stops and schedules it again when it starts.
* **Empty:** not applicable.
* **Error:** see the iOS crash and the Android token and link problems above. A failed token request on Android still continues.
* **No permission:** no permission check. Android uses storage permission only to create a hidden `.nomedia` file.
* **Offline (mobile):** the routing reads data stored on the phone, so it works offline. On iOS the launch log fails quietly.

## Dialogs and sheets

* **Notification alert (iOS):** described in step 2 of [Where iOS goes](#where-ios-goes).
* **App update (iOS):** when Remote Config reports a newer version, a sheet shows the prompt and release notes with "Update" and "Not Now". When the installed version is below the minimum, the same content shows full screen without "Not Now". "Update" opens the App Store page. Android uses Play in-app updates. This sheet comes from the launch flow and can appear over any screen.

## Platform differences

| Topic             | iOS                                                                                                                | Android                                                                                                                                                     |
| ----------------- | ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Wait              | 1 second                                                                                                           | 2.5 seconds, after a new push token when none is stored                                                                                                     |
| Jailbreak or root | [Device blocked](https://docs.snapfix.com/how-the-apps-work/screens/account/device-blocked.md) replaces the splash | The splash shows, then [Device blocked](https://docs.snapfix.com/how-the-apps-work/screens/account/device-blocked.md) opens on top; skipped in debug builds |
| Links             | Handled from notifications here, other links by the deep-link handlers after launch                                | Read here, before the normal order                                                                                                                          |
| Signed-in home    | Home tabs, last tab                                                                                                | Group list, after starting sync                                                                                                                             |
| Mode change       | None                                                                                                               | Wipes local data when the build's mode changed                                                                                                              |
| Database changes  | Two columns added on the splash                                                                                    | A separate screen, [Loading your Snapfix account](https://docs.snapfix.com/how-the-apps-work/screens/account/data-migration.md)                             |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.snapfix.com/how-the-apps-work/screens/account/splash.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
