When I build and deploy to an iPhone, I can call UIApplication.shared.setAlternateIconName
just fine. When I run on an iPad Pro, I get the following error:
Error Domain=NSCocoaErrorDomain Code=4 "The file doesn’t exist." UserInfo={NSUnderlyingError=0x1c0857700 {Error Domain=LSApplicationWorkspaceErrorDomain Code=-105 "iconName not found in CFBundleAlternateIcons entry" UserInfo={NSLocalizedDescription=iconName not found in CFBundleAlternateIcons entry}}}
Using the following code:
UIApplication.shared.setAlternateIconName(icons[indexPath.row].name) { err in
if let err = err {
print("Woops ! \(String(describing: err))")
}
}
I have standard, 2x, and 3x versions of each icon ranging from 60x60, 120x120, and 180x180. These images are placed loosely in the project, not in an assets bundle.They are referenced in my Info.plist.
What is going on? Why is there a difference between iPhone and iPad?