{"componentChunkName":"component---src-templates-markdown-template-jsx","path":"/developers/client-sdks/cordova/upgrade-to-version-5/","result":{"data":{"pageMetadata":{"title":"Upgrade to Version 5","path":"/developers/client-sdks/cordova/upgrade-to-version-5/","hideFromNav":null,"sourceCode":null,"metadataParent":{"title":"Cordova","path":"/developers/client-sdks/cordova/","sourceCode":"https://github.com/mParticle/cordova-plugin-mparticle","hasVersionPicker":null,"metadataChildren":[{"title":"Cordova Plugin","path":"/developers/client-sdks/cordova/getting-started/","order":1,"label":null},{"title":"Identity","path":"/developers/client-sdks/cordova/identity/","order":2,"label":null},{"title":"Upgrade to Version 5","path":"/developers/client-sdks/cordova/upgrade-to-version-5/","order":3,"label":null}],"metadataParent":{"title":"Client SDKs","path":"/developers/client-sdks/","metadataChildren":[{"title":"Alexa","path":"/developers/client-sdks/alexa/","order":1,"label":null},{"title":".NET MAUI","path":"/developers/client-sdks/maui/","order":null,"label":null},{"title":"AMP","path":"/developers/client-sdks/amp/","order":null,"label":null},{"title":"Android","path":"/developers/client-sdks/android/","order":null,"label":null},{"title":"Cordova","path":"/developers/client-sdks/cordova/","order":null,"label":null},{"title":"Direct Url Routing","path":"/developers/client-sdks/direct-url-routing/","order":null,"label":null},{"title":"Flutter","path":"/developers/client-sdks/flutter/","order":null,"label":null},{"title":"iOS","path":"/developers/client-sdks/ios/","order":null,"label":null},{"title":"React Native","path":"/developers/client-sdks/react-native/","order":null,"label":null},{"title":"Roku","path":"/developers/client-sdks/roku/","order":null,"label":null},{"title":"Unity","path":"/developers/client-sdks/unity/","order":null,"label":null},{"title":"Web","path":"/developers/client-sdks/web/","order":null,"label":null},{"title":"Xbox","path":"/developers/client-sdks/uwp/","order":null,"label":null}],"metadataParent":{"title":"Developers","path":"/developers/","metadataChildren":[{"title":"API Credential Management","path":"/developers/credential-management/","order":null,"label":null},{"title":"API References","path":"/developers/apis/","order":null,"label":null},{"title":"Client SDKs","path":"/developers/client-sdks/","order":null,"label":null},{"title":"Guides","path":"/developers/guides/","order":null,"label":null},{"title":"Media SDKs","path":"/developers/media-sdks/","order":null,"label":null},{"title":"Quickstart","path":"/developers/quickstart/","order":null,"label":null},{"title":"Server SDKs","path":"/developers/server-sdks/","order":null,"label":null},{"title":"The Developer's Guided Journey to mParticle","path":"/developers/developersjourney/","order":null,"label":null},{"title":"Tools","path":"/developers/tools/","order":null,"label":null}],"metadataParent":null}}}},"markdownRemark":{"html":"<p>Version 5 of the mParticle Cordova plugins (<code class=\"language-text\">@mparticle/cordova-sdk</code>, <code class=\"language-text\">@mparticle/cordova-rokt-kit</code>, and <code class=\"language-text\">@mparticle/cordova-rokt-payment-extension</code>) takes the native iOS SDKs from Swift Package Manager (SPM) instead of CocoaPods, because CocoaPods trunk becomes read-only on December 2, 2026. The breaking changes are on iOS. Android code is unchanged, but version 5 requires Cordova CLI 12 or later on every platform.</p>\n<p>This guide covers upgrades from 4.x. For a new integration, follow <a href=\"/developers/client-sdks/cordova/getting-started/\">Getting Started</a>. The plugin repository’s <a href=\"https://github.com/mParticle/cordova-plugin-mparticle/blob/main/MIGRATING.md\">MIGRATING.md</a> has the same steps.</p>\n<h2 id=\"ios\" style=\"position:relative;\"><a href=\"#ios\" aria-label=\"ios permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>iOS</h2>\n<p>The three plugins are now Swift packages. cordova-ios 8 adds them, and the native SDKs they depend on, to the Xcode project for you. The mParticle plugins don’t use CocoaPods. The native version ranges are the same as the 4.x pods:</p>\n<table>\n<thead>\n<tr>\n<th>Plugin</th>\n<th>4.x CocoaPod</th>\n<th>5.x Swift package</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"language-text\">@mparticle/cordova-sdk</code></td>\n<td><code class=\"language-text\">mParticle-Apple-SDK ~&gt; 9.3</code></td>\n<td><a href=\"https://github.com/mParticle/mparticle-apple-sdk\"><code class=\"language-text\">mparticle-apple-sdk</code></a>, <code class=\"language-text\">9.3.0</code> up to <code class=\"language-text\">10.0.0</code></td>\n</tr>\n<tr>\n<td><code class=\"language-text\">@mparticle/cordova-rokt-kit</code></td>\n<td><code class=\"language-text\">mParticle-Rokt ~&gt; 9.3</code></td>\n<td><a href=\"https://github.com/mparticle-integrations/mp-apple-integration-rokt\"><code class=\"language-text\">mp-apple-integration-rokt</code></a>, <code class=\"language-text\">9.3.0</code> up to <code class=\"language-text\">10.0.0</code></td>\n</tr>\n<tr>\n<td><code class=\"language-text\">@mparticle/cordova-rokt-payment-extension</code></td>\n<td><code class=\"language-text\">RoktPaymentExtension ~&gt; 2.0</code></td>\n<td><a href=\"https://github.com/ROKT/rokt-payment-extension-ios\"><code class=\"language-text\">rokt-payment-extension-ios</code></a>, <code class=\"language-text\">2.0.0</code> up to <code class=\"language-text\">3.0.0</code></td>\n</tr>\n</tbody>\n</table>\n<h3 id=\"upgrade-steps\" style=\"position:relative;\"><a href=\"#upgrade-steps\" aria-label=\"upgrade steps permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>Upgrade steps</h3>\n<ol>\n<li>Move to Cordova CLI 12 or later and cordova-ios 8. cordova-ios 8 needs Node.js 20.17 or later in the 20.x line, or 22.9 or later, and Xcode 15 or later.</li>\n<li>\n<p>In <code class=\"language-text\">config.xml</code>, set the deployment target to iOS 15 or later. Set it before you add the platform in step 6. cordova-ios 8.1.1 and earlier apply it to the plugins’ Swift packages only when the platform is added.</p>\n<div class=\"gatsby-highlight\" data-language=\"xml\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-xml line-numbers\"><code class=\"language-xml\"><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>platform</span> <span class=\"token attr-name\">name</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>ios<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span>\n    <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>preference</span> <span class=\"token attr-name\">name</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>deployment-target<span class=\"token punctuation\">\"</span></span> <span class=\"token attr-name\">value</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>15.0<span class=\"token punctuation\">\"</span></span> <span class=\"token punctuation\">/></span></span>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span>platform</span><span class=\"token punctuation\">></span></span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span></span></pre></div>\n</li>\n<li>\n<p>Remove the iOS platform, so the plugins don’t install against cordova-ios 7:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\">cordova platform <span class=\"token function\">rm</span> ios</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n</li>\n<li>\n<p>Upgrade every mParticle plugin your app uses to 5.x together. A 4.x kit next to the 5.x core still adds its CocoaPod, which brings a second copy of the mParticle SDK into the app: it builds, then fails at runtime. Changing the <code class=\"language-text\">spec</code> in <code class=\"language-text\">config.xml</code> alone doesn’t upgrade a plugin that <code class=\"language-text\">package.json</code> already lists, so remove and re-add the plugins, leaving out any your app doesn’t use:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\">cordova plugin <span class=\"token function\">rm</span> @mparticle/cordova-rokt-payment-extension @mparticle/cordova-rokt-kit @mparticle/cordova-sdk\ncordova plugin <span class=\"token function\">add</span> @mparticle/cordova-sdk@5 @mparticle/cordova-rokt-kit@5 @mparticle/cordova-rokt-payment-extension@5</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span></span></pre></div>\n</li>\n<li>For the same reason, remove any mParticle or Rokt pods you added yourself, for example in a custom plugin’s <code class=\"language-text\">&lt;podspec&gt;</code>.</li>\n<li>\n<p>Add the iOS platform again:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\">cordova platform <span class=\"token function\">add</span> ios@8</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>cordova-ios 8 names the Xcode project and target <code class=\"language-text\">App</code> (<code class=\"language-text\">platforms/ios/App.xcodeproj</code>, <code class=\"language-text\">platforms/ios/App/</code>) instead of your app’s name. Update any hooks or scripts that find them by name.</p>\n</li>\n<li>Move the SDK start-up into the Swift <code class=\"language-text\">AppDelegate.swift</code> that cordova-ios 8 generates, and import the SDK with <code class=\"language-text\">import mParticle_Apple_SDK</code>. See <a href=\"/developers/client-sdks/cordova/getting-started/#ios\">Getting Started</a> for the code. Cordova regenerates <code class=\"language-text\">platforms/</code>, so keep your copy outside it and copy it in with an <code class=\"language-text\">after_prepare</code> hook declared in <code class=\"language-text\">config.xml</code>. If your 4.x hook is an <code class=\"language-text\">after_platform_add</code> hook, change it to <code class=\"language-text\">after_prepare</code> so it runs before every build.</li>\n<li>\n<p>If you use the payment extension, delete the Swift shim (<code class=\"language-text\">RoktPaymentSetup.swift</code> in the 4.x example app) and any hook that copied it, created its bridging header or set <code class=\"language-text\">SWIFT_OBJC_BRIDGING_HEADER</code>. Keep the <code class=\"language-text\">Bridging-Header.h</code> that cordova-ios 8 generates. Register the extension in <code class=\"language-text\">AppDelegate.swift</code>, after starting the SDK. The Swift method is now <code class=\"language-text\">registerPaymentExtension(_:)</code>:</p>\n<div class=\"gatsby-highlight\" data-language=\"swift\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-swift line-numbers\"><code class=\"language-swift\"><span class=\"token keyword\">import</span> <span class=\"token builtin\">RoktPaymentExtension</span>\n\n<span class=\"token keyword\">if</span> <span class=\"token keyword\">let</span> paymentExtension <span class=\"token operator\">=</span> <span class=\"token function\">RoktPaymentExtension</span><span class=\"token punctuation\">(</span>\n    applePayMerchantId<span class=\"token punctuation\">:</span> <span class=\"token string\">\"merchant.com.yourapp.rokt\"</span><span class=\"token punctuation\">,</span> <span class=\"token comment\">// omit if not offering Apple Pay</span>\n    urlScheme<span class=\"token punctuation\">:</span> <span class=\"token string\">\"myapp\"</span> <span class=\"token comment\">// omit if not offering Afterpay / Clearpay</span>\n<span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token builtin\">MParticle</span><span class=\"token punctuation\">.</span><span class=\"token function\">sharedInstance</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>rokt<span class=\"token punctuation\">.</span><span class=\"token function\">registerPaymentExtension</span><span class=\"token punctuation\">(</span>paymentExtension<span class=\"token punctuation\">)</span>\n<span class=\"token punctuation\">}</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>If you pass <code class=\"language-text\">urlScheme</code>, register it under <code class=\"language-text\">CFBundleURLSchemes</code> in your app’s <code class=\"language-text\">Info.plist</code>. Otherwise the initializer returns <code class=\"language-text\">nil</code>, and Debug builds stop on an assertion failure.</p>\n</li>\n<li>If you forward payment redirect URLs to Rokt in <code class=\"language-text\">application:openURL:options:</code>, move that code to a <code class=\"language-text\">SceneDelegate</code> override. cordova-ios 8 apps use scenes, so the app delegate no longer receives URLs. See <a href=\"https://github.com/mParticle/cordova-plugin-mparticle#4-handle-redirect-based-payment-callbacks-afterpay-paypal\">Handle redirect-based payment callbacks</a> in the plugin README.</li>\n<li>Build and run once. If <code class=\"language-text\">platforms/ios</code> has a <code class=\"language-text\">Podfile</code> for another plugin, it should list no mParticle or Rokt pods. With <code class=\"language-text\">MParticle.sharedInstance().logLevel = .verbose</code>, the log shows <code class=\"language-text\">Included kits: {Rokt}</code> when the Rokt kit is installed.</li>\n</ol>\n<h3 id=\"other-mparticle-kits\" style=\"position:relative;\"><a href=\"#other-mparticle-kits\" aria-label=\"other mparticle kits permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>Other mParticle kits</h3>\n<p>cordova-ios 8 links only the Swift packages that plugins declare, so a kit pod you added another way is no longer installed. To keep using another kit, wrap the kit’s Swift package in a small local plugin, copied from the plugin repository’s <a href=\"https://github.com/mParticle/cordova-plugin-mparticle/tree/main/Kits/Rokt\"><code class=\"language-text\">Kits/Rokt</code></a>:</p>\n<ol>\n<li>Change the plugin id in <code class=\"language-text\">plugin.xml</code>, <code class=\"language-text\">package.json</code>, and <code class=\"language-text\">Package.swift</code>. In <code class=\"language-text\">Package.swift</code>, the package name and the library product name must both equal the plugin id.</li>\n<li>Rename the target in <code class=\"language-text\">Package.swift</code>, and the stub file in <code class=\"language-text\">src/ios</code> to match. Target names must be unique across all of the app’s packages.</li>\n<li>Change the package URL and product to the kit’s. The <a href=\"https://github.com/mParticle/mparticle-apple-sdk#currently-supported-kits\">mParticle Apple SDK README</a> lists each kit’s Swift package. Choose a kit version that supports mParticle Apple SDK 9, or Swift Package Manager cannot resolve the packages.</li>\n<li>The copied <code class=\"language-text\">plugin.xml</code> still adds the Rokt kit on Android. Remove its <code class=\"language-text\">&lt;platform name=&quot;android&quot;&gt;</code> block, or point it at the kit’s Android artifact.</li>\n<li>Add the plugin to your app with <code class=\"language-text\">cordova plugin add &lt;path-to-plugin&gt;</code>.</li>\n</ol>\n<h3 id=\"capacitor\" style=\"position:relative;\"><a href=\"#capacitor\" aria-label=\"capacitor permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>Capacitor</h3>\n<p>Capacitor reads a Cordova plugin’s <code class=\"language-text\">Package.swift</code> from Capacitor 8.3.2, in apps that use Swift Package Manager. Capacitor apps that use CocoaPods get no iOS code from version 5 and should stay on 4.x. Version 5 hasn’t been tested with Capacitor.</p>\n<h3 id=\"staying-on-cocoapods\" style=\"position:relative;\"><a href=\"#staying-on-cocoapods\" aria-label=\"staying on cocoapods permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>Staying on CocoaPods</h3>\n<p>To stay on CocoaPods for now, keep cordova-ios 7 and pin each mParticle plugin you use at 4.x, for example <code class=\"language-text\">cordova plugin add @mparticle/cordova-sdk@4</code>. If <code class=\"language-text\">package.json</code> already saves a 5.x version, remove the plugins with <code class=\"language-text\">cordova plugin rm</code> first.</p>\n<p>This option is deprecated. CocoaPods trunk is <a href=\"https://blog.cocoapods.org/CocoaPods-Specs-Repo/\">scheduled to stop accepting new pods and versions on December 2, 2026</a>. Existing published versions remain available, so 4.x stays on the last mParticle SDK released to CocoaPods.</p>\n<h2 id=\"android\" style=\"position:relative;\"><a href=\"#android\" aria-label=\"android permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>Android</h2>\n<p>No code changes are required on Android. The plugins still add <code class=\"language-text\">com.mparticle:android-core</code> 6.0.0 and, with the Rokt kit plugin, <code class=\"language-text\">com.mparticle:android-rokt-kit</code> 6.0.0. Version 5 requires Cordova CLI 12 or later.</p>","frontmatter":{"title":"Upgrade to Version 5","order":3,"seoTitle":null,"seoDescription":null},"parent":{"__typename":"File","modifiedTime":"October 28, 2026"}}},"pageContext":{"slug":"/developers/client-sdks/cordova/upgrade-to-version-5/"}},"staticQueryHashes":["159144251"]}