e-sites / Natrium

A pre-build (Swift) script to alter your Xcode project at pre-build-time per environment, build configuration and target.
https://www.e-sites.nl
MIT License
146 stars 15 forks source link

String variables should have `StaticString` type #30

Closed pokryfka closed 3 years ago

pokryfka commented 3 years ago

For example:

        static let testVariableString: StaticString = "debugString"

instead of

        static let testVariableString: String = "debugString"
pokryfka commented 3 years ago

Awesome, thank you!

basvankuijck commented 3 years ago

In addition, since v7.3.0 you should set this in your .natrium.yml:

settings:
   stringType: "StaticString"

stringType defaults to "String"

pokryfka commented 3 years ago

Makes sense, its a breaking change ...

Still I think its very useful to be able to identify string literals. Thank you for the change and this comment, will update settings.