触发用户删除应用程序时用户注销的方法 - iPad应用程序 [英] Trigger methods to logout user when user deletes app - iPad app

查看:112
本文介绍了触发用户删除应用程序时用户注销的方法 - iPad应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,我已经实现了登录,注销和一些自定义操作。某些操作只有在用户登录时才能执行,但如果用户在登录后删除了应用程序并且没有注销,那么我无法让其他用户知道他不再是用户而且全部只有在此用户再次安装应用程序并登录后,才能执行与登录相关联的操作。

I have an app in which I have implemented login, logout and some customized actions. There are certain actions that can be performed only when user is logged in but if the user deletes the app after he login and without logging out, then there is no way that I can let other users know that he is no more a user and all the actions that are associated with login should be done only after this user installs app again and logs in.

是否有任何方法在应用删除之前被调用?这样我就可以在该函数中触发logout方法。有什么方法可以使用委托方法或通知在用户从他的设备中删除应用程序时注销用户?

Is there any method which gets invoked before the app deletes ? So that I can trigger the logout method in that function. Is there any way where in I can use delegate methods or notifications to logout user when he is deleting the app from his device ?

推荐答案

不幸的是,删除应用程序时没有调用方法。

Unfortunately there are no methods called when app is removed.

我更喜欢一个解决方案,当用户退出应用程序并注销用户时进行安静登录他再次打开应用程序时没有注意到他已经退出了。因此,您需要存储凭据。

I'd prefer a solution where you log out the user when he quits the app and do a quiet login when he opens the app again without noticing that he was logged out. Therefore you need to store the credentials.

因此,您可以确保用户在不使用该应用时始终注销。

So you can ensure that the user is always logged out when he doesn't use the app.

但在我看来,你应该改变你的后端,以便用户是否安装了应用程序并不重要。但这可能取决于您的使用案例。

But in my opinion you should change your backend so that it doesn't matter if the user has installed the app or not. But this may depend on your use case.

这篇关于触发用户删除应用程序时用户注销的方法 - iPad应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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