{"action":"created","issue":{"url":"https://api.github.com/repos/j3k0/cordova-plugin-purchase/issues/389","repository_url":"https://api.github.com/repos/j3k0/cordova-plugin-purchase","labels_url":"https://api.github.com/repos/j3k0/cordova-plugin-purchase/issues/389/labels{/name}","comments_url":"https://api.github.com/repos/j3k0/cordova-plugin-purchase/issues/389/comments","events_url":"https://api.github.com/repos/j3k0/cordova-plugin-purchase/issues/389/events","html_url":"https://github.com/j3k0/cordova-plugin-purchase/issues/389","id":130122098,"number":389,"title":"Crash when trying to purchase","user":{"login":"mparpaillon","id":1062115,"avatar_url":"https://avatars.githubusercontent.com/u/1062115?v=3","gravatar_id":"","url":"https://api.github.com/users/mparpaillon","html_url":"https://github.com/mparpaillon","followers_url":"https://api.github.com/users/mparpaillon/followers","following_url":"https://api.github.com/users/mparpaillon/following{/other_user}","gists_url":"https://api.github.com/users/mparpaillon/gists{/gist_id}","starred_url":"https://api.github.com/users/mparpaillon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mparpaillon/subscriptions","organizations_url":"https://api.github.com/users/mparpaillon/orgs","repos_url":"https://api.github.com/users/mparpaillon/repos","events_url":"https://api.github.com/users/mparpaillon/events{/privacy}","received_events_url":"https://api.github.com/users/mparpaillon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-01-31T12:31:23Z","updated_at":"2016-02-03T19:44:14Z","closed_at":null,"body":"Hi ! :)\r\n\r\nWhen I launch my app on iPhone 6 simulator (iOS 9) I can't purchase my item.\r\n\r\nHere are the logs:\r\n```\r\nInAppPurchase[objc]: Purchasing...\r\nInAppPurchase[objc]: State: PaymentTransactionStatePurchasing\r\n-[__NSArrayI JSONRepresentation]: unrecognized selector sent to instance 0x7fb209754cd0\r\n*** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: <NSInvalidArgumentException> -[__NSArrayI JSONRepresentation]: unrecognized selector sent to instance 0x7fb209754cd0\r\n```\r\n\r\nAny idea ?\r\n\r\nThanks a lot\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/j3k0/cordova-plugin-purchase/issues/comments/179426108","html_url":"https://github.com/j3k0/cordova-plugin-purchase/issues/389#issuecomment-179426108","issue_url":"https://api.github.com/repos/j3k0/cordova-plugin-purchase/issues/389","id":179426108,"user":{"login":"davidzas","id":5615224,"avatar_url":"https://avatars.githubusercontent.com/u/5615224?v=3","gravatar_id":"","url":"https://api.github.com/users/davidzas","html_url":"https://github.com/davidzas","followers_url":"https://api.github.com/users/davidzas/followers","following_url":"https://api.github.com/users/davidzas/following{/other_user}","gists_url":"https://api.github.com/users/davidzas/gists{/gist_id}","starred_url":"https://api.github.com/users/davidzas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidzas/subscriptions","organizations_url":"https://api.github.com/users/davidzas/orgs","repos_url":"https://api.github.com/users/davidzas/repos","events_url":"https://api.github.com/users/davidzas/events{/privacy}","received_events_url":"https://api.github.com/users/davidzas/received_events","type":"User","site_admin":false},"created_at":"2016-02-03T19:44:14Z","updated_at":"2016-02-03T19:44:14Z","body":"I made it work adding some validations. Please use the code below under your own responsability.\r\n\r\nreplace:\r\n `NSString *js = [NSString stringWithFormat:@\"window.storekit.updatedTransactionCallback.apply(window.storekit, %@)\", [callbackArgs JSONSerialize]];`\r\n\r\nwith:\r\n`NSString *js = [NSString\r\n                    stringWithFormat:@\"window.storekit.updatedTransactionCallback.apply(window.storekit, ['%@'])\",\r\n                    [callbackArgs componentsJoinedByString:@\"','\"]];`\r\n\r\nAnd hope it helps. Worked for me.\r\n"}}