从swift2 迈向swift3 首先遇到的坑

第三方库更新

作死把项目往swift3方向改,首先遇到了第三方库的坑,底下是公司项目用到的框架,如果想在swift3底下继续使用得去github找相应的分支

现在分支已经更新到了支持Version 8.0 beta 6 (8S201h),如果你项目使用了相应框架,可以将podfile改成如下

# Uncomment this line to define a global platform for your project
'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
target '~~' do
  # Pods for SDVR
  pod 'SDWebImage'
  pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :branch => 'swift3'
  pod 'pop'
  pod 'SnapKit', :git => 'https://github.com/SnapKit/SnapKit', :branch => 'feature/0.40.0'
  pod 'HMSegmentedControl'
  pod 'MJRefresh'
  pod 'MagicalRecord'
  pod 'MBProgressHUD','0.9.2'
  pod 'ObjectMapper', :git => 'https://github.com/EvilClay/ObjectMapper.git', :branch => 'swift-3'
  pod 'UMengSocialCOM'
  pod 'UMengMessage'
  pod 'UMengFeedback'
  pod 'CardboardSDK'
  pod 'UMengAnalytics-NO-IDFA'
  pod 'ReachabilitySwift', :git => 'https://github.com/ashleymills/Reachability.swift.git', :branch => 'feature/ios10'

  target '~~' do
    inherit! :search_paths
    # Pods for testing
  end

  target '~~' do
    inherit! :search_paths
    # Pods for testing
  end

end
在Edit里Convert
在Edit里Convert
升级到swift3(开始走上一条不归路)
升级到swift3
785个错误,吓尿你,待点完upgrade后就烟消云散了
upgrade
success
success

后续的坑,怎么填

你可能感兴趣的:(从swift2 迈向swift3 首先遇到的坑)