StoreKit not working on tvOS

Can I please get a sample app? I cannot guess if I don’t have a sample app. I need a clear example of the problem. Please don’t post the main.lua in code brackets. I need to be able to download the sample, build the app, and see the problem. I don’t need steps, I need a sample app to see the problem with my own eyes and so I can build against it.

Ok. I’ll send you a copy of the entire.

Hey just wanted to give an update on this. I have tried everything I can think of to get this working. I cannot seem to get this working. I tried making sure AVAudioSession is on and on the right mode and the AVAudioSession audio session has volume. I am not really an audio wiz but I that is all I could think off. I think this is either an apple bug or corona bug. The none of my code has anything to due with audio, all it does is control the store framework provided by apple. I have tried implementing work arounds but nothing seems to do it. I will say during my investigation I notice the application state change from “applicationSuspend” to “applicationResume” to “applicationSuspend” to “applicationResume” during a purchase. i don’t know how Corona’s audio engine setup works but imagine Corona must be doing something to there audio engine on the suspend and resume phases. 

I do have a couple ideas for work arounds until this get fixed by me, Corona, or Apple. 

  1. during my investigation I did notice audio seems to work if you have never bought the item before on a particular apple account. But if you are rebuying the audio stops. You could try using the iCloud plugin to save purchases history in iCloud to allow users not have rebuy and the audio should work normally. There is a small chance a user may not have iCloud enabled but I think is that like 1% of people. I mean if you have an apple tv you probably have a lot of apple stuff. If you have a lot apple stuff you most likely have iCloud enabled.

  2. You could show people an alert after they buy something to reset the app. Probably not the best idea but better than not saying anything

I personally would recommend number 1. But I really really hate workarounds. I want a solution as much as you do. If I think of something or anyone has any ideas please let me know.