- Read about dynamic dispatch and performance https://developer.apple.com/swift/blog/?id=27, Whether this will make big difference for you depends on whether you have WMO enabled etc.
- Configure Sourcery https://github.com/krzysztofzablocki/Sourcery
- Copy above
FindFinalClasses.swift
to your templates folder with.swiftemplate
extension - Run Sourcery
chmod +x YourOutputFolder/FindFinalClasses.generated.swift
- Run the file as executable
./YourOutputFolder/FindFinalClasses.generated.swift
All top level classes (not supporting nested ones for now) that aren't open
or final
already will become final
.
should extension be
swifttemplate
instead ofswiftemplate
?