Skip to content

Migration to version 8.5.x

Milan Parađina edited this page Jul 6, 2026 · 1 revision

Migration from 8.4.x to 8.5.x

Version 8.5.0 introduces Swift Package Manager (SPM) support for the iOS side of the plugin, as an alternative to the existing CocoaPods integration.

This is a transition period. CocoaPods will still be fully supported until December 2nd, 2026, when CocoaPods Trunk is scheduled to become permanently read-only. You are not required to migrate to SPM right away. You can keep using CocoaPods and continue receiving all plugin updates as before. After that date, the iOS side of the plugin will only be updated via Swift Package Manager.

What changed

Dual dependency manager support

The plugin now ships both a Package.swift manifest (for SPM) and a <podspec> block in plugin.xml (for CocoaPods). Which one is used depends entirely on your cordova-ios version:

cordova-ios version Dependency manager used
v7.x CocoaPods (<podspec>)
v8.x and above Swift Package Manager (Package.swift)

No changes to your config.xml or plugin configuration are required to pick a path — it's selected automatically at cordova platform add ios time. If SPM is not available in the application, CocoaPods will be used as a fallback.

Nothing breaks if you stay on CocoaPods

If you keep cordova-ios at ^7.x.x, nothing changes for you. The <podspec> block remains in plugin.xml, and CocoaPods continues to work exactly as before.

Choosing your path

Option A: Stay on CocoaPods (no action required)

Keep your cordova-ios version as-is in package.json:

"devDependencies": {
    "cordova-ios": "^7.1.1"
}

Just update the plugin version as usual:

cordova plugin remove com-infobip-plugins-mobilemessaging
cordova plugin add com-infobip-plugins-mobilemessaging@8.5.x

You'll keep receiving plugin updates, including new features and bug fixes, via CocoaPods until it's phased out.

Option B: Migrate to Swift Package Manager (recommended)

This is the recommended long-term path, since CocoaPods support ends on December 2nd, 2026.

Prerequisites:

  • cordova-ios v8.0.0 or higher
  • Xcode 16 or higher
  • NodeJS 20.17 or higher
  • iOS deployment target 15.0 or higher

Steps:

  1. Update package.json:

    "devDependencies": {
        "cordova-ios": "^8.0.0",
        "com-infobip-plugins-mobilemessaging": "^8.5.0"
    }
    npm install
  2. Ensure your config.xml has the required iOS preferences:

    <platform name="ios">
        <preference name="SwiftVersion" value="5.0" />
        <preference name="deployment-target" value="15.0" />
    </platform>
  3. Remove and re-add the iOS platform, so cordova-ios v8 sets up SPM instead of CocoaPods:

    cordova platform remove ios
    cordova platform add ios
  4. Open the generated App.xcworkspace in Xcode and build normally. No Podfile or pod install is involved.

For full details, troubleshooting, and a breakdown of what changes structurally (lockfiles, workspace layout, Notification Service Extension setup), see the dedicated Swift Package Manager integration guide.

See also

Clone this wiki locally