Skip to main content
Solved

Support for games built with SDL2?


Forum|alt.badge.img+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

Best answer by Denis

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

View original
Did this post help you find an answer to your question?

2 replies

cody
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 492 replies
  • September 9, 2021

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?


Forum|alt.badge.img+4
  • Author
  • Helper
  • 1 reply
  • Answer
  • September 9, 2021

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings