5

Long time reader, first time writer. Thanks for a great community.

The app I am working on has In-App Purchase implemented and is working well, however I've run into a strange error case that I don't see an obvious solution to. The scenario is seen on iPhone 5S with Touch ID enabled for purchases. When the user selects an item to purchase, the Touch ID dialog pops up. If user cancels this specific dialog, the SKPayment delegate receives a SKPaymentTransactionStateFailed event with SKErrorUnknown code - not SKErrorPaymentCancelled as one would expect and what is received when I cancel the password input dialog. As the code cannot categorize this as the user canceling the purchase, the user will see a generic error alert view. I don't see this being a sandbox issue as purchases themselves works well both testing in sandbox and live.

Thoughts on how to detect that unknown error as a cancellation, anyone?

Etheryte
  • 24,589
  • 11
  • 71
  • 116
John Dough
  • 285
  • 1
  • 7
  • I've seen some Touch ID error states where localizedDescription had useful information. So you do some NSString work to see if you are in the bad state there. Maybe that's the same here? Gross code I know... – Paul Cezanne Apr 27 '15 at 09:52

0 Answers0