从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

后续的坑,怎么填😲

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容