Migrate the Unity SDK from CocoaPods to Swift Package Manager
Move the RevenueCat Unity SDK's iOS dependencies from CocoaPods to Swift Package Manager
Move your Unity app's iOS dependencies from CocoaPods to Swift Package Manager (SPM).
CocoaPods trunk becomes read-only 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.
- 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, but switching managers is optional. To switch, follow the SDK 10 dependency-manager instructions.
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
- In the generated Xcode project, check that
purchases-hybrid-commonis listed under Package Dependencies. If the project still has aPodfile, check that it doesn't listPurchasesHybridCommonorPurchasesHybridCommonUI. - Build Debug and a release archive, and run your existing purchase flow in your test environment.
- 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.
- Commit
ProjectSettings/GvhProjectSettings.xml, where the resolver saves these settings.
References
See the Unity install guide, Unity's iOS build workflow, and iOS Resolver settings reference.