> For the complete documentation index, see [llms.txt](https://adpopcornssp.gitbook.io/ssp-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://adpopcornssp.gitbook.io/ssp-sdk/sdk/ios/ios-2.x.x/undefined/cocoapod.md).

# CocoaPod 설치

### SDK 사양

* iOS 14.0 이상 (SDK 2.11.1 부터 최소 지원 사양 14.0으로 변경. 기존 11.0)
* Xcode 11 이상

## SDK 설치

### 1) CocoaPods 설치 및 초기화

CocoaPods가 설치되어 있지 않다면 Mac OSX 의 터미널을 실행하여 CocoaPods를 설치합니다.

```
$ sudo gem install cocoapods
```

설치가 완료되면 다음과 같은 터미널 화면을 확인할 수 있습니다.

<figure><img src="/files/QSX2in8MDZ2ALBFQdDJp" alt="" width="563"><figcaption><p>install complete</p></figcaption></figure>

설치가 완료된 후 CocoaPods를 초기화합니다.

```
$ pod setup
```

초기화 이후 다음과 같은 화면이 보이시면, CocoaPods가 설치 완료된 것입니다.

<figure><img src="/files/2eToJggdjde6abG7GdKW" alt="" width="563"><figcaption><p>CocoaPods 설치 완료</p></figcaption></figure>

### 2) Podfile 생성 및 편집

CocoaPods 를 적용할 Xcode 프로젝트 파일이 있는 폴더로 이동하여 Podfile를 생성합니다.

```
$ cd /path/to/MyXcodeProject
$ touch Podfile
```

터미널에서 vi 에디터를 실행하여 Podfile 의 내용을 다음과 같이 수정한 뒤에 ESC, Shift+Z(2번)를 연속으로 눌러 종료합니다.

<pre class="language-applescript"><code class="lang-applescript"><strong>platform :ios, '12.0'
</strong>target "myProjectName" do
pod 'AdPopcornSSP', '2.11.9'
end
</code></pre>

{% hint style="info" %}
platform 의 값 중 '12.0' 의 값은 Xcode 프로젝트에서 지원하는 최소 iOS OS 버전을 의미합니다.
{% endhint %}

### 3) SDK 설치 및 설치 확인

다음 명령어를 입력하여 SDK를 설치합니다.

```
$ pod install
```

다음의 명령어를 실행하여 프로젝트에 설치된 SDK를 확인할 수 있습니다.

```
$ open MyXCodeProject.wcworkspace
```

<figure><img src="/files/BQvwDTSvoojUnIsNttun" alt="" width="375"><figcaption></figcaption></figure>
