[iOS] [WK2] Modernize code for applying autocorrection