Skip to main content
The Permutive iOS SDK can be installed via Swift Package Manager or CocoaPods.

Requirements

RequirementVersion
iOS12.0+
tvOS12.0+
Xcode13.0+
Swift5.0+
CocoaPods1.9.1+ (if using CocoaPods)

Swift Package Manager

Swift Package Manager is the recommended installation method for new projects.
1

Open Package Dependencies

In Xcode, go to File → Add Package Dependencies
2

Enter Package URL

In the search field, enter:
https://github.com/permutive-engineering/permutive-ios-spm
3

Select Version

Choose a dependency rule:
  • Up to Next Major Version: 2.2.0 (recommended)
  • Exact Version: 2.2.0
4

Add Package Product

Select Permutive_iOS and add it to your target

Package.swift (for packages)

If you’re adding Permutive to a Swift package, add it to your Package.swift:
dependencies: [
    .package(url: "https://github.com/permutive-engineering/permutive-ios-spm", from: "2.2.0")
],
targets: [
    .target(
        name: "YourTarget",
        dependencies: [
            .product(name: "Permutive_iOS", package: "permutive-ios-spm")
        ]
    )
]

CocoaPods

Basic Installation

Add the Permutive pod to your Podfile:
target 'YourApp' do
  platform :ios, '12.0'
  pod 'Permutive_iOS', '~> 2.2.0'
end
Then install:
pod install

tvOS Installation

For tvOS targets, specify the tvOS platform:
target 'YourTVApp' do
  platform :tvos, '12.0'
  pod 'Permutive_iOS', '~> 2.2.0'
end

Multi-Platform Podfile

For apps supporting both iOS and tvOS:
# Shared dependencies
def shared_pods
  pod 'Permutive_iOS', '~> 2.2.0'
end

target 'YourApp-iOS' do
  platform :ios, '12.0'
  shared_pods
end

target 'YourApp-tvOS' do
  platform :tvos, '12.0'
  shared_pods
end

Updating the SDK

To update to the latest version:
pod update Permutive_iOS

Importing the SDK

After installation, import Permutive in your Swift or Objective-C files:
import Permutive_iOS

Verifying Installation

After installing, verify the SDK is accessible:
import Permutive_iOS

// This should compile without errors
let _ = Permutive.shared
Build your project (⌘B) to confirm there are no import errors.

Mac Catalyst Support

The SDK supports Mac Catalyst. When using Swift Package Manager, add the package as normal - it works for both iOS and Mac Catalyst targets. For CocoaPods, the standard iOS pod works with Catalyst projects.

Troubleshooting

Problem: Unable to find a specification for 'Permutive_iOS'Solutions:
  • Update your CocoaPods repo: pod repo update
  • Ensure CocoaPods is version 1.9.1 or later: pod --version
  • Try clearing the cache: pod cache clean --all
Problem: Xcode cannot resolve the package.Solutions:
  • Check your network connection
  • Reset package caches: File → Packages → Reset Package Caches
  • Verify the URL is correct: https://github.com/permutive-engineering/permutive-ios-spm
Problem: No such module 'Permutive_iOS'Solutions:
  • Clean build folder: Product → Clean Build Folder (⇧⌘K)
  • For CocoaPods: Ensure you opened the .xcworkspace file, not .xcodeproj
  • Restart Xcode
Problem: Bitcode-related build errors.Solution: Bitcode is no longer required for App Store submission. Disable it in your target’s Build Settings: set Enable Bitcode to No.

Next Steps