--- title: "Migrate React Native iOS from CocoaPods to Swift Package Manager" slug: "migrate-react-native-ios-from-cocoapods-to-swift-package-manager" description: "Move a React Native iOS app from CocoaPods to Swift Package Manager in Insider One with react-native-insider 9.2.0 and React Native 0.87 or later." updated: 2026-11-23T18:38:02Z published: 2026-11-23T18:38:02Z canonical: "academy.insiderone.com/migrate-react-native-ios-from-cocoapods-to-swift-package-manager" --- > ## Documentation Index > Fetch the complete documentation index at: https://academy.insiderone.com/llms.txt > Use this file to discover all available pages before exploring further. # Migrate React Native iOS from CocoaPods to Swift Package Manager This guide moves the iOS part of a bare React Native app that uses react-native-insider from CocoaPods to Swift Package Manager (SPM). Android is not affected. This guide does not cover Expo apps. > [!WARNING] > CocoaPods Trunk becomes read-only on December 2, 2026 ([official CocoaPods announcement](https://blog.cocoapods.org/CocoaPods-Specs-Repo/)). From react-native-insider 9.2.0, CocoaPods installs take the Insider One iOS SDK from the Insider-iOS-SDK Swift package. CocoaPods apps on React Native 0.75 or later therefore keep receiving SDK updates with no Podfile change. > > To stay on CocoaPods, update react-native-insider and run pod install. If your notification extension targets still install the InsiderMobileAdvancedNotification pod, pod install prints a warning and keeps the pod. Remove the line from every extension target to take that framework from the Swift package too. > > React Native 0.74 and earlier stay on react-native-insider 9.1.0. This migration is optional. Follow it if your app uses React Native 0.87 or later and you want to move the whole iOS project off CocoaPods. This guide explains the following concepts: - [Requirements](/docs/migrate-react-native-ios-from-cocoapods-to-swift-package-manager#requirements) - [Before you begin](/docs/migrate-react-native-ios-from-cocoapods-to-swift-package-manager#before-you-begin) - [Convert the app to Swift Package Manager](/docs/migrate-react-native-ios-from-cocoapods-to-swift-package-manager#convert-the-app-to-swift-package-manager) - [Notification extensions](/docs/migrate-react-native-ios-from-cocoapods-to-swift-package-manager#notification-extensions) - [Add the storyboard to a Notification Content extension](/docs/migrate-react-native-ios-from-cocoapods-to-swift-package-manager#add-the-storyboard-to-a-notification-content-extension) - [Verify the migration](/docs/migrate-react-native-ios-from-cocoapods-to-swift-package-manager#verify-the-migration) - [Roll back to CocoaPods](/docs/migrate-react-native-ios-from-cocoapods-to-swift-package-manager#roll-back-to-cocoapods) - [What changed](/docs/migrate-react-native-ios-from-cocoapods-to-swift-package-manager#what-changed) - [Troubleshooting](/docs/migrate-react-native-ios-from-cocoapods-to-swift-package-manager#troubleshooting) ## Requirements - **React Native:** 0.87 or later. - **react-native-insider:** 9.2.0 or later. - **iOS deployment target:** 15.0 or later. - **Other native libraries:** Every other autolinked native library in your app supports Swift Package Manager. It ships a Package.swift file, or npx react-native spm scaffold can generate one for it. > [!NOTE] > React Native's own Swift Package Manager integration is still a preview (experimental). Before you migrate, check that every other native library in your app supports it, because a library that does not can block the migration. > > An app that cannot move to React Native 0.87 or to Swift Package Manager can stay on CocoaPods and still receives SDK updates. ## Before you begin - Commit or back up your project. - Note whether your notification extension targets use the InsiderMobileAdvancedNotification pod. ## Convert the app to Swift Package Manager In the ios folder, run npx react-native spm add --deintegrate. On a CocoaPods app, a plain npx react-native spm stops without changing anything. The command removes the CocoaPods integration from your Xcode project, keeps your Podfile, and adds the Swift Package Manager setup. For the details, see [React Native's SwiftPM guide](https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/spm/__docs__/spm-scripts.md). - On a fresh clone and on CI, run npx react-native spm once in the ios folder before you build. - react-native-insider brings the InsiderMobile and InsiderGeofence products of the Insider-iOS-SDK package through its own Package.swift file, pinned to an exact version. ## Notification extensions If your app has a Notification Service or Notification Content extension, follow these steps: 1. Remove the InsiderMobileAdvancedNotification pod from your notification extension targets in the Podfile. The conversion names the pod in a warning. Do not keep it through CocoaPods, because your extensions now get the framework from the app target. 2. In Xcode, add the Insider-iOS-SDK package and set **Exact Version** to the version pinned in node_modules/react-native-insider/Package.swift (2.5.0 for react-native-insider 9.2.0). For how to add the package, see [Configure Swift Package Manager (SPM) Installation](/docs/configure-swift-package-manager-spm-installation). 3. Attach the InsiderMobileAdvancedNotification product to the **app** target, not to the extensions. > [!WARNING] > If you attach InsiderMobileAdvancedNotification only to an extension, the build succeeds but the extension fails to launch. The framework is dynamic, so Xcode embeds it only in the target that links it. Your extensions load it from the Frameworks folder of the app through @executable_path/../../Frameworks. > [!NOTE] > Keep the exact version equal to the one pinned in node_modules/react-native-insider/Package.swift. Update it every time you upgrade react-native-insider. ## Add the storyboard to a Notification Content extension If your app has a Notification Content extension, download [InsiderInterface.storyboard](https://github.com/useinsider/Insider-iOS-SDK/blob/main/InsiderInterface.storyboard) from the Insider-iOS-SDK repository. Add it to the resources of the extension, and select **Inherit Module From Target**. The package does not ship the storyboard as a product. ## Verify the migration 1. Build and run the app. 2. Send a test push to a physical device and confirm that your notification extensions display rich content. This checks the extensions against real APNs delivery. ## Roll back to CocoaPods In the ios folder, run npx react-native spm deinit, and then run pod install. You do not need to add the InsiderMobileAdvancedNotification pod back, because pod install links the Insider-iOS-SDK package to the app and the notification extensions. For the details, see [React Native's SwiftPM guide](https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/spm/__docs__/spm-scripts.md). ## What changed | Old | New | Action | | --- | --- | --- | | The InsiderMobile 16.5.0 and InsiderGeofence 1.3.0 pods, pinned by react-native-insider | The InsiderMobile and InsiderGeofence products of the Insider-iOS-SDK package, pinned to an exact version by react-native-insider | Run npx react-native spm add --deintegrate in the ios folder. | | The InsiderMobileAdvancedNotification pod in the notification extension targets | The InsiderMobileAdvancedNotification product of the Insider-iOS-SDK package, attached to the app target | Remove the pod from the extension targets, and add the package in Xcode with an exact version. | ## Troubleshooting | Symptom | Cause | Resolution | | --- | --- | --- | | Package resolution fails for Insider-iOS-SDK. | The exact version you added in Xcode differs from the version that react-native-insider pins. | Set **Exact Version** to the version in node_modules/react-native-insider/Package.swift. | | The notification extension fails to launch. | InsiderMobileAdvancedNotification is attached to an extension instead of the app target. | Attach it to the app target instead of the extension. | | The build fails on a fresh clone or on CI. | The Swift Package Manager setup was not generated in that checkout. | Run npx react-native spm once in the ios folder before you build. | | npx react-native spm stops without changing anything. | The app is still integrated with CocoaPods. | Run npx react-native spm add --deintegrate in the ios folder. | | pod install stops with an error. | The app now uses Swift Package Manager, so you do not need pod install. | To go back to CocoaPods, run npx react-native spm deinit first, as described in [Roll back to CocoaPods](/docs/migrate-react-native-ios-from-cocoapods-to-swift-package-manager#roll-back-to-cocoapods). | | Another autolinked library has no Package.swift file. | The library ships only a podspec. | Generate a Package.swift file with npx react-native spm scaffold. See [React Native's SwiftPM guide](https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/spm/__docs__/spm-scripts.md). |