I\'ve implemented a simple non-consumable in-app purchase mechanism by following the Ray Wenderlich tutorial book.
When my app starts, I initiate a product info requ
In iOS simulator documentation it is written :
API Limitations
Within iOS Simulator, there are some limitations to the APIs and features, including:
Apple Push Services Privacy alerts for access to Photos, Contacts, Calendar, and Reminders The UIBackgroundModes key iCloud document syncing and key-value storage support
Unsupported frameworks include:
External Accessory Media Player Message UI Event Kit In UIKit, the UIVideoEditorController class Store Kit
As in-app purchase needs Store Kit to work and the Store Kit framework is unsupported for Simulator, you can't test IAP in iOS Simulator.
More information : iOS Simulator documentation
I figured out something:
I initiated the SKProductRequest immediately at the end of AppDelegate's -didFinishLaunching... and it never worked.
Then I made a delayed call and waited 3 seconds. From then on it started working. So you can't make StoreKit requests immediately after app launch.
Unfortunately there are several things you can not test on the simulator. In App Purchases belongs in that list.
So you can not test In App Purchases in simulator, you need an iOS device for that.
Edit: As far as I can see, that is what happens when you try to test IAP on the simulator, purchase delegates won't get called.
You can test in-app purchases in Xcode 12 from Apple documentation
https://developer.apple.com/documentation/storekit/in-app_purchase/testing_in-app_purchases_in_xcode?language=objc
And custom manual
https://www.appcoda.com/storekit-testing/
In the current version of Xcode 5.0 (5A1413), In-App purchases will not work in the iOS simulator.
StoreKit (In-App purchases) will not work in the Simulator. 13962338
Source: Xcode 5.0 Release Notes > Known issues > iOS Simulator https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-Xcode/xc5_release_notes/xc5_release_notes.html#//apple_ref/doc/uid/TP40001051-CH2-SW303
Where is your skProductRequest object is declared? Try a global declaration of skProductRequest.