Gleap
Search…
iOS
The Gleap SDK for iOS 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.io.

πŸ— Installation

The Gleap SDK uses CocoaPods to install and manage dependencies. Open a terminal window and navigate to the root folder of your iOS project.

Install the Gleap SDK

The Gleap SDK supports the Swift Package Manager and CocoaPods.
Swift Package Manager
CocoaPods
To get started, open your Xcode project and select File > Add packages...
Now you need to paste the following package URL to the search bar in the top right corner. Hit enter to confirm the search.
Package URL:
1
https://github.com/GleapSDK/Gleap-iOS-SDK
Copied!
Now select the Gleap package and hit Add package to add the Gleap SDK to your project.
​
Gleap package for Swift Package Manager

Create a Podfile, and add your dependencies:

1
pod 'Gleap', '>= 6.3.2'
Copied!

​

Save the file and run the following command.

1
$ pod install
Copied!
These steps create a .xcworkspace file for your app. Make sure to open this file for further developments on your application.

Initialize the SDK

Open your project in XCode and navigate to your app delegate or main App class when using SwiftUI.

Import the Gleap SDK

Add the following import under your other imports.
Swift
Objective-C
1
import Gleap
Copied!
1
// When using Swift Package Manager
2
@import Gleap
3
​
4
// When using CocoaPods
5
#import <Gleap/Gleap.h>
Copied!

Initialize the SDK

The last step is to initialize & configure the Gleap SDK by adding the following code to the end of your applicationDidFinishLaunchingWithOptions delegate or init() method of your main app (SwiftUI).
Swift
Objective-C
1
Gleap.initialize(withToken: "API-TOKEN")
Copied!
1
[Gleap initializeWithToken: @"API-TOKEN"];
Copied!
Congratulations πŸŽ‰ You are now all set πŸ‘‹
​

🀝 Need help?

We are here to help! [email protected]​
Last modified 18h ago