Apps that support in-app purchases are rejected in App Review unless they implement the ability to restore previous purchases. There is a WWDC 2022 video on doing exactly that and I am doing what that video suggests, but my app is still rejected. Here's what they say:
"When validating receipts on your server, your server needs to be able to handle a production-signed app getting its receipts from Apple’s test environment. The recommended approach is for your production server to always validate receipts against the production App Store first. If validation fails with the error code "Sandbox receipt used in production," you should validate against the test environment instead."
To which I replied:
"I don’t have a server. Can you explain what “your server” means for an iOS app that has no server-side components?"
But they won't explain themselves. They just say:
"Your question requires technical assistance and would be best addressed by Apple Developer Technical Support who can provide discrete code-level assistance for Apple frameworks, APIs, and tools."
Can someone point me to a code example that shows how to do this? My failed attempt is here: https://github.com/mvolkmann/SwiftUI-GiftTrack/blob/main/GiftTrack/ViewModels/StoreViewModel.swift