Skip to Content

Install

Both channels below are the intended distribution — as if OneSygnalSDK were already published as a closed-source XCFramework per ADR 0006. See the caveat at the end of this page for where the current repository actually stands.

Swift Package Manager

dependencies: [ .package(url: "https://github.com/onesygnal/onesygnal-ios.git", from: "0.1.0") ]
import OneSygnalSDK

CocoaPods

pod 'OneSygnalSDK', '~> 0.1.0'
import OneSygnalSDK

Note the import name is OneSygnalSDK, not OneSygnal — the public API type itself is a class named OneSygnal (OneSygnal.shared), and the module deliberately avoids sharing that name.

Info.plist

Add your API key under the OneSygnalApiKey key:

<key>OneSygnalApiKey</key> <string>YOUR_API_KEY</string>

See Configuration for the setApiKey() code-based override and what happens if this key is missing.

Podspec / distribution caveat

OneSygnalSDK.podspec’s :git source points at https://github.com/onesygnal/onesygnal-ios.git, which does not currently exist — no Podfile in this repository references this podspec, and no CI job publishes it or the XCFramework scripts/build-xcframework.sh can produce locally. Package.swift likewise builds OneSygnalSDK from local source (.dynamic library target) rather than declaring a binary target.

In short: the install snippets above document ADR 0006’s intended public distribution model, not something you can pod install or resolve via SPM today. This is a known gap, raised here as a follow-up rather than papered over — see apps/ios-sdk/ARCHITECTURE.md (“What’s pending”) for the full list of what’s unbuilt.