Installation
Add the Owlmetry Swift SDK to your project via Swift Package Manager.
The Owlmetry Swift SDK is distributed as a Swift Package. It has zero external dependencies.
Xcode (recommended)
- Open your project in Xcode.
- Go to File > Add Package Dependencies.
- Enter the repository URL:
https://github.com/owlmetry/owlmetry-swift.git - Set the dependency rule to Branch and enter
main. - Click Add Package.
- Select the Owlmetry library and add it to your app target.
Package.swift
If you manage dependencies through a Package.swift file, add Owlmetry to the dependencies array:
dependencies: [
.package(url: "https://github.com/owlmetry/owlmetry-swift.git", branch: "main")
]For stable releases, pin to a version instead:
.package(url: "…", from: "X.Y.Z"). See releases for the latest.
Then add the product to your target's dependencies:
.target(
name: "YourApp",
dependencies: [
.product(name: "Owlmetry", package: "owlmetry-swift")
]
)Verify the Installation
Build your project and confirm the import compiles without errors:
import OwlmetryIf you see a "No such module 'Owlmetry'" error in your editor, this is a known SourceKit issue -- the error should resolve when you perform an actual build with Xcode or xcodebuild.
Requirements
| Platform | Minimum Version |
|---|---|
| iOS | 16.0 |
| iPadOS | 16.0 |
| macOS | 13.0 |
Next Steps
Once the package is added and your project builds, proceed to Configuration to initialize the SDK.
