# Cauly

#### Cauly

{% embed url="https://github.com/cauly/iOS-SDK?tab=readme-ov-file" %}

## 사용방법

{% hint style="warning" %}
**2) 초기 셋팅,  3) 초기화 진행은 위 링크에 들어가서 직접 설정하시는 것을 권장드립니다**
{% endhint %}



### 1) 설치

{% content-ref url="" %}
[]()
{% endcontent-ref %}



### 2) 초기 셋팅

**Info.plist 설정 ->** [**링크**](https://github.com/cauly/iOS-SDK?tab=readme-ov-file) (Cauly 폴더 Click)

* [x] ATS (App Transport Security)
* [x] SKAdNetworkIdentifier
* [x] ATT(App Tracking Transparency) Framework 적용
* [x] URL Scheme

<details>

<summary>ATS (App Transport Security)</summary>

```xml
 <key>NSAppTransportSecurity</key>
 <dict>
 	<key>NSAllowsArbitraryLoads</key>
 	<true/>
 </dict>
```

</details>

<details>

<summary><strong>SKAdNetwork (2024.03.04)</strong></summary>

```xml
 <key>SKAdNetworkItems</key>
 <array>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>55644vm79v.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>4fzdc2evr5.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>4pfyvq9l8r.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>v72qych5uu.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>6xzpu9s2p8.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>ludvb6z3bs.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>mlmmfzh3r3.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>294l99pt4k.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>24t9a8vw3c.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>hs6bdukanm.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>cstr6suwn9.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>54nzkqm89y.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>wzmmz9fp6w.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>yclnxrl5pm.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>7ug5zh24hu.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>feyaarzu9v.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>kbd757ywx3.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>275upjj5gd.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>9t245vhmpl.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>44jx6755aq.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>tl55sbb4fm.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>2u9pt9hc89.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>8s468mfl3y.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>74b6s63p6l.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>uw77j35x4d.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>gvmwg8q7h5.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>gta9lk7p23.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>32z4fx6l9h.skadnetwork</string>
 	</dict>
 	<dict>
 		<key>SKAdNetworkIdentifier</key>
 		<string>3rd42ekr43.skadnetwork</string>
 	</dict>
 </array>
```

</details>

<details>

<summary>ATT(App Tracking Transparency)</summary>

```xml
 <key> NSUserTrackingUsageDescription </key>
 <string> 맞춤형 광고 제공을 위해 사용자의 데이터가 사용됩니다. </string>
```

</details>



### 3) 초기화

**->** [**링크**](https://github.com/cauly/iOS-SDK?tab=readme-ov-file) (Cauly 폴더 Click)

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
@import CaulySDK;


{
    // 상세 설정 항목들은 하단 표 참조, 설정되지 않은 항목들은 기본값으로 설정됩니다.
    CaulyAdSetting * adSetting = [CaulyAdSetting globalSetting];
    [CaulyAdSetting setLogLevel:CaulyLogLevelInfo]; //  Cauly Log 레벨
    adSetting.appId                 = @"1234567"; //  App Store 에 등록된 App ID 정보 (필수)
    adSetting.appCode               = @"CAULY";//  Cauly 로부터 발급 받은 ID 입력
    adSetting.animType              = CaulyAnimNone;//  화면 전환 효과	     
        
    // app으로 이동할 때 webview popup창을 자동으로 닫아줍니다. 기본값은 NO입니다.
    adSetting.closeOnLanding         = YES      
}
```
{% endtab %}

{% tab title="Swift" %}
```swift
import CaulySDK

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    setupCauly()
    ...
    return true
}

func setupCauly() {
   // 상세 설정 항목들은 하단 표 참조, 설정되지 않은 항목들은 기본값으로 설정됩니다.
   let caulySetting = CaulyAdSetting.global();
   CaulyAdSetting.setLogLevel(CaulyLogLevelInfo)//  Cauly Log 레벨
   caulySetting?.appId = "1234567"                 //  App Store 에 등록된 App ID 정보 (필수)
   caulySetting?.appCode = "CAULY"                 //  Cauly 로부터 발급 받은 ID 입력
   caulySetting?.animType = CaulyAnimNone          //  화면 전환 효과     
   caulySetting?.closeOnLanding = true             //  App 으로 이동할 때 webview popup 창을 자동으로 닫아줍니다. 기본값은 false입니다.   
}
```
{% endtab %}
{% endtabs %}

