有没有一种方法(如果是这样,如何)获取给定应用程序包ID的图标。假设我有一个UIImage
,我想包含与facebook应用程序相关的图标(如果这些图标安装在我的iOS设备上)。捆绑图标给定包ID
1
A
回答
0
从用户的应用程序访问数据是在生产中的应用是不可能的,因为苹果公司提供了iOS应用程序编程指南中的明确和彻底的定义:
For security reasons, iOS restricts each application (including its preferences and data) to a unique location in the file system. This restriction is part of the security feature known as the application’s sandbox. The sandbox is a set of fine-grained controls limiting an application’s access to files, preferences, network resources, hardware, and so on. Each application has access to the contents of its own sandbox but cannot access other applications’ sandbox.
(Link)
虽然理论上是可能的在实践中,它肯定会被禁止访问iOS App Store,因为它会直接违背上述准则。
4
您可以使用私有API。这对于内部应用程序可能很有用。
@interface UIImage (UIApplicationIconPrivate)
/*
@param format
0 - 29x29
1 - 40x40
2 - 62x62
3 - 42x42
4 - 37x48
5 - 37x48
6 - 82x82
7 - 62x62
8 - 20x20
9 - 37x48
10 - 37x48
11 - 122x122
12 - 58x58
*/
+ (UIImage *)_applicationIconImageForBundleIdentifier:(NSString *)bundleIdentifier format:(int)format;
@end
相关问题
- 1. OSGi包在指定捆绑包上拾取系统捆绑包
- 2. 捆绑包ID问题 - 我无法获得Xcode捆绑包ID和iTunes连接ID以反映相同的ID
- 3. 捆绑ID后缀与info.plist中的捆绑标识相同吗?
- 4. 如何更改iTunes中的现有捆绑包ID连接项目中的新捆绑包标识
- 5. 捆绑包不TideSDK
- 6. iTunes Connect捆绑ID问题
- 7. webpack捆绑包大小vs requirejs捆绑包大小
- 8. 捆绑标识符
- 9. 捆绑标识符与之前的捆绑标识符不同
- 10. TextMate的捆绑文档图标
- 11. 捆绑惯于包括
- 12. 正确捆绑datatables.net.core NuGet包
- 13. 捆绑安装 - 部署和捆绑包的区别是什么
- 14. ASP.NET捆绑 - 将生成的捆绑包保存到磁盘
- 15. RequireJS捆绑包配置与捆绑模块
- 16. 如何静默卸载捆绑在wix捆绑包中的InstallShield.exe?
- 17. 删除捆绑商标志
- 18. Ruby(捆绑包安装,捆绑包更新)FAILS无法安装宝石http_parser.rb,eventmachine
- 19. 捆绑ID后缀?它是什么?
- 20. 通配符捆绑ID错误的Xcode
- 21. iTunesConnect捆绑ID吓我一跳
- 22. Magento捆绑产品从产品ID
- 23. iTunes上的捆绑ID连接?
- 24. iPhone多个目标LITE和推送通知的捆绑ID
- 25. 试图用ExtractTextPlugin捆绑CSS
- 26. 意图和捆绑关系
- 27. 试图捆绑第一个React应用程序 - 捆绑太大
- 28. 玩!为textmate捆绑给我错误
- 29. OSX Keynote文件是捆绑包,你可以像捆绑文件夹一样捆绑吗?
- 30. 捆绑-ManifestVersion = 2对比捆绑-ManifestVersion = 1
这将涉及到的代码,将有机会获得您的沙箱之外,更可能会在应用程序商店审查程序被阻止。您可能需要考虑尝试从第三方来源(如http://appshopper.com/)获取图标,并获得他们的许可。 – Joe 2011-03-28 21:41:25