简体   繁体   中英

Can not install RealmSwift with cocoapods

Every time I am trying to install RealmSwift with cocoapods gives me [!] /bin/bash -c set -e sh build.sh cocoapods-setup error. I have updated to xcode 8 and cocoapods to 1.1.0 however when I try from another mac with older cocoa RealmSwift 1.0.2 is getting installed.

Please help

Open terminal and hit this command

$ [sudo] gem install cocoapods

It will simply update CocoaPods version of your system. And then try to install Realm using this.

Add this piece of code to pods file,

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '2.3' # or '3.0'
    end
  end
end

It will add Realm for your latest swift version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM