I am getting the below error for sandbox testing while test in app purchase
you are not authorized to make purchases of this in app in sandbox at
this time
How to avoid this error
Make sure of the following:
1. The test account created is from the same developer portal from which you generated your provisioning profile.
2. The test account still exists and was not deleted from there.
3. Use the same identifier for which you created the in-app purchase for your app in iTunesConnect.
I found that I got this error when trying to log in with the wrong test account. One not connected to my iTunes connect account.
Log into iTunes Connect and double check you are using the correct email address as in the test account.
Otherwise here is a pretty good post about all the checks you need to go through to get the in app purchases working in sandbox mode, each has a short blurb on completing each one: http://ireviewappsblog.wordpress.com/2014/07/07/adding-in-app-purchases-in-sand-box-mode/
It covers adding the app to iTunes connecting, setting up the developer account and then also adding the code in xCode to get it working.
1.Check in-app product identifier on itunesconnect is same as you are using in your application
2.Check the bundle identifier for your app are same in the development profile & & itunes connect
3.The status of in app purchase for which you are testing on iTunes connect should be "Ready to submit"
4.Delete the app from your device clean its build from xcode if you have changed bundle identifier or provisioning profile
5.No documents agreement should be pending on iTunes connect or developer.
It is possible that your test account does not exist any longer. I found that you are still able to log in with a deleted test account but you are not allowed to make purchases and you will see the same message as you described.
Chances are you are using provisioning profile from different developer account. check it once again.
Step 1 : Go to settings.
Step 2 : Select iTunes & Settings
Step 3 : Scroll to the bottom. There is a section for SANDBOX ACCOUNT
Step 4 : Sign in there using your Sandbox account
Now test your app & it will work fine.
For sandbox, only sandbox testers can make purchases.
Make sure testers NEVER use the sandbox accounts to make actual purchases; this will convert the sandbox account to a live account.
Only Sandbox Testers can make test purchases. It's NOT the users who are listed in Internal and External testers lists. Check iTunes Connect => Users and Roles => Sandbox Testers.
Related
Well, I'm having this issue now. I'm using MKStoreKit in my in-app purchase. This are my errors:
Failed transaction: <SKPaymentTransaction: 0x136a62e0>
error: Error Domain=SKErrorDomain Code=2 "Cannot connect to iTunes Store" UserInfo=0x13654a90 {NSLocalizedDescription=Cannot connect to iTunes Store}
Any idea?
You may remove that error via cross checking this check list.
If your answer is no for any of the points then it may be causing the problem
Have you enabled In-App Purchases for your App ID?
Have you checked Cleared for Sale for your product?
Does your project’s .plist Bundle ID match your App ID?
Have you generated and installed a new provisioning profile for the new App ID?
Have you configured your project to code sign using this new provisioning profile?
Are you using the full product ID when making an SKProductRequest?
Have you waited several hours since adding your product to iTunes Connect?
Are your bank details active on iTunes Connect?
Is your device jailbroken? If so, you need to revert the jailbreak for IAP to work.
For iOS7 and Xcode 5 Try doing this:
You have to test on a physical device as apple restrict IAP testing in the simulator.
Go to setting -> iTunes & App Store -> and log out of your account.
Remove app from device and clean all data.
Most importantly do logout from your current iTunes account in your device before trying to do any purchase.
Make sure you have done all necessary steps for in-App purchase testing.
As of September/October 2013, iOS7 simulators cannot process app store inapp purchase requests.
You need to use a real device
Imagine, you created new app profile in My Apps of itunes connect. Added in-app. All correct.
Now you want to test purchases. It shows list of products but stops on buy button with "Cannot connect to iTunes Store" error in log.
This is because you try to buy not approved and not existing product!
You can test only sandbox product right now.
So, you have to
create sandbox user (in itunes connect - users...)
logout you real itunes login on device
try to buy under sandbox login (it will ask you)
Had same issue and I just remembered not any apple id will work. You have to create a testing apple id in itunes connect / manage users/ test user / add new user.
Try putting a build number in. Target > General > Identity > Build.
This solved it for me.
This app contains an embedded provisioning profile that is not associated with your account. Please use a provisioning profile associated with team ID : I am getting this error while I upload the build with Application loader.
I am using two different accounts.
1) For creating provisioning profile
2) For uploading in iTunes.
Everything had worked fine till date. I have updated my app several times in app store. I am using the same procedure but facing this issue.
What might be the reason? Its an emergency Please help me on this.
Apple does not allow anymore submission of an app on a developer account if this app have been signed using a different developer account certificate (different team ID).
You have no other choice than sign you app with the developer account certificate where you want the submission to be done. If the Bundle ID is already taken on the other/previous developer account, you will have to sign your app using a wildcar mobile provision.
If you need push notif or Game Center or anything that need to avoid a wildcar AppStore mobile provision, then you are in trouble => setup a brand new app (new app ID / Bundle ID) and plan migration of your customers from the old app to the new one ...
See Here
I Think i have cracked this issue, But dont know if there is still a better solution.
As i used a different accounts for creating provisioning profile and submitting it in iTunes, because of which i got this error.
Solution: We have to use the same account for creating the provisioning profile and also submitting it in iTunes. As a trial i did the same, it just worked fine.
I have finally updated my app to app-store successfully!
Reason:
Actually we had an corporate account and an individual developer account. Before we use to update using the individual account, Since the Apple Licence agreement changed some time back.
We cannot upload or update your app with the individual account if it is connected with the corporate account.
Soln:
Need to add or link the individual account to corporate account.
i am testing my application in-app purchases with iTunes test account.
I run the game and i log-in to sand box test account.
when try to buy something in the app a message box prompt me with confirm your in-app purchase information.
Then I click “Buy” it ask me for Apple ID Password for my sand box account. When I give the password it prompt me with following message ...
Your Apple ID has been disabled.
[Environment: Sandbox]
I tested with several test accounts same result. Can anyone provide some help on this?
If you use sandbox IAP test accounts to login to real iTunes Store or in Settings app, your sandbox account gets disabled.
I can't find the exact documentation URL right now, but I'm sure I have read it.
Here is a warning message from documentation:
Important: Do not sign in with your test account in the Settings application.
This may be due to new iOS Paid App agreements that haven't been agreed to yet.
You need to make sure you log out of your real account in the App Store app before using a test user account.
Does the sandbox environment still work once the app goes live ?
I just want to know if i will be able to further test my in-app purchase once the app is approved by apple.
Yes. If you use your developer certificate to sign your app and sign in to iTunes using the account you created in iTunes Connect, the sandbox is still present and usable.
I have completed in app purchase for my application. Its working fine.
The only problem i have , when i test in app purchase in sandbox enviornment, It shows a message do you want to buy an "un known app" for 1.79. why doesnt it shows the name of the app.
Plus when i am going to upload the final binary to app store. what i need to do to swrich in app purchase from sandbox enviornment to real in app purchase or it will switch automaticall?
Thanks guys
Probably your configuration on iTunes connect for this in app purchase is wrong, maybe you forgot to enter the name.
Go to iTunes connect, Manage you in app purchases, select the desired app, and make sure that you have all the fields correctly filled.
When you release on the app store, you don't have to do anything, the sandbox environment is just used when you are developing, when the app is uploaded to the app store, this behavior changes and you can't use your sandbox account anymore
Hope that helps.
When I added in-app purchase support to my application, I had already released a version so there was an entry in iTunes Connect. But I've read that you need to add a new application in iTunes Connect, but check the option to upload a binary later. Then you can enable In-App Purchase on it and configure items.
And your sandbox does not go away after the application is submitted. The In-App Purchase system determines whether to use a sandbox based on the account that is currently logged in to the store on the device. I think as long as you don't have a credit card (or any payment information?) associated with the account, and the account is designated as a In-App Purchase Test User in iTunes Connect, it will use the sandbox. You can log out and use a different account through the "Store" item in Settings.