Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Cocoapods to install Reachability 4.0 doesn't work #234

Closed
tjarbo opened this issue Sep 23, 2017 · 12 comments
Closed

Using Cocoapods to install Reachability 4.0 doesn't work #234

tjarbo opened this issue Sep 23, 2017 · 12 comments

Comments

@tjarbo
Copy link

tjarbo commented Sep 23, 2017

Hey,
after I updated Cocoapods and the repos (pod repo update), I was unable to install Reachability :(.

I tried:
pod 'ReachabilitySwift' and pod 'ReachabilitySwift' , '~> 3.0'

the response:

[!] Error installing ReachabilitySwift
[!] /usr/bin/git clone https://github.com/ashleymills/Reachability.swift.git /var/folders/1w/rbhn9wvn2qn6dghyrq6zmf5r0000gn/T/d20170923-60074-q1ic10 --template= --single-branch --depth 1 --branch v3

Cloning into '/var/folders/1w/rbhn9wvn2qn6dghyrq6zmf5r0000gn/T/d20170923-60074-q1ic10'...
warning: Could not find remote branch v3 to clone.
fatal: Remote branch v3 not found in upstream origin

And after i've read the README again, i founded the Warning, that ReachabilitySwift has been renamed to Reachability. So I tried pod 'Reachability' but this installs a definitely other Repo with versionnumber 3.2 written in Obj-C.

What did I wrong?
tjarbo :)

@tjarbo
Copy link
Author

tjarbo commented Sep 23, 2017

SOLVED the problem!
The solution for all the people with the same problem:

@ashleymills pod 'Reachability' still install https://cocoapods.org/pods/Reachability :( ?

To install Reachability 4.0 (BETA !) use pod 'ReachabilitySwift', '~> 4.0-beta2'

I hope, i could help you :),
tjarbo

@EAlsharkawy
Copy link

@tjarbo i have same issue here

[!] Error installing ReachabilitySwift
[!] /usr/bin/git clone https://github.com/ashleymills/Reachability.swift.git /var/folders/1w/rbhn9wvn2qn6dghyrq6zmf5r0000gn/T/d20170923-60074-q1ic10 --template= --single-branch --depth 1 --branch v3

Cloning into '/var/folders/1w/rbhn9wvn2qn6dghyrq6zmf5r0000gn/T/d20170923-60074-q1ic10'...
warning: Could not find remote branch v3 to clone.
fatal: Remote branch v3 not found in upstream origin

so i need pod 'ReachabilitySwift' , '~> 3.0' how did u solve it? and i don't need swift 4

@tjarbo
Copy link
Author

tjarbo commented Sep 24, 2017

@EAlsharkawy
I only found the solution to install the 4.0-beta.
I don't know it works, but what happend if you use pod 'ReachabilitySwift' , '~> v3.0' ?

@tjarbo
Copy link
Author

tjarbo commented Sep 24, 2017

Or you can import it manually. Just select the "v3.0" Tag, download it, and add it to your Project :)

@linbx08
Copy link

linbx08 commented Sep 25, 2017

hello, i think you should pod update to updating local specs repositories.
And then , you can pod search ReachabilitySwift find it.hope can help u

@yshrkt
Copy link

yshrkt commented Sep 25, 2017

I got same issue.
My workaround is sets podfile as bellow:
pod 'ReachabilitySwift', git: 'git@github.com:ashleymills/Reachability.swift.git', tag: 'v3.0'

Maybe, this issue is caused that podspec version is "3" but tag is setted "v3.0".
Cocoapods seems to search "v3" branch.

@ashleymills
Copy link
Owner

Hi, I've retagged the v3.0 commit as v3, so this should resolve your problem. Please reply here and let me know if it now works.

Thanks
Ash

@yshrkt
Copy link

yshrkt commented Sep 25, 2017

@ashleymills Thanks, it works for me.
I could install 3 version using pod 'ReachabilitySwift'.

@rkeniger
Copy link

Yep, that's fixed it for me @ashleymills, thanks.

@hamchapman
Copy link
Contributor

Closing as fixed 👍

@altanai
Copy link

altanai commented Jul 10, 2018

After replacing ReachabilitySwift with Reachability in import the build error reads "Cannot call value of non-function type 'module' " on doing the following
let reachability = Reachability()!

@cbielich
Copy link

Same here. After installing Reachability with pod Reachability I get the error No such module 'Reachability' when trying to import Reachability

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants