Getting error while installing realm through cocoapods

孤人 提交于 2020-01-03 21:03:03

问题


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.


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/42663086/getting-error-while-installing-realm-through-cocoapods

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!