[英]How to get start address of the current process and other process's heap from pid?
[英]How to get other application icon from process pid on iOS system?
我已经看到了这个问题:
现在我可以从进程pid获取应用程序路径,然后根据上面的问题,使用代码打击,我无法获得应用程序图标。
NSBundle* bundle = [NSBundle bundleWithPath:apppath];
NSArray *infostmp = [[bundle infoDictionary] objectForKey:@"CFBundleIconFiles"];
if(infostmp){
NSString* iconPath = [[NSString alloc] initWithString:[infostmp objectAtIndex:0]];
UIImage* icon =[UIImage imageWithContentsOfFile:iconPath];
}
您只能在未越狱的iOS设备上(非越狱的iOS设备)获取NSBundle对象,代码如下:NSBundle * bundle = [NSBundle bundleWithPath:apppath]; 得到捆绑是零。 因此,您无法获取该图标。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.