Closed EPage-Ed closed 1 year ago
Thanks for letting me know. I’ll investigate today and let you know what I see. Russell Sent from my iPhone On 1 Apr 2023, at 08:52
I can't reproduce this I'm afraid. This is what I did to reproduce the issue:
Setup:
StoreKit testing on real device:
Sandbox testing on real device:
I also removed the app from another real device and re-installed from the real App Store. Previous purchases were correctly recognized, auto-restored and validated.
So, it passes the "it all works on my machine" test! :-)
But what could be causing your issues? Actually, those errors about "StoreKit Testing in Xcode certificate is not trusted" look familiar. I seem to remember seeing something similar about 6 months ago, but only related to macOS builds. I never got to the bottom of it and a new version of Xcode seemed to cure it.
A couple of ideads:
Let me know how you get on - I'm happy to help if I can.
Russell
Success! You gave me a clue about the Sandbox account. I think my old one was just "old". Created a new one (a bit of a pain), turned off .storekit file, ran on device from Xcode, did purchase and it worked. Thanks!
Great response and thanks for getting to it so quickly. Can I give the repo a second star? ;-)
Excellent! So glad you got it sorted out!
iOS 16.4 (though same problem with iOS 16.3), Xcode 14.2 and 14.3.
Doing a non-consumable in-app purchase. Code was running fine a few months ago, and recently started on an update, and encounter this issue. Running on simulator works as before - purchase validates and updates just fine. Running on a device (iPhone 12 Pro with 16.3 or 16.4) fails validation with:
2023-04-01 00:16:39.288226-0700 XXXXX[27827:2726419] [Default] Failed to verify certificate chain due to client recoverable failure: Error Domain=NSOSStatusErrorDomain Code=-67843 "“StoreKit Testing in Xcode” certificate is not trusted" UserInfo={NSLocalizedDescription=“StoreKit Testing in Xcode” certificate is not trusted, NSUnderlyingError=0x28259a550 {Error Domain=NSOSStatusErrorDomain Code=-67843 "Certificate 0 “StoreKit Testing in Xcode” has errors: Root is not trusted;" UserInfo={NSLocalizedDescription=Certificate 0 “StoreKit Testing in Xcode” has errors: Root is not trusted;}}} 2023-04-01 00:16:39.289279-0700 XXXXXX[27827:2726418] [Default] Failed to verify signature for Transaction, will assume invalid: failedToVerifyCertificateChain