> For the complete documentation index, see [llms.txt](https://cauly.gitbook.io/cauly/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cauly.gitbook.io/cauly/ios/import-sdk/cocoapods.md). Agents can also search and read this documentation through its [MCP server](https://cauly.gitbook.io/cauly/~gitbook/mcp).

# CocoaPods

{% hint style="danger" %}
CocoaPods 정책 변경에 따라,\
**Cauly iOS SDK의 CocoaPods 지원은 2026년 내 종료될 예정**입니다.

이에 따라 CocoaPods 환경에서는\
**신규 기능 추가 및 장기적인 업데이트가 제공되지 않습니다.**

신규 연동 또는 향후 유지보수를 고려 중인 프로젝트의 경우\
**Swift Package Manager(SPM) 또는 수동 다운로드 방식 사용을 권장**드립니다.

***

CocoaPods 지원 중단 배경 및 상세 내용은 [**주요공지 및 안내사항**](https://cauly.gitbook.io/cauly/ios/notices.md#cocoapods)을 참고해 주세요.
{% endhint %}

[CocoaPods 사용](https://guides.cocoapods.org/using/using-cocoapods)에서 Podfile을 만들고 사용하는 방법을 참고하세요.

{% hint style="info" %}
Cauly iOS SDK 업데이트에 따라 아래 내용이 변경될 수 있습니다.
{% endhint %}

1. 프로젝트의 `Podfile`을 열고 다음 항목을 추가합니다.

```
source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/cauly/CaulySDK_iOS.git'

pod 'CaulySDK', '3.1.25'

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|

      # [해결 1] Xcode 15.0 이상에서 "DT_TOOLCHAIN_DIR" 관련 빌드 에러가 발생하는 경우 추가
      # 해당 에러가 없다면 이 블록은 생략 가능합니다.
      xcconfig_path = config.base_configuration_reference.real_path
      xcconfig = File.read(xcconfig_path)
      xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
      File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }

      # [해결 2] Xcode 27 이상에서 Pod의 배포 타겟 15.0 미만 빌드 에러가 발생하는 경우 추가
      # 해당 에러가 없다면 이 블록은 생략 가능합니다.
      if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 15.0
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
      end

    end
  end
end
```

2. pod을 설치하고 `.xcworkspace` 파일을 엽니다.

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

***

### Import 및 사용 방법

{% tabs %}
{% tab title="Swift" %}

```swift
import CaulySDK
```

{% endtab %}

{% tab title="Objective-C" %}

```objc
@import CaulySDK;
```

{% endtab %}
{% endtabs %}
