Question

Flutter StoreKit iOS simulator

  • 21 September 2021
  • 4 replies
  • 105 views

Badge

Flutter: 2.2.3

Plugin: purchases_flutter: ^3.4.5

Device: iOS simulator (14.5)

 

Using Flutter + StoreKit does not work. `getOfferings()` always return `null` with empty products.

 

I already made sure that bundle ID, product IDs, API key, and StoreKit public cert are correctly set.

 

The weird thing is, if I do this in a native iOS app, I can fetch the offerings and products. After installing the sample native iOS app, I tried running the Flutter app without changing the StoreKit public cert, it can fetch the offerings. Which is really weird.

 

I already tried creating a clean Flutter app with StoreKit, but it still fails to get the offerings. It will only work if I install my sample native iOS app, then run the Flutter version.

 

I don't have any actual device with me, so simulator is the only way I can proceed with my task. Any idea on why StoreKit in Flutter does not work?


4 replies

Userlevel 3
Badge +7

Hey @Rick Krystianne Lim :wave: ,

 

Have you checked out our docs on empty products? 

 

Additionally ,There might be something wrong with your StoreKit configuration files (we have a guide on testing with the simulator here: https://docs.revenuecat.com/docs/apple-app-store#ios-14-only-testing-on-the-simulator)

Badge

@jazmine 

https://community.revenuecat.com/sdks%2D51/why%2Dare%2Dofferings%2Dor%2Dproducts%2Dempty%2D124

Yes. I already checked this one and confirmed the statuses of my products. However, this states “You're testing on a physical device and not a simulator”. That’s why I proceeded to StoreKit section.

As for my StoreKit configuration, I already double checked it and as what I stated in my question, doing it in native iOS app works, in Flutter, it does not.

Hi, I have the same problem.

StoreKit is not working if running app from the Android studio or flutter run. 

But it works if run the app form the Xcode. Can then it’s possible to attach Flutter process to debug and develop. 

 

Badge

Hi, I have the same problem.

StoreKit is not working if running app from the Android studio or flutter run. 

But it works if run the app form the Xcode. Can then it’s possible to attach Flutter process to debug and develop. 

 

Hello @Andrii ,

Thanks for your suggestion. I was already given a physical device, but I will still try this. :bow_tone3:

Reply