Created
October 10, 2018 22:12
-
-
Save flurrydev/d52da2fb7a52a1d7efc6ff02e298baa9 to your computer and use it in GitHub Desktop.
Send a payment request to App Store once user select a product to purchase (Obj-C)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)purchase:(SKProduct *)product { | |
if ([SKPaymentQueue canMakePayments]) { | |
// add this payment to the payment queue | |
SKPayment *payment = [SKPayment paymentWithProduct:product]; | |
[[SKPaymentQueue defaultQueue] addPayment:payment]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment