I am stuck with setting up my in-app purchases.
I can't get to get this right:
SKPayment *paymentRequest = [SKPayment paymentWithProduct: @"co.za.nideo.100shotsbuybeer"];
I got it from
SKPayment *paymentRequest = [SKPayment paymentWithProductIdentifiers: @"co.za.nideo.100shotsbuybeer"];
but this seems to be deprecated. How can I get the first piece of code to work?
It seems to nee a SKProduct but I don't know how to create/init such an object.
According to the StoreKit docs and [1] you'd have to:
SKProductsRequest
with your product identifiers (initWithProductIdentifiers:
)delegate
start
method)productsRequest:didReceiveResponse:
which contains anSKProductsResponse
objectSKProduct
objects from theproducts
property and display them, saving the objects for further purchase.This seems in line with Important: You must make a product request for a particular product identifier before allowing the user to purchase that product. Retrieving product information from the App Store ensures that you are using a valid product identifier for a product you have marked available for sale in iTunes Connect. from [1]
[1] http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/RetrievingStoreInformation/RetrievingStoreInformation.html#//apple_ref/doc/uid/TP40008267-CH2-SW1