purchases-ios icon indicating copy to clipboard operation
purchases-ios copied to clipboard

Use combine instead of view modifiers internally

Open facumenzella opened this issue 6 months ago • 1 comments

Motivation

While having a debugging session with @joshdholtz and @ajpallares we agreed that using preference keys for things that are not SwiftUI 100% makes no sense, and it's flaky. This is an attempt to use combine internally instead of preference keys.

Removing preference keys for the public API is trickier, because the API is deeply tied to that.

Description

  • Add methods to CustomerCenterActionWrapper to subscribe to updates
  • Make existing PassthroughSubjects private
  • Move business logic to the view model, instead of the view.

facumenzella avatar May 27 '25 15:05 facumenzella

📸 Snapshot Test

15 modified, 853 unchanged

Name Added Removed Modified Renamed Unchanged Errored Approval
RevenueCat
com.revenuecat.PaywallsTester.mac-native
0 0 11 0 155 0 ⏳ Needs approval
RevenueCat
com.revenuecat.PaywallsTester
0 0 3 0 231 0 ⏳ Needs approval
RevenueCat
com.revenuecat.PaywallsTester.mac-catalyst-optimized-for-mac
0 0 1 0 233 0 ⏳ Needs approval
RevenueCat
com.revenuecat.PaywallsTester.mac-catalyst-scaled-to-match-ipad
0 0 0 0 234 0 N/A

:flying_saucer: Powered by Emerge Tools

emerge-tools[bot] avatar May 27 '25 15:05 emerge-tools[bot]

1 build increased size, 3 builds decreased size

Name Version Download Change Install Change Approval
RevenueCat
com.revenuecat.PaywallsTester
1.0 (1) 14.7 MB ⬇️ 36.3 kB (-0.25%) 51.1 MB ⬇️ 166.7 kB (-0.33%) N/A
RevenueCat
com.revenuecat.PaywallsTester.mac-catalyst-scaled-to-match-ipad
1.0 (1) 11.9 MB ⬇️ 3.8 kB (-0.03%) 44.1 MB ⬇️ 81.2 kB (-0.18%) N/A
RevenueCat
com.revenuecat.PaywallsTester.mac-catalyst-optimized-for-mac
1.0 (1) 11.9 MB ⬇️ 3.8 kB (-0.03%) 44.1 MB ⬇️ 81.2 kB (-0.18%) N/A
RevenueCat
com.revenuecat.PaywallsTester.mac-native
1.0 (1) 10.5 MB ⬆️ 44.7 kB (0.43%) 38.6 MB ⬆️ 156.4 kB (0.41%) N/A

RevenueCat 1.0 (1)
com.revenuecat.PaywallsTester

⚖️ Compare build ⏱️ Analyze build performance

Total install size change: ⬇️ 166.7 kB (-0.33%) Total download size change: ⬇️ 36.3 kB (-0.25%)

Largest size changes

Item Install Size Change
DYLD.String Table ⬇️ -43.4 kB
Code Signature ⬇️ -4.0 kB
🗑 RevenueCatUI.CustomerCenterActionViewModifier.CustomerCenterActio... ⬇️ -2.0 kB
DYLD.Exports ⬇️ -1.9 kB
📝 RevenueCatUI.CustomerCenterEnvironmentActions.Objc Metadata ⬆️ 732 B
View Treemap

Image of diff

RevenueCat 1.0 (1)
com.revenuecat.PaywallsTester.mac-catalyst-scaled-to-match-ipad

⚖️ Compare build ⏱️ Analyze build performance

Total install size change: ⬇️ 81.2 kB (-0.18%) Total download size change: ⬇️ 3.8 kB (-0.03%)

Largest size changes

Item Install Size Change
DYLD.String Table ⬇️ -80.7 kB
🗑 RevenueCatUI.CustomerCenterActionViewModifier.CustomerCenterActio... ⬇️ -2.0 kB
DYLD.Exports ⬇️ -1.9 kB
Code Signature ⬇️ -1.7 kB
📝 RevenueCatUI.CustomerCenterEnvironmentActions.Objc Metadata ⬆️ 732 B
View Treemap

Image of diff

RevenueCat 1.0 (1)
com.revenuecat.PaywallsTester.mac-catalyst-optimized-for-mac

⚖️ Compare build ⏱️ Analyze build performance

Total install size change: ⬇️ 81.2 kB (-0.18%) Total download size change: ⬇️ 3.8 kB (-0.03%)

Largest size changes

Item Install Size Change
DYLD.String Table ⬇️ -80.7 kB
🗑 RevenueCatUI.CustomerCenterActionViewModifier.CustomerCenterActio... ⬇️ -2.0 kB
DYLD.Exports ⬇️ -1.9 kB
Code Signature ⬇️ -1.7 kB
📝 RevenueCatUI.CustomerCenterEnvironmentActions.Objc Metadata ⬆️ 732 B
View Treemap

Image of diff

RevenueCat 1.0 (1)
com.revenuecat.PaywallsTester.mac-native

⚖️ Compare build ⏱️ Analyze build performance

Total install size change: ⬆️ 156.4 kB (0.41%) Total download size change: ⬆️ 44.7 kB (0.43%)

Largest size changes

Item Install Size Change
Code Signature ⬆️ 4.1 kB
DYLD.String Table ⬇️ -2.5 kB
Other ⬆️ 154.8 kB
View Treemap

Image of diff


:flying_saucer: Powered by Emerge Tools

Comment trigger: Size diff threshold of 100.00kB exceeded

emerge-tools[bot] avatar Sep 03 '25 12:09 emerge-tools[bot]

Closing in favor of the new PR

facumenzella avatar Sep 19 '25 14:09 facumenzella