2016-12-13 49 views
0

我有一個ObjC &雨燕混合的項目,它的使用StoreKit做IAP,類的定義如下:任何類型或協議名爲「SKPaymentTransactionObserver」

... 
import StoreKit 
public class IAPManager: NSObject, SKProductsRequestDelegate, SKPaymentTransactionObserver {...} 
... 

當構建它,它失敗,錯誤如下:

no type or protocol named'SKPaymentTransactionObserver'

no type or protocol named'SKPaymentTransactionObserver'

將env是:

  • 的Xcode:V8.1
  • iOS版:10.1
  • SWIFT:2.3

我GOOGLE了1小時,但找不到任何有用的東西。

回答

0

您是否實現了委託方法?

斯威夫特3

public func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) { 
} 
+0

是的,我實現了它 – tempvar

+0

它說,「沒有任何類型或協議」,而不是我的課沒有確認到委託 – tempvar

相關問題