我看过这个问题:
现在我可以从进程 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];
}