사용자가 애플리케이션을 재설치하는 경우 이미 보유 중인 비소모품과 갱신 가능한 구독 상품을 다시 제공해야 합니다. 앱 스토어는 각 사용자의 비소비 품목과 갱신 가능한 구독 상품의 기록을 영구적으로 보관하며 Unity IAP가 이를 검색해서 가져올 수 있습니다. Apple 플랫폼에서 재사용 불가능한 구독 상품은 복원할 수 없습니다. Apple 플랫폼에서 갱신이 불가능한 구독 상품을 사용하는 경우, 액티브 구독 내역을 스스로 보관하고 직접 장치 간 구독 내역의 싱크를 유지해야 합니다.
Google Play나 유니버셜 Windows 애플리케이션과 같이, 이 기능을 지원하는 플랫폼에서는 Unity IAP가 재설치 이후 첫 초기화 단계에서 사용자가 소유하는 모든 품목을 자동으로 복원합니다. 각 소유 중인 품목에 대해 IStoreListener
의 ProcessPurchase
메서드가 호출됩니다.
Apple 플랫폼의 경우 사용자가 비밀번호를 입력해야만 이전 거래 내역을 검색해서 가져올 수 있으므로 애플리케이션 내에 해당 과정을 진행할 수 있는 버튼이 제공되어야 합니다. 이 과정 동안 IStoreListener
의 ProcessPurchase
메서드가 사용자가 소유하고 있는 각각의 항목에 대해 호출됩니다.
/// <summary>
/// Your IStoreListener implementation of OnInitialized.
/// </summary>
public void OnInitialized(IStoreController controller, IExtensionProvider extensions)
{
extensions.GetExtension<IAppleExtensions> ().RestoreTransactions (result => {
if (result) {
// This does not mean anything was restored,
// merely that the restoration process succeeded.
} else {
// Restoration failed.
}
});
}
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.