While testing some Storekit code in sandbox mode, I came across this problem:
public func Restore(){
Task{
do{
try await AppStore.sync()
// check entitlements etc....
}
catch {
switch error {
case StoreKitError.networkError(let network_error):
print("AppStore.sync => network error")
case StoreKitError.systemError(let sys_error):
print("AppStore.sync => system error")
case StoreKitError.userCancelled:
print("AppStore.sync => user canceled error")
case StoreKitError.notEntitled:
print("AppStore.sync => notEntitled error")
case StoreKitError.unknown:
print("AppStore.sync => unknown error")
}
}
}
when I deliberately shut down the wifi connection, I receive an userCanceled error instead of the expected network error.
I have only tested this in sandbox mode, not in production. Running Ventura 13.2.1, latest version of Xcode & testing on iPad Air 4th generation iPadOS 16.3.1, minimum deployment target 15.0.
Anyone else ? solutions ? sandbox only issue ?
cheers