Exemple #1
0
        public IOSInAppPurchases()
        {
            this.transactionObserver = new IOSTransactionObserver();

            // 添加交易結果的 Observer
            SKPaymentQueue.DefaultQueue.AddTransactionObserver(this.transactionObserver);
        }
Exemple #2
0
 public void Dispose()
 {
     if (this.transactionObserver != null)
     {
         // 移除交易結果的 Observer
         SKPaymentQueue.DefaultQueue.RemoveTransactionObserver(this.transactionObserver);
         this.transactionObserver.Dispose();
         this.transactionObserver = null;
     }
 }