feat(paywalls): add web_view wire envelope (2/7)#7228
Merged
Conversation
Add PaywallWebViewMessage/Value/Controller/Action types and API baselines. Controller post APIs are no-ops until the session PR wires WebKit. Co-authored-by: Jacob Rakidzich <Jacob@JacobZivanDesign.com>
Add WebViewEnvelope encode/decode and input hardening tests. Inert until Part 7; builds on the public API from Part 1. Co-authored-by: Jacob Rakidzich <Jacob@JacobZivanDesign.com>
1 build increased size, 3 builds had no size change
RevenueCat 1.0 (1)
|
| Item | Install Size Change |
|---|---|
| DYLD.String Table | ⬆️ 15.0 kB |
| DYLD.Exports | ⬆️ 2.4 kB |
| Code Signature | ⬆️ 1.1 kB |
| 📝 RevenueCatUI.WebViewEnvelope.Envelope.CodingKeys.Swift Metadata | ⬆️ 505 B |
| Other | ⬆️ 36.6 kB |
BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.local-source
No changes to report
BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.cocoapods
No changes to report
BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.spm
No changes to report
🛸 Powered by Emerge Tools
This was referenced Jul 15, 2026
JZDesign
marked this pull request as ready for review
July 16, 2026 12:47
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f7f5d16. Configure here.
Co-authored-by: Jacob Rakidzich <Jacob@JacobZivanDesign.com>
Co-authored-by: Jacob Rakidzich <Jacob@JacobZivanDesign.com>
Co-authored-by: Jacob Rakidzich <Jacob@JacobZivanDesign.com>
ajpallares
reviewed
Jul 17, 2026
Co-authored-by: Jacob Rakidzich <Jacob@JacobZivanDesign.com>
Co-authored-by: Jacob Rakidzich <Jacob@JacobZivanDesign.com>
Co-authored-by: Jacob Rakidzich <Jacob@JacobZivanDesign.com>
Co-authored-by: Jacob Rakidzich <Jacob@JacobZivanDesign.com>
The bridge no longer forwards messages to an app-provided handler, so the message, action, controller, and environment types are removed. Only the JSON value type remains. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # RevenueCat.xcodeproj/project.pbxproj
…er and tests Carries over the edits that didn't land in PR #1: file rename to match its sole `PaywallWebViewValue` type, copyright header, and added test coverage for `arrayValue`/nested accessors and top-level scalar/empty-container round-trips. Co-authored-by: Cursor <cursoragent@cursor.com>
… doc Adds tests asserting the encoded frame uses snake_case wire keys and omits nil fields, decodes a full message frame with a rich payload, and rejects invalid protocol_version / non-string fields / non-object payload / non-object JSON. Co-authored-by: Cursor <cursoragent@cursor.com>
Defer the reserved-key set to Part 5 where its only consumer lives, and make the test JSON helper throwing to remove the file-wide force_try disable. Co-authored-by: Cursor <cursoragent@cursor.com>
AlvaroBrey
reviewed
Jul 20, 2026
Keep only the `resize`/`fit` message types (matching Android) and drop the `rc:*` leftovers from a previous API design. Remove `receiveScript`/ `receiveFunction` from the envelope data model; they're bridge concerns and will live in WebViewSession in Part 5 where the sole consumer exists. Co-authored-by: Cursor <cursoragent@cursor.com>
AlvaroBrey
approved these changes
Jul 20, 2026
2 tasks
ajpallares
added a commit
that referenced
this pull request
Jul 21, 2026
Retarget Part 5 onto main now that Parts 1-3 (#7227, #7228, #7229) are merged. Resolve conflicts by keeping main's canonical Part 1-3 files (PaywallWebViewValue, WebViewEnvelope, WebViewOriginPolicy and their tests) and dropping stale deps-123 artifacts (PaywallWebViewAPI.swift, WebViewIsolation.swift and its test, plus the now-unused content_rules_failed log string). Part 5's own additions (WebViewSession + tests, log strings) are preserved. Co-authored-by: Cursor <cursoragent@cursor.com>
vegaro
added a commit
that referenced
this pull request
Jul 23, 2026
A merge in #7197 reintroduced duplicate PBXBuildFile/PBXFileReference/PBXGroup entries pointing at PaywallWebViewAPI.swift, which was renamed to PaywallWebViewValue.swift in #7228. The duplicate file reference UUID caused Xcode to resolve to the stale (nonexistent) path, breaking the create_xcframework archive build used by release-checks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Checklist
purchases-androidand hybridsMotivation
Part 2 of 7 splitting #7183; inert until Part 7. Message size and nesting policy remains server-owned so limits can change without requiring an SDK release.
Description
Adds the internal
WebViewEnvelopeencoding, decoding, validation, and tests. The client accepts the canonical JSON string wire format and validates its structure and channel identity without imposing fixed byte or nesting thresholds. No runtime paywall behavior change until Part 7.PR Plan
PWENG-99