Qualaroo 1.14.2

Qualaroo 1.14.2

License BSD-3-Clause
ReleasedLast Release Apr 2021

Maintained by Marcin Robaczyński, Krzysztof K..




Qualaroo 1.14.2

  • By
  • Mihály Papp

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

Installation:

Preferred and supported installation method right now is using CocoaPods.

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:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'

target 'TargetName' do
  pod 'Qualaroo', '1.13.1'
end

Then, run the following command:

$ pod install

Carthage

Simply add:

github "qualaroo/ios-sdk" ~> 1.13.1

to your Cartfile

Usage

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

Imports

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
Qualaroo.shared.setUserID("HAL_9000")
//Add or replace user property "name" to "Hal"
Qualaroo.shared.addUserProperty("name", withValue: "Hal")
//remove property "name"
Qualaroo.shared.removeUserProperty("name")

Set preferred language

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

//Set preferred display language to French
Qualaroo.shared.setPreferredSurveysLanguage("fr");

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

Configure options for displaying survey

//Omit targetting options
Qualaroo.shared.showSurvey(
    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
        Qualaroo.shared.showSurvey(
            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":

Qualaroo.shared.abTestSurveys(
    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:

Qualaroo.shared.setDebugMode(true)

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.

Features

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

Communication

  • 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]