Rokt SDK+ is an umbrella that pulls the mParticle Apple SDK, the mParticle Rokt kit (mParticle-Rokt with rokt-contracts-apple 2.x), and Rokt Payment Extension.
Swift module and CocoaPods pod name: RoktSDKPlus.
This library is developed in the mParticle Apple SDK monorepo under Kits/rokt-sdk-plus/rokt-sdk-plus-ios and mirrored to ROKT/rokt-sdk-plus-ios for SwiftPM and CocoaPods releases. Version numbers follow the mParticle Apple SDK ecosystem (VERSION in the monorepo).
For full installation options, troubleshooting, and advanced topics, use the upstream guides (this repo only summarizes what you need alongside RoktSDKPlus):
- mParticle Apple SDK — README — core SDK via SwiftPM/CocoaPods, kits overview, and initialization.
- mParticle Rokt kit — README — kit-specific SwiftPM/CocoaPods lines, Shoppable Ads, and event APIs.
Official documentation: mParticle iOS SDK, Rokt + mParticle.
RoktSDKPlus, mParticle-Rokt, and mParticle-Apple-SDK share the same semver for each monorepo release. RoktPaymentExtension remains on its own 2.x line.
In Package.swift or Xcode → Package Dependencies:
.package(
url: "https://github.com/ROKT/rokt-sdk-plus-ios.git",
.upToNextMajor(from: "9.2.0")
)Add the RoktSDKPlus product to your app target, then import RoktSDKPlus and the upstream modules you need (for example mParticle_Apple_SDK, mParticle_Rokt_Swift, RoktPaymentExtension).
If you were integrating without this umbrella, the core SDK would be added from https://github.com/mParticle/mparticle-apple-sdk (product mParticle-Apple-SDK) and the kit from https://github.com/mparticle-integrations/mp-apple-integration-rokt (product mParticle-Rokt), per the mParticle README and Rokt kit README.
In your Podfile:
pod 'RoktSDKPlus', '~> 9.1'Match deployment target and Swift version expectations to the upstream podspecs (this podspec uses iOS 15.6 and Swift 5.9).
The mParticle Apple SDK is the hub for forwarding data to enabled integrations; kits (such as Rokt) are separate targets your app links against—RoktSDKPlus already links the core and Rokt kit for you.
Initialize the SDK from application(_:didFinishLaunchingWithOptions:) (do not defer startup with dispatch_async). A minimal Swift start:
import mParticle_Apple_SDK
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
let options = MParticleOptions(key: "<<<App Key Here>>>", secret: "<<<App Secret Here>>>")
MParticle.sharedInstance().start(with: options)
return true
}See the full mParticle Apple SDK README for Objective‑C, tvOS, crash reporter, and the supported kits table.
After install, rebuild and run with mParticle log level Debug or higher; you should see Included kits: { Rokt } in the Xcode console (Rokt kit README).
Placements (Swift):
MParticle.sharedInstance().rokt.selectPlacements(
"checkout",
attributes: ["email": "[email protected]"],
embeddedViews: ["Location1": embeddedView],
config: nil
) { event in
if event is RoktEvent.PlacementReady {
// Placement is ready
}
}Shoppable Ads use a registered payment extension (for example Stripe) and selectShoppableAds; see the Rokt kit README for registerPaymentExtension / selectShoppableAds snippets and MIGRATING.md for event types.
See LICENSE. Upstream SDKs remain under their respective licenses.