# OnsideKit Example App

Our sample application provides a practical, hands-on demonstration of the OnsideKit SDK's core functionalities. It's the perfect starting point for understanding how to integrate our SDK into your own iOS project.

The app is designed to be simple and focused, showcasing the essential features you'll need to get up and running quickly.

[**View Example App on GitHub**](https://github.com/onside-io/OnsideKit-iOS/tree/main/Example)

**What This Example Demonstrates**

By exploring the code, you will learn how to implement the following key features:

* **User Authentication:** A basic implementation of the user sign-in flow.
* **Fetching Products:** Loading a list of available in-app purchases from the Onside backend.
* **Making a Purchase:** Initiating and completing the purchase flow for a selected product.
* **Restoring Purchases:** Implementing the "Restore Purchases" functionality for non-consumable items.

**⚠️ Important: Required Setup**

Before you can build and run the project, two essential configuration steps are required. **The application will not function correctly without them.**

1. **Configure the Bundle Identifier**\
   The app's Bundle ID in Xcode must exactly match the one you registered for your application in the Onside Developer Console.
2. **Add Your Product SKUs**\
   You must provide your product identifiers in the [ProductsRepository.swift](https://github.com/onside-io/OnsideKit-iOS/blob/main/Example/OnsideKitExample/ProductsRepository.swift#L50) file. The app uses these SKUs to fetch the correct product information from the Onside backend.

Detailed instructions for these steps can be found in the [README.md](https://github.com/onside-io/OnsideKit-iOS/blob/main/Example/README.md) file within the repository.


---

# 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/onsidekit-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.
