> 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/flutter/undefined.md).

# 기본 설정

## 1. SDK 설치

* Android

아래 page 의 AdPopcornSSP SDK 설치 및 Manifest.xml 설정까지 확인하여 앱 내 세팅해줍니다.

{% content-ref url="/pages/07ujY2ZLJDcbzJ7a5WW6" %}
[기본 설정](/ssp-sdk/sdk/android/undefined.md)
{% endcontent-ref %}

* iOS

아래  page의  링크에서 IDFA 설정까지확인하여 앱 내 세팅하여 줍니다.&#x20;

{% content-ref url="/pages/fMDRjZmIzDTLySHdYr2S" %}
[기본 설정](/ssp-sdk/sdk/ios/ios-2.x.x/undefined.md)
{% endcontent-ref %}

나머지 광고 타입 연동은 아래 Flutter 가이드를 참고해 작성하기 바랍니다.

## 2. 미디에이션 설정

애드팝콘에서는 2가지 형태의 미디에이션을 지원합니다. 하나의 방식을 선택한 뒤, OS 환경에 맞게 연동을 진행해 주세요.

* 애드팝콘 미디에이션

{% content-ref url="/pages/XOGmPFQT7s0MbvOgKf5n" %}
[AP 미디에이션(Android)](/ssp-sdk/undefined-1/ap/ap-android.md)
{% endcontent-ref %}

{% content-ref url="/pages/IP2R7MXm9WlEBdvJxfnZ" %}
[iOS 2.x.x (구버전)](/ssp-sdk/undefined-1/ap/ap-ios/ios-2.x.x.md)
{% endcontent-ref %}

* Max 미디에이션(Beta) : 사용하고자 할 경우 사업팀(<pm@adpopcorn.com>)에 문의 하세요

{% content-ref url="/pages/esnyF96ixFtxH0IuGWzx" %}
[MAX 미디에이션(Beta, Android)](/ssp-sdk/undefined-1/max-beta/max-beta-android.md)
{% endcontent-ref %}

{% content-ref url="/pages/inI4X4hiPeJ8WPpyw8Zg" %}
[iOS 2.x.x (구버전)](/ssp-sdk/undefined-1/max-beta/max-beta-ios/ios-2.x.x.md)
{% endcontent-ref %}

## 3. 초기화

앱 시작 시, <mark style="color:red;">`AdPopcornSSP.init`</mark> API를 사용하여 SDK를 초기화 합니다

{% code title="Dart" %}

```dart
import 'dart:io' show Platform;
import 'package:adpopcornssp_flutter/adpopcornssp_flutter.dart';


void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    if (Platform.isAndroid) {
      AdPopcornSSP.init('YOUR_ANDROID_APP_KEY');
    }
    else if (Platform.isIOS) {
      AdPopcornSSP.init('YOUR_IOS_APP_KEY');
    }
  }
}
```

{% endcode %}

## 4. 로그 설정

Android의 경우는 <mark style="color:red;">`AndroidManifest.xml`</mark>에 debug 키를 추가해 설정합니다

{% code title="JavaScript" %}

```javascript
import 'dart:io' show Platform;
import 'package:adpopcornssp_flutter/adpopcornssp_flutter.dart';


void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    if (Platform.isAndroid) {
      AdPopcornSSP.init('YOUR_ANDROID_APP_KEY');
    }
    else if (Platform.isIOS) {
      AdPopcornSSP.init('YOUR_IOS_APP_KEY');
      AdPopcornSSP.setLogLevel("Trace");
    }
  }
}
```

{% endcode %}
