question

thanksperadvance avatar image
thanksperadvance asked

In app purchase: cordova plugin storekit.load issue

Hello I am trying since a week to resolve this probleme and did'nt succed I am a beginner in app development and i am using Cordova Html5 for my Android/Iphone project When i use this fonction : IAP.onReady = function () { // Once setup is done, load all product data. alert("hellooo here is e"); storekit.load(IAP.list, function (products, invalidIds) { console.log('IAPs loading done:'); alert(invalidIds.length+"hellooo here is e"+products.length); for (var j = 0; j < products.length; ++j) { var p = products[j]; alert('Loaded IAP(' + j + '). title:' + p.title + ' description:' + p.description + ' price:' + p.price + ' id:' + p.id); console.log('Loaded IAP(' + j + '). title:' + p.title + ' description:' + p.description + ' price:' + p.price + ' id:' + p.id); IAP.products[ p.id] = p; } IAP.loaded = true; for (var i = 0; i < invalidIds.length; ++i) { console.log('Error: could not load ' + invalidIds[i]); console.log('IAPs loading done:'); } }); }; I get the 2 alerts but it crashs after and the debugger Open this file : #import int main(int argc, char* argv[]) { @autoreleasepool { int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); return retVal; } } and i have the error message : Thread 1 : EXEC_BAD_ACCESS (code =EXEC_1386_GPFLT) Can this be related to 64 bits? thanks a lot for your help
iap
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

DougM@Amazon avatar image
DougM@Amazon answered
Hello thanksperadvance, This is a General Protection fault error code. However, since you are appearing to be trying this on the iOS Simulator, it is worth noting a couple of things. 1) StoreKit is not supported on the iOS Simulator, if you are wishing to validate your Cordova App's In-App Purchasing capabilities, you will need to do so on a physical iOS device for that set of test cases, and on a physical Android device for Google's In-App Billing. You can reference both Apple's and Google's documentation for details as to how to validate In-App Purchasing through their respective libraries. Note that Apple mainly just states instead of not supporting StoreKit in the Simulator, that in order to validate In-App Purchases, you must select your build target to be an iOS device. http://developer.android.com/google/play/billing/billing_testing.html https://developer.apple.com/library/ios/technotes/tn2259/_index.html 2) There are currently no supported plugins for use of the Amazon In-App Purchasing SDK for the Cordova framework. As such, the In-App Purchasing mechanism you write for your application would not function on our devices.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.