I have it set to nil if there nothing to restore.
On iOS and mac audio does not stop, this seems unique to tvOS. I believe this corona bug and I would submit a bug report, I mean I am willing to corona support if they need anything. But i mean iOS, MacOS, and tvOS plugins all the same lines of code( mac is a hair different with some security protocols).
I am away from the apple tv until jan 3 so I don’t really have a way to test this until then. Thanks, Scott
Thanks for the update. StoreKit is working and the app is in review.
But the audio doesn’t work as it should. If one play a audiostream before purchase the audio will be “muted” after purchase. But will work again after leaving the app and going back again. Maybe a bug in Corona.
I don’t see how this would be a Corona bug. What’s likely happening is Apple’s StoreKit framework is muting the sound and not turning it back on. Perhaps you could try to print out the volume on the channel that’s being muted or the master volume in the listener function and if you see it’s set to 0, then set the volume back to something that works for your app.
Rob
Hi Rob,
I have tried to set the volume back to 100% but maybe I just did that with the actual channel. Will try your suggestion. Thanks.
Magnus
Are you getting any output in your logs?
No, it didn’t work. I can see that the volume is set to the right level but no sound. Right now I have the code below.
audio.setVolume( 0.75, { channel=1 } ) audio.setVolume( 1 )
I have finally managed to upload the app to Appstore but when I try to buy StoreKit doesn’t fire “purchased” state. It works when I copy to device and use a Sandbox tester but not from the downloaded version from App store. The transaction is never ended and no errors seems to be triggered so nothing happens.
I think I fixed problem(just pushed update so wait 1 hour) with the store kit plugin not working out side of sandbox, I don’t really have any apps out side of sandbox to test on but made sure all event’s were loaded on main thread which is my guess on why load products works but the other functions don’t. Let me know if the update does not fix it but I have some confidence. As for that audio bug, I just got home today, will try testing tomorrow after noon. I have guess on what is causing the audio to stop but will put it to the test tomorrow.
Still the same problem. It works in sandbox mode and I haven’t change anything in the code. See attached store.init function
---------------------- -- Init Store ---------------------- store.init(function(e) print( "init") print( "------" ) print(json.prettify(e) ) print( "------" ) --print("error? ", e.isError) if e.isError == true or e.isError == nil or e.transaction.state == nil then if e.isError then print(e.errorType, e.errorString) end waitForPurchase = false native.setActivityIndicator( false ) else --print("No error. STATE: ", e.transaction.state) if e.transaction.state == "purchased" then native.setActivityIndicator( false ) native.showAlert("Success", "Thank you for the purchase", {"OK"}, function(event) -- Spara kvitto m.iApUpgrade = true; m.receipt = e.transaction.originalReceipt --print("will remove locking") removeLocking() end ) elseif e.transaction.state == "restored" then --native.showAlert("Success", "Your product is restored!", {"OK"}) -- Spara kvitto m.iApUpgrade = true; m.receipt = e.transaction.originalReceipt removeLocking() else waitForPurchase = false native.setActivityIndicator( false ) if e.transaction.state == "failed" then native.showAlert("Failed", "Your purchase failed. Please, try again.", {"OK"}) native.setActivityIndicator( false ) elseif e.transaction.state == "cancelled" then --native.showAlert("Cancelled", "Your transaction was cancelled. Please, try again.", {"OK"}, function(event) --waitForPurchase = false native.setActivityIndicator( false ) --end ) end end end end)
pushed update an hour ago
I still have the same problem. StoreKit doesn’t seem to recieve any transaction state or error after the purchase.
It looks like App Store register the transaction and take to money but the app never recieved the status and the user can’t unlock the extra videos.
- is this still happening in sandbox or app store
2.when did you build app
3.what version of Xcode and tvOs are you running
- are you getting anything in your apple tv logs
PS: I pushed out an update an hour which made sure that the apple tv framework was properly build which may or may not help.
Thanks, Scott
- It works when I copy the app to the device and make a purchase with a sandbox user but when downloading the released version from on App Store.
2. Jan 6, 2017 at 3:11 PM
-
XCode: Version 8.2.1 (8C1002)
-
No, but will test again.
Corona Daily build: Version 2016.3012 (2016.12.29)
Before you run the app store version are you completely logging out of the app store and logging in with a non-sandboxed account?
Rob
Yes, i’m using a non-sandbox user for the appstore version.
I’m making more tests and maybe there is something with .loadProducts. At startup I call store.init and then store.loadProducts as described in the docs.
When testing on device storeKit returns:
[Device] init
[Device] ------
[Device] {
[Device] ------
[Device] loadProducts
[Device] ------
[Device] {
[Device] ------
In sandbox e.invalidProducts = true
But the purchase still works in sandbox. When calling store.restore() nothing happens.
@scott, in the docs I noticed you have changed publisherID. Do I need to change that in my code?
@scott, in the docs I noticed you have changed publisherID. Do I need to change that in my code?
Yes