# Install eSIM

### Direct Installation

The `installProfile` method can be used to install an eSIM profile on a user's device. The device operating system will show up an installation wizard for the user.

```
let profile = <use activateInventory method>
Gigastore.installProfile(profile: profile,
                      completion: { (profile, error) in
    print("profile: \(profile)")
    print("error: \(error)")
})
```

This function returns either the installed profile or an error object containing the error.

### QR Code Installation

Due to restrictions, **Direct Installation** might not be available for some apps.&#x20;

In this case, you can use the iOS QR code feature.&#x20;

First, generate a QR code based on the `activationCode` of the `profile` object. Several libraries generate QR codes on iOS. Ensure you generate a QR code with a valid activation code starting with *LPA$*.

Then, provide the QR code to the user via email or as an image in your app that can be saved to photos.

{% hint style="info" %}
Please add a proper UX to explain to your users how to install the eSIM profile.
{% endhint %}

Check our [eSIM Profiles](/api/esim-profiles.md) section of our API if you want to initiate this process from your app middleware.


---

# 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.giga.store/ios/install-profile.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.
