iOS SDK

The Ours Privacy iOS SDK brings privacy-first analytics and consent management to your iOS applications. It delivers a comprehensive feature set for event tracking, user profiles, and compliance without compromising performance.

Key features include:

  • Event Tracking (track): Record custom events with optional properties.
  • User Identification (identify): Associate events with a specific user ID.
  • Lifecycle Tracking: Automatically capture app start, background, and resume events.

This integration is coming soon. Read the information below to learn more about how it will work.

Installation

Swift Package Manager

Add the package to your Xcode project:

dependencies: [
    .package(url: "https://github.com/oursprivacy/ios-sdk.git", from: "1.0.0")
]

CocoaPods

Add to your Podfile:

pod 'OursPrivacy', '~> 1.0.0'

Initialization

import OursPrivacy

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        OursPrivacy.initialize("YOUR_PROJECT_API_KEY")
        return true
    }
}

Basic Usage

// Identify a user
OursPrivacy.identify("user_12345")

// Track an event with properties
OursPrivacy.track("Item Purchased", properties: [
    "item_id": "sku-001",
    "price": 19.99
])

// Time an event
OursPrivacy.timeEvent("Image Upload")
// ... later ...
OursPrivacy.track("Image Upload")

Compatibility

  • iOS 13.0+
  • Swift 5.0+
  • Xcode 12.0+

Getting Help

For support or questions, visit our documentation site or reach out to your account representative.