I"m testing an in-app purchase using my iPhone on iOS5 but despite going to Settings > General > Store > Log out (as I've seen on many websites), I can only enter a password when prompted in my app. The username appears to be stuck as my primary Apple ID (used in the stores). Somewhere there must be a setting to sign out completely on the device, but I can't find it.
Anyone know how to fully sign out of the iTunes store on the device to test in app purchases?
Open the App Store, scroll to the bottom in the "Featured"-pane. You should see your account there, click it and log out.
Related
I have created a newsstand app and have everything working. The only issues I have now are:
When I click 'subscribe' and the dialogue box pops up to confirm the in app purchase it says
Confirm Subscription
Do you want subscribe to Unknown App for free?
[Environment: Sandbox]
Why does it say Unknown App? Everything else works (receipt validation, completing the transaction & co.)
Also, will the [Environment: Sandbox] go away automatically once I upload it to the app store and download it for real? Is there something in my code that I am missing that sends the in app purchase request to the sandbox? Or is it just because i am using a test device that has the app compiled onto it from XCode.
If your app is not in app store, it shows you the [Environment: Sandbox]. It will automatically go away once you uploaded app and your app is in app store.
For "Unknown App":
You need to add text in inApp purchase section in iTunes connect. If you haven't done that it will show you "Unknown App" on message which comes on iOS pop-up.When you activate in-app purchase by filling all information in inApp purchase section, pop-up will not show you "Unknown App", rather the pop-up will mention your app name.
Hope this will help you.
If your app is not in app store, it shows you the [Environment: Sandbox]. it will automatically will go away once you uploaded and your app is in app store.
If your binary has been rejected by Apple, the IAP products submitted with it should also show up as rejected. When you try and purchase a rejected IAP within the app, the confirmation screen will show the aforementioned "Do you want to buy one Unknown App...".
To correct this you should be able to make a small change to each IAP product in iTunes Connect. Then simply change it back, then the rejected flag should go away (and be replaced by waiting for review. For example, I added an 's' to the Display Name for the English language of each product. Then went right back in and removed the 's'.
This may not be acceptable to Apple if the reason for your rejection centers around your use of In-App Purchases.
I suggest to check your itunesconnect account.
Goto your Specific App "NewStandApp" .-> Manage InAppPurchases. Now check Reference Name you have Added with your ProductID.
Product_Id your are referring in project/app (sandbox environment) might be connected with app name "Unknown app"
I have an ad-hoc deployment of my iOS game, which includes in-app purchase. It is correctly set up with a purchasable item on itunes, and I have test users on itunes. I am able to successfully test it with my own iPod, and with a friend's iPod -- I can choose the item to purchase, get the price info correctly from the Apple server, choose to buy, enter the Apple ID and password for one of the test users, an the purchase completes successfully.
Another friend also installed the game on his iPhone and was starting to look at in-app purchase, but he followed an incorrect procedure, an now we can't get in-app purchase to work on his iPhone at all.
Specifically, he correctly signed himself out of the Store via the Settings application, then ran the game and chose the item to purchase. It correctly retrieved the price information. However, when the standard UI popped up and where he was supposed to click "Use an Existing Apple ID" he chose "Create a New Apple ID" by mistake. This brought him out of the game (game was sent to the background) and over to the web page to fill in the details for a new user. He realized that was wrong and returned to the game. But when he then tried to repeat he process, after retrieving the price info (again successfully), when he went to initiate the purchase, it errors out and never shows the standard UI where he can choose Existing Apple ID or Create New. So it's like his phone was left in a funny state. He tried rebooting the phone, reinstalling the app. Same problem. Then I recommended that he log in to the Store via the Settings app using his regular account, download a couple free apps, and then log out of the Store via the Settings app and try again. My thought was that this full process would somehow "clear out" whatever bad state his phone was in. But no dice. Same problem.
We can't figure out what state his device is in such that it fails when going to the purchase step of this sandbox in-app purchase process. I am still able to successfully complete the process on more than one other devices, so I don't think it's a problem with the state of the purchasable item or test users on itunes. It seems to be something specific to his device. I also had him using iPhone Config. Utility to watch the Console log as he went through this process. Very little was seen -- just an error code coming back after trying to initiate the purchase. (Nothing about PIPELINING errors and other web-service type errors that I've seen before when in-app purchase wasn't set up correctly on the sandbox.)
Any ideas on what state his phone could be in with respect to (sandbox) in-app purchase, and how we can clear it out?
Reset your network settings (Settings -> General -> Reset -> Network Settings)
Turn off your iPhone and turn it on again.
Wait for 15 min (This is the time iOS caches AppStore credentials)
Try running the app again.
I'm trying to test in app purchases in our app but I'm not having any luck. Part of the problem may be due to the expected sequence not being documented anywhere. Here are the steps I followed to support in-app purchases:
Create test user in iTunes Connect.
Log out of the Store on the device.
Build and run the app in Xcode using a non-wildcard App ID and provisioning profile targeting the device (an iPhone 4 running iOS 4.2.1). I've run through this building for both debug and ad-hoc release.
Make an in-app purchase.
Alert is displayed: "Confirm Your In AppPurchase" with two buttons - Cancel and Buy. Tap the Buy button.
Alert is displayed: "Sign In" with three buttons - Use Existing Apple ID, Create New Apple ID, and Cancel. Tap the Use Existing Apple ID button.
Alert is displayed: "Apple ID Password" with two text fields and two buttons - Cancel and OK. Enter the email address and password for the test user and tap the OK button.
Here is where my understanding of what is the expected behavior is deficient. Here is what I see at this point:
Alert is displayed: "This Apple ID has not yet been used in the iTunes Store. Tap Review to sign in" with two buttons - Cancel and Review. In all the documentation, blog posts, and forums, no one has mentioned this alert. Is this supposed to be displayed? I tapped the Review button.
I am now taken to the App Store app and taken through a series of steps to confirm the account.
The first page is titled "Confirm Your Country or Region" with a single value titled Store set to United States. I tapped the Next button on the toolbar at the bottom.
The second page is to agree to the terms and conditions and the Apple privacy policy. I tapped the Agree button on the toolbar at the bottom.
Alert is displayed: "I have read and agree to the iTunes Store Terms & Conditions." with two buttons - Cancel and Agree. I tapped Agree.
The third page is to confirm information for the account (email, password, security question, birth date) and enable/disable iTunes store subscription information. It requires me to enter the year (why didn't iTunes Connect just ask me for it!). I entered the birth year and then tapped the Next button on the toolbar at the bottom.
he fourth page asks is titled "Billing Information." This is when I realized something was wrong. All the documentation, blogs, and forums say I shouldn't be asked for a credit card.
Q1: What exactly should I expect once I enter the test user email address and password (the first set of steps)?
Q2: Why am I being asked for all this extra information for a test user? What should I be looking at to troubleshoot this?
Thanks for your help.
It happens when you install your development application over downloaded from App Store.
To fix this issue, you need to remove application from the device and install fresh copy using XCode.
iOS caches distribution profile somehow and requires production user if the first installation was done through App Store. With no regard what installation method was used recently.
Here is the trick (at least if worked for me..).
First log out of your real iTunes account in Settings > Store > Apple ID. You must be logged out of an account to be able to use your test account.
However, don't log in to your test account on that screen.
Go to the app, initiate your in-app purchase, and enter the test account email and password there. Assuming the test account is set up correctly (!), that should work.
Then, when finished testing, go back to Settings > Store > Apple ID and log out of the test account.
This sequence worked for me. I tried all of the above sequences and they failed for me.
Sign out of your account on the iPhone in Settings -> Store
Delete your test app
Power the iPhone off and on again
Close iTunes on your computer
Run the app again from XCode
Thanks to OmegaDelta's blog for this one:
http://omegadelta.net/2011/05/11/testing-in-app-purchases-in-ios-4-3-sandbox/
I found some answers to my questions above after I completely deleted the app off my device and tried again. I have no idea why that was required.
Q1: What exactly should I expect once I enter the test user email address and password( the first set of steps)?
No addition questions are asked once entering user credentials if it works, so if the first alert in the second list is displayed then you know it didn't work.
Q2: Why am I being asked for all this extra information for a test user? What should I be looking at to troubleshoot this?
The only thing I can think of is that there was something cached in my app from previous requests. This makes me nervous as I have no idea whether customers will have to delete the app or not like I did.
I've experienced the same problems until I quit iTunes and installed the right provisioning profile to my device. Running iTunes with Xcode restored my account from time to time so even when I log out on the device I was suggested to use my (not test) account in the app. Installing the correct profile fixed the second problem.
Hope it can help somebody too.
None of these answers is very specific or wholly correct, and the in-app behavior has changed slightly over the past year wrt test accounts. The true/current solution to this if you hit it: go through the review/sign-in pages in iTunes for the test account and just "cancel" from the "enter billing information" screen with no harm, no foul. If for whatever reason you never get prompted to review/sign-in, then don't bother to do so.
I was able to get around this issue by signing my test user into a different app that I was developing, then going back to the app where I was having problems (no amount of deleting or restarting helped). As others have said, you don't want to be signed in as the test user in the Settings menu when you try to perform your IAP.
I've created my iTunes Connect in-app test user and implemented all my in-app purchase code. I clicked on the home button -> settings -> appstore -> signout button. I launch my app through xcode. When it goes to perform a purchase transaction it continues to bring up my real itunes connect user info prompting me for the password. Even though it shows me as signed out in the settings appstore screen it never prompts me to enter my test user's email address when I'm testing in-app purchases.
Anyone have any ideas what's going on?
Might try rebooting your device. If you go into the AppStore.app, Featured Tab, and scroll all the way to the bottom where it should show your login name, are you still signed in?
Make sure you did not install your development version over distribution version.
My case:
I’ve downloaded my application from Apple AppStore – distribution version. Later, started debug session over installed application and got the same situation as described the question author. No sandbox environment for in-app purchase.
Solution:
Just uninstall the application and start debug/test your application again – xcode will install development version to your device.
Now there is a new way to log in and log out test users. Under
Settings -> iTunes & App Store
You can manage your current sandbox user. If you log out the sandbox user there you will be asked to give the email address for your user when you try buying inside your app.
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.