是否可以让备用应用图标动态显示? [英] Is it allowed to let the alternate app icon to be dynamic?

查看:98
本文介绍了是否可以让备用应用图标动态显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从iOS 10.3发布以来,Apple添加了一项新功能,该功能使我们可以使用解决方案

我认为这不可能.

setAlternateIconName(_:completionHandler :) API查找应用包中的图标,并且无法更改为从沙箱中获取.

另外,Apple很可能会查看您捆绑在一起的应用程序图标,以避免使用相同的应用程序图标或类似于Apple应用程序的图标.

引用: https://www.hackingwithswift.com/example-code/uikit/how-to-change-your-app-icon-dynamic-with-setalternateiconname

Since iOS 10.3 has been released, Apple added a new feature which allows us to change the app icon dynamically, by using setAlternateIconName(_:completionHandler:) method. So far, as mentioned in the method documentation, we have to mention the name(s) of the alternate app icon(s) in the project .plist file, assigned to CFBundlePrimaryIcon key.

Actually, when working with static icons (icons that have been added directly to the app main bundle) it works as expected without any problems:

My question is:

Is it possible -or is there a workaround- to set the alternate app icon dynamically (for instance: icons that have been downloaded from the web and saved in the app documents directory)?

解决方案

I don't think its possible.

setAlternateIconName(_:completionHandler:) API looks for the icons inside app bundle and cannot be changed to fetch from sandbox.

Also, most probably Apple reviews the app icons you have bundled for avoiding use of same app icons or icons similar to Apple apps.

Refer: https://www.hackingwithswift.com/example-code/uikit/how-to-change-your-app-icon-dynamically-with-setalternateiconname

这篇关于是否可以让备用应用图标动态显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