How to fix “SWIFT_VERSION '3.0' is unsupported, supported versions are: 4.0, 4.2, 5.0” error in Xcode 10.2?

change language version Target->build setting -> Swift compiler language -> select 5, 4.2 etc