Deprecated SKPayment Methods

A method identified as deprecated has been superseded and may become unsupported in the future.

Deprecated in iOS 5.0

paymentWithProductIdentifier:

Returns a new payment with the specified product identifier. (Deprecated in iOS 5.0. Use paymentWithProduct: instead, passing a product returned from SKProductsRequest.)

+ (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];
Availability
  • Available in iOS 3.0 and later.
  • Deprecated in iOS 5.0.
Declared In
SKPayment.h