XcodeGen
XcodeGen copied to clipboard
feat: let `inferDestinationFiltersByPath` to be smarter
I encountered the following case: I need to 1) add View.swift for all platforms except watchOS and 2) add View_watchOS.swift only for watchOS. (relevant if you create a widget and want View to be different for the mentioned platforms)
inferDestinationFiltersByPath allows you to make the second item, but does not allow the first, so I suggest implementing this behavior.
Of course, it is possible to create only View.swift with the following condition:
#if os(watchOS)
struct View: SwiftUI.View {}
#else
struct View: SwiftUI.View {}
#endif
But View can be big and keeping everything in one file can be inconvenient.
What do you think? Feel free to close this issue as not planned if you feel such a feature would not fit XcodeGen’s philosophy
Thank you!