I can read that changing the app icon programmatically at runtime is not possible, at least since iOS 3.0.
But... I regulary can see on "App" websites apps that can put icons on the springboard. The first I remember is that kind of app that you give a friend's picture from your album, and it creates an icon so you can call him just clicking on that icon:
http://itunes.apple.com/fr/app/speedtouch-the-best-home-screen/id378360978?mt=8
http://itunes.apple.com/fr/app/desktop-shortcut/id421701004?mt=8
http://itunes.apple.com/fr/app/appbutler-app-organizer/id327391626?mt=8
http://itunes.apple.com/fr/app/tap4music/id365578914?mt=8
So I guess, is it still impossible to change the app icon programmatically at runtime?
Update
Apple have changed this, you can do this now: https://developer.apple.com/documentation/uikit/uiapplication/2806818-setalternateiconname
Original Answer
What you're thinking of here are WebClips, which are basically shortcuts to websites on the home screen. An actual application cannot change it's icon at runtime, as it's defined in the static Info.plist file.
The only exception to this rule is Newsstand applications.
This is now possible in iOS 10.3 using the UIApplication.setAlternateIconName(_:completionHandler:) API.
See my answer to this question: https://stackoverflow.com/a/44966454/233602
Changing your actual icon (other than, e.g, badging) would require changing the app bundle. I'm pretty sure that you don't have write access to the bundle, and in any event this should change the code signature, causing the OS to prevent launching.
So, no. Apps can put links to web sites, but not change their own app.
Related
I'm building an app which would have to have the ability to show my own views on the iPhone lock screen. I've seen lots of apps which let you customize the lockscreen and so forth and these were App Store apps so i'm guessing it has to possible.
I just can't figure out what to use in the iOS SDK to even try implementing this.
Oh and P.S: same goes for wallpapers—can we change this from inside our app?
It can be changed programmatically (change to SpringBoard), but it won't make the way to the (official) AppStore. So if you want to build an app that can change something like the lock screen wallpaper or the ring tone which you usually need the Settings app for, you have to publish your application via Cydia, not Apple's store.
For a sample code block, see this answer.
Just wondering if it's possible to add a button like the "Clear History", "Clear Cookies" etc buttons in the Safari preferences to your own app's settings bundle? Been digging through the dev docs and can't find any plist specifier for a button, so I'm wondering if this is an internal API for the Apple guys?
After you hit the button, you get an action sheet asking you whether you really want to do it, and then presumably there is some callback based on the user's input.
Also noticed that the Nike + iPod settings have a clear button in them, but again, that app might have access to internal APIs that we don't.
No, this is not possible. The system only supports interacting with the values from within your app. You can't run code from the settings app so a button would be useless.
Nike+iPod is a root application. Anything running under root can run code from basically anywhere (with restrictions, Sandbox is a b**ch) If you're interested you can make a jailbreak preferencebundle with Theos or iOSOpenDev! Which allows you to make a root bundle that can run button action code.
iOSOpenDev, which extends Xcode for iOS jailbreak-style project development, provides project templates that have a check boxes to include either a simple PreferenceLoader (plist-based) or a full PreferenceLoader bundle.
I would like to know if the app icon on the iPhone can be slightly different than the one shown in a large version in Apple's App Store.
It was discussed in short here: Tips for a successful AppStore submission?
But I wanted to make sure if anyone has more experience with that.
To give an example: The New York Times has many words incorporated in its app icon (see http://itunes.apple.com/de/app/nytimes/id284862083?mt=8). Would it be okay to have a full black colored background without the words in the small/homescreen version of the icon?
I had one application (RefFinder) rejected just because the two didn't match. But they were quite different; I guess it's OK if they're only slightly different.
yes i have submit couple of application with different app icon and big application icon on App store.
Here is one example: http://itunes.apple.com/us/app/the-business-credit-blueprint/id360499998?mt=8
They can be different, but they have to accomplish the same design. I mean, they have to be recognized as the same applications (same colors, fonts.. same feeling)
You could achieve this using the new UIApplication.setAlternateIconName(_:completionHandler:) API in iOS 10.3 to change the app icon at runtime.
Note you need to ship the updated app icon as part of the app bundle however.
I am new to iPhone programming.
I created an application in Xcode. I want to change the application name and icon. However I can change the application name (which is appeared below the icon of application in iPhone) and icon from plist.
I want to ask that whether there are any other method or trick which i can use to change the icon and application name.
My project requirement is that end user want to change application name and icon frequently
As far as I know there is absolutely no way for the end user to change the application name or icon of applicaitons distributed via the App Store. I believe it would be possible to do this on jailbroken phones, but I'm not an expert in that area.
Jay is correct. You need to specify an icon and name for your app in the info.plist file. Those values can't be changed dynamically. If you want to change the name or the icon, you would need to fix them in xcode and submit an update to Apple for approval.
__mike
I disagree with the above answers.
Please go take a look at the free app on Itune, "OneTap" (or "onetap")
you will see that you can create a dynamicly new app with your own icon image.
There's definitely an app in cydia to accomplish this but you must jailbreak your iPhone or iPod touch
It seems like Info.plist file has an ability to declare different roles for the same application bundle through the UIRoleInfo key. SpringBoard can recognize these roles after installing an app and may display separate icons for each application role.
For instance, iPhone shows MobileSlideShow.app as 2 different programs: Photos and Camera.
Unfortunately, there is no official Apple documentation about the subject at the moment. Would anybody advise how to organize the same behavior in a custom app?
This feature is going to be used in the Enterprise product for ad hoc distribution.
This isn't a supported feature, so if you do this you might have a hard time getting your app through the approval process. I wouldn't recommend using it.
Have you tried it to see if it works? If it doesn't work, you could create a second app that does nothing but launch the first one, with a custom URL scheme. The first app can recognize when it is being launched with that URL. This is not ideal as you will see the second app launch & quit (though it should be really fast).