我正在使用 theos 开发一个锁屏应用程序,部分功能需要手机上某些应用程序的图标图像。我怎样才能获取这些图标图像并将它们显示在手机的锁屏上?
到目前为止,我已经尝试了所有我能想到的方法,并且在跳板标题中进行了搜索,但没有成功。我一直在尝试根据我通过 google 找到的建议从 SBApplication 和 SBIconModel 中检索图像,但我仍然没有运气。
非常感谢任何帮助。谢谢!
最佳答案
在你 %hook 一个类之后,在你正在使用的方法中,如果你试图获取邮件应用程序的图标,请执行以下操作
// Get the SBApplication for the mail app
Class $SBApplicationController = objc_getClass("SBApplicationController");
SBApplication *mailApp = [[$SBApplicationController sharedInstance] applicationWithDisplayIdentifier:@"com.apple.mobilemail"];
// Get the SBApplicationIcon for the mail app
SBApplicationIcon *mailAppIcon = [[objc_getClass("SBApplicationIcon") alloc] initWithApplication:mailApp];
重要的是获得您感兴趣的应用的正确 DisplayIdentifier。
希望对您有所帮助!有问题请喊。
关于iphone - 从跳板获取应用程序图标图像(越狱),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16132031/