Fantasma iOS SDK
The iOS SDK sources live insdks/ios/FantasmaSDK, and the repo root publishes
them as the FantasmaSDK Swift package.
Public API
configure(serverURL:writeKey:) async throwstrack(_:) async throwsflush() async throwsclear() async
Usage
platform, device, app_version, os_version, and
locale for each event.
Shared ingest and queue behavior lives on the SDK behavior
page.
Install
AddFantasmaSDK from the repo root package URL:
- Package:
FantasmaSDK - Minimum version: your tagged release, for example
0.4.0
- iOS 17.0+
- macOS 14.0+
iOS-Specific Notes
- The SDK exposes a static
Fantasmafacade instead of an instance-based client. - iPhone emits
platform = "ios",device = "phone". - iPad emits
platform = "ios",device = "tablet". - Native macOS, Mac Catalyst, and iOS-on-Mac desktop-class runs emit
platform = "macos",device = "desktop". track(_:)throws when the SDK has not been configured.flush()throws when the SDK has not been configured.- Reconfiguring to a different server URL or write key discards any still-queued rows after the current upload boundary, even across app relaunches, then switches future uploads to the new destination.
- In addition to the shared upload triggers, the SDK also attempts uploads when the app enters background.