zoukankan      html  css  js  c++  java
  • 获取已安装app的bundle id

    备注:以下是私有api 苹果审核会被拒绝。

     

    导入头文件

    #import <objc/runtime.h>

    /// 获取其他APP信息(iOS11无效)

    + (NSArray *)getOtherAPPInfo{

        Class lsawsc = objc_getClass("LSApplicationWorkspace");

        NSObject* workspace = [lsawsc performSelector:NSSelectorFromString(@"defaultWorkspace")];

        NSArray *Arr = [workspace performSelector:NSSelectorFromString(@"allInstalledApplications")];

        for (NSString * tmp in Arr)

        {

            NSString * bundleid = @"";

            NSString * target = [tmp description];

            NSArray * arrObj = [target componentsSeparatedByString:@" "];

            if ([arrObj count]>2) {

                bundleid = [arrObj objectAtIndex:2];

            }

            if (![bundleid containsString: @"com.apple."]) {

                NSLog(@"*******  %@  *****",bundleid);

            }

        }

        return Arr;

    }

  • 相关阅读:
    2.2 与球体相交-几何解
    2.1 与球体的交点 -代数解
    2 必要的光线追踪算法=>光线球体的相交和映射
    3.1 Matrix Properties
    chapter 3:Matriices
    4.8 渲染方程
    webstorm 皮肤(Sublime text)设置
    数字键盘(纯js)
    ios中设置readonly还会有光标?
    JS重要的坑
  • 原文地址:https://www.cnblogs.com/huangzs/p/8066046.html
Copyright © 2011-2022 走看看