You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Temporarily I've made this script with many more to adjust flavorizr to our internal processes and necessities:
import'dart:io';
import'package:flutter_flavorizr/src/parser/parser.dart';
import'package:yaml/yaml.dart';
Future<void> main() async {
await_fixLaunchIcons();
}
List<FlavorizrData> getFlavorizrData() {
Parser parser =constParser(
pubspecPath:'pubspec.yaml',
flavorizrPath: flavorizrPath,
);
final config = parser.parse();
return config.flavors.entries.map(_extractFlavorData).toList();
}
Future<void> _fixLaunchIcons() async {
final flavors =getFlavorizrData();
final contentsJSON =awaitFile(
'ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json',
).readAsString();
for (final flavor in flavors) {
final flavorName = flavor.name;
awaitFile(
'ios/Runner/Assets.xcassets/${flavorName}AppIcon.appiconset/Contents.json',
).writeAsString(contentsJSON);
}
}
if it's of any help to any of you, run it after running flavorizr (be it on the ci or your local machine that will solve your problem whilst it's not fixed on the lib)
Expected with contents.json:
Actual without contents.json:
Causing:
The text was updated successfully, but these errors were encountered: