-
Notifications
You must be signed in to change notification settings - Fork 42
[SDK-232] add startEmbeddedImpression and pauseEmbeddedImpression methods to ReactIterableAPI #798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: loren/embedded/SDK-235-ios-add-ability-to-sync-and-get-messages
Are you sure you want to change the base?
Conversation
… to ReactIterableAPI
|
Coverage Impact This PR will not change total coverage. 🚦 See full report on Qlty Cloud »🛟 Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds support for embedded message impression tracking to the iOS native bridge of the React Native SDK. The methods startEmbeddedImpression and pauseEmbeddedImpression enable tracking when embedded messages are displayed and when they are no longer visible.
Changes:
- Added iOS native bridge methods for starting and pausing embedded message impressions
- Implemented both New Architecture (TurboModule) and Legacy Architecture (RCTBridgeModule) support
- Methods integrate with the existing EmbeddedSessionManager from the Iterable iOS SDK
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| ios/RNIterableAPI/ReactIterableAPI.swift | Added Swift implementations of startEmbeddedImpression and pauseEmbeddedImpression methods that call the native SDK's EmbeddedSessionManager |
| ios/RNIterableAPI/RNIterableAPI.mm | Added Objective-C bridge methods for both New and Legacy React Native architectures, forwarding calls to the Swift implementation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @objc(startEmbeddedImpression:placementId:) | ||
| public func startEmbeddedImpression(messageId: String, placementId: Double) { | ||
| ITBInfo() | ||
| EmbeddedSessionManager.shared.startImpression(messageId: messageId, placementId: placementId) |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The placementId parameter is passed as Double directly to the EmbeddedSessionManager, but based on the Android implementation and the existing getEmbeddedMessages method in this file (line 527), placementId should be converted to Int before passing to the native SDK. The Android bridge explicitly casts double to int, and getEmbeddedMessages uses placementId.intValue when calling the SDK. Consider converting the Double to Int: Int(placementId) or verify that the EmbeddedSessionManager.startImpression method accepts Double.
| EmbeddedSessionManager.shared.startImpression(messageId: messageId, placementId: placementId) | |
| EmbeddedSessionManager.shared.startImpression(messageId: messageId, placementId: Int(placementId)) |

🔹 JIRA Ticket(s) if any
✏️ Description
Testing
Setup
yarn installyarn installbundle exec pod installwatchman watch-del-allyarn start --reset-cacheopen ReactNativeSdkExample.xcworkspace