Skip to content

Conversation

polpielladev
Copy link
Contributor

@polpielladev polpielladev commented Jun 23, 2025

In another effort to reduce the amount of 'Empty Offerings' reports that we get, we want to let users know of configuration issues whenever they run a DEBUG build.

For this reason, we would like to run the SDK Health Check on debug builds.

Examples

✅ Successful configuration (No Warnings)

Screenshot 2025-06-24 at 13 49 13

✅ Successful configuration (Warnings)

Screenshot 2025-06-24 at 13 46 22

❌ Failed configuration

Screenshot 2025-06-24 at 13 49 52

Checklist

  • If applicable, unit tests
  • If applicable, create follow-up issues for purchases-android and hybrids

@polpielladev polpielladev changed the title [DX-457] Log the SDK configuration report on every #DEBUG run [DX-457] Log the SDK configuration report on every #DEBUG run Jun 23, 2025
@polpielladev
Copy link
Contributor Author

@aboedo @ajpallares One question that I still haven't fully decided on is how we should configure it.

What I think we should definitely do (and I have already added in this PR) is to allow the user to control whether we do the health check or not.

What I am still unsure about is whether to enable it by default or not? Maybe we soft launch by making it false by default or we enable the SDK configuration value by default and we control with a BE FF that gets sent along with the report (more complex).

What do you think?

@polpielladev polpielladev marked this pull request as ready for review June 23, 2025 16:29
Copy link
Member

@ajpallares ajpallares left a comment

Choose a reason for hiding this comment

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

Such a nice addition! It's going to be extremely useful, not only for developers, but also for us internally. It's looking great so far. Great job!

I have some comments, mostly about ENABLE_CUSTOM_ENTITLEMENT_COMPUTATION mode and another about dependency injection.

What I am still unsure about is whether to enable it by default or not? Maybe we soft launch by making it false by default or we enable the SDK configuration value by default and we control with a BE FF that gets sent along with the report (more complex).

I'm not really sure about this either. I don't know if it makes sense to build something more complex around this. But it surely feels like doing it on every run is too much (especially if the health check is successful) and not doing it by default seems like a waste of this wonderful feature. I don't know if having a middle ground by default would make sense or would overcomplicate things and make it less expectable...

@polpielladev
Copy link
Contributor Author

I'm not really sure about this either. I don't know if it makes sense to build something more complex around this. But it surely feels like doing it on every run is too much (especially if the health check is successful) and not doing it by default seems like a waste of this wonderful feature. I don't know if having a middle ground by default would make sense or would overcomplicate things and make it less expectable...

I agree, especially because we have to query App Store Connect for this, and it is highly likely that this will only come in handy for people that are either starting out or that have issues with configuration.

That's the reason why I decided to turn it off by default, so that users can actually just run it when they need it with a configuration value, but it would potentially hurt discoverability. I keep going back and forth about this, as I want the experience to be as seamless as possible while still keeping in mind that this is going to come in handy in very specific situations only.

The other thing that I thought was to potentially introduce some caching (serverside probably), but that is just a bit risky as we might miss changes in configuration?

What do you think @aboedo @ajpallares @vegaro?

Copy link

emerge-tools bot commented Jun 27, 2025

1 build increased size

Name Version Download Change Install Change Approval
RevenueCat
com.revenuecat.PaywallsTester
1.0 (1) 12.3 MB ⬆️ 33.2 kB (0.27%) 46.9 MB ⬆️ 139.7 kB (0.3%) N/A

RevenueCat 1.0 (1)
com.revenuecat.PaywallsTester

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 139.7 kB (0.3%)
Total download size change: ⬆️ 33.2 kB (0.27%)

Largest size changes

Item Install Size Change
DYLD.String Table ⬆️ 53.7 kB
RevenueCat.Purchases.Purchases ⬇️ -9.1 kB
RCPurchases.Objc Metadata ⬆️ 6.8 kB
Code Signature ⬆️ 3.2 kB
DYLD.Exports ⬆️ 2.1 kB
View Treemap

Image of diff


🛸 Powered by Emerge Tools

Comment trigger: Size diff threshold of 100.00kB exceeded

@aboedo aboedo requested a review from a team June 27, 2025 18:17
Copy link
Member

@JayShortway JayShortway left a comment

Choose a reason for hiding this comment

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

This is such a huge improvement, that my only real comment is: wen Android? 🚀 😄

Copy link
Contributor

@tonidero tonidero left a comment

Choose a reason for hiding this comment

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

Looking great!! I think this will be really useful indeed!

@polpielladev polpielladev force-pushed the dx-457-run-the-check-sdk-health-method-on-every-debug-build branch from f370f2e to 50ecfcf Compare June 30, 2025 13:15
@polpielladev
Copy link
Contributor Author

@tonidero @JayShortway Addressed all of the feedback now, let me know if you are happy with it 👍

Copy link
Member

@ajpallares ajpallares left a comment

Choose a reason for hiding this comment

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

I have more comments! Looking better and better though!

@polpielladev polpielladev requested a review from ajpallares July 1, 2025 09:50
Copy link
Member

@ajpallares ajpallares left a comment

Choose a reason for hiding this comment

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

Looking great! Thanks for addressing all the comments so throughly!! Amazing job!

There's one small issue, which I think would prevent the SDK from compiling in Custom entitlement computation mode. But other than that, I think it looks great!

Copy link
Member

@JayShortway JayShortway left a comment

Choose a reason for hiding this comment

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

Thanks for making the changes! 🙏 Really excited about this!

@polpielladev polpielladev merged commit 21f226d into main Jul 2, 2025
12 checks passed
@polpielladev polpielladev deleted the dx-457-run-the-check-sdk-health-method-on-every-debug-build branch July 2, 2025 13:00
polpielladev added a commit that referenced this pull request Jul 3, 2025
polpielladev added a commit that referenced this pull request Jul 3, 2025
* Revert "fix `Purchases` temporary leak when running SDK health check (#5350)"

This reverts commit 26de543.

* Revert "[DX-457] Log the SDK configuration report on every `#DEBUG` run (#5317)"

This reverts commit 21f226d.
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.

6 participants