After using iOS 16 and Xcode 14, I noticed the subscriptions don't reset after deleting the app.
I'm using StoreKit, if on the simulator I subscribe to a product successfully and delete the app, then reinstall it, the in-app purchase is still active... How can I clear that?
I was looking at some of the docs but can't find anything. I'm not using a sandbox user, just triggering the purchase using Xcode Scheme, StoreKit Configuration.
How can the subscriptions be reseted on the simulator?
Related
I created an iOS application and I have an iPhone 4 to test my application on. Unfortunately, TestFlight can only be downloaded on iOS 8 and the iPhone 4 only supports up to iOS 7.
I wanted to test my in-app purchases. I know when users test in-app purchases using TestFlight, their iTunes account is not charged.
So I was wondering, if I add an email as an internal tester on iTunes Connect but instead of using TestFlight, I just build and run the application on my device through XCode, will I be charged for an in-app purchase?
My intuition says no so if not, is there any other way I can test my in-app purchases without having to buy a new device and let Apple take even more money from me?
Also, are there any other drawbacks to testing by building and running from XCode? Because if there are, I would just go out and buy an iOS 8 device to test properly using TestFlight.
When you test a sandboxed app (eg, not on the app store), you use itunes connect test accounts. These don't have associated credit cards. You don't get charged for this testing.
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.
Anyone used iOS6 inApp purchase? My inApp was working fine on iOS5 but when i am tying to build my app in iOS6 (XCode 4.5 beta). It is showing below error while inApp purchase.
2012-10-06 15:13:49.653 failed transaction
2012-10-06 15:13:49.654 The error description is:Error Domain=SKErrorDomain Code=0 "Cannot connect to iTunes Store" UserInfo=0x9caec40 {NSLocalizedDescription=Cannot connect to iTunes Store}
I have created another test user account but problem is still same. Also, tried with restarting XCode, Mac machine, simulator, reset simulator. Please help!!
FIX : Delete all inApp ids and create new. It will fix the issue.
You cannot test In-App. purchase on simulator. If you tried to do that you will get the Confirm alert, but nothing will happen.
I had similar issue with iOS 6, I done the following procedures to fix it:
Deleted my application from IPad
Signed out from the stores
Installed my application again
Tested the In-App
It worked fine for me, make sure that the internet connection is there. If you had the problem again, just sign-out from the stores and again test In-App purchase. (when I got the error again after few In-App purchases, I done this too)
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... 😃
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.