Install
Get your API key from your project settings at dash.1sygnal.app .
Swift Package Manager
dependencies: [
.package(url: "https://github.com/onesygnal/onesygnal-ios.git", from: "1.0.0")
]import OneSygnalSDKCocoaPods
pod 'OneSygnalSDK', '~> 1.0.0'import OneSygnalSDKNote 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.