Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>IMHO you'd better crop this question in some number if different questions.</p> <p>Anyway, I'll try to answer:</p> <p>1) That's how it meant to be. You get transactions with <code>SKPaymentTransactionStateRestored</code> state <em>only</em> if you call <code>restoreCompletedTransactions</code> manually. AFAIK, that's the normal practise to create one button (for example, "Restore purchases") for that.</p> <p>2) Can't say anything about that. Normally, <em>every time</em>, when your app is going to make a <em>purchase</em> (and take some user's money), it should ask user for password.</p> <p>3) AFAIK, no. You work with Apple servers through iTunes/AppStore apps. It's their business to remember user's iTunes account. And I don't think they give you any way to make current user logged out. Your project manager should understand it :-)</p> <p>4), 5) There is no difference in production/sandbox environments <em>until you try to verify the receipt</em>. If you talk about work with server, I hope, you use server to verify receipts.</p> <p>At device's side, all what you do is working with <code>StoreKit</code> framework. You don't define any URLs to Apple servers, you just use framework's classes and call it's methods. AFAIK, you don't need to make any changes to your code for sandbox and production support at the same time.</p> <p>But at your server's side, there is difference: when your app is in production already, you should send HTTP POST requests to <code>https://buy.itunes.apple.com/verifyReceipt</code> . At the other hand, when your app is still in the sandbox, use <code>https://sandbox.itunes.apple.com/verifyReceipt</code> .</p> <p>How to handle that? Watch WWDC 2012 video 308 about Auto-Renewable subscriptions. They suggest 2 ways:</p> <p>1) <em>Smart server.</em> When your app send receipts to your server, it also passes some parameter, to let server know, which Apple's server to use. As I see, you already use this method.</p> <p>2) <em>Reactive server.</em> Your server <em>always</em> send receipts to Apple's production server. You check the response, and if the status is <code>21007</code> (following the documentation, "This receipt is a sandbox receipt, but it was sent to the production service for verification."), you send the same request to Apple's sandbox server.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload