---
id: "sdk-guides/unity-cocoapods-to-spm-migration"
title: "Migrate the Unity SDK from CocoaPods to Swift Package Manager"
description: "Move your Unity app's iOS dependencies from CocoaPods to Swift Package Manager (SPM)."
permalink: "/docs/sdk-guides/unity-cocoapods-to-spm-migration"
slug: "unity-cocoapods-to-spm-migration"
version: "current"
original_source: "docs/sdk-guides/unity-cocoapods-to-spm-migration.mdx"
---

> **AI agents:** This is the Markdown version of a RevenueCat documentation page. For the complete documentation index, see [llms.txt](https://www.revenuecat.com/docs/llms.txt).

Move your Unity app's iOS dependencies from CocoaPods to Swift Package Manager (SPM).

:::warning CocoaPods releases end on December 2, 2026

[CocoaPods trunk becomes read-only](https://blog.cocoapods.org/CocoaPods-Specs-Repo/) on December 2, 2026. Existing versions remain available; migrate to Swift Package Manager to keep receiving RevenueCat's native SDK updates.

:::

## Prerequisites

- RevenueCat Unity SDK **10.0.0 or later**, with RevenueCatUI on the same version if you use it. To upgrade, follow the [v10 migration guide](https://github.com/RevenueCat/purchases-unity/blob/main/migrations/v10-MIGRATION.md).
- Unity's External Dependency Manager **2.1 or later**, or Google's EDM4U **1.2.189 or later**.
- A working iOS build committed to version control.

Keep using your existing dependency manager for this migration. Google's EDM4U is [deprecated](https://github.com/googlesamples/unity-jar-resolver/blob/v1.2.190/CHANGELOG.md), but switching managers is optional. To switch, follow the [SDK 10 dependency-manager instructions](https://github.com/RevenueCat/purchases-unity/blob/main/migrations/v10-MIGRATION.md#unitys-external-dependency-manager-replaces-edm4u).

Optional: staying on SDK 9

SDK 9 also supports SPM: use **9.16.0 or later** with RevenueCatUI, or **9.1.0 or later** without it. Keep the core SDK and RevenueCatUI on the same version.

Use Unity **2022.3 or later** with Unity's External Dependency Manager, or Unity **2021.3.15f1 or later** with Google's EDM4U.

## 1. Enable Swift Package Manager

Follow the section for your active dependency manager. From the next build, the resolver adds RevenueCat as Swift packages instead of pods.

### Using Unity's External Dependency Manager

Open **Edit > Project Settings > External Dependency Manager > iOS Resolver** and enable **Swift Package Manager Integration**.

If no other dependencies need CocoaPods, also disable **Podfile Generation** and set **CocoaPods Integration** to **None**. Choose **Silence Warning** if prompted to re-enable CocoaPods.

### Using Google's EDM4U

Open **Assets > External Dependency Manager > iOS Resolver > Settings** and enable **Swift Package Manager Integration**.

Keep **Podfile Generation** enabled: EDM4U uses it to read Swift package declarations. If no other dependencies need CocoaPods, set **CocoaPods Integration** to **None** and disable **Allow empty Podfile generation**. Choose **Silence Warning** if prompted to re-enable CocoaPods.

Click **OK** to save the settings.

## 2. Check the deployment target

Open **Edit > Project Settings > Player > iOS > Other Settings** and set **Target minimum iOS Version** to **13.0 or later**. Swift Package Manager doesn't link a package that requires a higher iOS version than your app.

## 3. Rebuild your iOS app

Build into a new folder, or choose **Replace** instead of **Append** when Unity asks about the existing build folder. This removes RevenueCat's pods and resource bundles from the previous build. If you customized the generated Xcode project, reapply your changes.

If you build the generated Xcode project yourself, open `Unity-iPhone.xcworkspace` if it exists, or `Unity-iPhone.xcodeproj` otherwise. If you reapplied `Podfile` changes, run `pod install` first. Choose **Product > Clean Build Folder** before building or archiving, and update any build scripts that reference the old workspace or run `pod install`.

## 4. Verify the migration

1. In the generated Xcode project, check that `purchases-hybrid-common` is listed under **Package Dependencies**. If the project still has a `Podfile`, check that it doesn't list `PurchasesHybridCommon` or `PurchasesHybridCommonUI`.
2. Build Debug and a release archive, and run your existing purchase flow in your test environment.
3. If you use RevenueCatUI, open the paywall and Customer Center your app uses, including from an archived build. Missing UI resources don't show up as build or launch errors.
4. Commit `ProjectSettings/GvhProjectSettings.xml`, where the resolver saves these settings.

## References

See the [Unity install guide](https://www.revenuecat.com/docs/getting-started/installation/unity), [Unity's iOS build workflow](https://docs.unity3d.com/6000.0/Documentation/Manual/iphone-BuildProcess.html), and [iOS Resolver settings reference](https://docs.unity3d.com/Packages/com.unity.external-dependency-manager@2.1/manual/ios-resolver-settings-reference.html).
