StoreKit 2: how can we test Family Sharing?

I'm not a member of any Family in iCloud. I want to understand what happens when a user is subscribed through Family Sharing but also how to use StoreKit when the user is subscribed twice: as an individual who purchased the product and as a member of a family when the purchase is shared with him.

How can I test Family Sharing for an app offering a product with Family Sharing enabled? Is it possible to create a fake Family in App Store Connect and add testers to it?

Please watch our tech talk for more info on how the Family Sharing for in app purchases feature works and learn some best practices. In general users of your app (the purchaser or family member) are nearly identical outside of the transaction value ownership type. What is important is your app is always monitoring for new transaction upon app launch. If so, your pp will see an unfinished transaction for you to process and grant access. To test that, be sure you can handle interrupted purchases.

Tech talk: https://developer.apple.com/videos/play/tech-talks/10869/

Testing interrupted purchases: https://developer.apple.com/documentation/storekit/original_api_for_in-app_purchase/testing_in-app_purchases_with_sandbox/testing_an_interrupted_purchase

Specifically you can identify the source of the transaction using the in app ownership key available from VerifyReceipt or any JWS transaction. It will indicate if the customer has it due to their own purchase or if it was via family sharing for in-app purchase.

StoreKit 2: how can we test Family Sharing?
 
 
Q