title: How do I read receipt data with existing paid iOS app?
body: <p>I have a paid app that I'm thinking about making free with in app purchases. If I make the switch I'll need to check if the user has already paid for the app and then enable the paid features. </p>
  
  <p>I think the below code should do what I need but I'm not sure how to test it. I built the app and ran it using my development provisioning profile on my device and <code>receitpData</code> is empty. So I built the app with a distribution provisioning profile and submitted it to the app store then downloaded the app using test flight but I'm still having the same problem. </p>
  
  <p>How do I get the receipt data from an existing app?</p>
  
  <p>Do I need to enable in-app purchases for this app to get this data?</p>
  
  <pre><code>NSURL *receiptUrl = [[NSBundle mainBundle] appStoreReceiptURL];
  NSData *receiptData = [NSData dataWithContentsOfURL:receiptUrl];
  </code></pre>