Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ For each release, **Core** (main SDK) changes are listed first, followed by **Ki
##### Added

- Pass through `handleURLCallback:` to `Rokt.handleURLCallback(with:)` on the Rokt SDK.
- SwiftPM: declare `rokt-payment-extension-ios`; default product `mParticle-Rokt` links `RoktPaymentExtension`; optional product `mParticle-Rokt-No-Payments` omits it (no Stripe).
- CocoaPods: default subspec `Payments` adds `RoktPaymentExtension`; subspec `No-Payments` is kit only (`Core`); subspec `Core` holds sources and base Rokt deps.
Comment thread
BrandonStalnaker marked this conversation as resolved.

## [9.0.1] - 2026-04-22

Expand Down
17 changes: 16 additions & 1 deletion Kits/rokt/rokt/Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.5
// swift-tools-version:5.9

import Foundation
import PackageDescription
Expand All @@ -25,6 +25,10 @@ let package = Package(
products: [
.library(
name: "mParticle-Rokt",
targets: ["mParticle-Rokt-Swift", "mParticle-Rokt-PaymentLinkage"]
),
.library(
name: "mParticle-Rokt-No-Payments",
targets: ["mParticle-Rokt-Swift"]
)
],
Expand All @@ -38,6 +42,10 @@ let package = Package(
url: "https://github.com/ROKT/rokt-contracts-apple.git",
.upToNextMajor(from: "2.0.0")
),
.package(
url: "https://github.com/ROKT/rokt-payment-extension-ios.git",
.upToNextMajor(from: "2.0.0")
),
.package(
url: "https://github.com/erikdoe/ocmock",
branch: "master"
Expand Down Expand Up @@ -65,6 +73,13 @@ let package = Package(
],
path: "Sources/mParticle-Rokt-Swift"
),
.target(
name: "mParticle-Rokt-PaymentLinkage",
dependencies: [
.product(name: "RoktPaymentExtension", package: "rokt-payment-extension-ios")
],
path: "Sources/mParticle-Rokt-PaymentLinkage"
),
.testTarget(
name: "mParticle-RoktObjCTests",
dependencies: [
Expand Down
29 changes: 27 additions & 2 deletions Kits/rokt/rokt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,41 @@ Add the package dependency to your `Package.swift` or via Xcode:
)
```

Then add `mParticle-Rokt` as a dependency of your target.
Then add a **product** to your target’s dependencies:

- **`mParticle-Rokt`** (default) — includes [`RoktPaymentExtension`](https://github.com/ROKT/rokt-payment-extension-ios) so Shoppable Ads works without declaring that package yourself. Imports stay the same (`mParticle_Rokt`, etc.).
- **`mParticle-Rokt-No-Payments`** — same kit **without** linking the payment extension (smaller dependency graph, no Stripe). Use this only if you do not need Shoppable Ads / `RoktPaymentExtension`, or you will add `rokt-payment-extension-ios` to your app separately.

```swift
.target(
name: "YourApp",
dependencies: [
.product(name: "mParticle-Rokt", package: "mp-apple-integration-rokt"),
// …
]
)
```

No-payments example:

```swift
.product(name: "mParticle-Rokt-No-Payments", package: "mp-apple-integration-rokt"),
```

### CocoaPods

Add the kit dependency to your app's Podfile:
Default install includes the payment extension (for Shoppable Ads):

```ruby
pod 'mParticle-Rokt', '~> 9.0'
```

To use the kit **without** `RoktPaymentExtension` / Stripe:

```ruby
pod 'mParticle-Rokt/No-Payments', '~> 9.0'
```

## Verifying the Integration

After installing, rebuild and launch your app. With the mParticle log level set to Debug or higher, you should see the following in your Xcode console:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import RoktPaymentExtension

public enum MPRoktPaymentExtensionLinkage {
public static let isPaymentExtensionLinked = true
Comment thread
BrandonStalnaker marked this conversation as resolved.
}
23 changes: 18 additions & 5 deletions Kits/rokt/rokt/mParticle-Rokt.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,22 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/mparticle-integrations/mp-apple-integration-rokt.git", :tag => "v" + s.version.to_s }
s.swift_version = "5.5"
s.ios.deployment_target = "15.6"
s.ios.source_files = 'Sources/mParticle-Rokt/**/*.{h,m}', 'Sources/mParticle-Rokt-Swift/**/*.swift'
s.ios.resource_bundles = { 'mParticle-Rokt-Privacy' => ['Sources/mParticle-Rokt/PrivacyInfo.xcprivacy'] }
s.ios.dependency 'mParticle-Apple-SDK', '~> 9.0'
s.ios.dependency 'RoktContracts', '~> 2.0'
s.ios.dependency 'Rokt-Widget', '~> 5.1'
s.default_subspec = "Payments"

s.subspec "Core" do |ss|
ss.ios.source_files = 'Sources/mParticle-Rokt/**/*.{h,m}', 'Sources/mParticle-Rokt-Swift/**/*.swift'
ss.ios.resource_bundles = { 'mParticle-Rokt-Privacy' => ['Sources/mParticle-Rokt/PrivacyInfo.xcprivacy'] }
ss.ios.dependency 'mParticle-Apple-SDK', '~> 9.0'
ss.ios.dependency 'RoktContracts', '~> 2.0'
ss.ios.dependency 'Rokt-Widget', '~> 5.1'
end

s.subspec "Payments" do |ss|
ss.ios.dependency 'mParticle-Rokt/Core', s.version.to_s
ss.ios.dependency 'RoktPaymentExtension', '~> 2.0'
end

s.subspec "No-Payments" do |ss|
ss.ios.dependency 'mParticle-Rokt/Core', s.version.to_s
end
end
Loading