In App Purchase using Sandbox account - fails with no detailed message

I'm trying to test my first InAppPurchase with a new sandbox account that I have created for my app.

Currently, I only have one NonConsumable product to purchase.

When running on my real device, I'm able to query for products AppStore. The problem is when I'm trying to purchase that product. It sends a request, but I don't get any popup to login to the account, I don't get any popup notifying me about running in sandbox mode eighter, it just crashes with no error message.

I was trying logging out of my personal Apple Id, login into the sandbox one. I have to authenticate agains some OAuth2 fedaration (Apple, Google, Facebook) so I can have the apple id anyway. But still I never get that dialog with the Enviroment: Sandbox. One thing that I noticed is that the dialog to confirm the purchase has the XCode on the left top corrnet. I was thing this is because I have the StoreKit configuration for simulator tests, but removing that file and duing a full clear and build did not change anything.

Cloud anyone help me with this problem ? I'm getting nuts on this one...

So after I raised this question, after I jumped and raised a Technical Support ticket I landed on a page that shows how to set up in app purchase and test in Xcode.... And I realized that maybe I still have my StoreKit IAP configuration selected in the Target Build configuration... And yes, that was the trick. I have no clue how XCode cached this file, as I already removed it from my repo, but setting non on the StoreKit Configuration made my day.

In App Purchase using Sandbox account - fails with no detailed message
 
 
Q