Follow this guide to move the iOS part of your Cordova app from CocoaPods to Swift Package Manager (SPM). It applies to Cordova apps, including Ionic apps built on Cordova. It does not cover Capacitor-based Ionic apps.
CocoaPods Trunk becomes read-only on December 2, 2026 (official CocoaPods announcement). From that date, new Insider One iOS SDK versions ship only through Swift Package Manager. The last Insider pod is InsiderMobile 16.5.0.
Apps that use CocoaPods today keep building, and pod versions already published stay installable, but they receive no new SDK versions. Android is not affected. The migration requires no changes to your JavaScript code.
Your cordova-ios version selects the iOS channel. With cordova-ios earlier than 8, the plugin installs the Insider One SDK through CocoaPods (InsiderMobile 16.5.0 and InsiderGeofence 1.3.0). With cordova-ios 8 or later, the plugin installs the SDK through Swift Package Manager.
In that case, the Insider pods are no longer in the Podfile, you do not run pod install for Insider One, and Xcode resolves the package when you build.
This guide explains the following concepts:
Requirements
cordova-plugin-insider: 5.0.0 or later.
cordova-ios: 8.0.0 or later.
Node.js: 20.17.0 or later on Node 20, or 22.9.0 or later.
iOS deployment target: 13.0 or later. Set it with the deployment-target preference in config.xml.
If you build with Xcode 27 or later, cordova-ios 8 raises the iOS deployment target to 15.0, even when config.xml sets 13.0. Your app then no longer installs on iOS 13 and 14.
Back up your extensions
Moving between cordova-ios versions starts with cordova platform rm ios, which deletes the generated iOS project. Notification Service and Notification Content extension targets that you added by hand in Xcode do not survive. After you add the iOS platform again, the extension folders and targets are gone.
Before you move, do the following for each extension:
Back up the extension folder, including the source files, Info.plist, the bridging header, and the entitlements.
Note the bundle identifier, the App Group, and the signing settings of the extension.
Move to cordova-ios 8
cordova-ios 8 names the Xcode project and the app target App (App.xcodeproj and App.xcworkspace). cordova-ios 7 names them after your app.
Set the iOS deployment target to 13.0 or later in config.xml:
<preference name="deployment-target" value="13.0" />Then move the platform:
Update cordova-plugin-insider to 5.0.0 or later.
Remove the iOS platform with cordova platform rm ios.
Add the platform again with cordova-ios 8 by running cordova platform add ios@8.
Notification extensions
Follow these steps if your app has a Notification Service or Notification Content extension. The extension code and the Info.plist of the Content extension stay as described on Required Dependencies and Permissions. Only the steps below differ under Swift Package Manager.
Add the InsiderMobileAdvancedNotification library of the Insider iOS SDK package to the main app target App. In Xcode, go to Project > Package Dependencies > + and choose Up to Next Major Version with a minimum of 2.5.0, as described on the SPM installation page. That page gives the package URL. Do not add anything to the Notification Service or Notification Content extension targets. The plugin does not add this library for you.
Add the extension targets again and copy their code back from your backup. The extension code does not need to change, because both the bridging header form and import InsiderMobileAdvancedNotification compile.
Build the app once with cordova build ios so that Xcode resolves the package.
Copy InsiderInterface.storyboard into the folder of the Notification Content extension and add it to that target. After the build in the previous step, the file is located at ~/Library/Developer/Xcode/DerivedData/App-*/SourcePackages/checkouts/Insider-iOS-SDK/InsiderInterface.storyboard. The Info.plist of the extension names it as the main storyboard. Without the copy, the extension bundle has no InsiderInterface storyboard.
Open InsiderInterface.storyboard in Xcode and select Inherit Module From Target in the Identity Inspector, so that the runtime can resolve the NotificationViewController class of your extension.
Do not add the InsiderMobileAdvancedNotification pod. Cordova generates the Podfile, and on cordova-ios 8 it contains no Insider pod.
The extension targets you added, the copied storyboard, and the package library on App survive cordova build.
Clean build
Perform a clean build after the migration. The module cache in DerivedData is built from the previous headers, and Xcode might report errors such as Insider.h has been modified since the module file … was built.
Delete the DerivedData folder of your project by running rm -rf ~/Library/Developer/Xcode/DerivedData/App-*.
Build again with cordova build ios.
Run the same commands whenever the native SDK version changes.
Verify the migration
Build for the simulator with cordova build ios --emulator.
Check the build output in platforms/ios/build/Debug-iphonesimulator/<YourAppName>.app and the Podfile against the table below. The folder is named after your app, although the Xcode target is App.
Location | Expected content |
|---|---|
Frameworks | InsiderMobile.framework, InsiderGeofence.framework, and InsiderMobileAdvancedNotification.framework (the last one only when you use notification extensions) |
PlugIns | One .appex bundle for each notification extension |
platforms/ios/Podfile | No Insider pod |
If the build matches the table, run the app on a physical device and send a rich push and an interactive (carousel) push. The simulator cannot receive push notifications.
Roll back to CocoaPods
Back up the extension folders again.
Run cordova platform rm ios, then cordova platform add ios@7. cordova-plugin-insider 5.0.0 supports cordova-ios 7 and later.
Add the extension targets again. Do not copy InsiderInterface.storyboard into the Content extension. Under CocoaPods, the InsiderMobileAdvancedNotification pod adds it, and a second copy fails the build with Cycle inside NotificationContent.
In platforms/ios/Podfile, put use_frameworks! at the top and add the InsiderMobileAdvancedNotification pod to both extension targets with inherit! :search_paths, as described on Required Dependencies and Permissions.
Run pod install in platforms/ios.
Open the .xcworkspace file and build from Xcode.
cordova build regenerates the Podfile because it runs cordova prepare first. The regenerated file removes the extension target blocks (the pod moves to the app target), and the extensions then fail with InsiderMobileAdvancedNotification/InsiderPushNotification.h file not found. After each Cordova build or prepare, restore the extension blocks and run pod install again.
What changed
Old | New | Action |
|---|---|---|
CocoaPods delivers the Insider One SDK (cordova-ios earlier than 8). | Swift Package Manager delivers the Insider One SDK (cordova-ios 8). | Move to cordova-ios 8. |
The InsiderMobileAdvancedNotification pod is on the extension targets. | The InsiderMobileAdvancedNotification library is on the App target, and nothing is on the extensions. | Add the library to App. |
InsiderInterface.storyboard came with the pod. | The file is in the package checkout, but it is not added to any target. | Copy it into the Content extension. |
Native SDK versions follow the plugin's CocoaPods pins. | The plugin's Swift package pins the native SDK version. | None |
Your JavaScript code | No change is needed for the migration. | None |
Android | Unchanged | None |
Troubleshooting
Symptom | Cause | Fix |
|---|---|---|
unable to resolve module dependency: InsiderMobileAdvancedNotification in an extension | The library is not added to the App target. | Add InsiderMobileAdvancedNotification to App. |
An extension crashes at launch with dyld: Library not loaded: @rpath/InsiderMobileAdvancedNotification.framework | The library was added to the extension targets instead of App, so it is not embedded. | Remove the library from the extension targets and add it to App. |
The Content extension crashes and the push is shown without its image. | InsiderInterface.storyboard is missing from the Content extension target. | Copy InsiderInterface.storyboard into the Content extension target. |
Insider.h has been modified since the module file … was built | The module cache in DerivedData is outdated. | Delete ~/Library/Developer/Xcode/DerivedData/App-* and build again. |
Rollback: Cycle inside NotificationContent | The copied storyboard and the storyboard from the pod both produce InsiderInterface.storyboard. | Remove the copied storyboard from the Content extension. |
Rollback: InsiderMobileAdvancedNotification/InsiderPushNotification.h file not found after cordova build | Cordova regenerated the Podfile and removed the extension blocks. | Restore the extension blocks and run pod install. |
Rollback: pod install fails with do not both set use_frameworks! | use_frameworks! is set only inside the extension targets. | Put use_frameworks! at the top of the Podfile. |