Ok, so I've been following the directions in Apple's documentation here:
https://developer.apple.com/documentation/storekit/testing-in-app-purchases-with-sandbox?language=objc
It lists a bunch of requirements all of which I have done. I have verified the strings exactly match for the bundle names and the IAP bundle names between my code and AppStoreConnect.
The docs continue, saying to prepare to test:
During developement[sic], build and run your app from Xcode. At this stage, you don’t need to upload your app binary to App Store Connect to test it in the sandbox environment.
When the app loads, I see this error on the console in Xcode:
[IAPManager] Store init failed: PurchasingUnavailable - Retrieve Products failed, and could not retrieve any products.
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
IAPManager:OnInitializeFailed(InitializationFailureReason, String)
Unity documentation indicates that my app is reaching AppStore successfully but it is not responding with any products.
The app exists in app store connect, but it has not been submitted for review. The IAP is created and showing as "Ready to Submit", and it is linked to the app. Xcode is NOT configured to use StoreKit (StoreKit settings set to "None").
Edit: I actually figured out how to sign-on using the sandbox account in Developer settings on my test device, but it didn't make any difference.
I am using Unity Purchasing 5.1.2. Incidentally, I was able to successfully test the IAP flow for Android through Google Play. I think the problem is something with my app store connect configuration. I can't understand why following the documentation instructions isn't working for me. If I can't get this to work then I guess my next step will be to try to get TestFlight working instead. I don't see how I can submit an app for review if I can't test IAP process first locally.
Thanks in advance for any help.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect