-
-
Notifications
You must be signed in to change notification settings - Fork 102
Custom iOS plist file names #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
2514453
008e145
3b491d8
0adfbea
49160a9
39020f9
64cbc24
46879b8
163f94f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -30,10 +30,15 @@ part 'ios.g.dart'; | |||||
|
||||||
@JsonSerializable(anyMap: true, createToJson: false) | ||||||
class IOS with BuildSettingsMixin { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should extend this feature to macos also |
||||||
IOS({Map<String, dynamic> buildSettings = const {}}) { | ||||||
IOS( | ||||||
{Map<String, dynamic> buildSettings = const {}, | ||||||
this.iOSPListFiles = const []}) { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer we set the default Info.plist path file here |
||||||
this.buildSettings = BuildSettingsMixin.iosDefaultBuildSettings; | ||||||
this.buildSettings.addAll(buildSettings); | ||||||
} | ||||||
|
||||||
@JsonKey(disallowNullValue: true, defaultValue: []) | ||||||
final List<String> iOSPListFiles; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
factory IOS.fromJson(Map<String, dynamic> json) => _$IOSFromJson(json); | ||||||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -250,11 +250,28 @@ class Processor extends AbstractProcessor<void> { | |
'ios:icons': () => IOSIconsProcessor( | ||
config: flavorizr, | ||
), | ||
'ios:plist': () => ExistingFileStringProcessor( | ||
K.iOSPListPath, | ||
IOSPListProcessor(config: flavorizr), | ||
config: flavorizr, | ||
), | ||
'ios:plist': () => (flavorizr.app?.ios?.iOSPListFiles != null && | ||
flavorizr.app!.ios!.iOSPListFiles.isNotEmpty | ||
? QueueProcessor( | ||
flavorizr.app!.ios!.iOSPListFiles | ||
.map<ExistingFileStringProcessor>( | ||
(String path) => ExistingFileStringProcessor( | ||
path, | ||
IOSPListProcessor(config: flavorizr), | ||
config: flavorizr, | ||
)) | ||
.toList(), | ||
config: flavorizr, | ||
) | ||
: ExistingFileStringProcessor( | ||
flavorizr.app?.ios != null && | ||
flavorizr.app!.ios!.buildSettings | ||
.containsKey('INFOPLIST_FILE') | ||
? flavorizr.app?.ios?.buildSettings['INFOPLIST_FILE'] | ||
: K.iOSPListPath, | ||
IOSPListProcessor(config: flavorizr), | ||
config: flavorizr, | ||
)) as AbstractProcessor<void>, | ||
Comment on lines
+253
to
+274
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I honestly don't like putting too much logic here as it makes the processor file unreadable. I think it would be better to create another processor that extends a QueueProcessor (you can follow this PR to better understand what I mean) and add the logic there. If the user doesn't define a custom set of info files, the processor should process at least the default one. Question: Why do we need |
||
'ios:launchScreen': () => IOSTargetsLaunchScreenFileProcessor( | ||
'ruby', | ||
K.tempDarwinAddFileScriptPath, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename it to infoFiles?