0

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.

Ashley Mills
  • 50,474
  • 16
  • 129
  • 160
Paul T.
  • 4,938
  • 7
  • 45
  • 93

1 Answers1

2

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'
Community
  • 1
  • 1
Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
  • I checked. In this case I will instal https://github.com/tonymillion/Reachability , not https://github.com/ashleymills/Reachability.swift . Framework really changed from ReachabilitySwift to Reachability . But pods are not changed, so it's strange that I can't install it with pod 'ReachabilitySwift' – Paul T. Sep 23 '17 at 04:03