31 07 2017
IOS cocoapods 설치
- 설치
 
| 
					 1  | 
						$sudo gem install cocoapods  | 
					
- 프로젝트에 cocoapod 적용
 
| 
					 1 2 3 4 5 6 7 8 9  | 
						$cd  /적용대상 Project $pod init  이렇게 하면 초기화(Podfile)이 생성된다. $vi Podfile  수정 platform :ios, '9.0' target "적용대상 Project " do   pod 'Firebase'  // 가져오고자 하는 library end   | 
					
- 
		1pod install
 - 프로젝트를 오픈
“적용대상 Project”.xcworkspace를 오픈한다. 
반드시 *.xcworkspace를 오픈한다.
끝
- 1.Delete the standalone files (
PodfilePodfile.lockand yourPodsdirectory) - 2.Delete the generated 
xcworkspace - 3.Open your 
xcodeprojfile, delete the references toPods.xcconfigandlibPods.a(in theFrameworksgroup) - 4.Under your 
Build Phasesdelete theCopy Pods Resources,Embed Pods FrameworksandCheck Pods Manifest.lockphases. - 5.This may seem obvious but you’ll need to integrate the 3rd party libraries some other way or remove references to them from your code.
 
- 
		1234567sudo gem install cocoapods-deintegrate cocoapods-cleanpod deintegratepod clean (pod cache clean --all)rm Podfile
 - TroubleShooting
 
– install 후에 No such module ‘Firebase…’ Error => pod update
-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: bad interpreter: No such file or directory
위의 에러가 발생할 경우 (보통 Mac OS 업그레이드 후 발생)
sudo gem install cocoapods 다시 설치하면 해결