Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 4, 2022. It is now read-only.

KimDarren/AlternativeIcon-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

6 Commits

Repository files navigation

AlternativeIcon

Since iOS 10.3, it is possible to change the application's icon programmatically. This repository contains simple application demo it.

Screenshot

Demo

Requirements

  • Xcode 8.3 or higher.
  • iOS 10.3 or higher.

How to build.

  1. Install cocoapods (if needed) .
  2. Clone this project.
  3. Redirect to /Project directory.
  4. pod install.
  5. Open AlternativeIconExample.xcworkspace with Xcode.
  6. Build and run on your device or simulator.

Alternate icon, step by step

  • Import your alternative icon files to project file.

    • IMPORTANT I don't know why, but it doesn't support .xcassets.
  • Open your project's Info.plist file.

     <key>CFBundleIcons</key>
     	<dict>
     		<key>CFBundleAlternateIcons</key>
     		<dict>
     			<key>{alternate-icon-key}</key>
     			<dict>
     				<key>CFBundleIconFiles</key>
     				<array>
     					<string>{alternate-icon-file-name}</string>
     				</array>
     				<key>UIPrerenderedIcon</key>
     				<false/>
     			</dict>
     		</dict>
     		<key>CFBundlePrimaryIcon</key>
     		<dict>
     			<key>CFBundleIconFiles</key>
     			<array>
     				<string>{primary-icon-file-name}</string>
     			</array>
     			<key>UIPrerenderedIcon</key>
     			<false/>
     		</dict>
     	</dict>
  • Write some code to set alternative icon.

     UIApplication.shared.setAlternateIconName("alternative-icon-key") { error in
     	// Handle error or do something.
     }

Before submit to App Store.

  • The icon must to be user-choosable.
  • The icon must to be related to your app.
  • Click here to show more details.

Used libraries.

License

AlternativeIcon-Example is available under the MIT license. See the LICENSE file for more info.

About

😱 Change your iOS application's icon programmatically since iOS 10.3

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /