Skip to main content

flutter_icon_composer 1.0.0 copy "flutter_icon_composer: ^1.0.0" to clipboard
flutter_icon_composer: ^1.0.0 copied to clipboard

Installs an Icon Composer .icon bundle (the layered Liquid Glass app icon of iOS 26) into a Flutter app's iOS project: copies it, registers it in project.pbxproj and sets it as the app icon.

An app icon pulled apart into its three Icon Composer layers: a blue fill, a white glyph and a glass sheet, next to the command dart run flutter_icon_composer:install --icon AppIcon.icon

pub.dev: flutter_icon_composer License: MIT Pure Dart command line tool iOS 26 icons, built with Xcode 26 Guide in English and Arabic

English · العربية

flutter_icon_composer #

Put the Liquid Glass app icon you made in Apple's Icon Composer into your Flutter app with one command.

iOS 26 app icons are layered: you design them in Icon Composer, which saves a .icon bundle with your layers and their glass, shadow, dark and tinted settings. Xcode 26 builds that bundle into the app. The awkward part for a Flutter app is getting the bundle into ios/Runner.xcodeproj without opening Xcode. This tool does it:

  1. copies AppIcon.icon into ios/Runner/;
  2. registers it in project.pbxproj (file reference, group, build file, Copy Bundle Resources), with fresh IDs, keeping the file's line endings and everything else as it was;
  3. names it as the app icon (ASSETCATALOG_COMPILER_APPICON_NAME) in every build configuration of the Runner target;
  4. optionally writes the classic AppIcon.appiconset for older iOS and older Xcode.

It is safe to run again: a second run changes nothing. --dry-run shows the plan first.

Want Apple's real Liquid Glass in your screens as well, not only on the icon? See uikit_liquid_glass, from the same author.

Diagram. Left: the AppIcon.icon folder from Icon Composer, with icon.json and Assets/glyph.svg, and its default and dark looks. Middle: one command copies it to ios/Runner/AppIcon.icon and adds four lines to project.pbxproj, a build file, a file reference of type folder.iconcomposer.icon, a Runner group child and a Resources phase line, with ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon. Right: after an Xcode 26 build, iOS 26 shows the default, dark, clear and tinted looks, and iOS 18 shows a flat image Xcode draws from the .icon.

The icons in these images are drawings of the sample icon, to show the idea. They are not screenshots.

Contents #

Quick start #

Save your icon in Icon Composer (File > Save), put the .icon bundle somewhere in your Flutter project, then:

dart pub add dev:flutter_icon_composer
dart run flutter_icon_composer:install --icon assets/icon/AppIcon.icon --dry-run   # look first
dart run flutter_icon_composer:install --icon assets/icon/AppIcon.icon

The tool run twice on a fresh Flutter 3.50 project: the first run copies the icon and adds four entries to project.pbxproj, the second prints Nothing to do

The same output as text
Icon:    AppIcon.icon (1 group, 1 layer; dark settings)
Project: ios/Runner.xcodeproj/project.pbxproj (ios/Runner, classic groups)

  + copy assets/icon/AppIcon.icon -> ios/Runner/AppIcon.icon
  + project.pbxproj: add file reference AppIcon.icon (E47AC0AC09039884B9368C8F)
  + project.pbxproj: add AppIcon.icon to the "Runner" group
  + project.pbxproj: add build file for AppIcon.icon (75FD9FB62D9AC982DA1223B2)
  + project.pbxproj: add AppIcon.icon to the Resources build phase of Runner

Note: iOS 26 and later show AppIcon.icon. For older iOS, Xcode 26 draws the icon images from the .icon at build time.

Done. Build with Xcode 26 or later to see the icon on iOS 26.

Or keep the settings in pubspec.yaml and run it with no arguments:

flutter_icon_composer:
  icon: assets/icon/AppIcon.icon
  # name: AppIcon              # the icon's name in Xcode (default AppIcon)
  # fallback: xcode            # or appiconset, see "Older iOS versions"
  # legacy_image: assets/icon/legacy-1024.png
  # legacy_image_dark: assets/icon/legacy-dark-1024.png
  # legacy_image_tinted: assets/icon/legacy-tinted-1024.png
dart run flutter_icon_composer:install

Run it again whenever you change the icon in Icon Composer: it replaces the copy and leaves the project alone. Commit the result like any other change; git diff ios/ shows exactly what it did.

On Windows or Linux, an .icon bundle is a plain folder (on a Mac, Finder shows it as one file). If someone sends it to you zipped, unzip it first.

What changes in your project #

With the classic Flutter template (every flutter create so far), project.pbxproj gets four lines and nothing else:

