Skip to content
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

[CHNL-16564] update script and message handling #261

Merged
merged 5 commits into from
Jan 27, 2025

Conversation

ab1470
Copy link
Contributor

@ab1470 ab1470 commented Jan 25, 2025

Description

This PR makes some updates to the KlaviyoWebViewModeling protocol, all conforming ViewModels, and the KlaviyoWebViewController. We will need these changes in order to handle the javascript messages that the in-app forms emit.

With this PR, I'm decoupling the javascript that gets injected into the WKWebView from the message handlers that get injected. This will allow us, in a future PR, to tell the WKWebView to listen for messages from the KlaviyoNativeBridge, even though we aren't injecting a script with the same name.

Check List

  • Are you changing anything with the public API?
  • Have you tested this change on real device?
  • Are your changes backwards compatible with previous SDK Versions?
  • Have you added unit test coverage for your changes?
  • Have you verified that your changes are compatible with all the operating system version this SDK currently supports?

Manual Test Plan

  1. I've tested this using Xcode previews and with the iOS test app

@ab1470 ab1470 requested a review from a team as a code owner January 25, 2025 00:18
Copy link
Contributor

@ajaysubra ajaysubra left a comment

Choose a reason for hiding this comment

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

Some minor questions but looks good to me

@ab1470 ab1470 force-pushed the ab/CHNL-16564/update-script-and-message-handling branch from 51c998c to c73c372 Compare January 27, 2025 18:34
@ab1470 ab1470 merged commit a14aa6c into master Jan 27, 2025
14 checks passed
@ab1470 ab1470 deleted the ab/CHNL-16564/update-script-and-message-handling branch January 27, 2025 19:50
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.

3 participants