My iOS IAP has been working without a problem for a long time, and then suddenly, I noticed that it’s broken. I’m getting runtime errors when I call store.canMakePurchases:
<Warning>: Runtime error
?:0: attempt to index upvalue ‘?’ (a nil value)
stack traceback:
[C]: ?
?: in function <?:2861>
?: in function ‘removeAds’
?: in function ‘onRelease’
?: in function <?:223>
?: in function <?:218>
<Warning>: errorMessage = “?:0: attempt to index upvalue ‘?’ (a nil value)”
<Warning>: Runtime error
stack traceback:
[C]: ?
?: in function <?:2861>
?: in function ‘removeAds’
?: in function ‘onRelease’
?: in function <?:223>
?: in function <?:218>
<Warning>: errorMessage = “\nstack traceback:\n\t[C]: ?\n\t?: in function <?:2861>\n\t?: in function ‘removeAds’\n\t?: in function ‘onRelease’\n\t?: in function <?:223>\n\t?: in function <?:218>”
If I comment out the if-statement where it checks store.canMakePurchases, my app proceeds to the next line and calls store.purchase , and it triggers the same runtime errors (i.e., attempt to index upvalue error – in exactly the same way store.canMakePurchases does.)
Am I the only person seeing this? I have no clue as to how I may fix this problem because error occurs with store API such as store.canMakePurchases. Besides, my IAP module has been working without fail for quite sometime now, and I have not made any changes to the module as it relates to Apple IAP routine. I’m at my wits end.
FYI, store.init(“apple”, transactionCallBack) works as expected (because I see the proper print statements to let me know that products are loaded as expected, etc.)
I was just about ready to submit a new release build to Apple, and now I’ve come to this screeching halt.
Did something break with store API? Or is it only me – and thus, must I look for whatever it might be in my code that’s causing this?
Naomi
Edit 1: Just in case it’s not clear, I’m having this problem with daily build 1184 as well as with the latest daily build 1192 that I fetched this morning. The device build was generated using iOS SDK 6.1 (not 7.0 beta).
Edit 2: I generated a device build with iOS SDK 7.0 beta, but it spat out the same runtime errors for me…