Add this line in your Podfile, after the target 'xxxx' do section: ENV['SWIFT_VERSION'] = '5' if you engage this error when doing 'pod install'.