简体   繁体   English

android 和 ios 应用订阅检查反应原生

[英]android and ios app subscription checking in react native

I'm creating app that is only available on subscription, no free or trial version.我正在创建仅适用于订阅的应用程序,没有免费或试用版。 In react native, how do I check if the user has a valid active subscription?在 React Native 中,如何检查用户是否具有有效的活动订阅? Is there any api I need to call?有我需要调用的api吗?

On the app load or login time, I want to check if the user still has valid subscription and if not just not let the user to login into app.在应用加载或登录时,我想检查用户是否仍有有效订阅,如果不是,则不让用户登录应用。

Another question I have is do I even need to do this?我的另一个问题是我什至需要这样做吗? Does android or ios automatically uninstall or restrict access to app if the subscription is expired?如果订阅过期,android或ios是否会自动卸载或限制对应用程序的访问?

To sell subscriptions or products in a React Native App use the react-native-iap library.要在 React Native App 中销售订阅或产品,请使用react-native-iap库。

After implementing it rightly and buying a subscription you can use the getAvailablePurchases function to get list of the bough products by the users.在正确实施并购买订阅后,您可以使用 getAvailablePurchases 函数来获取用户的树枝产品列表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM