Search code examples
swift3cocoapodsxcode8

Getting error while installing realm through cocoapods


I am getting this strange error while installing realm on xcode 8, cocoa pods version cocoapods-1.2.0

The error is -

Installing Realm (2.4.3)

[!] /bin/bash -c
set -e
sh build.sh cocoapods-setup

./scripts/swift-version.sh: line 59: [: =: unary operator expected No version of Xcode found that supports Swift 3.0.2

All other pods work great.

Thanks for the help in advance.

Error Image


Solution

  • Hey for anyone looking for an answer -

    I did find out that I had the second xcode installed (xcode 7), due to which the command line tools which were chosen were of xcode 7.3 which was causing the error.

    So what I did was, I went to - xcode >> preferences >> locations >> CommandLineTools

    and selected the commandLineTools for the latest Version(xcode 8).

    Thanks...