Weird, I can't find the non-deprecated method Xcode is hinting at.
Any ideas?
Conversation
Actually, turns out I shouldn't use that on launch anyway! For now I'm abstracting the few calls to the SDK into my own object under a Swift "namespace" (an enum).
This file will probably change a lot in the near future, but for now it gives me hooks to call on sign in/out.
2
1
The RevenueCat SDK was throwing warnings about not finding an offering, so I created one. The docs say they are optional, but I figured why not.
2
1
Since I'm working in a hybrid app most of the UI is rendered on the web.
So I can send a JavaScript message to the client when the web-based purchase button is clicked. This Stimulus controller grabs the iOS plan identifier to pass along to RevenueCat.
1
4
Back in iOS I can extract the plan identifier from the JavaScript message and make a purchase directly.
2
1
Oh hey! I think something might be working!
Time to revisit the section in the docs on integrating with the sandbox.
1
2
Progress! After setting up the StoreKit Configuration File I was able to make a purchase in the simulator. I had to copy over all the details from App Store Connect to the config.
Relevant RevenueCat docs: docs.revenuecat.com/docs/apple-app
2
5
Up next is integrating the webhooks from RevenueCat into my Rails app. Then I can associate iOS purchases with users in the Rails database.
But first⦠lunch!
1
4
OK, back at it!
Does RevenueCat only support a single webhook URL? How are we expected to manage development vs. production environments?
CC
2
1
Progress progress!
I now have a small Rails controller that handles authorization and kicks off a background job. Now I can unit test the actual sync logic in a PORO and not deal with integration/controller tests.
2
3
From RevenueCat's recommendation, the webhook kicks off a single GET request to their REST API to sync.
Here's a rough first pass at extracting an active subscription and assigning it to Pay. An official RevenueCat Pay integration might make sense.
github.com/pay-rails/pay
Replying to
That's all for today!
I'll continue to update this thread when I continue working on the integration.
Until then, all the Rails code is pushed to this branch. Enjoy your weekend everyone.
2
4
Back at integrating with my Rails app!
The more I think about this the more confused I get. Why is it simpler to have a single method/class do EVERYTHING when we are already getting the "diff" with each webhook?
3
3
A little weekend hacking today on the RevenueCat integration!
Thanks to for the hints and ideas, I've implemented a first pass of the webhook workflow. This kicks off a "sync" job for subscriptions.
1
4
