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

IAF - Initialize webview content with file URL #227

Draft
wants to merge 4 commits into
base: feat/iaf
Choose a base branch
from

Conversation

evan-masseau
Copy link
Contributor

@evan-masseau evan-masseau commented Feb 24, 2025

Description

Previously we'd used loadDataWithBaseURL to load in our HTML template as a string and explicitly state that the "base url" of the page is klaviyo.com. It appears that this is giving us CORS errors when loading fonts from another source however.
Another option is loadData, but that appears to be limited to only loading other data resources.
The final option is loadUrl with a file:// path, which is what I'm experimenting with here. This is analogous to what the iOS SDK is doing also, and our font sheets were loading out of the box when tested there.
If this fails to load fonts reliably, I'll go back to loadDataWithBaseURL and investigate intercepting and modifying request headers instead.

Check List

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

Changelog / Code Overview

Test Plan

Related Issues/Tickets

@evan-masseau evan-masseau changed the base branch from master to feat/iaf February 24, 2025 21:23
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.

1 participant