When I retrieve details for in-app purchases, they are displayed fine on iPhone simulator but simulator doesn't allow me to complete a test purchase. I then try it from an iOS device (tested with 4.x and 5.x) and it doesn't display any data for the in-app purchase
I know the code is fine because the simulator works fine (until purchase) and when app is submitted and becomes approved, but this in turn makes in-app test very tricky to me...
How can I test in-app purchases on my device?
First thing to check and this is a classic is to see if you are logged in with another account that is not the test user. Check the device's settings.
Another thing is this and I had this problem 3 times before with 3 different devices: corrupted file system. The only solution that always works for me is to reset the device to factory firmware. This is done in iTunes. It will wipe your device and reinstall the firmware with the current iOS version. Prepare yourself for at least 50 minutes of pleasure and rage while you wait everything being wiped and reinstallad.
Don't forget to backup first and don't blame me if things get wrong... 😃
Related
transactionState is always returning .Failed
any ideas? why this is happening
i have added new sandbox user in itunes connect and using its credentials in simulator to make the purchase in sandbox mode and it wont work.
it work on my physical iphone?
In-app purchase does not work in the simulator. It only works on an actual device. I'll try to find the documentation that states this.
EDIT
The closest thing I could find is under the Xcode 5 release notes:
https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-Xcode/Chapters/xc5_release_notes.html#//apple_ref/doc/uid/TP40001051-CH2-SW302
StoreKit (In-App purchases) will not work in the Simulator. 13962338
Although this is for Xcode 5, I believe it's safe to assume the same holds true for Xcode 6.
I've been using MKStoreKit to enable in-app purchases in my apps. The latest binary I submitted using this method was rejected because nothing happens when the user clicks on the purchase button when the reviewer tested it on iOS 5. Is this an iOS 5 issues, or has something else gone wonky? It works fine when I test it on iOS 4.
My iPod is too old to upgrade to iOS 5 and I've started saving up to buy a new one, but I'd like to get this app on the store before then. Also, it means that several of my other apps will be broken and I would like to fix those as well.
There is nothing special in MKStoreKit that could probably break on iOS 5. I've used it in many apps running iOS 4 and 5 without any issues. Can you test it on a real device and post what happens?
Ok so I have an in-app purchase sandbox testing fine on an old iPod touch. Just got a new iPhone, added it to the provisioning profile I was using for this project, re-downloaded it and added it to xcode. The transaction is failing whenever I test it out on the iPhone, whereas it still works fine on the iPod touch... wtf?
Your iOS developer account can active a "test account" on only one device at a time. You have to disable the test account on the first device and re-enable it on the second. That's probably the problem — it certainly happens to me. ;-)
Just a quick question, do you see any reason why Apple has disabled many things on the iPhone simulator like:
testing In app purchases
testing most services of Game Center
wifi connection
How do you live with those three?
If you want to quickly debug/run your app on simulator that requires the in app purchase, do you just change some places in the source code to say the app that the purchase is done?
If you want to quicky test your application (on simulator), how it works without the Internet connection, do you turn your airport off? Do you have any ways how to check how application works when the connection is fast/slow/very slow (even on a real device)?
Regards
It seems that Apple finally allowed testing In-App purchases in the Simulator starting from iOS 5. At least, in iOS 5 Beta 6 it worked for me.
PS. I haven't found an official proof link though...
Check out this post by David Linsin.
From iTunes Connect Developers Guide:
... the Store Kit APIs are not available when testing in the iPhone simulator.
Now testing in-app purchases in simulator is enabled.
Device has UDID but simulator has no UDID.
please Follow below link . It will Clear your doubt.
http://troybrant.net/blog/2010/01/in-app-purchases-a-full-walkthrough/.
IF you need to do in-app purchases app , You must have followings.
App Id (UDID) ..(provisioning)
iTunesConnect.
Create Product identifiers from iTunesConnect.
StoreKit frameworks.
StoreKit Framework communicate between your device and App store. Not b/w iOS Simulator and AppStore.
I'm only one month into my iOS development, and already have a sweet gps app running perfect on the iPhone simulator. I'm about to pay the 99 USD to be able to try out the app on my real device (iPhone 4). My question is: can I unplug the device after downloading the app. What I mean is, can I test my app unplugged from my computer without the whole process of submitting it to app-store etc.
If I can't, then I have to run around town with my laptop + iPhone for testing. That's pretty dumb.
This is not an issue.
You can provision a certain number of phones to work with your developer license, and install and run your app on it. It will look just like any other app.
Good luck!
If you install and run with your team provisioning profile you can also run the app from your iphone without a certificate. :)
The short answer is, "Yes, You can".
What everyone said about provisioning, and multiple devices and everything was correct.
From a simplistic point of view - when you run your app in the debugger (connected to the iPhone) - it actually installs it on your iPhone. So when/if you disconnect the phone from the debugger - it's still on your iPhone - and can be run just as any normal app.
(With respect to your other question)
You can provision certificates for up to 100 devices. So if your friend has a device, you can get his "UDID" (avaialble via iTunes). You can email him a provisioning profile (you generate) for his device and a copy of your app (provisioned under that profile). He drags-and-drops both into iTunes - syncs, and he has the app running on his machine.
Note that these types of certificates only last for 3 months - so you'll need to generate a new one for him - or give him a "real" copy from the AppStore after release.