Solved

Support for games built with SDL2?

  • 26 August 2021
  • 2 replies
  • 46 views

Badge +4

Hi

 

I have a game built in C++ and using SDL2 for the application framework and was wondering if it would be possible to use RevenueCat? Would it be possible to bridge the SDK with aObjective-C++ class?

Thanks

Denis

icon

Best answer by Denis 9 September 2021, 17:36

View original

2 replies

Userlevel 6
Badge +8

Hey @Denis! 👋

I don’t have any experience with using SDL2, and I haven’t heard of other customers using it with RevenueCat, so I’m not sure I can speak to it being possible to use the SDK. The native iOS SDK (3.x) was mostly built with Objective-C, so I’d expect that if you can get it to compile it would work as expected, but it may take some extra work on your end (like probably needing to create a wrapper for interacting with the SDK from SDL).

Maybe others in the community have had experience here and can speak to it?

Badge +4

Thanks for finally getting back to me.

 

I found a way to make it work using SDLUIKitDelegate and calling the RevenueCat SDK from Objective-C++. Here’s a snippet https://gist.github.com/nside/1cdbcc92554a944ca9049e0ce7d333ea

Reply