Skip to Content
PlatformsiOSOverview

iOS SDK

The iOS SDK is a native Swift package (current version 0.1.0) that owns transport, storage, trigger evaluation, and survey rendering itself — it shares no code with the Android SDK, only contracts. It renders surveys in their own UIWindow, attached to the current foreground scene above native and Flutter content alike, with no protocol conformance required on your AppDelegate, SceneDelegate, or any UIViewController.

Distribution model

Per ADR 0006 (closed-source binary distribution), the intended distribution is a closed-source XCFramework, published via an SPM binary target and a CocoaPods podspec — no source, mirroring Survicate’s shape. The current repository state falls short of that: Package.swift builds OneSygnalSDK from local source rather than a binary target, no CI job produces the XCFramework, and OneSygnalSDK.podspec’s :git source points at a repository that does not exist. See Install for what this means in practice.

The module/import name is OneSygnalSDK, not OneSygnal — the public API type itself is a class named OneSygnal (OneSygnal.shared), and a module sharing its exact name with a public top-level type breaks Swift’s .swiftinterface verification under BUILD_LIBRARY_FOR_DISTRIBUTION=YES.

Platform floors

s.ios.deployment_target = '15.0', Swift 5.9. Depends on GRDB.swift (~> 6.0) for local SQLite storage. The whole public API is wrapped in #if canImport(UIKit) — it only builds where UIKit exists (a plain swift test on macOS compiles the API surface down to nothing; CI uses xcodebuild test against a Simulator instead).