StoreKit Changes for Swift
StoreKit
Modified SKDownload
Declaration | |
---|---|
From | class SKDownload : NSObject { var downloadState: SKDownloadState { get } var contentLength: Int64 { get } var contentIdentifier: String! { get } var contentURL: NSURL! { get } var contentVersion: String! { get } var error: NSError! { get } var progress: Float { get } var timeRemaining: NSTimeInterval { get } var transaction: SKPaymentTransaction! { get } } |
To | class SKDownload : NSObject { var downloadState: SKDownloadState { get } var contentLength: Int64 { get } var contentIdentifier: String { get } var contentURL: NSURL? { get } var contentVersion: String { get } var error: NSError? { get } var progress: Float { get } var timeRemaining: NSTimeInterval { get } var transaction: SKPaymentTransaction { get } } |
Modified SKDownload.contentIdentifier
Declaration | |
---|---|
From | var contentIdentifier: String! { get } |
To | var contentIdentifier: String { get } |
Modified SKDownload.contentURL
Declaration | |
---|---|
From | var contentURL: NSURL! { get } |
To | var contentURL: NSURL? { get } |
Modified SKDownload.contentVersion
Declaration | |
---|---|
From | var contentVersion: String! { get } |
To | var contentVersion: String { get } |
Modified SKDownload.error
Declaration | |
---|---|
From | var error: NSError! { get } |
To | var error: NSError? { get } |
Modified SKDownload.transaction
Declaration | |
---|---|
From | var transaction: SKPaymentTransaction! { get } |
To | var transaction: SKPaymentTransaction { get } |
Modified SKDownloadState [enum]
Raw Value Type | |
---|---|
From | -- |
To | Int |
Modified SKMutablePayment
Declaration | |
---|---|
From | class SKMutablePayment : SKPayment { var applicationUsername: String! var productIdentifier: String! var quantity: Int @NSCopying var requestData: NSData! var simulatesAskToBuyInSandbox: Bool } |
To | class SKMutablePayment : SKPayment { var applicationUsername: String var productIdentifier: String var quantity: Int @NSCopying var requestData: NSData? var simulatesAskToBuyInSandbox: Bool } |
Modified SKMutablePayment.applicationUsername
Declaration | |
---|---|
From | var applicationUsername: String! |
To | var applicationUsername: String |
Modified SKMutablePayment.productIdentifier
Declaration | |
---|---|
From | var productIdentifier: String! |
To | var productIdentifier: String |
Modified SKMutablePayment.requestData
Declaration | |
---|---|
From | @NSCopying var requestData: NSData! |
To | @NSCopying var requestData: NSData? |
Modified SKPayment
Declaration | |
---|---|
From | class SKPayment : NSObject, NSCopying, NSMutableCopying { convenience init!(product product: SKProduct!) class func paymentWithProduct(_ product: SKProduct!) -> Self! class func paymentWithProductIdentifier(_ identifier: String!) -> AnyObject! var productIdentifier: String! { get } @NSCopying var requestData: NSData! { get } var quantity: Int { get } var applicationUsername: String! { get } var simulatesAskToBuyInSandbox: Bool { get } } |
To | class SKPayment : NSObject, NSCopying, NSMutableCopying { convenience init(product product: SKProduct) class func paymentWithProduct(_ product: SKProduct) -> Self class func paymentWithProductIdentifier(_ identifier: String) -> AnyObject var productIdentifier: String { get } @NSCopying var requestData: NSData? { get } var quantity: Int { get } var applicationUsername: String? { get } var simulatesAskToBuyInSandbox: Bool { get } } |
Modified SKPayment.applicationUsername
Declaration | |
---|---|
From | var applicationUsername: String! { get } |
To | var applicationUsername: String? { get } |
Modified SKPayment.init(product: SKProduct)
Declaration | |
---|---|
From | convenience init!(product product: SKProduct!) |
To | convenience init(product product: SKProduct) |
Modified SKPayment.productIdentifier
Declaration | |
---|---|
From | var productIdentifier: String! { get } |
To | var productIdentifier: String { get } |
Modified SKPayment.requestData
Declaration | |
---|---|
From | @NSCopying var requestData: NSData! { get } |
To | @NSCopying var requestData: NSData? { get } |
Modified SKPaymentQueue
Declaration | |
---|---|
From | class SKPaymentQueue : NSObject { class func defaultQueue() -> Self! class func canMakePayments() -> Bool func addPayment(_ payment: SKPayment!) func restoreCompletedTransactions() func restoreCompletedTransactionsWithApplicationUsername(_ username: String!) func finishTransaction(_ transaction: SKPaymentTransaction!) func startDownloads(_ downloads: [AnyObject]!) func pauseDownloads(_ downloads: [AnyObject]!) func resumeDownloads(_ downloads: [AnyObject]!) func cancelDownloads(_ downloads: [AnyObject]!) func addTransactionObserver(_ observer: SKPaymentTransactionObserver!) func removeTransactionObserver(_ observer: SKPaymentTransactionObserver!) var transactions: [AnyObject]! { get } } |
To | class SKPaymentQueue : NSObject { class func defaultQueue() -> Self class func canMakePayments() -> Bool func addPayment(_ payment: SKPayment) func restoreCompletedTransactions() func restoreCompletedTransactionsWithApplicationUsername(_ username: String?) func finishTransaction(_ transaction: SKPaymentTransaction) func startDownloads(_ downloads: [SKDownload]) func pauseDownloads(_ downloads: [SKDownload]) func resumeDownloads(_ downloads: [SKDownload]) func cancelDownloads(_ downloads: [SKDownload]) func addTransactionObserver(_ observer: SKPaymentTransactionObserver) func removeTransactionObserver(_ observer: SKPaymentTransactionObserver) var transactions: [SKPaymentTransaction] { get } } |
Declaration | |
---|---|
From | func addPayment(_ payment: SKPayment!) |
To | func addPayment(_ payment: SKPayment) |
Declaration | |
---|---|
From | func addTransactionObserver(_ observer: SKPaymentTransactionObserver!) |
To | func addTransactionObserver(_ observer: SKPaymentTransactionObserver) |
Declaration | |
---|---|
From | func cancelDownloads(_ downloads: [AnyObject]!) |
To | func cancelDownloads(_ downloads: [SKDownload]) |
Declaration | |
---|---|
From | class func defaultQueue() -> Self! |
To | class func defaultQueue() -> Self |
Declaration | |
---|---|
From | func finishTransaction(_ transaction: SKPaymentTransaction!) |
To | func finishTransaction(_ transaction: SKPaymentTransaction) |
Declaration | |
---|---|
From | func pauseDownloads(_ downloads: [AnyObject]!) |
To | func pauseDownloads(_ downloads: [SKDownload]) |
Declaration | |
---|---|
From | func removeTransactionObserver(_ observer: SKPaymentTransactionObserver!) |
To | func removeTransactionObserver(_ observer: SKPaymentTransactionObserver) |
Declaration | |
---|---|
From | func restoreCompletedTransactionsWithApplicationUsername(_ username: String!) |
To | func restoreCompletedTransactionsWithApplicationUsername(_ username: String?) |
Declaration | |
---|---|
From | func resumeDownloads(_ downloads: [AnyObject]!) |
To | func resumeDownloads(_ downloads: [SKDownload]) |
Declaration | |
---|---|
From | func startDownloads(_ downloads: [AnyObject]!) |
To | func startDownloads(_ downloads: [SKDownload]) |
Modified SKPaymentQueue.transactions
Declaration | |
---|---|
From | var transactions: [AnyObject]! { get } |
To | var transactions: [SKPaymentTransaction] { get } |
Modified SKPaymentTransaction
Declaration | |
---|---|
From | class SKPaymentTransaction : NSObject { var error: NSError! { get } var originalTransaction: SKPaymentTransaction! { get } var payment: SKPayment! { get } var downloads: [AnyObject]! { get } var transactionDate: NSDate! { get } var transactionIdentifier: String! { get } var transactionReceipt: NSData! { get } var transactionState: SKPaymentTransactionState { get } } |
To | class SKPaymentTransaction : NSObject { var error: NSError? { get } var originalTransaction: SKPaymentTransaction? { get } var payment: SKPayment { get } var downloads: [SKDownload] { get } var transactionDate: NSDate? { get } var transactionIdentifier: String? { get } var transactionReceipt: NSData? { get } var transactionState: SKPaymentTransactionState { get } } |
Modified SKPaymentTransaction.downloads
Declaration | |
---|---|
From | var downloads: [AnyObject]! { get } |
To | var downloads: [SKDownload] { get } |
Modified SKPaymentTransaction.error
Declaration | |
---|---|
From | var error: NSError! { get } |
To | var error: NSError? { get } |
Declaration | |
---|---|
From | var originalTransaction: SKPaymentTransaction! { get } |
To | var originalTransaction: SKPaymentTransaction? { get } |
Modified SKPaymentTransaction.payment
Declaration | |
---|---|
From | var payment: SKPayment! { get } |
To | var payment: SKPayment { get } |
Modified SKPaymentTransaction.transactionDate
Declaration | |
---|---|
From | var transactionDate: NSDate! { get } |
To | var transactionDate: NSDate? { get } |
Declaration | |
---|---|
From | var transactionIdentifier: String! { get } |
To | var transactionIdentifier: String? { get } |
Modified SKPaymentTransactionObserver
Declaration | |
---|---|
From | protocol SKPaymentTransactionObserver : NSObjectProtocol { func paymentQueue(_ queue: SKPaymentQueue!, updatedTransactions transactions: [AnyObject]!) optional func paymentQueue(_ queue: SKPaymentQueue!, removedTransactions transactions: [AnyObject]!) optional func paymentQueue(_ queue: SKPaymentQueue!, restoreCompletedTransactionsFailedWithError error: NSError!) optional func paymentQueueRestoreCompletedTransactionsFinished(_ queue: SKPaymentQueue!) optional func paymentQueue(_ queue: SKPaymentQueue!, updatedDownloads downloads: [AnyObject]!) } |
To | protocol SKPaymentTransactionObserver : NSObjectProtocol { func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) optional func paymentQueue(_ queue: SKPaymentQueue, removedTransactions transactions: [SKPaymentTransaction]) optional func paymentQueue(_ queue: SKPaymentQueue, restoreCompletedTransactionsFailedWithError error: NSError) optional func paymentQueueRestoreCompletedTransactionsFinished(_ queue: SKPaymentQueue) optional func paymentQueue(_ queue: SKPaymentQueue, updatedDownloads downloads: [SKDownload]) } |
Declaration | |
---|---|
From | optional func paymentQueue(_ queue: SKPaymentQueue!, removedTransactions transactions: [AnyObject]!) |
To | optional func paymentQueue(_ queue: SKPaymentQueue, removedTransactions transactions: [SKPaymentTransaction]) |
Declaration | |
---|---|
From | optional func paymentQueue(_ queue: SKPaymentQueue!, restoreCompletedTransactionsFailedWithError error: NSError!) |
To | optional func paymentQueue(_ queue: SKPaymentQueue, restoreCompletedTransactionsFailedWithError error: NSError) |
Modified SKPaymentTransactionObserver.paymentQueue(_: SKPaymentQueue, updatedDownloads: [SKDownload])
Declaration | |
---|---|
From | optional func paymentQueue(_ queue: SKPaymentQueue!, updatedDownloads downloads: [AnyObject]!) |
To | optional func paymentQueue(_ queue: SKPaymentQueue, updatedDownloads downloads: [SKDownload]) |
Declaration | |
---|---|
From | func paymentQueue(_ queue: SKPaymentQueue!, updatedTransactions transactions: [AnyObject]!) |
To | func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) |
Modified SKPaymentTransactionObserver.paymentQueueRestoreCompletedTransactionsFinished(_: SKPaymentQueue)
Declaration | |
---|---|
From | optional func paymentQueueRestoreCompletedTransactionsFinished(_ queue: SKPaymentQueue!) |
To | optional func paymentQueueRestoreCompletedTransactionsFinished(_ queue: SKPaymentQueue) |
Modified SKPaymentTransactionState [enum]
Raw Value Type | |
---|---|
From | -- |
To | Int |
Modified SKProduct
Declaration | |
---|---|
From | class SKProduct : NSObject { var localizedDescription: String! { get } var localizedTitle: String! { get } var price: NSDecimalNumber! { get } var priceLocale: NSLocale! { get } var productIdentifier: String! { get } var downloadable: Bool { get } var downloadContentLengths: [AnyObject]! { get } var downloadContentVersion: String! { get } } |
To | class SKProduct : NSObject { var localizedDescription: String { get } var localizedTitle: String { get } var price: NSDecimalNumber { get } var priceLocale: NSLocale { get } var productIdentifier: String { get } var downloadable: Bool { get } var downloadContentLengths: [NSNumber] { get } var downloadContentVersion: String { get } } |
Modified SKProduct.downloadContentLengths
Declaration | |
---|---|
From | var downloadContentLengths: [AnyObject]! { get } |
To | var downloadContentLengths: [NSNumber] { get } |
Modified SKProduct.downloadContentVersion
Declaration | |
---|---|
From | var downloadContentVersion: String! { get } |
To | var downloadContentVersion: String { get } |
Modified SKProduct.localizedDescription
Declaration | |
---|---|
From | var localizedDescription: String! { get } |
To | var localizedDescription: String { get } |
Modified SKProduct.localizedTitle
Declaration | |
---|---|
From | var localizedTitle: String! { get } |
To | var localizedTitle: String { get } |
Modified SKProduct.price
Declaration | |
---|---|
From | var price: NSDecimalNumber! { get } |
To | var price: NSDecimalNumber { get } |
Modified SKProduct.priceLocale
Declaration | |
---|---|
From | var priceLocale: NSLocale! { get } |
To | var priceLocale: NSLocale { get } |
Modified SKProduct.productIdentifier
Declaration | |
---|---|
From | var productIdentifier: String! { get } |
To | var productIdentifier: String { get } |
Modified SKProductsRequest
Declaration | |
---|---|
From | class SKProductsRequest : SKRequest { init!(productIdentifiers productIdentifiers: Set<NSObject>!) unowned(unsafe) var delegate: SKProductsRequestDelegate! } |
To | class SKProductsRequest : SKRequest { init(productIdentifiers productIdentifiers: Set<String>) unowned(unsafe) var delegate: SKProductsRequestDelegate? } |
Modified SKProductsRequest.delegate
Declaration | |
---|---|
From | unowned(unsafe) var delegate: SKProductsRequestDelegate! |
To | unowned(unsafe) var delegate: SKProductsRequestDelegate? |
Declaration | |
---|---|
From | init!(productIdentifiers productIdentifiers: Set<NSObject>!) |
To | init(productIdentifiers productIdentifiers: Set<String>) |
Modified SKProductsRequestDelegate
Declaration | |
---|---|
From | protocol SKProductsRequestDelegate : SKRequestDelegate, NSObjectProtocol { func productsRequest(_ request: SKProductsRequest!, didReceiveResponse response: SKProductsResponse!) } |
To | protocol SKProductsRequestDelegate : SKRequestDelegate, NSObjectProtocol { func productsRequest(_ request: SKProductsRequest, didReceiveResponse response: SKProductsResponse) } |
Declaration | |
---|---|
From | func productsRequest(_ request: SKProductsRequest!, didReceiveResponse response: SKProductsResponse!) |
To | func productsRequest(_ request: SKProductsRequest, didReceiveResponse response: SKProductsResponse) |
Modified SKProductsResponse
Declaration | |
---|---|
From | class SKProductsResponse : NSObject { var products: [AnyObject]! { get } var invalidProductIdentifiers: [AnyObject]! { get } } |
To | class SKProductsResponse : NSObject { var products: [SKProduct] { get } var invalidProductIdentifiers: [String] { get } } |
Declaration | |
---|---|
From | var invalidProductIdentifiers: [AnyObject]! { get } |
To | var invalidProductIdentifiers: [String] { get } |
Modified SKProductsResponse.products
Declaration | |
---|---|
From | var products: [AnyObject]! { get } |
To | var products: [SKProduct] { get } |
Modified SKReceiptRefreshRequest
Declaration | |
---|---|
From | class SKReceiptRefreshRequest : SKRequest { init!(receiptProperties properties: [NSObject : AnyObject]!) var receiptProperties: [NSObject : AnyObject]! { get } } |
To | class SKReceiptRefreshRequest : SKRequest { init(receiptProperties properties: [String : AnyObject]?) var receiptProperties: [String : AnyObject]? { get } } |
Declaration | |
---|---|
From | init!(receiptProperties properties: [NSObject : AnyObject]!) |
To | init(receiptProperties properties: [String : AnyObject]?) |
Declaration | |
---|---|
From | var receiptProperties: [NSObject : AnyObject]! { get } |
To | var receiptProperties: [String : AnyObject]? { get } |
Modified SKRequest
Declaration | |
---|---|
From | class SKRequest : NSObject { unowned(unsafe) var delegate: SKRequestDelegate! func cancel() func start() } |
To | class SKRequest : NSObject { unowned(unsafe) var delegate: SKRequestDelegate? func cancel() func start() } |
Modified SKRequest.delegate
Declaration | |
---|---|
From | unowned(unsafe) var delegate: SKRequestDelegate! |
To | unowned(unsafe) var delegate: SKRequestDelegate? |
Modified SKRequestDelegate
Declaration | |
---|---|
From | protocol SKRequestDelegate : NSObjectProtocol { optional func requestDidFinish(_ request: SKRequest!) optional func request(_ request: SKRequest!, didFailWithError error: NSError!) } |
To | protocol SKRequestDelegate : NSObjectProtocol { optional func requestDidFinish(_ request: SKRequest) optional func request(_ request: SKRequest, didFailWithError error: NSError) } |
Declaration | |
---|---|
From | optional func request(_ request: SKRequest!, didFailWithError error: NSError!) |
To | optional func request(_ request: SKRequest, didFailWithError error: NSError) |
Declaration | |
---|---|
From | optional func requestDidFinish(_ request: SKRequest!) |
To | optional func requestDidFinish(_ request: SKRequest) |
Modified SKStoreProductViewController
Declaration | |
---|---|
From | class SKStoreProductViewController : UIViewController { unowned(unsafe) var delegate: SKStoreProductViewControllerDelegate! func loadProductWithParameters(_ parameters: [NSObject : AnyObject]!, completionBlock block: ((Bool, NSError!) -> Void)!) } |
To | class SKStoreProductViewController : UIViewController { unowned(unsafe) var delegate: SKStoreProductViewControllerDelegate? func loadProductWithParameters(_ parameters: [String : AnyObject], completionBlock block: ((Bool, NSError?) -> Void)?) } |
Declaration | |
---|---|
From | unowned(unsafe) var delegate: SKStoreProductViewControllerDelegate! |
To | unowned(unsafe) var delegate: SKStoreProductViewControllerDelegate? |
Declaration | |
---|---|
From | func loadProductWithParameters(_ parameters: [NSObject : AnyObject]!, completionBlock block: ((Bool, NSError!) -> Void)!) |
To | func loadProductWithParameters(_ parameters: [String : AnyObject], completionBlock block: ((Bool, NSError?) -> Void)?) |
Modified SKStoreProductViewControllerDelegate
Declaration | |
---|---|
From | protocol SKStoreProductViewControllerDelegate : NSObjectProtocol { optional func productViewControllerDidFinish(_ viewController: SKStoreProductViewController!) } |
To | protocol SKStoreProductViewControllerDelegate : NSObjectProtocol { optional func productViewControllerDidFinish(_ viewController: SKStoreProductViewController) } |
Modified SKStoreProductViewControllerDelegate.productViewControllerDidFinish(_: SKStoreProductViewController)
Declaration | |
---|---|
From | optional func productViewControllerDidFinish(_ viewController: SKStoreProductViewController!) |
To | optional func productViewControllerDidFinish(_ viewController: SKStoreProductViewController) |