# 프로젝트 설정

### 1 : SDK 연동을 위한 준비

* Xcode 16.0 이상
* Deployment Target : iOS 12.0 이상

> 앱 스토어 커넥트에 업로드 날짜에 따른 빌드에 사용하는 Xcode 버전 요구사항은 다음과 같습니다.
>
> * 2025년 4월 24일부터: Xcode 16 이상
> * 2026년 4월 28일부터: Xcode 26 이상\
>   \
>   <https://developer.apple.com/kr/news>

### 2 : 설치

#### [`CocoaPods`](https://cocoapods.org) 사용

* AdPie SDK의 최신버전을 가져오려면 아래와 같이 프로젝트의 Podfile에 추가합니다.

```
  platform :ios, '12.0'
  use_frameworks!

  target YOUR_PROJECT_TARGET do
    pod 'AdPieSDK'
  end
```

* 터미널 실행하고 iOS 프로젝트가 있는 경로로 이동 후, 아래 명령어를 실행하여 AdPie SDK를 설치합니다.

```
  pod install --repo-update
```

#### [Swift Package Manager](https://swift.org/package-manager) 사용

* Xcode 실행 후, `Add Package Dependencies` 메뉴를 클릭합니다.

```
  Xcode > File > Add Package Dependencies....
```

* 프롬프트 창이 나타나면 아래의 Git Hub 저장소 URL를 사용하여 검색합니다.

```
  https://github.com/gomfactory/AdPie-iOS-SDK.git
```

* 설치하려는 버전을 선택하고 `Add Package` 버튼을 클릭하여 AdPie SDK를 설치합니다.

  > Swift Package Manager 를 이용하여 SDK를 설치하는 경우, AdPie SDK V1.6.3 버전부터 설치 가능.
* 아래의 `Xcode 프로젝트 설정` 내용을 참고하여 `Other Linker Flags` 설정을 완료합니다.

#### SDK 수동 설치

* SDK 및 샘플프로젝트를 [download](https://github.com/gomfactory/AdPie-iOS-SDK/archive/master.zip) 합니다.
* `AdPie-iOS-SDK-master.zip` 파일을 압축을 해제하고 `AdPieSDK.xcframework` 파일이 있는지 확인합니다.
* Xcode에서 타겟 프로젝트 선택 후, `General -> Frameworks, Libraries, and Embedded Content` 에 `AdPieSDK.xcframework` 파일을 드래그하여 추가합니다.

<figure><img src="/files/uonCdM3LHPdEbfwiuKce" alt=""><figcaption></figcaption></figure>

* 아래의 `Xcode 프로젝트 설정` 내용을 참고하여 `Other Linker Flags` 설정을 완료합니다.

#### Xcode 프로젝트 설정

* Xcode 실행 > 프로젝트 타겟 선택 > Build Settings에서 `Other Linker Flags` 에 `$(inherited)` 와 `-ObjC` 플래그가 추가되어 있는지 확인합니다.

  > 위의 플래그가 없을 경우 , 비정상 종료(Crash)가 발생할 수 있습니다.

<figure><img src="/files/V3Dh7c2y0e0SxzLaRlqq" alt=""><figcaption></figcaption></figure>

### 3 : iOS 14+ 대응

* [iOS 14+ 대응](https://github.com/gomfactory/AdPie-iOS-SDK/wiki/iOS-14-%EC%9D%B4%EC%83%81--%EB%8C%80%EC%9D%91) 페이지를 통해 info.plist 와 코드를 적용합니다.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://platform-business.gitbook.io/adpie/ios/project-settings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
