lib_unity_purchase/Samples~/Apple App Store - 11 Family...
刘涛 3b87d20391 全部提交 2024-01-29 18:49:33 +08:00
..
.sample.json 全部提交 2024-01-29 18:49:33 +08:00
FamilySharing.cs 全部提交 2024-01-29 18:49:33 +08:00
FamilySharing.cs.meta 全部提交 2024-01-29 18:49:33 +08:00
FamilySharing.unity 全部提交 2024-01-29 18:49:33 +08:00
FamilySharing.unity.meta 全部提交 2024-01-29 18:49:33 +08:00
README.md 全部提交 2024-01-29 18:49:33 +08:00
README.md.meta 全部提交 2024-01-29 18:49:33 +08:00
UserWarningAppleAppStore.cs 全部提交 2024-01-29 18:49:33 +08:00
UserWarningAppleAppStore.cs.meta 全部提交 2024-01-29 18:49:33 +08:00

README.md

README - In-App Purchasing Sample Scenes - App Store - Family Sharing

This sample shows how to implement and use Apple's Family Sharing feature in your application. The family sharing feature enables players to share non-consumable and subscription in-app purchases with members of the same family group.

Instructions to test this sample:

Unfortunately, Apple doesn't support family sharing on the Sandbox, Xcode testing, or TestFlight. The only way to test the full feature is by using an app published on the app store. However, it is possible to test the AppleProductMetadata.isFamilyShareable and the IAppleConfiguration.SetEntitlementsRevokedListener API by using Xcode testing and refunding a purchase. Even though it is hard to test this sample, it is still provided to showcase how to implement family sharing using Unity IAP.

  1. Have in-app purchasing correctly configured with the Apple App Store .
  2. Make sure you have a subscription with family sharing enabled.
  3. Set your own product's id in the InAppPurchasing game object > Family Sharing script > Family Shareable Subscription ProductId field or change the familyShareableSubscriptionProductId the FamilySharing.cs script.
  4. Publish your app to the Apple App Store.
  5. To test, click Buy Family Shared Subscription. You should see your subscription status updated.
  6. When you open the app with another phone that is sharing the same family, you should see that the account is subscribed. It may take several minutes before the purchase is updated by apple.
  7. When you remove that account from the family, you should see a revoked notification and the subscription status updated.

See Apple's Family Sharing documentation for more information.