I am trying to add an In-App Subscription to my app, but when I execute my code... or any In-App Sample.. I am prompted with a dialog that only asks for the password... NO EMAIL
The first time I tried my code it prompted for email but subsequent times it only prompts for password. I deleted my app and have tried several sample In-App projects but they all ask for just the password. I have reset the settings on the iPad but still only password. I have signed in and out of my Apple ID several times. Tried it logged in and not logged n but I only get a password prompt. Obviously I am new to In-App purchase code, but none of the samples prompt for email either. I clearly am misunderstanding something.
What happened to the e-mail prompt?
So I solved my problem with this. It turns out there is an option in the settings. If you tap the iCloud settings then choose iTunes & App Store, there is an option at the very bottom entitled, "Sandbox Account"
On my systems it was set to my REAL apple id. I need to change that to the id from the dev site.
Hope it helps someone else with a similar issue.
The best to test IAP is to use physical device with sandbox account credentials,
Steps :-
Create sandbox credentials in iTunes, make sure every setup is correct.
Remove all logged in account from the device by going through phone settings.
Run the app
And test with your sandbox credentials.
In simulator IAP won't work it always prompt the pop up when you launch the app asking password because you have logged with your apple credentials in your system.
It is taking Email from there. Resetting and relaunching is not a solution.
Follow above steps to test properly.
Thanks
Related
I created a test user for the irish store
Signed out of my personal account
Launched the application and tried to make the purchase
I get the "Apple ID Verification" prompt
Asks me to set a new password
Please help
I was having the same issue (Australian App Store) and today things seem to have gone back to normal, but the behaviour is slightly different from before.
This has now worked for me:
- Created a new Sandbox user on iTunes Connect.
- Followed the link in the email sent to verify the email address.
- In the app, when interacting with StoreKit, the app will then ask for the App Store credentials. Enter the username and password.
- The "Apple ID Verification" alert will pop up. Tap "Settings".
- Change the password as instructed.
- In the app, repeat the operation that interacts with StoreKit. This should now work correctly.
Now is working fine...after friday 13 jan the same process works as expected. It's enough to verify the email and the sandbox allows you to try IAP! Should be only an Apple bug on their servers.
You need to setup Test users in iTunes Connect portal which you can use to test In App purchase functionality with Sandbox environment. You can't test in-app purchase functionality in sandbox environment using actual Apple account.
https://developer.apple.com/library/content/documentation/LanguagesUtilities/Conceptual/iTunesConnectInAppPurchase_Guide/Chapters/TestingInAppPurchases.html
While adding in some in-app-purchases to an app, I created a test user account in iTunes Connect. After "buying" the items in the store with the test user, I then deleted that test user and created another.
The problem I'm having is that the phone still asks for the original test account's password constantly. This test account isn't logged in under the "iTunes & App Store" settings, nor anywhere else I'm aware of.
I've tried doing a backup & restore, and still no progress. Does this issue sound familiar? Any ideas of other things to try would be terrific.
Thanks for reading.
Make sure you have signed out test user account from within your device:
Sign out of the app store from Settings in iOS: Go to Settings >
iTunes & App Store, tap your Apple ID, then tap ‘Sign Out’
In your app, initiate your IAP
You will be prompted to enter credentials for username and password
Hope this helps!
I have signed out from the store in device settings.
I entered user credentials only in my App.
I have set up a brand new (actually around 4 times) test user.
Why this message keep poppin' up?
Is it something connected to iOS 5, automatic app sync, or iCloud?
I had exactly same problem with sandbox in-app purchases, in built-in model (no receipt verification), app received valid products, now i called addPayment, everything alright. But now "Verification required" appeared and payment was canceled.
After hours of pain I discovered, my problem was in test account.. i created test account for Czech Republic iTunes store... and that was the reason of fail. Dumb.
I tried to create Canadian test user and it suddenly worked! "Verification required" will no longer appeared.
I've dealing with this problem for about one week, trying to use accounts in US/Canada without any success. Finally I found this post and it works:
http://iphonedevsdk.com/forum/iphone-sdk-development/63008-in-app-purchase-test-account-verification-required-cant-get-passed.html
You need a test account that NEVER has a credit card attached to it, NEVER is logged into itunes store or app store via device, and if you do login to itunes or agree to any app store stuff it voids the test account and will never work again.
So, To test your In App Purchase app, you need to use a new account that does not have a credit card. logout of the store, and only use your new account inside the app you are testing.
Update: After a long time system maintenance of iTunes in Sept 2013, only test accounts in US can make test purchases.
I have struggled with this myself, i finally found a workaround that worked for me...
On the device Log out of iTunes account in settings (also hard close settings and iTunes if you have them open as a precaution)
Delete app
Create a new test user at “itunesconnect.apple.com” – selecting the United States as your store
Reinstall app
Try to make a purchase in the app
Enter you new test user account details
If a pop up states that it needs to swap stores, immediately press home. DO NOT press OK.
Relaunch the app, and try again. It should now work as expected.
Hope this works...
In addition of the above answers, note the below points also :-
1) Uninstall your app from the device.
2) Create a new test account on iTunes Connect and verify its email address. Never add any payment information for this test account, not online, not on iTunes, not on your device. Doing so might invalidate your test account (and trigger the "verify payment info" vicious cycle.) Also never use this test account out of the Sandbox.
3) Log-out from the App Store on your device. DO NOT log back in the App Store via Settings > iTunes & App Stores on your device. You will be asked your login credentials from your app later (see points 5-6)
4) Re-install your app.
5) Attempt an in-app purchase. You should now be prompted to enter both your username and password (as you logged out from the App Store)
6) Type in your username and password: you should not see the dreadful "Verification Required: before you can make purchases, you must verify your payment info" message and the purchase should be successful.
Even in sandbox, you need to complete the buy verifying the receipt to the server.
It corresponds to steps 6-7-8 of built-in model and 11-12-13 of the server model.
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/APIOverview/OverviewoftheStoreKitAPI.html
All you need to do is:
Retrieve the receipt data from the transaction’s transactionReceipt property and encode it using base64 encoding.create a json like this:
{
"receipt-data" : "(receipt in base 64 encoding)"
}
Make a post to verification URL for production:
https://buy.itunes.apple.com/verifyReceipt
For sandbox :
https://sandbox.itunes.apple.com/verifyReceipt
The response is like this:
{
"status" : 0,
"receipt" : { ... }
}
If the value of the status key is 0, this is a valid receipt.
If the value is anything other than 0, this receipt is invalid.
For further information look the guide:
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/VerifyingStoreReceipts/VerifyingStoreReceipts.html
Swift 3
Insert this temporary code somewhere in your project:
for transaction: AnyObject in SKPaymentQueue.default().transactions {
guard let currentTransaction: SKPaymentTransaction = transaction as? SKPaymentTransaction else {return}
SKPaymentQueue.default().finishTransaction(transaction as! SKPaymentTransaction)
}
This clears out the payment queue. Make sure to run it much later than viewDidLoad if you can. I made mine triggered by a button. Ran it a couple times, then removed the code. No more annoying verification pop-ups.
I saw this issue after iOS5 got released.
Earlier I used to create test accounts with dummy email addresses and it used to work well for me, but post iOS5, it started showing verification required for test accounts.
Thus I ended up using actual email addresses for the test accounts and verified when asked for, which seemed to do the trick for me.
I was facing same problem after spending several hours i figured out that county/region of your itunes connect test account and your device/simulator must be same.
Please verify it as it solved my problem
Register a fresh test user for the USA. You can put any email address.
Log out under settings.
Delete the app.
start it again via xCode
login with your new user within the app.
It may say that you are not located in the USA and it opens the browser, Close the browser and start it again.
It should work now.
If you are having such problem for 4th IAP item to buy.
It looks, each test account does not work for purchasing more than 3 items of an application. You may create a new test account from itunesconnect.apple.com->Manage Users->Test User to test your 4th IAP item.
Creating a canadian test user solve this issue.
I'm developing in-app purchase using this excellent tutorial:
http://www.raywenderlich.com/21081/introduction-to-in-app-purchases-in-ios-6-tutorial
and I'm getting an error "Cannot connect to itunes store" which it seems can be related to Apple's sandbox servers being down; apart from googling for tweets regarding sandbox status, is there any other way of confirming their status otherwise it's difficult (read ipossible) to debug.
Almost a year late, but I'm facing the same problem right now. As far as I know, the best way to test the status of the iTunes Sandbox environment is checking this url:
http://sandbox.itunes.apple.com
An Http/1.1 Service Unavailable means SSErrorHTTPStatusCodeKey=503 in your debugger output.
I'll answer this in case someone else also comes up against this. I have an app in the app store that was built using the tutorial mentioned in the question, and it performs flawlessly. Unfortunately, in my experience the reliability of the Apple Sandbox servers can be iffy, with no obvious place to check online aside from posting to the Apple forums and hoping for a corroborative reply.
As others have said on StackOverflow, the key is to make sure that:
You create at least one test user account at itunesconnect.apple.com
Make sure that there is NO credit card associated with the test account
DO NOT sign into iTunes on your test device with the test account. Instead, SIGN OUT of any iTunes Store account you are signed into. Then try purchasing an IAP. It will ask for your username and password - give it your test username(s).
I got the "Cannot connect to itunes store" error when using a tester sandbox account. The problem was I had signed in on my iPhone with that account and confirmed the email address associated with the test account.
I solved the problem by creating a new tester account under Users and Roles in Itunes Connect and never sign in on my device with the account.
The reason for the error in my case was that when I confirmed the email address, the account was registered as a production account in AppStore and it did not work as a sandbox account anymore.
So if you sign in on your device once, the account will be registered as a production account and even if you sign out again, that account won´t work in the sandbox.
For testing an app in Sand Box . Follow these steps
To test IAP ,we have to create a test user at itunesconnect.apple.com
Go to Settings and sign out from all active accounts (mail, iTunes & App Store , Game Center)
Restart your device.
Run your app on the device. Click on the IAP button -> choose existing account -> enter apple id and password created from step 1. Now everything will be fine.
This question already has answers here:
Why In-App purchase sandbox always ask "Verification Required"?
(11 answers)
Closed 9 years ago.
I cant test my in-app purchases because I am always getting this error message: Verification Required: before you can make purchases, you must verify your payment info [Environment: Sandbox]. Two buttons are presented in UIAlertView: cancel and continue. If I tap continue I am redirected to Safari and I follow verification steps, but in my app in this case I always get "Cancelled transaction" event.
I am using the test accounts created in iTunes Connect. I tried creating several accounts but always the same message occurs. What to do?
Any hints?
From my experience I see two possibilities:
you didn't sign-out from the App Store in settings, so the system thinks you're trying to access using your "real" iTunes credentials
or you by mistake the test user for a real purchase (no sandbox or directly in the app store); in such case this user has been messed up and the only option for you is to create a new test user.
Both are quite common situations when the same device is used for development and private use.
You can also try to check-out the link listed in this famous page here:
http://troybrant.net/blog/2010/01/invalid-product-ids/
This problem was driving me crazy and took me half a day and quite a bit of research to solve it (thanks a lot Apple!), but I finally solved it and here is what worked for me:
1) Uninstall your app from the device.
2) Create a new test account on iTunes Connect and verify its email address.
Never add any payment information for this test account, not online, not on iTunes, not on your device. Doing so might invalidate your test account (and trigger the "verify payment info" vicious cycle.) Also never use this test account out of the Sandbox.
3) Log-out from the App Store on your device.
DO NOT log back in the App Store via Settings > iTunes & App Stores on your device. You will be asked your login credentials from your app later (see points 5-6)
4) Re-install your app.
5) Attempt an in-app purchase. You should now be prompted to enter both your username and password (as you logged out from the App Store)
6) Type in your username and password: you should not see the dreadful "Verification Required: before you can make purchases, you must verify your payment info" message and the purchase should be successful.
N.B. One user on the Apple Developers Forums who also managed to solve this issue claims you have to create at least 3 test accounts, as the first 2 won't work (https://devforums.apple.com/message/699718#699718).
I can't confirm that is true, but the test account with which I managed to successfully finish a transaction was indeed my third test account.
Hope this helps.
At the time of creating the Test user Account You would given Email ID. Apple send a mail to the Given mail ID for Verification.
What u have to do is, open that mail(inbox) and Click on the received mail from the Apple and click on the Verify Apple ID and Login into the Apple Account.
Now onwards you can login simply.
Thats all..,