title: How to test ios11 promoted In-App Purchases
body: <p>Apple introduced Promoted In-App Purchases in iOS 11.  Though I have implemented the new required SKPaymentTransactionObserver method, paymentQueue:shouldAddStorePayment:for:, I have not been able to successfully test "buying" an item.  Should one be able to test and purchase in the Sandbox test environment?</p>
  
  <p>Apple does discuss initiating testing through an URL of the form:</p>
  
  <p>itms-services://?action=purchaseIntent&amp;bundleId=com.example.app&amp;productIdentifier=com.example.app.myIAP</p>
  
  <p>I've put the URL in an email to myself. When I click on the URL, I get the following sequence:</p>
  
  <p>1) Switches to MyApp, and shouldAddStorePayment is called with a product with my product identifier, com.example.app.myIAP  (encouraging start)</p>
  
  <p>2) Have paymentQueue:shouldAddStorePayment:for: return true.</p>
  
  <p>3) paymentQueue:updatedTransactions: is called, with a transaction in the “purchasing” (but not purchased) state. It has a nil transactionIdentifier.</p>
  
  <p>4) An alert pops up saying to Sign In. I sign in with a sandbox Apple ID - hitting the “Buy” button on the sign in alert.</p>
  
  <p>5) Another pop up saying to Sign In. I sign in with a sandbox Apple ID - hitting the “Buy” button on the sign in alert.</p>
  
  <p>6) paymentQueue:updatedTransactions: is called, with a transaction in the “failed” state. It has a non-nil transactionIdentifier.</p>
  
  <p>Should the shouldAddStorePayment routine be doing something extra?</p>