I worked on adding in-app purchases and was able to create and test in-app purchases using the Store Kit.
Now I can’t successfully execute any transactions and instead receive only transactions with the transactionState SKPaymentTransactionStateFailed.
There is -1001 in transaction .error.code, and transaction.error.localizedDescription is "Cannot Connect to iTunes Store"!
I tried to remove all products from iTunesConnect and rebuilt them using different identifiers, but that didn't help. I also tried using the App Store app to really connect to the real app store and download some apps, so I have the ability to connect. Finally, I visited the Settings: Store app to make sure I signed out of my regular app store account.
source
share