Is it allowed to let the alternate app icon to be dynamic? - ios

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

Related

need to apply dynamic app icon from web in iOS [duplicate]

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

Dynamic App Icon from Plist Swift

I have searched online on how to change your app icon dynamically and all says you would need put the images under project directory. Is there any ways I can get an image from URL from my plist and show it as my app icon?
According to the documentation, you must declare your alternate icons in your app's Info.plist, which is shipped in your app bundle. Since your app bundle is read-only, you can't add/edit entries in your Info.plist, which means it's impossible to download a new app icon from a server and set it as your app's icon

Change App icon in iOS through Custom URL

I know we could change the app icon of the application in iOS 10.3 above and I achieved this successfully, but my question is that could we achieve this using a custom url.
Suppose that the app icon is stored in the backend server and the icon while changed according to the user login in the system. Is it possible?
This is not possible. Any alternate icons must be predefined the the app's info.plist file and are subject to app review.
Check out the documentation here: https://developer.apple.com/documentation/uikit/uiapplication/2806818-setalternateiconname
Apple's Human Interface Guidelines discusses some of the limitations of custom app icons: https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/

Does the CFBundleURLIconFile key have any purpose in iOS?

In an app's Info.plist the developer has the opportunity to declare custom URL schemes supported by the app. The developer may also associate each scheme with an Apple Icon Image (icns) file in the bundle that will serve as an icon.
I have never seen these URL icons used anywhere, and I can't imagine how they even would be used. Is there any purpose to setting them?
That is not an iOS thing, but is instead intended for OS X/macOS.
You can read some about it here on the macOS Human Interface Guidelines page.

In-app preferences screen in an iOS 7 app

I'm fairly new to iOS development and I am porting an Android app to iOS 7. The Android app provides a screen that allows the user to change a number of non persistent settings. Because these are not saved, it doesn't seem appropriate to me to expose them, on iOS, as preferences via a settings bundle and the built-in Settings app. So I'm looking at an in-app settings screen, which I understand is allowed - but perhaps not encouraged - by Apple.
Some questions:
Am I correct that an in-App approach is allowed by Apple? Most example code seems to use settings bundles. Am I going to have problems when the app is submitted to the App Store?
I can put the settings UI in a simple UITableViewController, but is there an approved way to expose this to the user? XCode 5 doesn't provide a settings identifier (and icon) for toolbar buttons, and the "Info" identifier (letter i inside a circle) seems to have been dropped too. Should I use a custom icon? Are there any de facto standards?
I haven't seen this kind of UI element before on iOS but my exposure to the platform as a user is limited.
There is nothing wrong with doing an in-app preference (table)view. You won't be rejected for that (this point seems to be way too much exagerated outside the iOS community). There are guidelines that you can follow: iOS Human Interface Guidelines... or not. As long as you don't use private APIs (assuming you know how to access them anyway), you're fine! So you can use a custom icon, the "i" button, or any UI element that convey the reasonable meaning of providing access to more info/preference.
In your code, you can use the class NSUserDefaults (with the standardUserDefaults) to store your preferences.
Many apps have in-app settings. It's fine. Apple even states that it is fine. Just don't have both.
Use a custom icon. Many apps seem to use an icon that looks like a gear.

Resources