Skip to content

Comments

chore: Add MPRoktLayout Implementation to Example App#598

Open
BrandonStalnaker wants to merge 2 commits intomainfrom
chore/Add-MPRoktLayout-Implementation-to-Example
Open

chore: Add MPRoktLayout Implementation to Example App#598
BrandonStalnaker wants to merge 2 commits intomainfrom
chore/Add-MPRoktLayout-Implementation-to-Example

Conversation

@BrandonStalnaker
Copy link
Collaborator

Background

  • The mParticle iOS SDK supports Rokt integration for displaying placements, but the SwiftExample app was missing a demonstration of the MPRoktLayout SwiftUI component, which provides a declarative approach to integrating Rokt placements as documented at Rokt iOS SDK Integration Guide
  • Additionally, the example app lacked a demonstration of the events:onEvent: subscription API for handling Rokt placement lifecycle events

What Has Changed

  • Added a new function selectPlacementWithEventSubscription() demonstrating the imperative rokt.events() API with MPRoktEvent handling
  • Added mParticle_Rokt_Swift and Rokt_Widget imports to ContentView.swift to access the SwiftUI layout component and Rokt SDK types
  • Created RoktLayoutExampleView, a new SwiftUI view demonstrating:
  • Using MPRoktLayout with sdkTriggered binding for declarative placement control
  • Configuring placements with RoktConfig (color mode, caching)
  • Handling all RoktEvent types (PlacementReady, PlacementInteractive, OfferEngagement, PositiveEngagement, PlacementClosed, etc.)
  • Real-time event logging to visualize the placement lifecycle

Checklist

  • I have performed a self-review of my own code.
  • I have tested this locally.

Reference Issue (For employees only. Ignore if you are an outside contributor)

@BrandonStalnaker BrandonStalnaker self-assigned this Feb 18, 2026
@BrandonStalnaker BrandonStalnaker requested a review from a team as a code owner February 18, 2026 17:29
@github-actions
Copy link

github-actions bot commented Feb 18, 2026

📦 SDK Size Impact Report

Measures how much the SDK adds to an app's size (with-SDK minus without-SDK).

Metric Target Branch This PR Change
App Bundle Impact 1.82 MB 1.82 MB +N/A
Executable Impact 896 bytes 896 bytes +N/A
XCFramework Size 9.49 MB 9.49 MB +N/A

➡️ SDK size impact change is minimal.

Raw measurements

Target branch (main):

{"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1944,"with_sdk_executable_size_bytes":76360,"sdk_impact_kb":1860,"sdk_executable_impact_bytes":896,"xcframework_size_kb":9716}

This PR:

{"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1944,"with_sdk_executable_size_bytes":76360,"sdk_impact_kb":1860,"sdk_executable_impact_bytes":896,"xcframework_size_kb":9716}

thomson-t
thomson-t previously approved these changes Feb 18, 2026
denischilik
denischilik previously approved these changes Feb 18, 2026
Copy link
Contributor

@nickolas-dimitrakas nickolas-dimitrakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants