This tutorial is Good for SandBox Testing, Its Working properly but I want to implement it to my Real Project not Using Sandbox testing, So you please create a tutorial for it and Send me link . if Any Solution apart from it please help me. how to implement in Real App.
This tutorial does not follow Apple’s recommended best practice, which is to create the payment transaction observer in didFinishLaunchingWithOptions() in the AppDelegate file. This can cause problems in a real world app, as well as making things like redeeming consumable promo codes impossible. Please can you update the tutorial to follow Apple’s recommendation?
Nice tutorial, but what about restoring on app init? Don’t want a restore button, I just want the pre-bought-non-consumable to be there on app init.
Would be nice to see implementation of : Listing 2 in : Apple Developer Documentation
@kumarlav@eatton Could you just move the code from InAppProducts (or at the very least move the store variable to App Delegate) into the app delegate so you can call store = IAPHelper(productIds: InAppProducts.productIdentifiers) in didFinishLaunchingWithOptions() since HAPHelp init() contains SKPaymentQueue.default().add(self) which is what Apple Recommends. ofcause a few other changed had to be changed to work with apple Recommendation like adding SKPaymentTransactionObserver to AppDelegate, removing reference to Observer in IAPHelp since the AppDelegate will manage that & add the Observer via the IAPHelp init() and in App Delegate when adding the paymentQueue(queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) inside that func just put store.paymentQueue(queue, updatedTransactions: transactions) since IAPHelp contains that function already and all your doing is passing the function to the already existing one.
Hi I am running the final tutorial code with all the steps mentioned above. I am getting empty list of products. Is there any chance that this wont work with simulator and will work only with real devices?
I’ve been having difficulty getting my test device to “see” the In-App products (1 consumable, 1 non-consumable). I have run through the checklist (very helpful) and the only thing I’ve not yet done is wait several hours so I’ll probably check it again in the morning.
One thing that may need to be added to this tutorial is the absolute need to have a Sandbox Tester. Apple informed me today that this was the only way to test in-app purchasing. You may want to make that more explicit in your tutorial - the way I read it, it sounded like I only needed a Sandbox Tester to avoid having to pay for buying something.
You may also want to add code to show what to do when users purchase Apple Hosted Content. This is a great feature - Apple will store purchase-able content for you, so you don’t need to host it yourself. This involves creating an upload package in a separate Xcode project, uploading to Apple, and then showing what the code needs to do when a user purchases it.