SurveyBoxSdk-ios Mobile SDK - iOS
The Surveybox Mobile SDK allows you to collect feedback from your mobile app users, enabling you to trigger targeted surveys to better understand your users and collect their opinions about your products. The SDK is maintained and supported by Survicate - The Customer Experience & Survey Software.

Installation

The SDK can be installed in the iOS mobile app using one of the three methods described below.

Swift Package Manager
  1. Open Xcode and select New Project in the File > New > Project... menu to create a new project for your application.
  2. Choose the App template for your project.
  3. When prompted, choose your app name (e.g., Survabox) and use the default options. Next, select the location to save the project and finally click on the Create button to finish project creation.
  4. Once the project is created, open your application in Xcode and select your project's Package Dependencies tab.
  5. Copy the Survicate SDK Swift package repository URL https://github.com/surveybox-io/SurveyBoxSdk-ios into the search field.
  6. Under Dependency Rule, select a version according to your preferences.
Requirements
  • The SDK supports iOS 13+.
  • Survicate Mobile SDK is distributed in a binary version and developed using Swift 5.3.
  • The minimum required version of Xcode is 13.0, however, we recommend using the SDK with Xcode 13.1 and above.

Using Survaybox Mobile SDK requires an account at Survaybox. Sign up for free and find your workspace key in the Access Keys tab.

Installation Steps

  1. Download the latest Surveybox SDK for iOS and extract the zip file (approximately 1.3MB).
  2. Open your existing iOS application Xcode project.
  3. Import the SurvayBox.embeddedframework into your project.
  4. Confirm the SDK files have been added to your project:
    • Navigate to your project build settings by selecting your project's Project File in the Project Navigator.
    • Select the main build target for your app.
    • Select the Build Phases tab.
    • Confirm that Thunderhead.xcframework is located in the Link Binary With Libraries section.
    • Confirm that ThunderheadBundle.bundle is located in the Copy Bundle Resources section.

Configuring Framework API Key

To use the framework's features, you need to configure the API key. Follow these steps:

  1. Open the AppDelegate.swift file.
  2. Locate the didFinishLaunchingWithOptions method.
  3. Find the line that configures the API key.
  4. Replace the placeholder YOUR_API_KEY with your actual API key and your customer email id.
  5. Save the changes to the AppDelegate.swift file.
  6. Build and run the application.

Example code in AppDelegate.swift:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    // Other code...

    // Configure your API key
    Surveybox.configure(apiKey: "YOUR_API_KEY", customer_email: "Email")

    // Other code...

    return true
}

Using Framework's WellcomeVC Class

To use the WellcomeVC class from our framework in your ViewController, follow these steps:

Import the framework at the top of your ViewController or where you want to show the Survey file:

import SurvayNew

Use the following function to present the survey:

func showSurvayBox() {
    let controller = WellcomeVC.createNew(with: "")
    controller.modalPresentationStyle = .fullScreen
    controller.modalPresentationStyle = .overCurrentContext
    self.present(controller, animated: true, completion: nil)
}

Ready to Get Started?

Follow the installation steps above to integrate the SurveyBox SDK into your iOS application and start collecting valuable user feedback today.