iPhone 14 simulator not loading SKProducts

I was testing my app using the Xcode 12 beta, in an iOS 14 simulator - when it tried to load SKProducts (all subscriptions) that normally have been loading just fine, I got back an error:

Error Domain=SKErrorDomain Code=0 "UNKNOWNERROR" UserInfo={NSLocalizedDescription=UNKNOWNERROR, NSUnderlyingError=0x600000c903f0 {Error Domain=ASDErrorDomain Code=507 "Error decoding object" UserInfo={NSLocalizedDescription=Error decoding object, NSLocalizedFailureReason=Attempted to decode store response}}}

Will we still be able to load products in simulators going forward, or can we only load the local test versions of products from the new StoreKit configuration files? I would really, really still like to be able to load production products in a simulator so I can see the actual data that is in AppStore connect.

Replies

I always test the SKProductsRequest method on a device. In the case that the call returns the identifier(s) in the invalidProducts array, and I've verified that my identifier use is correct, I can install the StoreKit profile and capture the console log to include in a bug report. I just did a quick test with Xcode 11 and found that using the SKProductsRequest in a simulator app returned all of the items in the invalidProducts array. When I run the test on my device, the identifiers are validated by the App Store and return the information I set up on AppStoreConnect.

I seem to recall 5 - 6 years ago that StoreKit support was removed in the emulators. Members of the engineering team, please correct me if the SKProductsRequest is supported in the emulators.

rich kubota - rkubota@apple.com
developer technical support CoreOS/Hardware/MFI
@rich SKProducts have been able to load in the simulator right up until my run in iOS 14... indeed, even running from Xcode 12 beta, in an iOS 13.2 simulator SKProducts load just fine.

I also test product loads on a device, but that is pretty cumbersome to do all the time compared to using the simulator. Also Sandbox is often pokey at loading SKProducts where the simulator is always pretty much instant.

I'm more looking to get a sense from Apple if starting from iOS 14 SKProducts will not load from the App Store, or if this is a bug... I'll file a radar and see what they say I guess.
iOS 14 Simulator can't load SKProducts from the web, but you can add the StoreKit Configuration File and add your products there. This will fix an issue.

See my answer here for detailed instructions: https://stackoverflow.com/a/58065711/558333

PS: can't add images here. I think that's an essential thing for any community.
I'm filing a radar on this issue, as the simulator should load products from AppStoreConnect if a StoreKit configuration profile has not been specified in the Scheme you are running.

Me too
I can't get SKProduct on iOS14 simulator by Xcode12.
but on Xcode11 it works.

Seems to be the same issue as reported here: https://developer.apple.com/forums/thread/651858
Hope it will be fixed soon by Apple.
Same problem here.
unfortunately not only on a simulator, but also on a real iPhone 7 running iOS 14.2