---
title: "Ionic Capacitor SDK setup"
description: "Install and initialize Gleap in your application with the Gleap Ionic Capacitor SDK. Follow the integration code examples."
url: https://docs.gleap.ai/en/articles/563-ionic-capacitor-sdk-setup
collection: "Ionic / Capacitor"
updated: 2026-11-01
language: en
---

# Ionic Capacitor SDK setup

Install and initialize Gleap in your application with the Gleap Ionic Capacitor SDK. Follow the integration code examples.

The Gleap SDK for Ionic / Capacitor is the easiest way to integrate Gleap into your apps. Communicate with your users directly and build better software by discovering their everyday pain points. Gleap is your all-in-one customer feedback tool for apps and websites.

For the SDK to work, you need an API key, which you can get for free at [app.gleap.ai](https://app.gleap.ai).

## 🏗 Installation

Installing the Gleap SDK takes only a few seconds.

**Capacitor 7 or later**

Install the **Gleap** package via npm.

```javascript
npm install capacitor-gleap-plugin
```

Sync your capacitor dependencies:

```javascript
npx cap sync
```

#### iOS

The plugin needs Capacitor 7 or later and an iOS deployment target of **15.0** or higher. On iOS it is a Swift package that pulls the native [Gleap iOS SDK](https://github.com/GleapSDK/Gleap-iOS-SDK) from GitHub; it still ships a podspec for apps that use CocoaPods.

**Swift Package Manager (recommended).** New apps: `npx cap add ios --packagemanager SPM`. Existing CocoaPods apps can move with `npx cap spm-migration-assistant` once all their plugins support SPM (see [Capacitor: Swift Package Manager](https://capacitorjs.com/docs/ios/spm)). Set the app target's iOS deployment target to 15.0 in Xcode, then run `npx cap sync ios` again so `CapApp-SPM/Package.swift` declares iOS 15 as well.

**CocoaPods.** Set `platform :ios, '15.0'` in `ios/App/Podfile` and run `npx cap sync ios`.

> **Warning:** CocoaPods trunk becomes read-only on December 2, 2026, so Gleap iOS SDK versions released after that date are not on trunk. For those, `pod install` fails with `None of your spec sources contain Gleap (= X.Y.Z)`. Add the SDK from GitHub to your app target in the Podfile, with the version the plugin requires (`s.dependency 'Gleap', 'X.Y.Z'` in `node_modules/capacitor-gleap-plugin/CapacitorGleapPlugin.podspec`):
> `target 'App' do`
> `capacitor_pods`
> `# Add your Pods here`
> `pod 'Gleap', :git => 'https://github.com/GleapSDK/Gleap-iOS-SDK.git', :tag => 'X.Y.Z'`
> `end`

* * *

Initialize the Gleap SDK by adding the following code to your index.js/.tsx file or main component.

```Ionic title="/ Capacitor"
import { Gleap } from 'capacitor-gleap-plugin';

// Please make sure to call this method only once!
Gleap.initialize({ API_KEY: "YOUR_API_KEY" });
```

**Capacitor 6**

Install the **Gleap** package via npm.

```javascript
npm install GleapSDK/Capacitor-SDK#capacitor-v6 --save
```

Sync your capacitor dependencies:

```javascript
npx cap sync
```

* * *

Initialize the Gleap SDK by adding the following code to your index.js/.tsx file or main component.

```Ionic title="/ Capacitor"
import { Gleap } from 'capacitor-gleap-plugin';

// Please make sure to call this method only once!
Gleap.initialize({ API_KEY: "YOUR_API_KEY" });
```

**Capacitor 5**

Install the **Gleap** package via npm.

```javascript
npm install GleapSDK/Capacitor-SDK#capacitor-v5 --save
```

Sync your capacitor dependencies:

```javascript
npx cap sync
```

* * *

Initialize the Gleap SDK by adding the following code to your index.js/.tsx file or main component.

```Ionic title="/ Capacitor"
import { Gleap } from 'capacitor-gleap-plugin';

// Please make sure to call this method only once!
Gleap.initialize({ API_KEY: "YOUR_API_KEY" });
```

**Capacitor 4 or earlier**

Install the **Gleap** package via npm.

```javascript
npm install GleapSDK/Capacitor-SDK#capacitor-v4 --save
```

Sync your capacitor dependencies:

```javascript
npx cap sync
```

* * *

Initialize the Gleap SDK by adding the following code to your index.js/.tsx file or main component.

```Ionic title="/ Capacitor"
import { Gleap } from 'capacitor-gleap-plugin';

// Please make sure to call this method only once!
Gleap.initialize({ API_KEY: "YOUR_API_KEY" });
```

> **Note:** WebView console and network logs and dark mode (SDK **v19.0.0**) need the Capacitor 7 plugin (`capacitor-gleap-plugin`).

> **Info:** Congrats! You are now all set 🎉 Report your first bug by using the feedback button

## 🌍 Data region

Gleap stores and processes your data in the region you selected at signup: EU (default) or US. If your project lives in the US region, select the region **before** initializing the SDK (requires SDK v18.0.0 or newer). EU projects don't need this call.

```javascript
await Gleap.setRegion({ region: "us" });
await Gleap.initialize({ API_KEY: "API_KEY" });
```

See [Data regions](https://gleap-developer-docs.gleap.help/en/articles/711-data-regions) for all hosts and details.

## Required permissions (Android)

In order to use the image picker for attachments, add the following permissions to your `AndroidManifest.xml`.

```javascript
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VISUAL_USER_SELECTED"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
```

The following permissions are needed to enable audio recordings.

```javascript
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-feature android:name="android.hardware.audio.pro" android:required="false" />
<uses-feature android:name="android.hardware.microphone" android:required="false" />
```

## Required permissions (iOS)

In order to use the image picker for attachments, add the following permissions to your `Info.plist`.

```javascript
<key>NSPhotoLibraryUsageDescription</key> <string>We need access to your photo library to allow you to select an image.</string> 

<key>NSCameraUsageDescription</key> <string>We need access to your camera to take photos.</string> 
```

The following permissions are needed to enable audio recordings.

```javascript
<key>NSMicrophoneUsageDescription</key> <string>We need access to your microphone to record audio with videos.</string>
```

## 🤝 Need help?

We are here to help! [hello@gleap.ai](mailto:hello@gleap.ai)

## Related

- [Ionic Capacitor SDK: User identity](https://docs.gleap.ai/en/articles/564-ionic-capacitor-sdk-user-identity.md)
- [Ionic Capacitor SDK: Frontend tools](https://docs.gleap.ai/en/articles/565-ionic-capacitor-sdk-frontend-tools.md)
- [Ionic Capacitor SDK: Track events](https://docs.gleap.ai/en/articles/566-ionic-capacitor-sdk-track-events.md)
- [Ionic Capacitor SDK: Track pages](https://docs.gleap.ai/en/articles/567-ionic-capacitor-sdk-track-pages.md)
- [Ionic Capacitor SDK: Forms](https://docs.gleap.ai/en/articles/568-ionic-capacitor-sdk-forms.md)
