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.)
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.
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.