检测自己机器上安装了什么应用

https://github.com/danielamitay/iHasApp

iHasApp Framework

The iHasApp iOS Framework allows you to detect installed apps on a user's device.

Detection results can be in the form of an array of detected appIds, or an array of appDictionaries from the iTunes Search API.

Screenshot

Background

Basic Setup

  1. Add the iHasApp subfolder to your project and ensure that it is linked to the project target.
  2. Add #import "iHasApp.h" to the classes in which you wish to access iHasApp.
  3. Initialize and begin detection methods.

Example code:

iHasApp *detectionObject = [iHasApp new];
[detectionObject detectAppDictionariesWithIncremental:^(NSArray *appDictionaries) {
    NSLog(@"Incremental appDictionaries.count: %i", appDictionaries.count);
} withSuccess:^(NSArray *appDictionaries) {
    NSLog(@"Successful appDictionaries.count: %i", appDictionaries.count);
} withFailure:^(NSError *error) {
    NSLog(@"Failure: %@", error.localizedDescription);
}];

Requirements

  • iOS base SDK 5.0+
  • Internet connectivity (optional if schemeApps.json is included)

Note: schemeApps.json only adds ~180kB to your final, compiled IPA

App Store Safe

The iHasApp framework utilizes only public, documented, and non-deprecated APIs. It is completely App Store safe. There are already a number of approved apps on the App Store that have integrated iHasApp.

Like all things, it is always a prudent idea to either ask your users' permission or to include a clause in your EULA.

Example Application

This framework comes with an example application that demonstrates detection initialization and information display.

The iHasAppExample project uses Olivier Poitrey's SDWebImage project to asynchronously display the app icons.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值