[IAP, IOS] Family Sharing fails to restore purchase on non-owner accounts

Hello Unity’s IAP team,

We would like to ask about IAP and how it works with Family Sharing on Apple.

We had released our game onto the AppStore and have been receiving a lot of complaints stating that our game does not support Family Sharing even though we have enabled it. Players state that they have brought the game on an account, however it does not unlock on another device with an account that is part of the family. They cannot purchase the game again as well, stating that the game has been brought on another account, and is treated as duplicate.

More context of what is happening, our game supports the following model:

  • Game is free-to-play and is released as a free demo on the Appstore
  • Players can go into the game to BUY the FULL game at a price (be it after completing the demo, or through call to action screens we have implemented)

We have setup 2 IAP, both are Non-consumable:

  • one that we use to show players the current price and what they will be buying
  • one that stores the full price of the game, and is not shown to the players

Family Sharing flag is set to Enabled for both IAPs. We are using IAP 4.12.2, Unity Version 2022.3.18f.

We have tested in a sandbox environment, and the family sharing unlocks the full game on an account that has not brought the game but is part of a Family with the game brought on another account. On the live version, it does not behave this way.

Based on another forum that is quite recent [ iOS >> Support for Family Sharing - #5 by Yannick_D ], it states that there is no need to do anything else besides enabling it on Apple Connect and calling RestoreTransaction on initialized. The rest will be handled like how a normal purchase would be.
We have done those, but the game still remains locked in the live version.

Is there anything else we have left out, done incorrectly or misunderstood on how the IAP works? Does our setup for the IAPs mess with anything that is in the backend?

Hope to get a response soon, thank you very much!

This might be caused by an issue where the Apple ID for Family Sharing isn’t the same one as Media & Purchases, can you validate that both of these match? (Sandbox uses different settings, so this might explain why it works there, but not in production).
Some people also suggest signing out and in from the Media and Purchases.

A few things to check on the IAP side:

  • Does the product have a transaction ID and a receipt?
  • Is there any errors or warnings in the device logs?
  • If you parse the Apple receipt, does it contain that transaction?

Hi Yannick,

We have checked the Apple ID for Family Sharing and in Media & Purchases, and they are using the same Apple ID in both (Family has email#1 as part of it, and Media & Purchases uses email#1).

We have tried signing out and in of the Media & Purchases as well, but the game is still in the locked state.

On the IAP side,

  • when restore transaction is completed, the callback returns true (success) but it didn’t return any receipt or call ProcessPurchase (which it does in the Sandbox, and this unlocks our game in Sandbox)
  • no errors or warnings was noticed in the device logs
  • there is no receipt received to parse and check

Somehow, when we are testing buying the game on our side, the game is able to be purchased again, even though someone in the family has it. (which we believe could be something that we setup wrongly on our side, however the players are facing another issue as mentioned earlier)

Are we misunderstanding how the Media & Purchases and Family should be setup?
We have added Apple accounts to a Family, and did not touch anything else besides checking that Sharing is enabled on the devices.

Just to be sure, you have setup a Sandbox Family (for Sandbox) and a Family (for production)?
The products are marked as shareable?

The restore transaction only returns if it succeeded or not, but the restored products will be received by the transaction observer from StoreKit. Those are then sent to your ProcessPurchase if they are new. The receipt on the device also gets updated, so you can look at it directly to make sure the sharing did work.
For the receipt, you can follow these instructions to parse the receipt, this should validate if the products are being shared or not:

If you don’t see your shared products in there, then this means there’s an issue with the Family Sharing configuration.

For the Sandbox product being purchasable, is the product a non-consumable or a subscription?
This should be blocked by StoreKit and if it somehow lets you buy it, the “You already own this product” message should appear.

Hi Yannick_D,

jolyn_w and I are from the same development team, thus I will be answering on her behalf.

Yes we setup a Sandbox Family and Family for live store testing. The products are definitely marked as shareable and we have sharing enabled for both organizer and other members. In our test sessions, we have the organizer purchase the game and the other members download the game and test if the auto restore kicks in with the family sharing.

Our product is a 1 time purchase to unlock full game non-consumable

With regards to our current flow, when our game starts and after UnityIAP’s onInitialized callback, we call _appleExtensions.RestoreTransactions as part of the auto restore flow.

However, in the live store’s test session, process purchase never calls after that. In the sandbox family test session, process purchase does call and unlocks the game as expected.

Not sure if we are interpreting this correctly, can we assume that if everything is setup properly and when member of a family share account starts the game and triggers our auto restore, we should expect a process purchase callback?

In addition, when the user clicks on manual restore via our button, no process purchase calls as well, and when we call

Product product = _controller.products.WithID(fullGameProductId); and product.hasReceipt{product.hasReceipt}, returns us no receipt.

We are very certain that our regular purchase and restore functionality are working in cases for users with no family sharing.

Our game is live and so far we have only received complaints about family sharing purchases.

Thank you for your help.

We are using family sharing with native store implementation. Family sharing worked in sandbox and when the app went live family organizer does see the options as “Family shared”. But the member doesnt receive the products on restore both locally and via back end receipt validation. (unity 2022.3)

Noticed that we are missing the “supports family sharing” on Apple app store page. :confused:

Note: Exact same implementation works for other apps in our catalog made with unity 2021.3.40

we have this issue as well : Noticed that we are missing the “supports family sharing” on Apple app store page. We were told by our Apple representative that it is just a visual issue and shouldn’t affect how Unity IAP and store kit works.

This is most likely on Apple’s side, if they don’t send the transactions or the updated receipt when restoring transactions, there’s nothing to forward to the ProcessPurchase.

You can still try to read the receipt that Apple updates on the device, or if you have another product that has a receipt, you can also use that one since on Apple, it’s one big receipt for all transactions.

This will confirm if the issue is on Apple’s side or our side by verifying if the receipt contains that transaction or not.

Another alternative would be to use IAP 5.0.0, since StoreKit 2 uses a different way to obtain transactions. If you do upgrade, I strongly suggest no longer relying on the receipt and instead using CheckEntitlement which asks Apple directly if the user owns the product.

Hi Yannick_D,

Thank you for your help! We will reach out to Apple again and if it still doesn’t work out, we will probably upgrade to IAP 5.0.0.

Just one additional question about testflight, would family sharing work with test flight users? (not sandbox users) ?

No, I don’t believe Apple offers Family Sharing support for Test Flight.

1 Like

Hi Yannick,

We have reached out to Apple Support and they have investigated the issue and gotten back to us that the issue was solved. We have tested on some of our devices with live builds, and indeed the Family Sharing does work across the devices! Furthermore, the Family Sharing tag has been added to the store page on Appstore!

Thank you very much for helping and guiding us on this issue!

P.S We have taken a look at IAP 5 as well, and thought it was quite well done and will consider using it for our next project!

1 Like

We have family sharing working now on live builds. The Family Sharing tag can now be seen in the appstore page. We did not take any action on our side other than creating code-leve support ticket that got closed with following resolution.

Thank you for contacting Apple Developer Technical Support (DTS). We provide support for code-level questions on hardware & software development, and are unable to help you with your question. 

For questions regarding App Store Connect, we recommend that you first check the App Store Connect Help:

https://developer.apple.com/help/app-store-connect

If you are not able to find the information you need in the App Store Connect Help and you are still not able to resolve your issue, first file feedback via Feedback Assistant (https://developer.apple.com/bug-reporting). Next, direct your inquiry through the Contact Us page:

@BrendanKe Can you try to prepare a new submission form for your app. When we did that apps started to have family sharing working for live builds. :crossed_fingers: I presume apple expects to have family sharing before an update is submitted. Which is something that is not documented anywhere.

our issue has been resolved and yes probably something to do with family sharing toggled after submission is made.

1 Like