SlideShare a Scribd company logo
1 of 20
Tips for Migration from
Swift 2.2 to Swift 3.0
Swift 2.2 is no longer support
After Apple released XCode 8.2 in Sept 2016, swift project will need to force
upgrade to Swift 2.3 or Swift 3.0
Anyway, you still can upload ipa by using XCode 7, but not guarantee you can
pass Apple review approval.
Case Study
WalkingApp - written in swift 2.2
A bunch of third party library integrated including Objective-C, Swift and custom own library.
(Alamofire, SwiftFlux, Charts, XMPPFramework, SugarRecord, Realm, DeepLinkKit, SwaggerClient, etc.)
Big Project Size
Over ~1,000 swift code files
Slow compiling time in Swift
Average 20 mins for simulator debug build
40 mins ~ 50 mins for release build
It is terrible!
slow down development process seriously
OK. we are going to
upgrade the project next.
What happen if we click the “Convert” button?
Unlimited errors are
waiting for you to
fix!
Issue 1: Project settings error
Compile error about cocoapods library, legacy swift error
Fix: Add “SWIFT_VERSION” to Podfile
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
Issue 2: Looping compiling error
Fix one red error introduce another error show in other place.
Some errors didn’t show up after compilation.
Fix: Tick “Continue building after errors”
Issue 3: XCode bug
XCode sometimes missing to display red error lines when you are fixing bug
Issue 4: 3rd party library support
“Alamofire” 4.x only support Swift 3 and does not support iOS8
“SwiftFlux” no update to support Swift 3 yet.
“Chart” totally change source code in Swift 3.
Fix: No fast solution at all
Firstly, you need to wait the source community to support Swift 3 before you start.
When you choose a 3rd party library, please pay attention to the active rate and number of stars.
Better mircoservice structures will help to debug and update for library code change.
Hint: Breakdown you big source code into many small library for specific feature.
Finally
We (4 Engineers) use about 1 month to update source code from Swift 2.2 to Swift 3.0 until the build is
success.
Summary
Use Objective-C if you afraid of fast change open source development process.
You still can use Objective-C in the future 3 years at least.
Swift language is good, but painful when upgrading from major version each time.
It will got much stable and easy coding and maintain.
Thanks!

More Related Content

Viewers also liked

Viewers also liked (10)

Swift3 generic
Swift3 genericSwift3 generic
Swift3 generic
 
iOS 10 & XCode 8, Swift 3.0 features and changes
iOS 10 & XCode 8, Swift 3.0 features and changesiOS 10 & XCode 8, Swift 3.0 features and changes
iOS 10 & XCode 8, Swift 3.0 features and changes
 
Swift 3
Swift   3Swift   3
Swift 3
 
Discover new music
Discover new musicDiscover new music
Discover new music
 
Latest fashion trends
Latest fashion trendsLatest fashion trends
Latest fashion trends
 
DOV-E TV Engage & Pay
DOV-E TV Engage & PayDOV-E TV Engage & Pay
DOV-E TV Engage & Pay
 
Anurag_Resume
Anurag_ResumeAnurag_Resume
Anurag_Resume
 
Las TIC y sus implicaciones educativas
 Las TIC y sus implicaciones educativas Las TIC y sus implicaciones educativas
Las TIC y sus implicaciones educativas
 
131111092-Forum5-PencarianHeuristik
131111092-Forum5-PencarianHeuristik131111092-Forum5-PencarianHeuristik
131111092-Forum5-PencarianHeuristik
 
MET presentation -2015
MET presentation -2015MET presentation -2015
MET presentation -2015
 

Similar to Tips for migration from swift 2.2 to swift 3.0

Swift should I switch?
Swift should I switch?Swift should I switch?
Swift should I switch?wulfgeng
 
State ofappdevelopment
State ofappdevelopmentState ofappdevelopment
State ofappdevelopmentgillygize
 
Should you choose react native or swift for i os app development
Should you choose react native or swift for i os app development Should you choose react native or swift for i os app development
Should you choose react native or swift for i os app development Moon Technolabs Pvt. Ltd.
 
Alexander Kutsan: “C++ compilation boost”
Alexander Kutsan: “C++ compilation boost” Alexander Kutsan: “C++ compilation boost”
Alexander Kutsan: “C++ compilation boost” LogeekNightUkraine
 
Contributing To The Mozilla Codebase
Contributing To The Mozilla CodebaseContributing To The Mozilla Codebase
Contributing To The Mozilla CodebaseSouradeep De
 
Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1benDesigning
 
Eclipsist2009 Rich Client Roundup
Eclipsist2009 Rich Client RoundupEclipsist2009 Rich Client Roundup
Eclipsist2009 Rich Client RoundupMurat Yener
 
An overview of the architecture of electron.js
An overview of the architecture of electron.jsAn overview of the architecture of electron.js
An overview of the architecture of electron.jsMoon Technolabs Pvt. Ltd.
 
Api Versioning with Docker and Nginx
Api Versioning with Docker and NginxApi Versioning with Docker and Nginx
Api Versioning with Docker and Nginxtech.kartenmacherei
 
iOS Development Using Swift 2
iOS Development Using Swift 2iOS Development Using Swift 2
iOS Development Using Swift 2Edureka!
 
Reasons to Choose Swift for iOS App Development.pdf
Reasons to Choose Swift for iOS App Development.pdfReasons to Choose Swift for iOS App Development.pdf
Reasons to Choose Swift for iOS App Development.pdfFuGenx Technologies
 
