Type Method

paymentWithProductIdentifier:

Returns a new payment with the specified product identifier.

Declaration

+ (id)paymentWithProductIdentifier:(NSString *)identifier;

Parameters

identifier

A string that identifies the item to be purchased.

Return Value

A new payment object.

Discussion

The product identifier is a string previously agreed on between your application and the Apple App Store. The quantity property defaults to 1.

To create a SKPayment object with a quantity greater than 1, create a SKMutablePayment object, adjust its quantity property and then add it to the payment queue:

SKMutablePayment *myPayment = [SKMutablePayment paymentWithProductIdentifier: myIdentifier];
myPayment.quantity = 2;
[[SKPaymentQueue defaultQueue] addPayment:myPayment];

See Also

Creating Payments

+ paymentWithProduct:

Returns a new payment for the specified product.