How to Restrict In-App Purchases to a Specific User Email or Differentiate Users?

Hello,

I am implementing In-App Purchases in my app and want to ensure that only users whose email matches their Apple ID email (the account used on the device as apple account) can purchase the subscription.

  1. Is it possible to retrieve the Apple ID email from the device or verify if the email matches the user's email in the app?
  2. If this is not feasible, what is the recommended approach to differentiate users and associate subscriptions with specific users in a secure way? For instance, how do I ensure that a subscription is tied to the correct user within my app?

I understand privacy constraints, but I am trying to find the best way to match the subscription to the correct user while adhering to Apple's guidelines. Any guidance or best practices would be appreciated.

Thank you!

  1. No.

  2. What do you mean by "associate subscriptions with specific users"? When your app calls StoreKit APIs, it only ever gets information about the user whose device it is running on. You don't need to do anything to "match" users - unless you are providing some sort of outside-the-app payment process.

How to Restrict In-App Purchases to a Specific User Email or Differentiate Users?
 
 
Q