It depends on what aspect of being in production in causing the problem:
Many problems that only show up in production are caused by difference between the Debug and Release builds (A).
In your situation, it’s possible that the in-app purchase APIs are behaving different in your product build (B).
With regards A, you can debug your release build Xcode, although it’s a bit tricky. The basic idea is as follows:
In the Organizer, select the archive that you submitted to the store.
Click Distribute App.
In the sheet, select Development and click Next.
Follow through that workflow, which results in Xcode exporting a
Using the Device and Simulators window, install the
.ipaon your device.
Run the app from the Home screen.
Attach to it with Xcode (Debug > Attach to Process), and you’re up and debugging.
You’ll see some strange behaviours from the debugger because you’re targeting an optimised build, but it may be enough to give you a critical hint.
If this build of your app doesn’t reproduce the problem then you’re dealing with sitation B. This is substantially trickier. The only good option is:
os_logto add logging to your app so that you can follow the in-app purchase process.
Publish that build to TestFlight.
Use the Console app on macOS to monitor your logging.
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"