有沒有一種方法(如果是這樣,如何)獲取給定應用程序包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