CocoaPods 사용법

2020. 9. 9. 23:14개발자료/iOS


반응형

# 설치

$ sudo gem install cocoapods

 

# Xcode 프로젝트 Root 폴더로 이동

$ cd project_directory

 

# Pod 파일 생성

$ pod init

 

# Podfile 생성 확인

# Podfile 을 열어 설치할 Pod 내용 추가

pod 'Firebase/Messaging' 추가

# Pod 설치

$ pod install

# 프로젝트.xcworkspace 생성 확인 및 Xcode로 열어 Pods 프로젝트 추가 확인


## 2020.09.10 ##

# 설치 중 오류 - 다른 개발 Mac에 설치 중 오류 발생

ERROR:  Error installing cocoapods:

ERROR: Failed to build gem native extension.

 

    current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.13.1/ext/ffi_c

/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20200910-1812-ratp9n.rb extconf.rb

mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h

 

extconf failed, exit code 1

 

Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/ffi-1.13.1 for inspection.

Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/ffi-1.13.1/gem_make.out

#  Xcode Command Lines Tools 설치 후 정상 설치 확인

$ xcode-select --install

# 설치 완료 후 CocoaPods 설치

Building native extensions.  This could take a while...

Successfully installed ffi-1.13.1

Fetching: ethon-0.12.0.gem (100%)

Successfully installed ethon-0.12.0

Fetching: typhoeus-1.4.0.gem (100%)

Successfully installed typhoeus-1.4.0

Fetching: netrc-0.11.0.gem (100%)

Successfully installed netrc-0.11.0

Fetching: cocoapods-core-1.9.3.gem (100%)

Successfully installed cocoapods-core-1.9.3

Fetching: claide-1.0.3.gem (100%)

Successfully installed claide-1.0.3

Fetching: cocoapods-deintegrate-1.0.4.gem (100%)

Successfully installed cocoapods-deintegrate-1.0.4

Fetching: cocoapods-downloader-1.4.0.gem (100%)

Successfully installed cocoapods-downloader-1.4.0

Fetching: cocoapods-plugins-1.0.0.gem (100%)

Successfully installed cocoapods-plugins-1.0.0

Fetching: cocoapods-search-1.0.0.gem (100%)

Successfully installed cocoapods-search-1.0.0

Fetching: cocoapods-stats-1.1.0.gem (100%)

Successfully installed cocoapods-stats-1.1.0

Fetching: cocoapods-trunk-1.5.0.gem (100%)

Successfully installed cocoapods-trunk-1.5.0

Fetching: cocoapods-try-1.2.0.gem (100%)

Successfully installed cocoapods-try-1.2.0

Fetching: molinillo-0.6.6.gem (100%)

Successfully installed molinillo-0.6.6

Fetching: atomos-0.1.3.gem (100%)

Successfully installed atomos-0.1.3

Fetching: CFPropertyList-3.0.2.gem (100%)

Successfully installed CFPropertyList-3.0.2

Fetching: colored2-3.1.2.gem (100%)

Successfully installed colored2-3.1.2

Fetching: nanaimo-0.3.0.gem (100%)

Successfully installed nanaimo-0.3.0

Fetching: xcodeproj-1.18.0.gem (100%)

Successfully installed xcodeproj-1.18.0

Fetching: escape-0.0.4.gem (100%)

Successfully installed escape-0.0.4

Fetching: fourflusher-2.3.1.gem (100%)

Successfully installed fourflusher-2.3.1

Fetching: gh_inspector-1.1.3.gem (100%)

Successfully installed gh_inspector-1.1.3

Fetching: ruby-macho-1.4.0.gem (100%)

Successfully installed ruby-macho-1.4.0

Fetching: cocoapods-1.9.3.gem (100%)

Successfully installed cocoapods-1.9.3

Parsing documentation for ffi-1.13.1

Installing ri documentation for ffi-1.13.1

Parsing documentation for ethon-0.12.0

Installing ri documentation for ethon-0.12.0

Parsing documentation for typhoeus-1.4.0

Installing ri documentation for typhoeus-1.4.0

Parsing documentation for netrc-0.11.0

Installing ri documentation for netrc-0.11.0

Parsing documentation for cocoapods-core-1.9.3

Installing ri documentation for cocoapods-core-1.9.3

Parsing documentation for claide-1.0.3

Installing ri documentation for claide-1.0.3

Parsing documentation for cocoapods-deintegrate-1.0.4

Installing ri documentation for cocoapods-deintegrate-1.0.4

Parsing documentation for cocoapods-downloader-1.4.0

Installing ri documentation for cocoapods-downloader-1.4.0

Parsing documentation for cocoapods-plugins-1.0.0

Installing ri documentation for cocoapods-plugins-1.0.0

Parsing documentation for cocoapods-search-1.0.0

Installing ri documentation for cocoapods-search-1.0.0

Parsing documentation for cocoapods-stats-1.1.0

Installing ri documentation for cocoapods-stats-1.1.0

Parsing documentation for cocoapods-trunk-1.5.0

Installing ri documentation for cocoapods-trunk-1.5.0

Parsing documentation for cocoapods-try-1.2.0

Installing ri documentation for cocoapods-try-1.2.0

Parsing documentation for molinillo-0.6.6

Installing ri documentation for molinillo-0.6.6

Parsing documentation for atomos-0.1.3

Installing ri documentation for atomos-0.1.3

Parsing documentation for CFPropertyList-3.0.2

Installing ri documentation for CFPropertyList-3.0.2

Parsing documentation for colored2-3.1.2

Installing ri documentation for colored2-3.1.2

Parsing documentation for nanaimo-0.3.0

Installing ri documentation for nanaimo-0.3.0

Parsing documentation for xcodeproj-1.18.0

Installing ri documentation for xcodeproj-1.18.0

Parsing documentation for escape-0.0.4

Installing ri documentation for escape-0.0.4

Parsing documentation for fourflusher-2.3.1

Installing ri documentation for fourflusher-2.3.1

Parsing documentation for gh_inspector-1.1.3

Installing ri documentation for gh_inspector-1.1.3

Parsing documentation for ruby-macho-1.4.0

Installing ri documentation for ruby-macho-1.4.0

Parsing documentation for cocoapods-1.9.3

Installing ri documentation for cocoapods-1.9.3

Done installing documentation for ffi, ethon, typhoeus, netrc, cocoapods-core, claide, cocoapods-deintegrate, cocoapods-downloader, cocoapods-plugins, cocoapods-search, cocoapods-stats, cocoapods-trunk, cocoapods-try, molinillo, atomos, CFPropertyList, colored2, nanaimo, xcodeproj, escape, fourflusher, gh_inspector, ruby-macho, cocoapods after 35 seconds

24 gems installed

 

 

 

 

 

 

 

 

반응형