How to know the apps installed in iPhone

纵饮孤独 提交于 2019-12-17 16:33:13

问题


I am developing an application in which i need to find the apps which are already installed in iphone device such as Skype, facebook. I need to check it. Please give me code snippet if possible otherwise a link to get the solution. Is it possible or not.

If this is possible, then how to disable the app also...

Thanks in advance......


回答1:


You can't check for any application, but you can actually check for applications which officialy shared their url scheme.

You can find the biggest database of those url schemes here. Now, how to use? All that we'll need is UIApplication. First, we need check if the iOS can open specific url:

[[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"fb://profile"]];

If this method returns yes then the user has the facebook application installed. To open the following application you need to call:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"fb://profile"]];

Which will open your facebook profile on the facebook application.

Alas, there is no possibility of disabling any other application on the iOS, since each and every third party software is being sandboxed.

Hope this was helpful, Pawel




回答2:


Tapbots does something similar but only with their own apps. They probably keep track of device UDIDs on a server of theirs by communicating with the server using each app, so they are able to show which of their apps are installed on a given device.

As mentioned, this only works for apps you make though, as you'll be the one programming such functionality into your apps. You cannot check the existence of apps made by others.

There are also no public APIs that allow you to disable other apps. And besides, as the others say, apps are all sandboxed to themselves.

By the way... if you're trying to disable those apps because they compete with yours... forget it. The legal implications that can and will follow are not pretty.




回答3:


I don't think it's possible, as a result of being sandboxed into your own application's environment.

And I'm referring to applications in general, not applications made by you (as BoltClock mentioned), since you're referring to the facebook and skype apps, which I imagine aren't yours.




回答4:


I question your reasons for doing this, especially disabling other apps. Apps are sandboxed into their own environment. Anything that breaks this would not be accepted into the App Store.



来源:https://stackoverflow.com/questions/3649201/how-to-know-the-apps-installed-in-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!