如何获取您的iPhone应用程序列表

时间:2023-01-12 20:06:49

How can i get a list of all my iphone apps (even pointers for each app will be helpful)?

如何获得我所有的iphone应用程序列表(甚至每个应用程序的指针都会有帮助)?

I'm developing an app which contain some screen that should have a list of all my installed apps (with their icon) and the option to select one to launch it in the future depends in other function of mine.

我正在开发一个应用程序,其中包含一些屏幕应该包含我所有已安装应用程序的列表(带有它们的图标),并且选择一个用于将来启动它的选项取决于我的其他功能。

Thanks alot!

非常感谢!

3 个解决方案

#1


2  

There's no way to accomplish this, because each app is sandboxed.

没有办法实现这一点,因为每个应用程序都是沙箱。

You would be able to determine if select apps are installed if they have custom URL schemes. For example, the Facebook app can be launched with the custom url scheme "fb://", but these aren't guaranteed to be unique, so a different app could use a scheme that's well known to belong to another app. Also not all apps have a custom URL scheme, and you would need some master list (that would need to be constantly updated to be accurate) to check for the presence of each. So you could maybe detect a select list of well-known apps with custom URL schemes, but never get a list of all of them.

如果他们有自定义URL方案,您将能够确定是否安装了选定的应用程序。例如,Facebook应用程序可以使用自定义URL方案“fb://”启动,但这些不保证是唯一的,因此不同的应用程序可以使用众所周知属于另一个应用程序的方案。此外,并非所有应用程序都有自定义URL方案,您需要一些主列表(需要不断更新才能准确)以检查每个应用程序是否存在。因此,您可以使用自定义URL方案检测已知应用程序的选择列表,但永远不会获得所有这些应用程序列表。

If you just wanted to detect your own apps, you could have custom URL schemes that are almost certainly going to be unique set for each app, and check for those.

如果您只是想检测自己的应用程序,那么您可以拥有自定义URL方案,这些方案几乎肯定会为每个应用程序设置唯一,并检查这些方案。

You could also jailbreak your device, but I'm assuming you want this functionality in an app that is distributed on the app store, so you wouldn't be able to add functionality that requires a jailbreak to work.

您也可以越狱您的设备,但我假设您希望在应用商店中分发的应用中使用此功能,因此您将无法添加需要越狱才能运行的功能。

EDIT:

编辑:

Here's an example showing detection of the Facebook app being installed:

这是一个示例,显示正在安装的Facebook应用程序的检测:

if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"fb://"]])
{
    // Handle the Facebook app being installed
}

Note however, this won't give you any information about the app. Any app developer could add the "fb://" custom url scheme to their app, which would make this falsely detect it.

但请注意,这不会为您提供有关该应用的任何信息。任何应用开发者都可以将“fb://”自定义网址方案添加到他们的应用中,这会使其错误地检测到它。

If you want to find lists of custom url schemes for iOS apps, just search in Google.

如果您想查找iOS应用的自定义网址方案列表,只需在Google中进行搜索即可。

#2


0  

another way to look at this is to present the user with all of your app in the appstore. If they have any apps installed on their device then in iOS 7 they will see a button called "Open" next to each of them.

另一种看待这种情况的方法是向用户展示appstore中的所有应用。如果他们的设备上安装了任何应用程序,那么在iOS 7中,他们会在每个应用程序旁边看到一个名为“打开”的按钮。

For example you can have a UITableViewCell or a UIButton that says "Checkout Our Apps". In the code you would add this.

例如,您可以使用UITableViewCell或UIButton,其中显示“Checkout Our Apps”。在代码中,您将添加此内容。

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms://itunes.com/apps/sixaxisllc"]];

Replace SixAxis LLC with your iTunes developer name and when users click on it, it will launch AppStore app with only your apps are shown. (With Open or price amount next to each of them)

将SixAxis LLC替换为您的iTunes开发者名称,当用户点击它时,它将启动AppStore应用程序,只显示您的应用程序。 (每个旁边都有未结或价格金额)

NOTE: test this on actual device and not in simulator

注意:在实际设备上测试,而不是在模拟器中测试

如何获取您的iPhone应用程序列表

#3


0  

