Swiftpack.co - qualaroo/ios-sdk as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by qualaroo.
qualaroo/ios-sdk 1.14.8
iOS SDK for Qualaroo
⭐️ 1
🕓 51 weeks ago
.package(url: "https://github.com/qualaroo/ios-sdk.git", from: "1.14.8")

QualarooSDK for iOS

Qualaroo helps companies identify and capitalize on mobile visitor revenue opportunities.

How to get started

  • Download QualarooSDKiOS and try out example app.
  • Check our wiki page.
  • Checkout documentation - It's in Documentation folder.
  • Continue reading this page.
  • Changelog


Preferred and supported installation method right now is using CocoaPods.


CocoaPods is a dependency manager for Swift and Objective-C, which automates and simplifies the process of using 3rd-party libraries like QualarooSDK in your projects. You can install it with the following command:

$ gem install cocoapods

To integrate QualarooSDKiOS into your Xcode project using CocoaPods, specify it in your Podfile:

platform :ios, '9.0'

target 'TargetName' do
  pod 'Qualaroo', :git => 'https://github.com/qualaroo/ios-sdk.git', :tag => '1.14.8'

To integrate QualarooSDKiOS into your Flutter app using CocoaPods, specify it in your Podfile:

platform :ios, '9.0'

target 'TargetName' do
  pod 'Qualaroo', :git => 'https://github.com/qualaroo/ios-sdk.git', :tag => '1.14.8'
  pod 'Qualaroo/Flutter', :git => 'https://github.com/qualaroo/ios-sdk.git', :tag => '1.14.8'

Then, run the following command:

$ pod install

Swift Package Manager (SPM)

Step 1: Select File -> Add Packages...
Step 2: Search url https://github.com/qualaroo/ios-sdk
Step 3: Select Depedency Rule -> Exact Version -> 1.14.8
Step 4: Click the button "Add Package" 
Step 5: Check if the package is added at Target -> General -> Framework, Libraries, and Embedded Content


Simply add:

github "qualaroo/ios-sdk" ~> 1.14.8

to your Cartfile


Framework can be used for both iPhones and iPads. It supports iOS 9.0 and above.


For Swift it's import Qualaroo
For Objective-C it's @import Qualaroo;

Make sure that you have set Always Embed Swift Standard Libraries to YES

Pure Obj-C projects:

If you encounter problems in your project related to Swift symbols not being recognized, please add a new empty Swift file to your project (File->New file->Swift) and make sure you create an Objective C Bridging Header when Xcode prompts you to.

Initialize the Client

In order to be able to use Qualaroo SDK you need to to initialize it first.

Qualaroo.shared.configure(with: "<your_key_here>")       

After initialization, the SDK will be accessible via Qualaroo.shared field.

Display survey with a given alias.

The survey will be displayed if all conditions configured in our dashboard are met

//Show survey with "your_survey_alias" alias
Qualaroo.shared.showSurvey(with: "your_survey_alias")

You can also check whether particular survey will be displayed (i.e. SDK is initialized and all of the conditions are met).

let willShowSurvey = Qualaroo.shared.willSurveyBeShown(with alias: String)
if (willShowSurvey) {
  // do something

Set user properties

//Set unique user id
//Add or replace user property "name" to "Hal"
Qualaroo.shared.addUserProperty("name", withValue: "Hal")
//remove property "name"

Set preferred language

You can set preferred language that you want to use when displaying surveys.

//Set preferred display language to French

Language that you provide should be an ISO 639-1 compatible language code (two lowercase letters)

Configure options for displaying survey

//Omit targetting options
    with: "your_survey_alias",
    forced: true

Observe survey related events

In order to be able to listen to events, you need to create your own implementation of a SurveyDelegate protocol:

public protocol SurveyDelegate: class {
  /// Survey view has loaded.
  func surveyDidStart()

  /// User has dismissed survey before finishing it.
  func surveyDidDismiss()

  /// User finished survey (or dismissed it on last message).
  func surveyDidFinish()

  /// Some internal error occured. Survey was closed and probably not finished.
  func surveyDidClose(errorMessage: String)

  /// Some question will be sending callbacks after user has responded. This method is optional.
  @objc optional func userDidAnswerQuestion(_ response: UserResponse)

To register a survey delegate for a given survey, use the showSurvey call:

class Foo {
    let surveyDelegate = YourSurveyDelegateImpl()

    func showMySurvey() {
        // show "your_survey_alias" survey and register a delagate
            with: "your_survey_alias",
            delegate: surveyDelegate

Run AB tests [experimental!]

You might want to test multiple surveys at once and verify which performs best. Out of surveys provided, one will be chosen on a random basis and presented to the user. This choice will be stored throught multiple app launches.

To run an AB test out of surveys "A", "B" and "C":

    with: ["my_survey_A", "my_survey_B", "my_survey_C"]

Keep in mind that this is an experimental feature and it's implementation might change in future releases.

Debug mode

In order to get additional info and help us with potential bugs and issues, use the following command:


Known issues

If you notice the following log: Could not load the "logo_ico" image referenced from a nib in the bundle with identifier "org.cocoapods.Qualaroo" this might be caused by some other library that you are using.

If possible, share your Podfile with us by creating a new issue and we will provide a workaround for you.


Check our wiki if you want to get familiar with features Qualaroo provide.


  • If you are a developer and you need help with some internal SDK issue or you found a bug write: [email protected]
  • If you want to know how can you benefit by using this SDK, or how to create survey using Qualaroo Dashboard write: [email protected]
  • If you need a feature or piece of functionality that SDK is currently not providing you, write: [email protected]


Stars: 1
Last commit: 17 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

51 weeks ago

Improved compatibility of CocoaPods for TestFlight.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics