For a given file A.m we want to create a file A.swift to replace it:
- Create
A.swift with the right properties and intializers
- Port methods (from private utility methods to public ones*)
- write the swift version of method
foo in A.swift, not necessarily improving the code, but just translating it from objc to swift
- remove
foo in A.m
- stage new method in swift change and deleted lines only in
A.m
- commit changes: Converting
foo to swift
- undo removal of
foo in A.m
- move to the next method
- Replace usages of
A.m for A.swif in the source code (and commit)
- Remove
A.m and A.h from the project
- Fix any remaining compile error
- Improve the current existing swift code and commit changes by one
Then reviewing the changes will be way easier by commit, as only the relevant conversions are set.
*: start with the private methods that don’t depend on other methods
For a given file
A.mwe want to create a fileA.swiftto replace it:A.swiftwith the right properties and intializersfooinA.swift, not necessarily improving the code, but just translating it from objc to swiftfooinA.mA.mfooto swiftfooinA.mA.mforA.swifin the source code (and commit)A.mandA.hfrom the projectThen reviewing the changes will be way easier by commit, as only the relevant conversions are set.
*: start with the private methods that don’t depend on other methods