Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS: Migration (Upgrade) from Swift 3 to Swift 4

Recent major update in iOS application development tool Xcode 9 supports Swift 3.2 & 4 programming language.

I've my app developed with Swift 3 version and I want to convert/migrate, complete source code from Swift 3 to Swift 4. During migration, it's showing me 354 errors.

These errors are fixable. The solution of error is suggested by Xcode itself. But there are 354 errors. How can I fix them all at once? Manual fixing of each error one-by-one will be a time-consuming activity.

Is there any feasible solution to fix all errors at once.

Here is a snapshot with the sample.

enter image description here

like image 583
Krunal Avatar asked Jun 06 '17 13:06

Krunal


1 Answers

We have a better option to fix this error at once. It can be solved out from Editor menu

enter image description here

Use this option to fix all the error at once in class.

Note: You cannot always rely on Xcode suggestions, but for migration case it will work in most of the case.

like image 182
Moin Shirazi Avatar answered Nov 05 '22 05:11

Moin Shirazi