Testing In-App purchase on iPad

My iPhone worked normally with a fresh Sandbox Test ID account, but my iPad tried to autofill a previously used username. I had deleted the App and reinstalled. I was logged out of the AppStore when I get to the Purchase dialog, it asks for the password that goes with user Test5@... It doesn't give me a choice of clearing that user. I even deleted Test5 from the Sandbox Test users accounts. I even rebooted the iPad.


Then it seems to Restore the purchase! Even without me supplying the password.


Is there a possibility it's trying to do some auto completion on the AppStore sign in? Is there something more I need to clear in the Keychain?


How can I force it to test it as if it had never been installed on that iPad?


I should mention this was code previously used and approved in another app of ours.


Thanks in advance for any suggestions!


--EdM

You stated "my iPad tried to autofill a previously used username. I had deleted the App and reinstalled. I was logged out of the AppStore when I get to the Purchase dialog, it asks for the password that goes with user Test5@... It doesn't give me a choice of clearing that user. I even deleted Test5 from the Sandbox Test users accounts."


To my knowledge, there is only one method where the StoreKit alert is raised such that the user name is already entered - the SKReceiptRefreshRequest. With the SKReceiptRefreshReq call, the system recalls the account that was used to install the app and only allows the app to be refreshed using this users test info. You mention that this was a purchase dialog - I wonder if instead, the app called SKReceiptRefreshReq first so as to check whether the user might already have purchased the item before attempting a real purchase.


Normally, when you log out of the App Store in the Settings app -> iTunes and App Store pref panel, then attempt a new in app purchase, iOS presents the dialog for you to specify the use of an "Existing User" or "Create New User". You don't mention seeing this alert.


My suspicion is that after entering the password associated with Test5@..., the app scanned the updated app receipt and determined that the in app purchase content had been paid for previously and made it available.


If my suspicion is correct and you want to test the app with a new user account, you may need to download the testflight app with a new user account. This is a guess on my part, but you might check with the app developer as to how things were implemented. However, the SKReceiptRefreshReq mechanism does make for an alternate method for restoring all content, except consumable purchase types.


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

-With the SKReceiptRefreshRequest call, the system recalls the account that was used to install the app and only allows the app to be refreshed using this users test info. You mention that this was a purchase dialog.


I have a question about this.


the system recalls the account that was used to install the app.


Is this only when installing the application using testflight? Or is it the same if you use the App Store?

The behavior is similar for the production app. However this is not a dependable behavior to guarantee that the app is only associated with the user who installed the app.


rich kubota - rkubota@apple.com


developer technical support CoreOS/Hardware/MFI

>Is this only when installing the application using testflight? Or is it the same if you use the App Store?


Try an ad-hoc install...they sometimes better replicate a store install.

Thank you for answering


After changing the account used for installing the application to another account, when you call SKReceiptRefreshRequest, you will be prompted to enter the password for the account you used to install the application. Is there a way to avoid it?


When I checked the operation, when I got through testFlight, I was prompted to enter the password of the account used for installing the application and when passing via Ad Hoc I was not asked to enter the password of the account used for installation.

Testing In-App purchase on iPad
 
 
Q