Interface IAppleStoreExtendedPurchaseService
A public interface for the Apple Store purchase service extension.
Namespace: UnityEngine .Purchasing
Assembly: Unity.Purchasing.dll
Syntax
public interface IAppleStoreExtendedPurchaseService : IPurchaseServiceExtension
Properties
appReceipt
Read the App Receipt from local storage. Returns null for iOS less than or equal to 6, may also be null on a reinstalling and require refreshing.
Declaration
[Obsolete]
string? appReceipt { get; }
Property Value
Type | Description |
---|---|
string |
simulateAskToBuy
For testing purposes only.
Modify payment request for testing ask-to-buy.
Declaration
bool simulateAskToBuy { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
AddEntitlementsRevokedAction(Action<string>)
Add an action to be called when an entitlements is revoked
Declaration
void AddEntitlementsRevokedAction(Action<string> revokedEntitlementsAction)
Parameters
Type | Name | Description |
---|---|---|
Action<string> | revokedEntitlementsAction | The action to be added to the list of callbacks. The callback will return the product id that has been revoked |
ContinuePromotionalPurchases()
Continue promotional purchases that were intercepted by SetPromotionalPurchaseInterceptorCallback
Declaration
void ContinuePromotionalPurchases()
PresentCodeRedemptionSheet()
Initiate Apple Subscription Offer Code redemption API, presentCodeRedemptionSheet
Declaration
void PresentCodeRedemptionSheet()
RemoveEntitlementsRevokedAction(Action<string>)
Remove an action to be called when an Entitlements is revoked
Declaration
void RemoveEntitlementsRevokedAction(Action<string> revokedEntitlementsAction)
Parameters
Type | Name | Description |
---|---|---|
Action<string> | revokedEntitlementsAction | The action to be removed to the list of callbacks. The callback will return the product id that has been revoked |
SetPromotionalPurchaseInterceptorCallback(Action<Product>)
Stores a callback that will be called when the user attempts a promotional purchase (directly from the Apple App Store) on iOS or tvOS. The callback must be set before fetching products.
If the callback is set, you must call ContinuePromotionalPurchases()
inside it in order to continue the intercepted purchase(s).
Declaration
void SetPromotionalPurchaseInterceptorCallback(Action<Product> callback)