#payment in-app for iOS and Android

7 messages · Page 1 of 1 (latest)

cosmic grove
#

Hello guys,
I am working on my first tauri mobile app (a workout tracker app: pantakala.app) using Svelte and tailwind for the front end. The main problem I have is how to integrate in-app payments into my app for both iOS and Android.

It is a bit surprising that Tauri does not have such a plugin, in-app purchase are a very important feature to build apps.

I wanted to use revenueCat but they don't have an SDK for Tauri, only for capacitor. I have a Mac but I know nothing about swift or Rust, so I have no idea about where to start (it seems we can integrate their API).

I would appreciate any help you can provide, and would even be ready to pay a few hundreds of $ if anyone could help to build a tauri plugin (we could open source it) that could be easy to integrate with Tauri and javascript.

Thanks a lot for your help guys!

sour turret
cosmic grove
#

I will try to build something with chatGPT. In my (stupid) head I see things this way:

  • revenueCat SDk seems quite easy: call a payment function with a product ID and it will triger the native payment and send you a success/failure result.
  • it seems they don't have that much functions to be called. The problem is how to call such native functions living in Swift while we are coding in js.
  • So I need to write un plugin that will call the revenueCat SDK in swift/kotlin functions, wrap this into some functions, expose these functions to rust so they ban be called by rust and then the rust code exposed these functions to the font end so I can call them in js.
  • So if I figure out how to call from js a rust function that calls a swift/koltin function I would have not half of the work, and the rest should just be regular swift/kotlin.

So conceptually, it does not sounds THAT complicated right?

The problem is that for now I know nothing about rust, kotlin, swift and tauri plugins. :p

I will try to see what I can do with the help of chat GPT and we will see. If it works I will share it with everyone!

feral chasm
#

@cosmic grove And while trying, if you have any trouble, post them here and maybe we can help as well 😉

cosmic grove
#

I managed to compile my app and run it, but got some error 500 haha, so it does not work yet but there are progresses