卸载 ReactNative App - 清理用户数据 [英] Uninstall ReactNative App - Clean User Data

查看:58
本文介绍了卸载 ReactNative App - 清理用户数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在卸载时清除保存在 Mobile 中的 User AuthData.AuthData 使用 AsyncStorage 保存.是否有任何机制可以检测 ReactNative 中的应用程序卸载

I want to clean the User AuthData Saved in Mobile upon uninstall. AuthData is saved using AsyncStorage. Is there any mechanism by which I can detect App Uninstall in ReactNative

推荐答案

似乎不可能,特别是如果您的应用在卸载时没有运行.但是,您似乎可以采用几种方法,但都不是完美的.

Doesn't seem possible, especially if your app is not running at the time they uninstall. However, there seems to be a couple approaches you can take, but neither is perfect.

  1. 如果您的应用正在运行,您可以监听 UIApplicationWillTerminateNotification(请参阅 检测即将删除的 iOS 应用程序?)
  2. 使用推送通知反馈服务(参见删除应用时的委托方法)
  1. If your app is running, you can listen for UIApplicationWillTerminateNotification (see Detect iOS application about to delete?)
  2. Use the push notification feedback service (see Delegate Method when Deleting App)

这篇关于卸载 ReactNative App - 清理用户数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