Testing In-App Purchase Works on One Device and not Another - iphone

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. ;-)

Related

Can't make IAP work in sandbox (SWIFT) in simulator

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.

publish ios app without any registered device

I have completed an ios app that I want to get published. I do not have any apple devices other than my mac. I used the simulator to test my app. I tried to make a provisioning profile in the member center and link it up to my app but Xcode keeps telling me that it cannot find any compatible provisioning profiles since I do not have any ios devices registered in the member center. I believe that I cannot register my mac as an ios device. I tried doing that in the member center using my mac's UDID but it did not recognize the UDID.
I want to know if there is any way I can still have the app published without buying any other ios device?
I used the simulator to test my app.
Then you did not test your app. The simulator is useful but it is nowhere near an adequate substitute for device testing. What if users report that the app crashes on their devices, but you can't reproduce the crash in the simulator? This is not a hypothetical scenario, it's actually quite common.
I want to know if there is any way I can still have the app published without buying any other ios device?
Possibly, but it would be extremely unwise to publish the app without testing it on a device. If you can't get a device, try to borrow one.
I see only workaround here - Get device from your friend or family and register it for first install. You just need its UDID to register.

Unable to test iOS in-app purchase on devices, only simulator

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... 😃

In app purchases iPhone simulator why disabled?

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.

Testing app unplugged from laptop?

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.