Error Domain=SKErrorDomain Code=0 "Cannot connect to iTunes Store" - objective-c

I'm working on In-App purchases to my iPad app. I am able to receive the productsRequest:didReceiveResponse method, and receive the array of products.
My problem arises when I add a SKPayment to the SKPaymentQueue. After I add the product to the queue, in the paymentQueue:updatedTransactions method the transactions always have the state SKPaymentTransactionStateFailed.
I NSLog the transaction.error and this is what it returns:
Error Domain=SKErrorDomain Code=0 "Cannot connect to iTunes Store"
UserInfo=0x339120 {NSLocalizedDescription=Cannot connect to iTunes
Store}.
And also i am not able to add any new test user in Manage User.
Any solution is most welcome.
Thanks

This problem may also occur if your app is in Sandbox and your AppStore account isn't valid for Sandbox environment. In my case I was logged into AppStore with my private account and each time I tried to make purchase I got the same error as you.
So solution is:
log out from your AppStore account (from Settings)
go to your app and try to make purchase
when app asks you for Apple ID choose "Use Existing Apple ID" and login with your Sandbox account

In addition to the above answers, make sure you run on a device and not on the simulator. That solved the issue for me.

Related

App Store Connect error 2002: "ask your Account Holder to set up an App Store Connect account for you"

I'm developing an iOS app for a client. I attempt to add him as a user under "Users and Access" using his apple ID email address. He receives the invite and enters his apple ID and password, but receives this error message:
"Unable to Sign In" - "This app is used by developers to manage apps on the App Store. To get access, ask your Account Holder to set up an App Store Connect account for you. (2002)"
Under Users and Access, the user record is grayed out as though he hasn't accepted the invitation, and I can't add him as a tester in the app yet.
For anyone facing this issue:
I faced the same problem today, deleting the invitation and sending it again worked.
FYI: First I had sent an invitation with the role "Developer" and later with the role "Admin", which might have had something to do with it working
just remove the invite and do it again, it is better if the team is coordinated and understands how the aggregation process works

Impossible to log into admob account

I am facing a strange login problem with admob and could not find any explanation for this exact problem on the web. So here is the problem:
- I have an admob account
- I jave an app link to that account
- The app released on the app store was perfectly displaying ads
- But 3 or 4 days after this, it became impossible to log in to my admob account. At the same time, the app had stopped displaying the ads.
- Each time I try to log in, the admob web page is telling me that "You are currently signed in as charlesdurandjp#gmail.com, which already has an AdMob account."
- When I click on the blue button "SIGN IN WITH CURRENT ACCOUNT", I simply remain on the same page.
I followed the admob help instructions (logging off from gmail etc.) but no success. I sent an email to admob support 3 days ago, but no answer.
I did not receive any email from admob stating there is any problem with my account or with my app.
In short, I am purely lost.
If anyone experienced such problem, I would love to hear about and / or to know if there any thing I could try to solve the issue.
Thank you.
It seems your admob account is suspended or terminated. You should check your emails.
In the meanwhile you can start exploring Facebook Audience Network Ads to not loose any revenue.
http://hackerseve.com/android-using-together-admob-and-facebook-audience-network/
http://hackerseve.com/android-integrating-facebook-audience-network-fan/

Error Code=2 "Cannot connect to iTunes Store" {NSLocalizedDescription=Cannot connect to iTunes Store} only in production env for some users only

I have implemented Auto-renewable purchases in the App. But, not all the users are able to complete the purchase. Their money is deducted but the transaction goes in the failed state with the above error, or sometimes it does not even trigger the updatedTransaction method after purchasing state. Also if I ask the users to restore the purchase, they get an alert as "product already purchased". I am very frustrated with this now, as I can't even replicate the issue. It works perfectly on a sandbox, plus I tried the real purchase and it worked there too. What is that I am missing? Please help me.

Error trying to create itunes app store test user; Could not convert Apple ID account to iTunes store account

What I am trying to do:
create a test user for testing in app purchase in my app.
What I am doing:
Logging into itunes connect.
Clicking on Manage Users
Clicking on Test User
Filling out the form.
What Error I am getting:
Could not convert Apple ID account to iTunes store account.
Doesnt seem to matter how I fill that form out I keep getting the above error. What am I doing wrong?
If I then try and resubmit the form again i get:
The email address you entered already belongs to an existing Apple account. Please try again.,
However when I look at my users it tells me I dont have any and when I try and use one I created it doesn't let me.
I had accepted all agreements, and apparently time heals all wounds because as of 11/19/2011 its back up and working.
I had this problem today as well. When I went to go create a test user this morning, it would give me the same error. Just a few minutes ago I thought I'd give it another try and when I logged in, I noticed that I needed to accept a new agreement amendment (which I had forgotten to do this morning). After accepting the agreement, I was then able to create a test account without any issues.
I switched Country to United States - and it helped me to fix the issue & to create in-app test user.

not able to see In app purchase test user on Clicking of Manage user

i want to set up a test account to test in app purchase on sandbox, i am logging into intunes connect and following the same procedure as prescribed in the itunes connect developer guide. i am clinking on manage user, but i am not able to see the window where i can select test in app purchase user.
do i need to do any change in my profile to make it visible.
Just didn't had the paid app contract certificate so wasn't getting the page
now it is working fine... In case anybody is stuck in this, check it once.