Thursday, October 13, 2016

Migrating to Swift 2.3 or Swift 3 from Swift 2.2


Xcode 8 has feature to Migrator from 2.2, 2.3 ----> 3.0

Take care of these steps before migrate

1. All Build and test case should be pass on Xcode7.3
2. Project should be have version control otherwise you are able to see the changes after the migration.
3. If your project contains multiple scheme than better to go for two different projects.

Swift 3.0 Migration

When you the xcode 8.0, it will prompted the alert for migration from Swift 2.2 or 2.3 to Swift 3.
Same thing you can do manually also from  edit --> convert ---> To convert swift syntax

Somebody has issue like me,  We wanted to stay 2.3 for time been and release the build from Xcode 8.

Solution is very easy just you have to set "Use legacy Swift build setting" ---> YES 

you'll able to build the project and run into iOS10 devices.


Swift 3.0 Migration Issues

There are many issues come across to you.. like compiler crash or syntax error.. If you don't want to this kind issue than follow above steps

Well there are known issues in Swift 3.0 migration 

1. Swift Standard library
   Migrator failed due to using of indexing methods on SetIndex and DictionaryIndex 


Learn Swift 3.0 in 5 hours





No comments:

Post a Comment