{"action":"created","issue":{"url":"https://api.github.com/repos/MugunthKumar/MKStoreKit/issues/255","labels_url":"https://api.github.com/repos/MugunthKumar/MKStoreKit/issues/255/labels{/name}","comments_url":"https://api.github.com/repos/MugunthKumar/MKStoreKit/issues/255/comments","events_url":"https://api.github.com/repos/MugunthKumar/MKStoreKit/issues/255/events","html_url":"https://github.com/MugunthKumar/MKStoreKit/issues/255","id":121977708,"number":255,"title":"Release builds used via TestFlight will verify receipts against the wrong server","user":{"login":"warpling","id":220240,"avatar_url":"https://avatars.githubusercontent.com/u/220240?v=3","gravatar_id":"","url":"https://api.github.com/users/warpling","html_url":"https://github.com/warpling","followers_url":"https://api.github.com/users/warpling/followers","following_url":"https://api.github.com/users/warpling/following{/other_user}","gists_url":"https://api.github.com/users/warpling/gists{/gist_id}","starred_url":"https://api.github.com/users/warpling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/warpling/subscriptions","organizations_url":"https://api.github.com/users/warpling/orgs","repos_url":"https://api.github.com/users/warpling/repos","events_url":"https://api.github.com/users/warpling/events{/privacy}","received_events_url":"https://api.github.com/users/warpling/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-12-14T05:35:53Z","updated_at":"2016-01-21T01:09:04Z","closed_at":null,"body":"Release builds will attempt to verify receipts against the production verification server, but release builds distributed via TestFlight _should_ validate against the Sandbox server. Verifying sandbox receipts against the production server results in the error:\r\n\r\n````\r\nError Domain=com.mugunthkumar.mkstorekit Code=21007 \"This receipt is from the test environment.\" UserInfo={NSLocalizedDescription=This receipt is from the test environment.}\r\n````\r\n\r\nApparently [Apple's recommended method](http://stackoverflow.com/questions/9677193/ios-storekit-can-i-detect-when-im-in-the-sandbox) of handling this is to first attempt to validate against the production server and if that fails with error code 21007, try the request again with the Sandbox server. This should definitely make it into a future release! :)"},"comment":{"url":"https://api.github.com/repos/MugunthKumar/MKStoreKit/issues/comments/173418281","html_url":"https://github.com/MugunthKumar/MKStoreKit/issues/255#issuecomment-173418281","issue_url":"https://api.github.com/repos/MugunthKumar/MKStoreKit/issues/255","id":173418281,"user":{"login":"warpling","id":220240,"avatar_url":"https://avatars.githubusercontent.com/u/220240?v=3","gravatar_id":"","url":"https://api.github.com/users/warpling","html_url":"https://github.com/warpling","followers_url":"https://api.github.com/users/warpling/followers","following_url":"https://api.github.com/users/warpling/following{/other_user}","gists_url":"https://api.github.com/users/warpling/gists{/gist_id}","starred_url":"https://api.github.com/users/warpling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/warpling/subscriptions","organizations_url":"https://api.github.com/users/warpling/orgs","repos_url":"https://api.github.com/users/warpling/repos","events_url":"https://api.github.com/users/warpling/events{/privacy}","received_events_url":"https://api.github.com/users/warpling/received_events","type":"User","site_admin":false},"created_at":"2016-01-21T01:09:04Z","updated_at":"2016-01-21T01:09:04Z","body":"Yikes, I've run into lots of weird issues with the Sandbox I'm afraid. Have you tried reinstalling the app?"}}