When updating Xcode version you should just be sure you don't end up in a situation where you can no longer work.
Instead of updating Xcode you could just install two version of Xcode on the same mac and use both of them by trying out the new version.
For now, you can go back to your previous Xcode by downloading the previous version here https://developer.apple.com/download/more, extract the archive you will download and copy the App file to your Applications folder in macOS.
What I would suggest as a solution before you start upgrading everything, as you don't know how all the new pod updates will work with your code implementation, is to delete the Xcode 10.2 and go back install 10.1 or 10.0 (can download them from the previous link).
For later on, when your project builds fine and it's stable and you would like to try to upgrade everything (Xcode, Swift and PODs), you should first of all check if your project build with your current Swift version (which Swift version is your project currently set on you can find under Target > Build Settings > Swift Language Version).
At this moment your project doesn't build, so make your project build by using a previous Xcode version to make your life easier and also to be sure that by upgrading everything you don't end up with broken functionality from other PODs that might have changed the way their implementation works with your project.
When your projects build without errors and you want to upgrade to a new version of Swift
- Research on the latest version of your PODs and which Swift version they support (go the project github pages, or in cocoapods)
Try to upgrade just your project without upgrading your PODs, if that works you are going to upgrade also your PODs later on, to ensure your PODs stays with the current Swift version that is working for you (let's say it is right now Swift 3.2
for example) you add this snippet to your Podfile:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.2'
end
end
end
To convert just your project to the newer Swift version go to Edit -> Convert -> Convert to current swift syntax
A popup will appear with a list of targets, including the pods. Deselect everything except your project target, the unit and UI tests and press convert. Wait for the project to build and generate the preview and apply the changes. Fix all the issues and warning created by the new Swift version requirements.
To update all the PODs that support the new Swift version you upgraded your project, do it by using the right POD version for each POD that has support to the newer Swift version and for the one that don't support yet the newer Swift version you could replace the code snippet on the Podfile with this
post_install do |installer|
installer.pods_project.targets.each do |target|
if ['UnsupportedPod1', 'RxSwift', 'RxCocoa'].include? target.name
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.2'
end
end
end
end