简体   繁体   中英

How to update swift 2.3 project to latest swift 4

I am having too many cocoapods installed. It shows too many compile time errors. How to solve this? I am new to swift so looking for help. Thanks

  • Choose auto upgrade after opening the project in Xcode 9.
  • In Podfile refer to the framework built in swift 4. Add below script in your Podfile and do a pod install, which will set the swift version of all pod targets to 4.

    post_install do |installer|

     installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['SWIFT_VERSION'] = '4' end end

    end

Hope this helps in proceeding in upgrading the application to swift4

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM