iPhone - Change app icon pointed to by info.plist within the application?

梦想的初衷 提交于 2019-11-28 07:52:54

问题


Is there any way to change the 47x47 PNG, pointed to within info.plist, for the iPhone springboard icon from within code?

I understand I can add a translation and change the springboard icon per language that the iPhone supports via a changed info.plist per language, but I would like to change the springboard icon for my iPhone app based on a user preference within the app.

Any ideas?

I haven't tried this, but can a file be copied over another within an app bundle? Could I ship with info.plist pointing to "base.png" then replace "base.png" with another PNG I package with my app from within code?

Thanks.

--Batgar


回答1:


This cannot be done - an iPhone application main bundle is read only, so you cannot change your app icon from within your app.




回答2:


What you want to do is create a new target (with the relevant icon) for each "sister" app and that will allow you to compile multiple apps using the same code base. Hope this helps!



来源:https://stackoverflow.com/questions/1223787/iphone-change-app-icon-pointed-to-by-info-plist-within-the-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!