title: Refreshing iOS app receipt: How to determine if user will need to sign in for app store?
body: <p>I am implemeting Apple's &quot;Grand unified receipt&quot; on iOS 7, which allows the app to check an app's purchase receipt locally without having to contact Apple's servers for validation &amp; verification. This works great if the user has a receipt stored in the app. Iin the case that the app is missing the receipt, the best practice is to request the app to refresh its receipt, as such:</p>
  <pre><code>SKReceiptRefreshRequest *request = [[SKReceiptRefreshRequest alloc] init];
  [request setDelegate:self];
  [request start];
  </code></pre>
  <p>The issue is that calling this code will ask the user to log in with his or her Apple ID. I am not 100% sure if this happens all of the time, or only if the user's app store login has timed out. I don't want to display the Apple ID login screen to users unless it is really necessary - I don't want people to be concerned that they will be charged incorrectly. I would like to show a display telling the user why they will be asked for their Apple ID password, but only if they will actually be required to enter their password. If they don't need to enter their password I want it to be a seamless and hidden process. What's the best way to proceed? I think the best way would be to check if the user will need to sign in for the app store, but I'm not sure if that is possible.</p>