Blitzllama Documentation
  • About Blitzllama
  • Quickstart Guides
    • Creating Surveys
    • Creating Quizzes
    • Targeting Essentials
    • Customization & Personalization
    • Extracting Insights from Surveys
    • Core Concepts
  • PLATFORMS
    • Android
    • iOS
    • Web
    • React Native
    • Flutter
    • Google Tag Manager
    • Links
    • API
  • Connections - Sources
    • Mixpanel
    • CleverTap
    • Segment
    • Amplitude
    • RudderStack
    • Backend Triggers
    • Hightouch
  • Connections - Destinations
    • Amplitude
    • CleverTap
    • Mixpanel
    • Segment Streams
    • Zapier
    • Slack
    • Webhook
    • Export APIs
  • ORGANIZATION
    • Team Members & Projects
    • MTU Sampling
  • Eureka - Connections
    • Zendesk
    • Freshdesk
    • Intercom
    • Play Store
    • Appstore
Powered by GitBook
On this page
  • Overview
  • Getting Started
  • Before You Begin
  • Quick Start (5 Minutes)
  • 1. SDK Installation
  • 2. Initializing the SDK
  • 3. Create a User
  • 4. Trigger a Survey
  • Triggers and Event Properties
  • What are Triggers?
  • Adding Trigger Properties (Optional)
  • Personalizing and Localizing Surveys
  • Setting User Attributes
  • Set User Email or Name (Optional)
  • Setting Survey Language
  • User Management
  • Logout User
  • FAQ & Troubleshooting
  • Next Steps

Was this helpful?

  1. PLATFORMS

iOS

Overview

The Blitzllama iOS SDK enables you to deliver in-product surveys directly inside your iOS app. By integrating the SDK, you can collect targeted user feedback at critical moments in the user journey.

Key Features:

  • Quickly embed surveys via triggers you define in your app.

  • Identify and track users to ensure they don’t receive duplicate surveys unnecessarily.

  • Personalize surveys with user attributes (optional).

  • Localize surveys by setting different languages (optional).

Requirements:

  • iOS 11 and above

  • Access to the Blitzllama dashboard (to retrieve your API key and manage triggers).

Getting Started

Before You Begin

Obtain Your API Key: Log in to the Blitzllama dashboard, navigate to the Connections Tab, click iOS, and find your API_KEY.

Quick Start (5 Minutes)

1. SDK Installation

Option A: Cocoapods (Recommended)

  1. Add the SDK to your Podfile:

pod 'Blitzllama-ios', '1.6.29'
  1. Install the pods:

pod install

Option B: Swift Package Manager (SPM)

  • In Xcode, go to File > Add Packages.

  • Select the latest version from he master branch and add it to your project targets.

2. Initializing the SDK

In your AppDelegate (or SceneDelegate if using newer lifecycle):

import BlitzLlamaSDK
import UIKit

@main
class AppDelegate: UIResponder, UIApplicationDelegate {

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        //initialisation Blitzllama
        BlitzLlamaSDKController.getSDKManager.setBlitzLlamaAPIKey("API_KEY")
        return true
    }
}

3. Create a User

Ensure you create a user with a unique user ID before triggering surveys to avoid duplicate survey prompts:

BlitzLlamaSDKController.getSDKManager.createUser("user_id")

4. Trigger a Survey

Add a trigger in your app (e.g., on a button press or screen load) to display surveys:

BlitzLlamaSDKController.getSDKManager.fetchSurvey(triggerName: "triggerName")

Make sure the trigger name matches the configuration on the Blitzllama dashboard.

You’re now ready to collect targeted user feedback with Blitzllama’s in-app surveys! 🚀


Triggers and Event Properties

What are Triggers?

Triggers are events in your app (e.g., button presses, screen views) that prompt a survey if configured in the Blitzllama dashboard.

Adding Trigger Properties (Optional)

// Define your event properties
let eventProperties: [String: Any] = [
    "eventKey1": "eventValue1",
    "eventKey2": "eventValue2"
]

// Trigger the survey with the event properties
BlitzLlamaSDKController.getSDKManager().fetchSurvey(triggerName: "triggerName", properties: eventProperties)

Why Use Trigger Properties?

  • Filter users more precisely in the Blitzllama dashboard.

  • Understand user context when surveys are triggered.

Personalizing and Localizing Surveys

Setting User Attributes

Attributes help you segment and target specific user groups. Allowed data types are "string", "number", "date", "boolean".

BlitzLlamaSDKController.getSDKManager.updateUserAttributes("attribute_name", attributeValue: "attribute_value", dataType: "string")  

Set User Email or Name (Optional)

Providing the user’s email or name is optional but can help personalize surveys.

BlitzLlamaSDKController.getSDKManager.updateUserEmail("user_email")
BlitzLlamaSDKController.getSDKManager.updateUserName("user_name")

Setting Survey Language

BlitzLlamaSDKController.getSDKManager.setLanguageCode("en")

Why Set Survey Language?

  • Improve user experience by displaying surveys in the user's native language.

  • Better localization for multi-lingual apps.

User Management

Logout User

When a user logs out, call the logout method to clear their session:

BlitzLlamaSDKController.getSDKManager.logout()

Why Logout?

  • Prevents mixing user data between sessions.

  • Ensures a clean state when switching users.

FAQ & Troubleshooting

  • Survey not showing up?

    • Ensure createUser is called before triggering an event.

    • Check that the trigger name matches exactly what’s configured in the Blitzllama dashboard.

  • Survey not showing on the first screen?

    • This might be due to timing issues. Consider delaying the trigger call until after createUser completes.

  • Switching users?

    • Call logout() before creating a new user to avoid mixing sessions.

  • How to create triggers?

    • Add a new trigger_name in your app. If it doesn’t exist, it’s automatically created and will appear on the dashboard.

    • Alternatively, create the trigger on the Blitzllama dashboard first, then use the same trigger_name in the fetchSurvey call.

  • Need more help?

    • Reach out via support chat or email tech@blitzllama.com.

Next Steps

  • Start by adding 5 triggers for the most critical user actions in your app.

  • Create your first survey on the Blitzllama dashboard.

  • Customize the UI/UX of the survey on the Blitzllama dashboard.

PreviousAndroidNextWeb

Last updated 3 months ago

Was this helpful?

Use the repository.

You can also use backend events to launch in-app surveys. Check out for more details.

Set the survey language using an (e.g., "en" for English).

Blitzllama iOS SDK git
https://documentation.blitzllama.com/connections/backend-trigger
ISO 639-1 codes