Can't install with Cocoapods (Xcode/Swift)


#1

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
use_frameworks!

Pods for ToDoSwift

pod ‘RealmSwift’

end

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


#2

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.


#3

Hi,
try sudo xcode-select -s /Applications/Xcode.app/Contents/Developer/ it should help. :wave: