> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apsio.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart for iOS

> From an app key to your first crash in an iOS or iPadOS app, then symbols for the builds you ship.

You need an iOS or iPadOS app with a deployment target of iOS 15 or later, and an Apsio
project.

## 1. Get an app key

Each app in a project has its own key, for example `a-…`. Find it in the console under
Settings → Apps. App keys ship inside your app, so they are not secrets.

## 2. Add the SDK

In Xcode, choose File → Add Package Dependencies, enter
`https://github.com/Apsio/apsio-apple-sdk`, choose the `main` branch, and add the `Apsio`
product to your app target.

## 3. Start Apsio

```swift theme={null}
import SwiftUI
import Apsio

@main
struct ShopApp: App {
    init() {
        Apsio.start(key: "a-…")
    }

    var body: some Scene {
        WindowGroup { ContentView() }
    }
}
```

For a UIKit app delegate, see [Start](/sdks/ios#start). Run the app: sessions, app start
and network requests are now recorded.

## 4. Cause a test crash

Add a temporary button that crashes:

```swift theme={null}
import SwiftUI

struct ContentView: View {
    var body: some View {
        Button("Test crash") { fatalError("Apsio test crash") }
    }
}
```

1. Run the app from Xcode, then stop it in Xcode: the debugger would catch the crash
   before Apsio does.
2. Open the app from the home screen and tap **Test crash**.
3. Open the app again. Apsio sends the crash report at this launch.

## 5. See the crash

The crash appears as an issue in the console. You can also read it with the
[read API](/read-api) and a project token, issued by the console:

```sh theme={null}
curl -H "Authorization: Bearer $APSIO_TOKEN" \
  "https://api.apsio.io/v1/projects/$PROJECT_ID/issues"
```

Until you upload symbols, its stack shows addresses rather than function names.

## 6. Upload symbols

Symbols belong to one build: a crash is symbolicated with the dSYM of the exact build that
crashed. Upload them with the [`apsio` CLI](/cli) and your project's
[upload token](/symbols/upload#upload-tokens). For a build you archive (Product → Archive),
upload the archive:

```sh theme={null}
apsio login --with-token < token.txt
apsio upload dsyms ~/Library/Developer/Xcode/Archives/*/Shop*.xcarchive
```

Crashes that arrived before the upload are symbolicated once it lands. Debug builds have no
dSYM by default, so the test crash above keeps its addresses unless you
[upload symbols for Debug builds](/symbols/xcode#debug-builds). To upload on every build, add
the [Xcode build phase](/symbols/xcode).

## Next

* [The iOS SDK](/sdks/ios): users, logs, errors, spans and SwiftUI screens.
* [Sessions and release health](/concepts/sessions): what crash-free means.
* Remove the test button before you ship.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.