/* PBXBuildFile */      75FD…23B2 /* AppIcon.icon in Resources */ = {isa = PBXBuildFile; fileRef = E47A…8C8F /* AppIcon.icon */; };
/* PBXFileReference */  E47A…8C8F /* AppIcon.icon */ = {isa = PBXFileReference; lastKnownFileType = folder.iconcomposer.icon; path = AppIcon.icon; sourceTree = "<group>"; };
/* Runner group */      E47A…8C8F /* AppIcon.icon */,
/* Resources phase */   75FD…23B2 /* AppIcon.icon in Resources */,

These are the same entries Xcode writes when you drag an .icon into the Runner group. The Flutter template already sets ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon, so with the default name the build setting stays as it is. With --name Glass it becomes Glass in Debug, Release and Profile.

  • Xcode 16 synchronized folders. If your Runner folder is a synchronized folder (PBXFileSystemSynchronizedRootGroup, what Xcode's Convert to Folder makes), Xcode picks up files in the folder by itself, so no file entries are added. The tool still sets the build setting, and warns if a membership exception leaves the icon out.
  • Widget and watch extensions in synchronized folders are left alone; only the app target is touched.
  • Half-done installs (an entry added by hand, a reference that is not in the build phase) are completed, not duplicated.
  • Line endings: the file keeps CRLF or LF, as it was.
  • Info.plist: nothing to add. Xcode writes CFBundleIconName itself from the build setting. If your Info.plist sets it to another name, the tool warns you.

Older iOS versions #

The .icon format is new in iOS 26. What iOS 18 and earlier show depends on --fallback:

--fallback iOS 26+ iOS 18 and earlier Status
xcode (default) your .icon images Xcode 26 draws from the same .icon at build time Apple's documented behaviour
appiconset your .icon AppIcon.appiconset from the asset catalog experimental

xcode is the simplest. Apple's Icon Composer guide says Xcode generates the icon images for earlier releases from the .icon, and that it uses the .icon instead of an asset-catalog icon with the same name. Your existing Assets.xcassets/AppIcon.appiconset stays where it is: Xcode 26 ignores it, but Xcode 16 and older still build with it, and flutter build ipa still checks it.

appiconset is for when older iOS should show a different, hand-made image. It sets ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES and adds --enable-icon-stack-fallback-generation=disabled to ASSETCATALOG_OTHER_FLAGS. This recipe comes from developers' reports and real projects, not from Apple's documentation, so check it on an iOS 18 simulator. Running again with --fallback xcode takes the flag out.

New images for the asset catalog. --legacy-image (plus --legacy-dark and --legacy-tinted) writes AppIcon.appiconset from 1024×1024 PNGs, as a single-size set (Xcode makes the other sizes). Icon Composer can export PNG images of each look. The default image must have no transparency, or App Store Connect rejects it; the tool warns you.

Dark, tinted and clear #

You don't need extra files. Icon Composer keeps the dark and tinted looks inside the .icon (as *-specializations entries in icon.json), and iOS 26 makes the clear look from them. The tool copies the bundle as it is and tells you which looks it found. For the classic asset catalog, pass --legacy-dark and --legacy-tinted.

Other tools #

Pick what fits how you make your icon:

You have Look at
Layer images (PNG/SVG), and you want a .icon generated from settings in YAML launcher_icons: it builds the icon.json for you, registers the bundle in the Xcode project, and does Android and the other platforms too
A classic square icon for every platform flutter_launcher_icons. Liquid Glass support is an open pull request there (#650)
A .icon designed in Icon Composer, that should reach the app exactly as you saved it this tool

Flutter itself may add .icon support to its template later (flutter/flutter#191058). This tool only touches iOS and does one job, so it works next to any of the above: run it after them.

Liquid Glass inside your app, too #

The icon is one half of the iOS 26 look; the other half is the glass inside your screens. uikit_liquid_glass, by the same author, puts Apple's own UIGlassEffect and UITabBar into a Flutter app on iOS 26, with a Dart fallback on Android, the web and older iPhones. Guide in English and Arabic: github.com/yahyakhalid/flutter-uikit-liquid-glass.

Use it with an AI agent #

PROMPT.md is a ready-made, self-contained prompt. Open your own Flutter project in Claude Code, Cursor, Copilot, Codex or any coding agent and give it the prompt. The agent finds your .icon, runs the tool with a dry run first, checks the result and tells you what to check in Xcode. If it can't add a dependency, the prompt also explains the manual edit.

Follow the instructions in https://github.com/yahyakhalid/flutter-icon-composer/blob/main/PROMPT.md to install my Icon Composer icon in this app.

Arabic version: PROMPT.ar.md. Agents working on this repository read AGENTS.md.

Options #

-i, --icon=<path>          The .icon bundle saved by Icon Composer.
    --name=<name>          Icon name in Xcode, without .icon. Default: AppIcon.
-p, --project=<dir>        The Flutter project folder. (defaults to ".")
    --target=<name>        The Xcode app target. Default: Runner.
    --fallback             What iOS versions before 26 show.
          [appiconset]     Older iOS use <name>.appiconset instead (experimental).
          [xcode]          Older iOS get images Xcode 26 draws from the .icon (default).
    --legacy-image=<png>   Write <name>.appiconset from this 1024x1024 PNG.
    --legacy-dark=<png>    Dark look for the .appiconset (1024x1024 PNG).
    --legacy-tinted=<png>  Tinted look for the .appiconset (1024x1024 PNG).
    --config=<file>        Read settings from this YAML file instead of pubspec.yaml.
-n, --dry-run              Show what would change, and write nothing.

Settings come from --config, else flutter_icon_composer.yaml, else the flutter_icon_composer: section of pubspec.yaml. Command-line options win. Exit codes: 0 done, 1 error (one readable line on stderr), 64 wrong usage.

The same steps are a small Dart library, for scripts and other tools: installIcon(InstallOptions(...)) does the whole install, and planIconInstall(pbxprojText, iconName: 'AppIcon') returns the edited project.pbxproj text without touching the disk.

What has been tested #

  • Unit tests (dart test, 71 tests) on real project.pbxproj files: a fresh flutter create from Flutter 3.50, an older one (Flutter 2.0, objectVersion = 46), a Runner group next to a synchronized widget-extension folder, and a fully synchronized Runner folder. They check the four entries, unique IDs, idempotency, CRLF and LF, missing settings, half-done installs, the fallback settings and the error messages. The two synchronized fixtures were made by editing the Flutter 3.50 file into the shape Xcode 16 writes; see test/fixtures/README.md.
  • An end-to-end run of dart run flutter_icon_composer:install on a fresh Flutter 3.50 project, on Windows: dry run, install, then a second run that changes nothing.
  • Not yet tested by us: an Xcode 26 build on a Mac that shows the icon. The pbxproj entries match what Xcode writes (compared with real projects that ship a .icon), but until someone builds it, treat that part as unconfirmed. The list below is what to check.

The sample example/AppIcon.icon was written by hand in Icon Composer's file format, to try the tool. Use your own icon for a real app.

Checking it on a Mac #

With Xcode 26 or later:

  1. Run the tool, then open ios/Runner.xcworkspace. In the project navigator, AppIcon.icon is inside Runner with the Icon Composer icon. Runner target > Build Phases > Copy Bundle Resources lists it. General > App Icons shows AppIcon.
  2. flutter build ios --simulator (or run from Xcode). The build has no None of the input catalogs contained a matching … app icon set error. Apple lists the warning Failed to generate flattened icon stack as safe to ignore.
  3. Run on an iOS 26 simulator and look at the Home Screen icon. Then long-press the Home Screen > Edit > Customize and try Dark, Clear and Tinted.
  4. In the built app, Info.plist has CFBundleIconName = AppIcon.
  5. Run on an iOS 18 simulator: the icon shows (drawn by Xcode from the .icon).
  6. Optional: run the tool with --fallback appiconset --legacy-image … and repeat steps 3 and 5. iOS 18 should show the PNG and iOS 26 the .icon.
  7. Make any change in Xcode (so it saves the project), then run the tool again. It should print Nothing to do.
  8. Optional: in Xcode, right-click the Runner group > Convert to Folder, then run the tool again.

If any step fails, please open an issue with the step and the build log.

Limits #

  • iOS only. macOS apps can use .icon too; that is not done yet.
  • One icon for all build configurations. Flavors with a different icon per configuration are not supported yet.
  • One app target: Runner, the only app target, or the one you pass with --target.
  • It does not design or edit the icon. Icon Composer does that. It only reads icon.json to check that the layer images are there and to report the looks.
  • Renaming (--name) adds the new name; it does not delete an old .icon you installed under another name.

License #

MIT.

0
likes
150
points
54
downloads
screenshot

Documentation

Documentation
API reference

Publisher

verified publisherakkadx.com

Weekly Downloads

Installs an Icon Composer .icon bundle (the layered Liquid Glass app icon of iOS 26) into a Flutter app's iOS project: copies it, registers it in project.pbxproj and sets it as the app icon.

Repository (GitHub)
View/report issues

Topics

#icon #ios #liquid-glass #xcode #cli

License

MIT (license)

Dependencies

args, path, yaml

More

Packages that depend on flutter_icon_composer