问题描述
在我的 iOS 项目中,我尝试为我的 iOS 应用程序设置备用图标),并且图像文件(icon_1、icon_2、icon_3)在我的项目包中而不是 Assets.xcassets 中。 Info.list 像这样:
<key>CFBundleIcons</key>
<dict>
<key>CFBundleAlternateIcons</key>
<dict>
<key>icon_1</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>icon_1</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
<key>icon_2</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>icon_2</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
<key>icon_3</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>icon_3</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>AppIcon</string>
</array>
</dict>
</dict>
我将备用图标设置为源代码
[[UIApplication sharedApplication] setAlternateIconName:@"icon_1" completionHandler:^(NSError *error) {}
但是,图标不会改变并出现错误
Error Domain=NSOsstatusErrorDomain Code=-54 "The operation Couldn’t be completed."
我该如何解决这个问题?
谢谢:)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)