Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法在iOS 11中设置备用应用程序图标_Ios_Swift_Xcode_Xcode9 Beta - Fatal编程技术网

无法在iOS 11中设置备用应用程序图标

无法在iOS 11中设置备用应用程序图标,ios,swift,xcode,xcode9-beta,Ios,Swift,Xcode,Xcode9 Beta,我无法在iOS 11中将应用程序的图标更改为备用图标(Xcode 9,beta 3) 但是,它在iOS 10.3中运行良好(使用以下代码): 我的plist设置如下: 我觉得这很奇怪,因为我在iOS 11中使用过其他使用备用应用图标的应用程序。iOS 11中是否存在已知的bug 注意:如果您想知道我为什么要使用延迟,我通过在ViewController中实现它来解决这个问题,而不是在AppDelegate的appDidFinishLaunchingWithOptions中实现它 正如相关问题/

我无法在iOS 11中将应用程序的图标更改为备用图标(Xcode 9,beta 3)

但是,它在iOS 10.3中运行良好(使用以下代码):

我的plist设置如下:

我觉得这很奇怪,因为我在iOS 11中使用过其他使用备用应用图标的应用程序。iOS 11中是否存在已知的bug


注意:如果您想知道我为什么要使用延迟,我通过在ViewController中实现它来解决这个问题,而不是在AppDelegate的appDidFinishLaunchingWithOptions中实现它


正如相关问题/答案所指出的那样,仍然需要在延迟内运行它才能正常工作。

如果这没有帮助,请禁用应用程序图标资产。这对我有帮助。
我猜资产和plist图标之间存在一些冲突。

您是否预先检查了
支持salternaicons
?我认为如果提供plist值(如图所示),那么这是一个只读属性
    if #available(iOS 10.3, *) {
        guard let iconName = MySingletonClass.sharedInstance.iconName() else { return }
        delay(0.01) {
            UIApplication.shared.setAlternateIconName(iconName, completionHandler: { (error) in
                if let error = error {
                    print(error.localizedDescription)
                } else {
                    print("Success!")
                }
            })
        }
    } else {
        // Fallback on earlier versions
    }