Question

Objective-C, how to access RCStoreFront


Userlevel 1
Badge +5

Good evening


We are moving away from calling SK1 directly towards using RC in iOS. We do use SKStorefront.

 

We see the RCStoreFront class in the xcframework but we haven’t found a way to access/init/fetch it.

 

Dead end? Can you point us in the right direction? How to get a RCStoreFront in ObjC

 

Thank you


4 replies

Userlevel 1
Badge +5

Hello,

That’s a great question. `RCStoreFront` does have a `currentStorefront` property which supports StoreKit 1 and StoreKit 2, but due to the fact that the SK2 way of obtaining the current storefront is `async`, this property is `async`, which means that it indeed isn’t available on Objective-C.

I think this means we should add another property for Objective-C, maybe `+ [RCStoreFront rc1CurrentStorefront]`.

Userlevel 1
Badge +5

I’ve sent a proposed solution: https://github.com/RevenueCat/purchases-ios/pull/1614

Userlevel 1
Badge +5

Awesome. Thank you. That makes sense! :) 

Userlevel 1
Badge +5

This is being released today as part of version 4.5.0 🎉

[RCStorefront sk1CurrentStorefront]

Reply