feat(remote-config): update request and response models according to spec#7022
Conversation
|
@RCGitBot please test |
4 builds decreased size
RevenueCat 1.0 (1)
|
| Item | Install Size Change |
|---|---|
| DYLD.String Table | ⬇️ -22.8 kB |
| 🗑 RevenueCat.RemoteConfigResponse | ⬇️ -3.9 kB |
| RevenueCat.RemoteConfigAPI.RemoteConfigAPI | ⬆️ 1.5 kB |
| Code Signature | ⬇️ -936 B |
| DYLD.Exports | ⬇️ -624 B |
BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.local-source
⚖️ Compare build
📦 Install build
⏱️ Analyze build performance
Total install size change: ⬇️ 7.1 kB (-0.05%)
Total download size change: ⬇️ 842 B (-0.02%)
Largest size changes
| Item | Install Size Change |
|---|---|
| 🗑 RevenueCat.RemoteConfigResponse | ⬇️ -16.4 kB |
| DYLD.String Table | ⬇️ -3.3 kB |
| 📝 RevenueCat.RemoteConfiguration.__derived_struct_equals | ⬆️ 1.7 kB |
| 📝 RevenueCat.RemoteConfiguration.init(from) | ⬆️ 1.4 kB |
| 📝 RevenueCat.RemoteConfiguration.ConfigItem.init(from) | ⬆️ 1.3 kB |
BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.cocoapods
⚖️ Compare build
📦 Install build
⏱️ Analyze build performance
Total install size change: ⬇️ 40.7 kB (-0.14%)
Total download size change: ⬇️ 4.0 kB (-0.06%)
Largest size changes
| Item | Install Size Change |
|---|---|
| DYLD.String Table | ⬇️ -26.1 kB |
| 🗑 RevenueCat.RemoteConfigResponse | ⬇️ -16.4 kB |
| 📝 RevenueCat.RemoteConfiguration.init(from) | ⬆️ 1.4 kB |
| 📝 RevenueCat.RemoteConfiguration.ConfigItem.init(from) | ⬆️ 1.3 kB |
| Code Signature | ⬇️ -1.2 kB |
BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.spm
⚖️ Compare build
📦 Install build
⏱️ Analyze build performance
Total install size change: ⬇️ 3.4 kB (-0.03%)
Total download size change: ⬇️ 763 B (-0.02%)
Largest size changes
| Item | Install Size Change |
|---|---|
| 🗑 RevenueCat.RemoteConfigResponse | ⬇️ -16.4 kB |
| 📝 RevenueCat.RemoteConfiguration.__derived_struct_equals | ⬆️ 1.7 kB |
| 📝 RevenueCat.RemoteConfiguration.init(from) | ⬆️ 1.4 kB |
| 📝 RevenueCat.RemoteConfiguration.ConfigItem.init(from) | ⬆️ 1.3 kB |
| 📝 RevenueCat.RemoteConfiguration.ConfigItem.encode(to) | ⬆️ 912 B |
🛸 Powered by Emerge Tools
85655eb to
d94efa3
Compare
7353dc0 to
32e22eb
Compare
| @@ -10,27 +10,32 @@ import Foundation | |||
| final class GetRemoteConfigOperation: CacheableNetworkOperation { | |||
There was a problem hiding this comment.
Will rename this in a follow up PR to SyncRemoteConfigOperation where the actual syncing happens
cf2e497 to
b540cab
Compare
| struct Topics: Equatable { | ||
|
|
||
| /// Changed topic bodies only: topic name to item name to config item. | ||
| let entries: [String: [String: ConfigItem]] |
There was a problem hiding this comment.
Will be adding some more generic helpers for decoding concrete types from the topics / config items. So did not spend too much time in making the 'api' nice for getting the data.
This will be done in the follow up PR working on the remote config manager.
| } | ||
|
|
||
| init(from decoder: Decoder) throws { | ||
| let container = try decoder.container(keyedBy: DynamicCodingKey.self) |
There was a problem hiding this comment.
tonidero
left a comment
There was a problem hiding this comment.
Just a question but looks great!!
|
@RCGitBot please test |
4e4ae0d to
60efa0c
Compare
9434b2e to
b980d5f
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ 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 b980d5f. Configure here.
b980d5f to
969f3ef
Compare
|
@RCGitBot please test |
tonidero
left a comment
There was a problem hiding this comment.
One comment but I think it's not a blocker either.
e199587 to
f829337
Compare
|
@RCGitBot please test |
f829337 to
cd935bb
Compare
|
@RCGitBot please test |





Part of the remote config stack, builds on #7037.
Backend source-of-truth context: https://github.com/RevenueCat/khepri/pull/21676.
Android parity reference: RevenueCat/purchases-android#3610.
Updates the API models to match the new backend spec and Android implementation. Contains the minimal modeling required to encode/decode the config object.
Note that no clean APIs were introduced for genericly decoding business models into concrete types, this will be done in a follow up PR that introduces the
RemoteConfigManager.Note
Medium Risk
Changes core remote-config wire models and request coalescing keys that future sync logic will depend on, but the HTTP path still returns
RCContainer?and noRemoteConfigManagerconsumesRemoteConfigurationyet.Overview
Replaces the old
RemoteConfigResponseshape (top-levelapi_sources/blob_sourcesand a nested manifest object) withRemoteConfiguration, matching the new/v2/configcontract:domain,subdomains, opaquemanifest,active_topics,prefetch_blobs, andtopicsthat carry only changed topic bodies via flexibleConfigItementries (blob_ref,prefetch, plus arbitrary inlinecontent).RemoteConfigRequestis no longer an empty POST body—it now sendsdomain(default"app"), optionalmanifest, andprefetched_blobswhen non-empty.GetRemoteConfigOperation/RemoteConfigAPIthread that request through and key in-flight request coalescing ondomain,manifest, and sorted prefetched blobs so differing sync states do not share one network call.Decoding tests are renamed and expanded for the new models; backend remote-config tests assert the new JSON body and coalescing rules.
Reviewed by Cursor Bugbot for commit cd935bb. Bugbot is set up for automated code reviews on this repo. Configure here.