Can't install with Cocoapods (Xcode/Swift)


First time with Realm. Using a tutorial from Angela Yu from Udemy.

I use the command line and go to the subdir where the project is. This is an Xcode project that wasn’t using Cocoapods before.

I create the pod file with ‘pod init’
This is the podfile:
platform :ios, ‘9.0’

target ‘ToDoSwift’ do

Pods for ToDoSwift

pod ‘RealmSwift’


The next command is: ‘pod install’ and I get this:
Karls-iMac:ToDoSwift karljay$ pod install
Analyzing dependencies
Downloading dependencies
Installing Realm (3.1.1)
[!] /bin/bash -c
set -e
sh cocoapods-setup

WARNING: The active Xcode command line tools, as returned by /Library/Developer/CommandLineTools, are not from Xcode.
The newest version of Xcode will be used instead.
Print: Entry, “:CFBundleVersion”, Does Not Exist

I’m not sure what the problem is, the version of Cocoapods is 1.4.0 and I’ve used Cocoapods on other projects with no problem. Xcode version is 9.0 and is the same version used just a week ago for other projects.

Any idea why Realm doesn’t install?


Quick update: in the same project, I just installed another product using Cococapod. Same steps, just commented out one line for another. So the system works, just not for Realm for some strange reason.


try sudo xcode-select -s /Applications/ it should help. :wave: