Skip to content

Conversation

@lposen
Copy link
Contributor

@lposen lposen commented Jan 11, 2026

🔹 JIRA Ticket(s) if any

✏️ Description

  • Add ability to sync messages
  • Add ability to get messages

Testing

  • Run the setup
  • Login and then click on the "Embedded" tab
  • Click "Sync messages"
    • In the Xcode Console, you should see something that looks like this:
       💛 17:55:06.1810:0x600001836640:ReactIterableAPI:syncEmbeddedMessages():512
       💚 17:55:06.2020:0x600001836640:Pending:init(value:):199
       💚 17:55:06.2050:0x600001836640:Pending:init(value:):199
       💚 17:55:06.7080:0x60000185fc80:Pending:deinit:215
       💚 17:55:06.7090:0x60000185fc80:Pending:deinit:215
      
  • Click "Get messages"
  • If you have embedded messages which are active, you should see the data for them in the emulator.
Screenshot 2026-01-11 at 5 58 10 PM

Setup

  • cd into root and run yarn install
  • cd into example and run yarn install
  • cd into ios and run bundle exec pod install
  • open two separate terminals.
  • In Terminal 1
    • run watchman watch-del-all
    • run yarn start --reset-cache
  • In Terminal 2
    • cd into ios
    • run open ReactNativeSdkExample.xcworkspace
    • Once Xcode opens the project, choose an emulator then click the play button to run it.

@lposen lposen added the embedded Issues/PRs related to Embedded Messages label Jan 11, 2026
@github-actions
Copy link

Lines Statements Branches Functions
Coverage: 62%
62.72% (392/625) 38.64% (97/251) 61.5% (139/226)

@qltysh
Copy link

qltysh bot commented Jan 11, 2026

Qlty

Coverage Impact

This PR will not change total coverage.

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

Copy link
Contributor

Copilot AI left a 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 PR adds the ability to sync embedded messages and retrieve embedded messages with optional placement ID filtering for the iOS platform. The Android implementation already exists in the codebase.

Changes:

  • Added iOS native implementation for syncEmbeddedMessages() and getEmbeddedMessages() methods
  • Added serialization support for IterableEmbeddedMessage to convert to dictionary format
  • Simplified the example app usage to pass placement IDs directly instead of chaining promises

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
ios/RNIterableAPI/Serialization.swift Adds toDict() extension for IterableEmbeddedMessage to serialize messages for React Native
ios/RNIterableAPI/ReactIterableAPI.swift Implements syncEmbeddedMessages() and getEmbeddedMessages() methods with placement ID filtering
ios/RNIterableAPI/RNIterableAPI.mm Exports the new methods for both new and legacy React Native architectures
example/src/components/Embedded/Embedded.tsx Simplifies the getEmbeddedMessages callback to accept placement IDs directly as a parameter

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

embedded Issues/PRs related to Embedded Messages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants