Ramandeep Singh Gosal
Ramandeep Singh Gosal

Reputation: 448

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

Upvotes: 3

Views: 2100

Answers (2)

Ramandeep Singh Gosal
Ramandeep Singh Gosal

Reputation: 448

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...

Upvotes: 19

Apogee
Apogee

Reputation: 719

I too faced the same issue

xcode version - 8.1

error - No version of Xcode found that supports Swift 2.2

so I did the following

pod 'RealmSwift', :git => 'https://github.com/realm/realm-cocoa', :commit => '2faba712db752fba8e85639e7023ce35ada0fb15', :submodules => 'true'

For reference you may have a look to this link https://github.com/realm/realm-cocoa/issues/4534

Upvotes: 0

Related Questions