recently I working on IAP
.
As you know, when you want to send a payment request, you should call
+ (id)paymentWithProduct:(SKProduct *)product
but I found only way to get product is using SKProductsRequest
, is there any way to generate SKProduct
directly?
just like the deprecated one,
+ (id)paymentWithProductIdentifier:(NSString *)identifier
The fact is I want a new SKProduct
object directly using product id.
BR, Roger
On the Google Play Store app, in-app purchases will be by the Price or Install button. On play.google.com/store, you'll see "Offers in-app purchases" below the name of the app.
In-app purchases allow developers to offer the app for free in the App Store (for iOS) and Google Play (for Android). Then, within the application, they can upsell and advertise paid upgrades, locked features, special items, and other premium offers.
In-app purchases are extra content or subscriptions that you buy inside an app. Not all apps offer in-app purchases. To check if an app offers in-app purchases before you buy or download it, find it in the App Store. Then look for "In-App Purchases" near the app's price or Get button.
I use this to buy a product without fetching all the products from iTunes:
- (void)buyProductIdentifier:(NSString *)productIdentifier
{
SKMutablePayment *payment = [[SKMutablePayment alloc] init] ;
payment.productIdentifier = productIdentifier;
[[SKPaymentQueue defaultQueue] addPayment:payment];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With