ReachabilitySwift can't be installed with CocoaPods

1.1k views Asked by At

In my Podfile, I have:

pod 'ReachabilitySwift', '~> 3.0'

But when I run pod install, all the frameworks are setup correctly except ReachabilitySwift:

Installing ReachabilitySwift 3 (was 2.4)

[!] Error installing ReachabilitySwift
[!] /usr/bin/git clone https://github.com/ashleymills/Reachability.swift.git /var/folders/cn/1zzgfkjj5xq3hm3g4351087r0000gn/T/d20170922-5156-v06cm4 --template= --single-branch --depth 1 --branch v3

Cloning into '/var/folders/cn/1zzgfkjj5xq3hm3g4351087r0000gn/T/d20170922-5156-v06cm4'...
warning: Could not find remote branch v3 to clone.
fatal: Remote branch v3 not found in upstream origin

With this GitHub link, I found a recommended solution:

Please add a

s.pod_target_xcconfig = {
    'SWIFT_VERSION' => '3.0'
}

to the podspec file. Otherwise, there will be an error after each pod install.

But I don't know where to find the podspec file and in what place to insert this string.

1

There are 1 answers

1
Tamás Sengel On BEST ANSWER

You don't have to edit the podspec file manually, that would involve forking the project.

The project's podspec file references a wrong tag, you should specify the correct tag and use that until the podspec file is fixed.

From a GitHub Issue:

Podspec is still looking for the old v3 tag, for now manually specify the repo and tag will fix:

pod 'ReachabilitySwift', :git => 'https://github.com/ashleymills/Reachability.swift.git', :tag => 'v3.0'