-
Notifications
You must be signed in to change notification settings - Fork 415
Open
Labels
Description
Description
When using flavor-specific launcher icons with a custom xcodeproj_path
, the tool fails to update the project file despite following the documented flavor configuration pattern (flutter_launcher_icons-<flavor>.yaml
).
Steps to Reproduce
- Create a Flutter project with flavors (dev, hml, prod) and custom iOS project name
- Create flavor-specific icon configuration files following the documentation pattern:
Example flutter_launcher_icons-hml.yaml
:
flutter_launcher_icons:
android: true
ios: true
image_path: "assets/icons/ic_launcher_hml.png"
remove_alpha_ios: true
xcodeproj_path: "ios/MyApp.xcodeproj"
- Run the flavor-specific command:
flutter pub get
dart run flutter_launcher_icons -f flutter_launcher_icons-hml.yaml
Current Behavior
The tool:
- Successfully generates the flavor-specific icons in Assets.xcassets
- Fails with path error, still looking for default Runner.xcodeproj:
✓ Successfully generated launcher icons
Unhandled exception:
PathNotFoundException: Cannot open file, path = 'ios/Runner.xcodeproj/project.pbxproj' (OS Error: No such file or directory, errno = 2)
Expected Behavior
The tool should:
- Generate the flavor-specific icons (currently working)
- Use the specified
xcodeproj_path
for project file updates - Successfully complete the flavor-specific icon update process
Environment
- Flutter version: 3.19.0
- flutter_launcher_icons version: 0.14.3
- Operating System: macOS Sonoma 14.3.1
Additional Context
- The documentation explicitly supports flavors through
flutter_launcher_icons-<flavor>.yaml
files - Icon generation works correctly for flavors
- The issue appears specific to project file updates when using both flavors and custom xcodeproj paths
- Project structure follows Flutter flavor best practices with separate configurations for dev, hml, and prod environments
Related Documentation
From the official documentation:
Create a Flutter Launcher Icons configuration file for your flavor. The config file is called flutter_launcher_icons-.yaml by replacing by the name of your desired flavor.