title: Is there any way to know purchase made by which iTunes account? - iOS
body: <p>My app provides an in-app-purchase non-consumable type. The app has log in facility. Is it possible to make purchase based on logged in user to my app?</p>
  
  <p>I know it sounds awkward. Let me specify the problem.</p>
  
  <p>The device has a already logged in user at iTunes store. At that time, when my app gets install to device for first time, any user can login with credentials to my app. Consider, he made some purchase and log out from the app. Now, another user logged in to the app and can't use facilities available for previous user after in app purchase. But as you know non-consumable product purchase based on iTunes store account (only one non-consumable product can be purchased for each account). I have tried by following way..</p>
  
  <ol>
  <li><p>Store user id to iCloud, but I don't know by which iTunes account that purchase was made. So, I couldn't display proper message "You should log in with different iTunes account to make purchase".</p></li>
  <li><p>In android, with the In-app Billing v3, a <code>developer payload</code> string can be sent along with the purchase request. This string is also returned when a query is made for that purchase. So, this can be used to identify the user who made the purchase. Is there anything similar available in iOS?</p></li>
  </ol>