Changes

An iOS 8 Swift In-App Purchase Tutorial

20 bytes added, 21:10, 14 April 2015
no edit summary
super.viewDidLoad()
let appdelegate = UIApplication.sharedApplication().delegate
as ! AppDelegate
appdelegate.homeViewController = self
if SKPaymentQueue.canMakePayments() {
let request = SKProductsRequest(productIdentifiers:
NSSet(objects: self.productID)as Set<NSObject>)
request.delegate = self
request.start()
func paymentQueue(queue: SKPaymentQueue!, updatedTransactions transactions: [AnyObject]!) {
for transaction in transactions as ! [SKPaymentTransaction] {
switch transaction.transactionState {
func unlockFeature() {
let appdelegate = UIApplication.sharedApplication().delegate
as ! AppDelegate
appdelegate.homeViewController!.enableLevel2()