Because of the Sandboxed environment, all you can do is test if it you can open a custom URL. Akosma Software maintains a list of popular Url on his wiki: IPhone URL Schemes.

由于Sandboxed环境,您可以做的就是测试是否可以打开自定义URL。 Akosma Software在他的维基上维护着一个流行的Url列表:IPhone URL Schemes。

#1


2  

There's no way to accomplish this, because each app is sandboxed.

没有办法实现这一点,因为每个应用程序都是沙箱。

You would be able to determine if select apps are installed if they have custom URL schemes. For example, the Facebook app can be launched with the custom url scheme "fb://", but these aren't guaranteed to be unique, so a different app could use a scheme that's well known to belong to another app. Also not all apps have a custom URL scheme, and you would need some master list (that would need to be constantly updated to be accurate) to check for the presence of each. So you could maybe detect a select list of well-known apps with custom URL schemes, but never get a list of all of them.

如果他们有自定义URL方案,您将能够确定是否安装了选定的应用程序。例如,Facebook应用程序可以使用自定义URL方案“fb://”启动,但这些不保证是唯一的,因此不同的应用程序可以使用众所周知属于另一个应用程序的方案。此外,并非所有应用程序都有自定义URL方案,您需要一些主列表(需要不断更新才能准确)以检查每个应用程序是否存在。因此,您可以使用自定义URL方案检测已知应用程序的选择列表,但永远不会获得所有这些应用程序列表。

If you just wanted to detect your own apps, you could have custom URL schemes that are almost certainly going to be unique set for each app, and check for those.

如果您只是想检测自己的应用程序,那么您可以拥有自定义URL方案,这些方案几乎肯定会为每个应用程序设置唯一,并检查这些方案。

You could also jailbreak your device, but I'm assuming you want this functionality in an app that is distributed on the app store, so you wouldn't be able to add functionality that requires a jailbreak to work.

您也可以越狱您的设备,但我假设您希望在应用商店中分发的应用中使用此功能,因此您将无法添加需要越狱才能运行的功能。

EDIT:

编辑:

Here's an example showing detection of the Facebook app being installed:

这是一个示例,显示正在安装的Facebook应用程序的检测:

if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"fb://"]])
{
    // Handle the Facebook app being installed
}

Note however, this won't give you any information about the app. Any app developer could add the "fb://" custom url scheme to their app, which would make this falsely detect it.

但请注意,这不会为您提供有关该应用的任何信息。任何应用开发者都可以将“fb://”自定义网址方案添加到他们的应用中,这会使其错误地检测到它。

If you want to find lists of custom url schemes for iOS apps, just search in Google.

如果您想查找iOS应用的自定义网址方案列表,只需在Google中进行搜索即可。

#2


0  

another way to look at this is to present the user with all of your app in the appstore. If they have any apps installed on their device then in iOS 7 they will see a button called "Open" next to each of them.

另一种看待这种情况的方法是向用户展示appstore中的所有应用。如果他们的设备上安装了任何应用程序,那么在iOS 7中,他们会在每个应用程序旁边看到一个名为“打开”的按钮。

For example you can have a UITableViewCell or a UIButton that says "Checkout Our Apps". In the code you would add this.

例如,您可以使用UITableViewCell或UIButton,其中显示“Checkout Our Apps”。在代码中,您将添加此内容。

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms://itunes.com/apps/sixaxisllc"]];

Replace SixAxis LLC with your iTunes developer name and when users click on it, it will launch AppStore app with only your apps are shown. (With Open or price amount next to each of them)

将SixAxis LLC替换为您的iTunes开发者名称,当用户点击它时,它将启动AppStore应用程序,只显示您的应用程序。 (每个旁边都有未结或价格金额)

NOTE: test this on actual device and not in simulator

注意:在实际设备上测试,而不是在模拟器中测试

如何获取您的iPhone应用程序列表

#3


0  

Because of the Sandboxed environment, all you can do is test if it you can open a custom URL. Akosma Software maintains a list of popular Url on his wiki: IPhone URL Schemes.

由于Sandboxed环境,您可以做的就是测试是否可以打开自定义URL。 Akosma Software在他的维基上维护着一个流行的Url列表:IPhone URL Schemes。