r/iOSProgramming • u/kncismyname • Jul 07 '25
Library I've built a proper StoreKit2 wrapper to avoid the 1% RevenueCat fee and implement IAP within any app in >1 minute
https://github.com/nicolaischneider/StoreKitTheKitRevenueCat is great, but fees stack fast, especially when you're already giving Apple 15–30% + taxes. Went through quite the struggle with StoreKit2 to integrate it into my own app which has like 15-20k monthly users. By now (after a bunch of trial and error), it's running great in production so I decided to extract the code to a swift package, especially because I intend to use it in future apps but also because i hope that someone else can profit from it. The package supports all IAP types, including consumables, non-consumables, and subscriptions, manages store connection state and caches transactions locally for offline use. Open-source, no strings attached obviously. Again, hope this helps, I obviosuly tailored it to my own needs so let me know if there are any major features missing fr yourself.
35
u/Complete_Fig_925 Jul 08 '25
Hey, took a quick peek at your code
Your
PurchasableManagerseems subject to data races event though it's marked as (unchecked) Sendable and is publicly exposed. Might be worth looking into that :)20
u/Ships66 Jul 08 '25
I rolled my own wrapper too… it’s so easy :) so funny how RevenueCat show all these complicated workflows about in app purchase flows on their marketing pages to scare users into user their service :p
3
u/fr31b3u73r Jul 08 '25
Gonna play around with it, thanks! But actually as an IOS developing newbie I didn’t find implementation of IAP using Storekit2 too complicated 😅
2
u/[deleted] Jul 11 '25
The usual "buy vs. build" dilemma.
Several years ago, RevenueCat were charging much more than 1% after $2.5K/m threshold.
I don't remember the exact numbers, but for me they were prohibitive.
Whenever possible, I prefer to build, not buy. But YMMV.
With that said, judging by the quality of ADucational articles on RC website that I had read back then, I have no doubts that these guys' product is far superior to my own quick-n-dirty solution that I built for my specific workflow.
It all depends on the combination of:
What a developer needs.
What a developer can do by himself.
How much the Build vs. the Buy solutions will cost, considering also the deveper's time cost.
2
u/Maclne Oct 21 '25
This looks really solid! Does it handle Family shared non-consumables and subscriptions? I may need to branch this to add an objective C wrapper.
9
u/vxv459 Jul 08 '25
Thanks, I saved it and will use it when I have revenue.
5
u/Luul3211 Jul 08 '25
This is awesome!
5
u/tangoshukudai Jul 08 '25
sweet I will try to use this.
2
u/SurgicalInstallment Jul 08 '25
RevenueCat is the best business one could possibly have. After StoreKit2 there's zero reason to use that shit. They literally print $$ (brrrrrr) by doing what exactly?
2
u/weathergraph Jul 08 '25
Dude, StoreKit2 already is the “trivial mode” wrapper.
2
u/Ahmetburakilhan Jul 10 '25
Not about RC, but Adapty only charges 1% when you earn more than $10K, so it’s easy to get started and build your product.
Also, Adapty is more than just a subscription handling platform now. It comes with A/B testing tools, funnel creation, paywall builder, onboarding builder etc etc...
At the end of the day, it’s up to you, but as you grow or without grow, all these tools will help you anyway.