title: Restoring purchases in swift
body: <p>So i can't seem to get the <code>updatedTransactions</code> protocol to fire when trying to restore purchases.</p>
  
  <p>I have a button in one view controller which calls the following method in my IAPViewController file <code>restoreIAP()</code> which is set up like so.</p>
  
  <pre><code>func restoreIAP(){
  
      SKPaymentQueue.defaultQueue().restoreCompletedTransactions()
  }
  </code></pre>
  
  <p>This method is called when the user presses the button so this is the class which handles this.</p>
  
  <pre><code>class SettingsViewController: IAPViewController {
  
  
      @IBAction func restoreDidTouch(sender: AnyObject) {
  
          restoreIAP()
          activityTitle = "Restoring"
  
      }
  
  }
  </code></pre>
  
  <p>In my <code>IAPViewController</code> nothing seems to be triggering this method so that i can do something.</p>
  
  <pre><code>// Check the transaction
  func paymentQueue(queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) {
  
      // Check the tranactions
  
      for transaction in transactions {
  
          switch transaction.transactionState {
  
          case .Purchasing:
              // TODO: Start Activity Indicator
              showPurchaseIndicator(activityTitle)
              break
  
          case .Purchased:
              // TODO: End the purchasing activity indicator
              dismissPurchaseIndicator()
              print("Transaction completed successfully.")
              SKPaymentQueue.defaultQueue().finishTransaction(transaction)
              transactionInProgress = false
  
              // TODO: Put method here to unlock all news sources
              storiesMethods.unlockAllStories()
              break
  
          case .Restored:
              // TODO: Start Activity Indicator
            //  showPurchaseIndicator(activityTitle)
              break
  
          case .Failed:
              dismissPurchaseIndicator()
              notificationMethods.showAlertErrorMessage(self, title: "Purchase", actionMessage: "Dismiss", message: "Unable to complete transaction please try again later.")
              SKPaymentQueue.defaultQueue().finishTransaction(transaction)
              transactionInProgress = false
              break
  
          default:
              print(transaction.transactionState.rawValue)
              break
          }
      }
  
  }
  </code></pre>