์ด๋ด,
Cocoapods ๋ฐ repos( pod repo update
)๋ฅผ ์
๋ฐ์ดํธํ ํ Reachability :(.
๋๋ ์๋ํ๋ค:
pod 'ReachabilitySwift'
๋ฐ pod 'ReachabilitySwift' , '~> 3.0'
์๋ต:
[!] 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
๊ทธ๋ฆฌ๊ณ README๋ฅผ ๋ค์ ์ฝ์ ํ, ReachabilitySwift๊ฐ Reachability๋ก ์ด๋ฆ์ด ๋ฐ๋์๋ค๋ ๊ฒฝ๊ณ ๋ฅผ ๋ง๋ค์์ต๋๋ค. ๊ทธ๋์ pod 'Reachability'
๋ฅผ ์๋ํ์ง๋ง ์ด๊ฒ์ Obj-C๋ก ์์ฑ๋ ๋ฒ์ ๋ฒํธ 3.2๋ฅผ ๊ฐ์ง ํ์คํ ๋ค๋ฅธ Repo๋ฅผ ์ค์นํฉ๋๋ค.
๋ด๊ฐ ๋ญ ์๋ชปํ์ด?
์ง๋ณด :)
๋ฌธ์ ํด๊ฒฐ!
๊ฐ์ ๋ฌธ์ ๋ฅผ ๊ฐ์ง ๋ชจ๋ ์ฌ๋๋ค์ ์ํ ์๋ฃจ์
:
@ashleymills pod 'Reachability'
์์ง ์ค์น https://cocoapods.org/pods/Reachability :( ?
Reachability 4.0(๋ฒ ํ !)์ ์ค์นํ๋ ค๋ฉด pod 'ReachabilitySwift', '~> 4.0-beta2'
๋ฅผ ์ฌ์ฉํ์ธ์.
๋๋ ๋น์ ์ ๋์ธ ์ ์๊ธฐ๋ฅผ ๋ฐ๋๋๋ค :),
์ฐจ๋ฅด๋ณด
@tjarbo ์ฌ๊ธฐ์ ๊ฐ์ ๋ฌธ์ ๊ฐ ์์ต๋๋ค.
[!] 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
๊ทธ๋์ 'ReachabilitySwift' , '~> 3.0' ํฌ๋๊ฐ ํ์ํฉ๋๋ค. ์ด๋ป๊ฒ ํด๊ฒฐํ์ จ๋์? ๊ทธ๋ฆฌ๊ณ ๋ ์ค์ํํธ 4๊ฐ ํ์ํ์ง ์์
@Ealsharkawy
4.0-๋ฒ ํ๋ฅผ ์ค์นํ๋ ์๋ฃจ์
๋ง ์ฐพ์์ต๋๋ค.
์๋ํ๋์ง ๋ชจ๋ฅด๊ฒ ์ง๋ง pod 'ReachabilitySwift' , '~> v3.0'
๋ฅผ ์ฌ์ฉํ๋ฉด ์ด๋ป๊ฒ ๋ ๊น์?
๋๋ ์๋์ผ๋ก ๊ฐ์ ธ์ฌ ์ ์์ต๋๋ค. "v3.0" ํ๊ทธ๋ฅผ ์ ํํ๊ณ ๋ค์ด๋ก๋ํ์ฌ ํ๋ก์ ํธ์ ์ถ๊ฐํ๊ธฐ๋ง ํ๋ฉด ๋ฉ๋๋ค.
์๋
ํ์ธ์, ๋ก์ปฌ ์ฌ์ ๋ฆฌํฌ์งํ ๋ฆฌ๋ฅผ ์
๋ฐ์ดํธํ๋ ค๋ฉด pod update
ํด์ผ ํ๋ค๊ณ ์๊ฐํฉ๋๋ค.
๊ทธ๋ฐ ๋ค์ pod search ReachabilitySwift
์ฐพ์ ์ ์์ต๋๋ค. ๋์์ด ๋ ์ ์์ต๋๋ค.
๋๋ ๊ฐ์ ๋ฌธ์ ๊ฐ์๋ค.
๋ด ํด๊ฒฐ ๋ฐฉ๋ฒ์ podfile์ ๋ค์๊ณผ ๊ฐ์ด ์ค์ ํ๋ ๊ฒ์
๋๋ค.
pod 'ReachabilitySwift', git: '[email protected]:ashleymills/Reachability.swift.git', tag: 'v3.0'
์๋ง๋ ์ด ๋ฌธ์ ๋ podspec ๋ฒ์ ์ด "3"์ด์ง๋ง ํ๊ทธ๊ฐ "v3.0"์ผ๋ก ์ค์ ๋์ด ์๊ธฐ ๋๋ฌธ์ผ ์ ์์ต๋๋ค.
Cocoapods๋ "v3" ๋ถ๊ธฐ๋ฅผ ๊ฒ์ํ๋ ๊ฒ ๊ฐ์ต๋๋ค.
์๋ ํ์ธ์, v3.0 ์ปค๋ฐ์ v3์ผ๋ก ํ๊ทธ๋ฅผ ๋ค์ ์ง์ ํ์ผ๋ฏ๋ก ๋ฌธ์ ๊ฐ ํด๊ฒฐ๋ ๊ฒ์ ๋๋ค. ์ฌ๊ธฐ์์ ๋ต์ฅ์ ๋ณด๋ด ์ง๊ธ ์๋ํ๋์ง ์๋ ค์ฃผ์ธ์.
๊ฐ์ฌ ํด์
๊ธ์ฐ ๊ฑด๊ฐ ์ฆ์ง ํํ
@ashleymills ๊ฐ์ฌํฉ๋๋ค. ์ ์๊ฒ ํจ๊ณผ์ ์
๋๋ค.
pod 'ReachabilitySwift'
๋ฅผ ์ฌ์ฉํ์ฌ $ 3
๋ฒ์ ์ ์ค์นํ ์ ์์ต๋๋ค.
๋ค, @ashleymills ๋๋ถ์ ํด๊ฒฐ๋์์ต๋๋ค.
ํ์ ์ข ๋ฃ ๐
๊ฐ์ ธ์ค๊ธฐ์์ ReachabilitySwift๋ฅผ Reachability๋ก ๊ต์ฒดํ ํ ๋น๋ ์ค๋ฅ๋ ๋ค์์ ์ํํ ๋ "๋นํจ์ ์ ํ 'module'์ ๊ฐ์ ํธ์ถํ ์ ์์"์ ์ฝ์ต๋๋ค.
๋๋ฌ ๊ฐ๋ฅ์ฑ = ๋๋ฌ ๊ฐ๋ฅ์ฑ()์ผ๋ก ํ์!
์ฌ๊ธฐ๋ ๋ง์ฐฌ๊ฐ์ง์
๋๋ค. pod Reachability
๋ก ์ฐ๊ฒฐ์ฑ์ ์ค์นํ ํ import Reachability
$๋ฅผ ์๋ํ ๋ No such module 'Reachability'
์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
์๋ ํ์ธ์, v3.0 ์ปค๋ฐ์ v3์ผ๋ก ํ๊ทธ๋ฅผ ๋ค์ ์ง์ ํ์ผ๋ฏ๋ก ๋ฌธ์ ๊ฐ ํด๊ฒฐ๋ ๊ฒ์ ๋๋ค. ์ฌ๊ธฐ์์ ๋ต์ฅ์ ๋ณด๋ด ์ง๊ธ ์๋ํ๋์ง ์๋ ค์ฃผ์ธ์.
๊ฐ์ฌ ํด์
๊ธ์ฐ ๊ฑด๊ฐ ์ฆ์ง ํํ