outgoing again
outgoing againoutgoing again
outgoing againspredslide
 
Top 10 IDEs for React.js Developers in 2021
Top 10 IDEs for React.js Developers in 2021Top 10 IDEs for React.js Developers in 2021
Top 10 IDEs for React.js Developers in 2021WrapPixel
 
Enterprise ipad Development with notes
Enterprise ipad Development with notesEnterprise ipad Development with notes
Enterprise ipad Development with notesjaxarcsig
 

Similar to Tips for migration from swift 2.2 to swift 3.0 (20)

Swift should I switch?
Swift should I switch?Swift should I switch?
Swift should I switch?
 
State ofappdevelopment
State ofappdevelopmentState ofappdevelopment
State ofappdevelopment
 
Exploring App Compat
Exploring App CompatExploring App Compat
Exploring App Compat
 
Should you choose react native or swift for i os app development
Should you choose react native or swift for i os app development Should you choose react native or swift for i os app development
Should you choose react native or swift for i os app development
 
Alexander Kutsan: “C++ compilation boost”
Alexander Kutsan: “C++ compilation boost” Alexander Kutsan: “C++ compilation boost”
Alexander Kutsan: “C++ compilation boost”
 
Contributing To The Mozilla Codebase
Contributing To The Mozilla CodebaseContributing To The Mozilla Codebase
Contributing To The Mozilla Codebase
 
Programming in C++
Programming in C++Programming in C++
Programming in C++
 
Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1
 
Eclipsist2009 Rich Client Roundup
Eclipsist2009 Rich Client RoundupEclipsist2009 Rich Client Roundup
Eclipsist2009 Rich Client Roundup
 
An overview of the architecture of electron.js
An overview of the architecture of electron.jsAn overview of the architecture of electron.js
An overview of the architecture of electron.js
 
Api Versioning with Docker and Nginx
Api Versioning with Docker and NginxApi Versioning with Docker and Nginx
Api Versioning with Docker and Nginx
 
Xcode 6 release_notes
Xcode 6 release_notesXcode 6 release_notes
Xcode 6 release_notes
 
Programming
ProgrammingProgramming
Programming
 
iOS Development Using Swift 2
iOS Development Using Swift 2iOS Development Using Swift 2
iOS Development Using Swift 2
 
Reasons to Choose Swift for iOS App Development.pdf
Reasons to Choose Swift for iOS App Development.pdfReasons to Choose Swift for iOS App Development.pdf
Reasons to Choose Swift for iOS App Development.pdf
 
Srgoc java
Srgoc javaSrgoc java
Srgoc java
 
outgoing again
outgoing againoutgoing again
outgoing again
 
Top 10 IDEs for React.js Developers in 2021
Top 10 IDEs for React.js Developers in 2021Top 10 IDEs for React.js Developers in 2021
Top 10 IDEs for React.js Developers in 2021
 
Enterprise ipad Development with notes
Enterprise ipad Development with notesEnterprise ipad Development with notes
Enterprise ipad Development with notes
 
Java Programming Basics
Java Programming BasicsJava Programming Basics
Java Programming Basics
 

Recently uploaded

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 

Recently uploaded (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 

Tips for migration from swift 2.2 to swift 3.0

  • 1. Tips for Migration from Swift 2.2 to Swift 3.0
  • 2. Swift 2.2 is no longer support After Apple released XCode 8.2 in Sept 2016, swift project will need to force upgrade to Swift 2.3 or Swift 3.0 Anyway, you still can upload ipa by using XCode 7, but not guarantee you can pass Apple review approval.
  • 4. WalkingApp - written in swift 2.2 A bunch of third party library integrated including Objective-C, Swift and custom own library. (Alamofire, SwiftFlux, Charts, XMPPFramework, SugarRecord, Realm, DeepLinkKit, SwaggerClient, etc.)
  • 5. Big Project Size Over ~1,000 swift code files
  • 6. Slow compiling time in Swift Average 20 mins for simulator debug build 40 mins ~ 50 mins for release build
  • 7. It is terrible! slow down development process seriously
  • 8. OK. we are going to upgrade the project next.
  • 9. What happen if we click the “Convert” button?
  • 10. Unlimited errors are waiting for you to fix!
  • 11. Issue 1: Project settings error Compile error about cocoapods library, legacy swift error
  • 12. Fix: Add “SWIFT_VERSION” to Podfile post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['SWIFT_VERSION'] = '3.0' end end end
  • 13. Issue 2: Looping compiling error Fix one red error introduce another error show in other place. Some errors didn’t show up after compilation.
  • 14. Fix: Tick “Continue building after errors”
  • 15. Issue 3: XCode bug XCode sometimes missing to display red error lines when you are fixing bug
  • 16. Issue 4: 3rd party library support “Alamofire” 4.x only support Swift 3 and does not support iOS8 “SwiftFlux” no update to support Swift 3 yet. “Chart” totally change source code in Swift 3.
  • 17. Fix: No fast solution at all Firstly, you need to wait the source community to support Swift 3 before you start. When you choose a 3rd party library, please pay attention to the active rate and number of stars. Better mircoservice structures will help to debug and update for library code change. Hint: Breakdown you big source code into many small library for specific feature.
  • 18. Finally We (4 Engineers) use about 1 month to update source code from Swift 2.2 to Swift 3.0 until the build is success.
  • 19. Summary Use Objective-C if you afraid of fast change open source development process. You still can use Objective-C in the future 3 years at least. Swift language is good, but painful when upgrading from major version each time. It will got much stable and easy coding and maintain.