Skip to content

Instantly share code, notes, and snippets.

@jauntybrain
Created September 9, 2023 08:02
Show Gist options
  • Save jauntybrain/0213142abd03255e0c12bc24f7f4c279 to your computer and use it in GitHub Desktop.
Save jauntybrain/0213142abd03255e0c12bc24f7f4c279 to your computer and use it in GitHub Desktop.
info.plist implementation with iPad dynamic icons
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTDPLIST1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- ...the rest of info.plist -->
<key>CFBundleIcons</key>
<dict>
<!-- Default app icon -->
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>black</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
<key>CFBundleAlternateIcons</key>
<dict>
<!-- First custom icon - Black -->
<key>black</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>black</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
<!-- Second custom icon - Gradient -->
<key>gradient</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>gradient</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
<!-- Third custom icon - Galaxy -->
<key>galaxy</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>galaxy</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
</dict>
<!-- iPad Icons -->
<key>CFBundleIcons~ipad</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>black</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
<key>CFBundleAlternateIcons</key>
<dict>
<!-- First custom icon - Black -->
<key>black</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>blackIpadPro</string>
<string>blackIpad</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
<!-- Second custom icon - Gradient -->
<key>gradient</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>gradientIpadPro</string>
<string>gradientIpad</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
<!-- Third custom icon - Galaxy -->
<key>galaxy</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>galaxyIpadPro</string>
<string>galaxyIpad</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
</dict>
<!-- ...the rest of info.plist -->
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment