as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
跳转到主要内容
useIapUserData(getUserDataRequest: UserDataRequest): { iapUserDataLoading: any; iapUserDataError: any; iapUserData: any; }
useIapUserData hook should be called in your main screen component. This hook automatically invokes getUserData API and populates states during main screen launch and App state transitions from BG -> FG. “iapUserData” state returned by this hook will help you to make sure that you retrieve the receipts for the current user account. This hook handles case where the user switched account when your app went to background. State “iapUserData” will be populated when the app comes to foreground and would trigger your logic to retrieve receipts for the current user.

Parameters

getUserDataRequest

UserDataRequest User Data request parameters

Returns

{ iapUserDataLoading: any; iapUserDataError: any; iapUserData: any; } States and value of user data
最后修改于 2026年8月25日