title: Swift3 - Get transaction date when restoring In-App Purchase Transactions
body: <p>i am trying to restore in-app purchase (non-renewing subscription) in case a user installs the app on a new phone or re-installs it on his phone. I want to get the original purchase date for an in-app purchase using the method </p>
  
  <pre><code> func paymentQueueRestoreCompletedTransactionsFinished(_ queue: SKPaymentQueue) {
  
          for transaction in queue.transactions{
              let t : SKPaymentTransaction = transaction
              let prodID = t.payment.productIdentifier as String
              print("transaction finished",prodID)
              if(prodID == "com.netvariant.FamousFaces.FullAccess"){
                  print("&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;", t.original?.transactionDate)
                  print("&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;", t.transactionDate)
                  defaults.set("Y", forKey: "adPurchase")
                  NotificationCenter.default.post(name: Notification.Name(rawValue: "removeAds"), object: nil)
                  print("working")
              }
  
          }
      }
  </code></pre>
  
  <p>The problem is transaction date in returning nil in both cases. What did i miss in the code ? and is this the best way to handle restored purchases?</p>
  
  <p>I want to get the date to calculate if the users's subscription period (1 month) is over or not. The restore is successful but as i mentioned the date in nil.</p>
  
  <p>Thank you.</p>