Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zigpoll iOS SDK

Present Zigpoll surveys inside your iOS app.

Requirements

  • iOS 15+
  • Swift 5.7+

Installation

Swift Package Manager

In Xcode: File → Add Package Dependencies and enter:

https://github.com/zigpoll/zigpoll-ios

CocoaPods

pod 'Zigpoll'

Setup

  1. In the Zigpoll dashboard, create a survey and set its delivery type to API.
  2. Configure the SDK once, early in your app lifecycle:
import Zigpoll

Zigpoll.configure(accountId: "YOUR_ACCOUNT_ID")

Your account id is under Installation in the dashboard.

Identify the user (optional, recommended)

Zigpoll.identify(id: "user_123", metadata: [
    "email": "jane@example.com",
    "name": "Jane"
])

Identified users keep their survey state across sessions and devices — a completed survey stays completed on re-trigger. Without identify, an anonymous device-persistent id is used.

Call Zigpoll.logout() when the user signs out.

Show a survey

Zigpoll.trigger(pollId: "SURVEY_ID", from: viewController)

The survey appears in a native bottom sheet. from: is optional — the top-most view controller is used by default (handy in SwiftUI).

Metadata

Attach metadata to responses for segmentation and targeting:

Zigpoll.setMetadata(["plan": "pro", "cohort": "2026-Q3"])

The SDK automatically includes source=mobile-sdk, platform=ios, sdk_version, and your app version.

Callbacks

Zigpoll.onLoad     = { }
Zigpoll.onComplete = { responses in }
Zigpoll.onClose    = { responses in }
Zigpoll.onError    = { error in }

Development builds

Zigpoll.configure(accountId: "YOUR_ACCOUNT_ID", preview: true)

With preview: true, surveys open normally but responses are not billed or counted in analytics.

Notes

  • Call all SDK methods on the main thread.
  • Surveys with URL-dependent response settings are not supported on mobile; use the default (once per participant) setting.

Example app

A ready-to-run sample: https://github.com/zigpoll/zigpoll-ios-example

Docs

Full documentation: https://docs.zigpoll.com/installation/ios-sdk

About

Zigpoll surveys for iOS apps

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages