SKPaymentQueue.defaultQueue().addTransactionObserver(self)
が実現した複数のアプリストアのログインを除いて、正常に動作しているPurchaseViewController
をセットアップしました。 DidFinishLaunchingWithOptions
クラスのAppdelegate
クラスに挿入する必要があります。私はこれを行うと: SKPaymentTransactionObserverのApplelegate設定
import UIKit
import StoreKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, SKPaymentTransactionObserver {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool
{
UINavigationBar.appearance().barTintColor = UIColor(red: 0/255.0, green: 115/255.0, blue: 158/255.0, alpha: 1.0)
UINavigationBar.appearance().tintColor = UIColor.whiteColor()
UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName : UIColor.whiteColor()]
SKPaymentQueue.defaultQueue().addTransactionObserver(self)
// Override point for customization after application launch.
return true
}
は私が
Type Appdelegate does not conform to protocol "SKPaymentTransactionObserver
を取得します。
誰かが私が間違っている場所を指摘してくれる?
おそらく欠落しているデリゲートメソッドですか? – LoVo