Skip to content

feat(remote-config): add network scaffolding for GET /v2/config endpoint#6854

Merged
rickvdl merged 6 commits into
mainfrom
rickvdl/remote-config-api-endpoint
Jun 2, 2026
Merged

feat(remote-config): add network scaffolding for GET /v2/config endpoint#6854
rickvdl merged 6 commits into
mainfrom
rickvdl/remote-config-api-endpoint

Conversation

@rickvdl

@rickvdl rickvdl commented May 27, 2026

Copy link
Copy Markdown
Member

Summary

This is the first PR in a stacked series implementing remote config support on iOS, mirroring Android PR #3435.

Adds the network scaffolding for GET /v2/config — response models, endpoint definition, API class, and request coalescing operation. No public API surface is introduced.

What's included:

  • RemoteConfigResponse — response model with api_sources, blob_sources, and manifest.topics. Unknown topic keys are silently dropped for forward compatibility.
  • HTTPRequest.Path.getRemoteConfig — endpoint at /v2/config (authenticated, no etag, no signature verification — matching Android's WIP flags)
  • RemoteConfigAPI + GetRemoteConfigOperation — follows the existing CacheableNetworkOperation pattern with request coalescing via CallbackCache
  • Backend.remoteConfigAPI — wired into Backend following the same pattern as other API sub-objects
  • Unit tests: BackendGetRemoteConfigTests + RemoteConfigResponseDecodingTests

What's not included (future PRs):

  • Calling this endpoint from Purchases or any consumer
  • Caching or persistence of the config response
  • Acting on the returned api_sources or blob_sources

Note

Medium Risk
New authenticated config endpoint and models that will eventually drive entitlement-related blob routing; risk is limited today because nothing calls it yet, but path/signing flags are still WIP.

Overview
Adds network scaffolding for remote config via authenticated GET /v2/config (v2 path, no signature verification yet—marked WIP). Introduces RemoteConfigResponse (api_sources, blob_sources, manifest.topics with product_entitlement_mapping only; unknown topics are dropped and logged), RemoteConfigAPI + GetRemoteConfigOperation using the existing cacheable/coalescing pattern, and Backend.remoteConfigAPI.

Wires the new types into the Xcode project and test harness (MockBackend, BaseBackendTests, BasePurchasesTests). Adds BackendGetRemoteConfigTests and RemoteConfigResponseDecodingTests plus request snapshots. No public Purchases API or persistence/consumer of the response in this PR.

Reviewed by Cursor Bugbot for commit fe95ebf. Bugbot is set up for automated code reviews on this repo. Configure here.

@emerge-tools

emerge-tools Bot commented May 27, 2026

Copy link
Copy Markdown

4 builds increased size

Name Version Download Change Install Change Approval
RevenueCat
com.revenuecat.PaywallsTester
1.0 (1) 18.3 MB ⬆️ 33.0 kB (0.18%) 66.2 MB ⬆️ 180.1 kB (0.27%) N/A
BinarySizeTest
com.revenuecat.binary-size-test.local-source
1.0 (1) 4.2 MB ⬆️ 12.5 kB (0.3%) 12.7 MB ⬆️ 37.4 kB (0.3%) ⏳ Needs approval
BinarySizeTest
com.revenuecat.binary-size-test.cocoapods
1.0 (1) 6.4 MB ⬆️ 20.6 kB (0.33%) 28.0 MB ⬆️ 112.1 kB (0.4%) ⏳ Needs approval
BinarySizeTest
com.revenuecat.binary-size-test.spm
1.0 (1) 4.3 MB ⬆️ 11.2 kB (0.26%) 11.0 MB ⬆️ 28.9 kB (0.26%) ⏳ Needs approval

RevenueCat 1.0 (1)
com.revenuecat.PaywallsTester

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 180.1 kB (0.27%)
Total download size change: ⬆️ 33.0 kB (0.18%)

Largest size changes

Item Install Size Change
DYLD.String Table ⬆️ 73.4 kB
Code Signature ⬆️ 4.7 kB
DYLD.Exports ⬆️ 3.7 kB
📝 RevenueCat.RemoteConfigAPI.RemoteConfigAPI ⬆️ 1.1 kB
Other ⬆️ 97.1 kB
View Treemap

Image of diff

BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.local-source

⚖️ Compare build
📦 Install build
⏱️ Analyze build performance

Total install size change: ⬆️ 37.4 kB (0.3%)
Total download size change: ⬆️ 12.5 kB (0.3%)

Largest size changes

Item Install Size Change
DYLD.String Table ⬆️ 7.1 kB
📝 RevenueCat.RemoteConfigResponse.Manifest.encode(to) ⬆️ 2.0 kB
📝 RevenueCat.RemoteConfigResponse.Manifest.init(from) ⬆️ 1.5 kB
📝 RevenueCat.RemoteConfigResponse.init(from) ⬆️ 1.2 kB
📝 RevenueCat.GetRemoteConfigOperation.getRemoteConfig(completion) ⬆️ 1.1 kB
View Treemap

Image of diff

BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.cocoapods

⚖️ Compare build
📦 Install build
⏱️ Analyze build performance

Total install size change: ⬆️ 112.1 kB (0.4%)
Total download size change: ⬆️ 20.6 kB (0.33%)

Largest size changes

Item Install Size Change
DYLD.String Table ⬆️ 55.5 kB
Code Signature ⬆️ 2.5 kB
📝 RevenueCat.RemoteConfigResponse.Manifest.encode(to) ⬆️ 2.0 kB
📝 RevenueCat.RemoteConfigResponse.Manifest.init(from) ⬆️ 1.5 kB
📝 RevenueCat.RemoteConfigResponse.init(from) ⬆️ 1.2 kB
View Treemap

Image of diff

BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.spm

⚖️ Compare build
📦 Install build
⏱️ Analyze build performance

Total install size change: ⬆️ 28.9 kB (0.26%)
Total download size change: ⬆️ 11.2 kB (0.26%)

Largest size changes

Item Install Size Change
📝 RevenueCat.RemoteConfigResponse.Manifest.encode(to) ⬆️ 2.0 kB
📝 RevenueCat.RemoteConfigResponse.Manifest.init(from) ⬆️ 1.5 kB
📝 RevenueCat.RemoteConfigResponse.init(from) ⬆️ 1.2 kB
📝 RevenueCat.GetRemoteConfigOperation.getRemoteConfig(completion) ⬆️ 1.1 kB
RevenueCat.Result.parseResponse ⬆️ 988 B
View Treemap

Image of diff


🛸 Powered by Emerge Tools

Comment trigger: Size diff threshold of 100.00kB exceeded

@rickvdl

rickvdl commented May 27, 2026

Copy link
Copy Markdown
Member Author

@RCGitBot please test

@RevenueCat-Danger-Bot

RevenueCat-Danger-Bot commented May 28, 2026

Copy link
Copy Markdown
1 Warning
⚠️ This PR increases the size of the repo by more than 100.00 KB (increased by 109.27 KB).

Generated by 🚫 Danger

@rickvdl rickvdl force-pushed the rickvdl/remote-config-api-endpoint branch from f0e1d35 to 9307626 Compare May 28, 2026 06:15
@rickvdl

rickvdl commented May 28, 2026

Copy link
Copy Markdown
Member Author

@RCGitBot please test

@rickvdl rickvdl marked this pull request as ready for review May 28, 2026 15:14
@rickvdl rickvdl requested a review from a team as a code owner May 28, 2026 15:14
Comment thread Sources/Networking/Responses/RemoteConfigResponse.swift
@rickvdl rickvdl force-pushed the rickvdl/remote-config-api-endpoint branch from 9307626 to 46960a1 Compare May 29, 2026 07:55

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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 d7eef73. Configure here.

Comment thread Sources/Networking/HTTPClient/HTTPRequestPath.swift
@rickvdl

rickvdl commented May 29, 2026

Copy link
Copy Markdown
Member Author

@RCGitBot please test

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great!

Comment thread Sources/Networking/HTTPClient/HTTPRequestPath.swift Outdated
Comment thread Sources/Networking/HTTPClient/HTTPRequestPath.swift Outdated
Comment thread Sources/Networking/HTTPClient/HTTPRequestPath.swift Outdated
@rickvdl rickvdl force-pushed the rickvdl/remote-config-api-endpoint branch from 7e33097 to 648e8c6 Compare June 1, 2026 09:45
@rickvdl

rickvdl commented Jun 1, 2026

Copy link
Copy Markdown
Member Author

@RCGitBot please test

rickvdl added 6 commits June 2, 2026 14:54
Adds RemoteConfigResponse model, GetRemoteConfigOperation, RemoteConfigAPI,
and wires everything into Backend. Unknown topic keys in the manifest are
silently dropped for forward compatibility. Mirrors Android PR #3435.
Aligns with Android convention (DEFAULT_ENTRY_ID = "default") established
in purchases-android PR #3437.
BackendGetRemoteConfigTests was only recording snapshots for iOS 26.
CI also runs tests on iOS 14/15/16/17/18, tvOS 18, macOS, and watchOS,
each of which requires its own snapshot file.

Derived from existing snapshot patterns in BackendGetRewardVerificationStatusTests.
Follows the codebase convention of logging unknown backend values
(e.g. WorkflowsResponse unknown_workflow_trigger_type) rather than
silently dropping them.
…for signature verification

Aligns Topic with Swift's RawRepresentable convention and matches the
Android SDK's comment indicating signature verification will be enabled
once the remote config endpoint is finalized.
@rickvdl rickvdl force-pushed the rickvdl/remote-config-api-endpoint branch from 648e8c6 to fe95ebf Compare June 2, 2026 12:58
@rickvdl

rickvdl commented Jun 2, 2026

Copy link
Copy Markdown
Member Author

@RCGitBot please test

@rickvdl rickvdl merged commit 7ee15c7 into main Jun 2, 2026
42 of 43 checks passed
@rickvdl rickvdl deleted the rickvdl/remote-config-api-endpoint branch June 2, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants