如何以编程方式从iphone设备中删除应用程序? [重复]

时间:2021-01-30 20:51:28

Possible Duplicate:
Programmatically delete my own app

可能重复:以编程方式删除我自己的应用程序

Currently i am working on a iphone application and one of the critical requirement of the application is if a user cannot successfully authenticate after 5 attempts, the application is removed from the user’s iphone.

目前我正在开发iphone应用程序,该应用程序的一个关键要求是,如果用户在5次尝试后无法成功进行身份验证,则应用程序将从用户的iphone中删除。

Please suggest me how can i achieve this goal.

请建议我如何实现这一目标。

Thanks in advance.

提前致谢。

7 个解决方案

#1


4  

Being able to alter things outside of the application's own sandbox is a huge security risk that Apple (understandably) has not allowed. Therefore you will not be able to do this. The best you can do is store the result in a persistent value and not allow to app to continue after launching. For bonus points, you can store this value in the iOS keychain so that it will persist between installs if you like, then the user will be forced to reset their ios device to factory defaults to be able to use it again.

能够改变应用程序自己的沙箱之外的东西是Apple(可以理解)不允许的巨大安全风险。因此,您将无法做到这一点。您可以做的最好的事情是将结果存储在持久值中,并且不允许应用程序在启动后继续。对于奖励积分,您可以将此值存储在iOS钥匙串中,以便它可以在安装之间保留,如果您愿意,那么用户将*将其ios设备重置为出厂默认设置,以便能够再次使用它。

#2


1  

Can't be done. The best you can do is to make your app stop functioning after five failed authentication attempts.

无法做到。您可以做的最好的事情是在五次失败的身份验证尝试后让您的应用停止运行。

#3


1  

you cant. the only one who can have this privilige is the user. You could just make the app to not open anymore, making the user angry and then deleting it afterwards.

你不能。唯一能够拥有这种特权的人就是用户。你可以让应用程序不再打开,让用户生气,然后删除它。

#4


0  

Its not possible. You should handle it programmatically like locking the application. Once user is failed for 5 attempts, change your startup viewcontroller and do not allow the user to navigate any where else. Here you can display some message to delete the app.

这是不可能的。您应该以编程方式处理它,如锁定应用程序。一旦用户尝试5次失败,请更改启动视图控制器,并且不允许用户导航到其他任何位置。在这里,您可以显示一些消息来删除该应用。

#5


0  

An application, installed in a non-jailbroken device, is a sandboxed eco-system. If your app is for App Store, this thing cannot be done. If this app is for a JB device (for In-House apps would be possible, but I think you need root permissions to delete apps), try to remove the app file from disk after the app has gone on background (but I'm quite sure files are locked, so you'll not be able to do it). If this approach, as I guess, doesn't work due to locked files, you can try to search for private APIs.

安装在非越狱设备中的应用程序是沙盒生态系统。如果您的应用程序适用于App Store,则无法完成此操作。如果这个应用程序是用于JB设备(对于内部应用程序是可能的,但我认为您需要root权限来删除应用程序),请尝试在应用程序运行后从磁盘中删除应用程序文件(但我是非常确定文件是锁定的,所以你将无法做到这一点。如果我认为这种方法由于锁定文件而无效,您可以尝试搜索私有API。

#6


0  

It's not possible. You only solution is lock the app if authentication not success.

这是不可能的。如果身份验证不成功,您只有解锁才能锁定应用程序。

#7


0  

No, it's not possible. Can remove applications from the device

不,这是不可能的。可以从设备中删除应用程序

#1


4  

Being able to alter things outside of the application's own sandbox is a huge security risk that Apple (understandably) has not allowed. Therefore you will not be able to do this. The best you can do is store the result in a persistent value and not allow to app to continue after launching. For bonus points, you can store this value in the iOS keychain so that it will persist between installs if you like, then the user will be forced to reset their ios device to factory defaults to be able to use it again.

能够改变应用程序自己的沙箱之外的东西是Apple(可以理解)不允许的巨大安全风险。因此,您将无法做到这一点。您可以做的最好的事情是将结果存储在持久值中,并且不允许应用程序在启动后继续。对于奖励积分,您可以将此值存储在iOS钥匙串中,以便它可以在安装之间保留,如果您愿意,那么用户将*将其ios设备重置为出厂默认设置,以便能够再次使用它。

#2


1  

Can't be done. The best you can do is to make your app stop functioning after five failed authentication attempts.

无法做到。您可以做的最好的事情是在五次失败的身份验证尝试后让您的应用停止运行。

#3


1  

you cant. the only one who can have this privilige is the user. You could just make the app to not open anymore, making the user angry and then deleting it afterwards.

你不能。唯一能够拥有这种特权的人就是用户。你可以让应用程序不再打开,让用户生气,然后删除它。

#4


0  

Its not possible. You should handle it programmatically like locking the application. Once user is failed for 5 attempts, change your startup viewcontroller and do not allow the user to navigate any where else. Here you can display some message to delete the app.

这是不可能的。您应该以编程方式处理它,如锁定应用程序。一旦用户尝试5次失败,请更改启动视图控制器,并且不允许用户导航到其他任何位置。在这里,您可以显示一些消息来删除该应用。

#5


0  

An application, installed in a non-jailbroken device, is a sandboxed eco-system. If your app is for App Store, this thing cannot be done. If this app is for a JB device (for In-House apps would be possible, but I think you need root permissions to delete apps), try to remove the app file from disk after the app has gone on background (but I'm quite sure files are locked, so you'll not be able to do it). If this approach, as I guess, doesn't work due to locked files, you can try to search for private APIs.

安装在非越狱设备中的应用程序是沙盒生态系统。如果您的应用程序适用于App Store,则无法完成此操作。如果这个应用程序是用于JB设备(对于内部应用程序是可能的,但我认为您需要root权限来删除应用程序),请尝试在应用程序运行后从磁盘中删除应用程序文件(但我是非常确定文件是锁定的,所以你将无法做到这一点。如果我认为这种方法由于锁定文件而无效,您可以尝试搜索私有API。

#6


0  

It's not possible. You only solution is lock the app if authentication not success.

这是不可能的。如果身份验证不成功,您只有解锁才能锁定应用程序。

#7


0  

No, it's not possible. Can remove applications from the device

不,这是不可能的。可以从设备中删除应用程序