Present Zigpoll surveys inside your iOS app.
- iOS 15+
- Swift 5.7+
In Xcode: File → Add Package Dependencies and enter:
https://github.com/zigpoll/zigpoll-ios
pod 'Zigpoll'- In the Zigpoll dashboard, create a survey and set its delivery type to API.
- 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.
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.
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).
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.
Zigpoll.onLoad = { }
Zigpoll.onComplete = { responses in }
Zigpoll.onClose = { responses in }
Zigpoll.onError = { error in }Zigpoll.configure(accountId: "YOUR_ACCOUNT_ID", preview: true)With preview: true, surveys open normally but responses are not billed or
counted in analytics.
- 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.
A ready-to-run sample: https://github.com/zigpoll/zigpoll-ios-example
Full documentation: https://docs.zigpoll.com/installation/ios-sdk