# Example App

The sample app is a small, focused project that demonstrates the core OnsideKit flows end to end. It's a good starting point for seeing how the pieces fit together in a real project.

{% hint style="info" %}
[**View the Example App on GitHub**](https://github.com/onside-io/OnsideKit-iOS/tree/main/Example)
{% endhint %}

## What it demonstrates

<table><thead><tr><th width="260">Feature</th><th>API</th></tr></thead><tbody><tr><td>User authentication</td><td><a href="/pages/IDqAGYlWbxSmIjHh88J7"><code>Onside.requestLogin</code></a> / on-demand login</td></tr><tr><td>Fetching products</td><td><a href="/pages/c1zXVakY1NYA1etwIIJj"><code>Onside.makeProductsRequest(productIdentifiers:)</code></a></td></tr><tr><td>Making a purchase</td><td><a href="/pages/HhnXQpRNBjCAhuOmnFSN"><code>Onside.defaultPaymentQueue().add(_:completion:)</code></a></td></tr><tr><td>Restoring purchases</td><td><a href="/pages/ywjXlambhT5vjV5RFgHO"><code>restoreCompletedTransactions(completion:)</code></a></td></tr></tbody></table>

## Required setup

The app won't run correctly until you complete two steps:

1. **Bundle Identifier** — the app's Bundle ID in Xcode must match the one you registered in the [Onside Developer Console](https://developer.onside.io).
2. **Product identifiers** — add your product identifiers in [`ProductsRepository.swift`](https://github.com/onside-io/OnsideKit-iOS/blob/main/Example/OnsideKitExample/ProductsRepository.swift), so the app can fetch your products.

The app also calls `Onside.initialize()` at launch, as every integration must — see [Initializing the SDK](/sdk/getting-started/initialization.md). It integrates the full **OnsideKit** product; see [OnsideKit vs OnsideKitLite](/sdk/advanced-and-tooling/onsidekit-lite.md) if you need the PassKit-free build.

Full instructions are in the [Example README](https://github.com/onside-io/OnsideKit-iOS/blob/main/Example/README.md).


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onside.io/sdk/reference/example-app.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
