title: iOS Subscription: getting last expiration date from receipt
body: <p>I am using Xcode/Swift to set up an auto-renew subscription. In order to get the last expiration date from receipt, tutorials and guides recommend to get the &quot;<strong>last object</strong>&quot; of the receipt:</p>
  <pre><code>let lastReceipt = receiptInfo.lastObject as! NSDictionary
  let expiresDate = lastReceipt[&quot;expires_date&quot;]
  </code></pre>
  <p>But during my tests in <em>sandbox environment</em>, I found out there is no &quot;expires_date&quot; in the receipt's &quot;last object&quot;. Actually, the last subscription info was always in the &quot;<strong>first object</strong>&quot;, so I have to write this:</p>
  <pre><code>let lastReceipt = receiptInfo.firstObject as! NSDictionary
  </code></pre>
  <p>Does anyone else notice that? Or did I miss something? Is this something specific to sandbox environment?</p>
  <p>Even though it works in sandbox, I am not sure how it works in production environment. I am quite new with subscriptions, so thank you for any insights.</p>