Skip to main content

Overview

The Permutive iOS SDK enables user segmentation, personalization, and ad targeting in your iOS and tvOS applications. Track user behavior, manage identities across devices, and deliver targeted advertising through integrations with major ad platforms. Current Version: 2.2.0
Platform Support: The SDK supports iOS 12.0+ and tvOS 12.0+. Both platforms share the same API with minor differences noted in the documentation.

Getting Started

New to the Permutive iOS SDK? Start here.

Core Concepts

Understand the fundamental concepts of the Permutive SDK.

Features

Detailed guides for specific SDK features.

Integrations

Connect Permutive with ad platforms and other services.

Common Tasks

let aliases = [
    Alias(tag: "email_sha256", identity: emailHash),
    Alias(tag: "internal_id", identity: userId, priority: 1)
]
try? Permutive.shared.setIdentities(aliases: aliases)
var trigger: TriggerAction?

func watchCohort() {
    trigger = Permutive.shared.triggerProvider?.action(
        boolFor: ["premium_user"],
        action: { query, isInCohort in
            if isInCohort {
                self.showPremiumFeatures()
            }
        }
    )
}

// Release trigger when done
deinit {
    trigger = nil
}
let adRequest = GAMRequest()
adRequest.customTargeting = Permutive.shared.googleCustomTargeting(
    adTargetable: pageTracker
)
bannerView.load(adRequest)

Requirements

RequirementVersion
iOS12.0+
tvOS12.0+
Xcode13.0+
Swift5.0+
Add the package URL in Xcode:
https://github.com/permutive-engineering/permutive-ios-spm
Select Permutive_iOS as the package product.

Key Concepts

- **Cohorts**: All segments a user belongs to - **Activations**: Cohorts configured for specific ad platforms
- **Behavioral**: Based on user history (e.g., "sports enthusiast") - **Contextual**: Based on current content (e.g., viewing sports article right now)
Multiple identifiers (email, user ID, ad ID) linked to single user profile for cross-device tracking.

Additional Resources

API documentation and technical reference.

FAQ

PageTracker is the recommended approach for most use cases. It automatically tracks Pageview events, measures engagement time, and enables contextual cohorts when URLs are provided.Direct event tracking via track(event:properties:) is for specialized cases where you need to track custom events that don’t fit the page model.
Enable logging in your initialization options:
let options = Options(
    apiKey: "<your api key>",
    organisationId: "<your org id>"
)
options.logModes = LogMode.all
Messages will appear in the Xcode console.
Use hashed emails (SHA-256), internal user IDs, or the vendor identifier (identifierForVendor). Never send plain text PII. See the Identity Management guide for details.
Permutive recommends against using IDFA due to Apple’s App Tracking Transparency requirements. Consider using identifierForVendor or hashed email addresses instead. See the IDFA Provider guide if you do need IDFA.

Getting Help

Privacy & Compliance

Permutive is designed with privacy in mind: GDPR compliant, CCPA compliant, no PII storage, user consent respected, and transparent data usage.