SlideShare ist ein Scribd-Unternehmen logo
1 von 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!

Weitere ähnliche Inhalte

Andere mochten auch

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxFIDO Alliance
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxjbellis
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024Stephen Perrenod
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...ScyllaDB
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Paige Cruz
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewDianaGray10
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...FIDO Alliance
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTopCSSGallery
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfFIDO Alliance
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfalexjohnson7307
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch TuesdayIvanti
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdfMuhammad Subhan
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingScyllaDB
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxFIDO Alliance
 

Kürzlich hochgeladen (20)

Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 

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.