# 오퍼월

오퍼월은 사용자가 광고를 보고 참여해서 포인트를 받을 수 있는 화면입니다. 애드체인 오퍼월은 단순한 광고 목록이 아닌, 퀴즈 콘텐츠와 AI 추천을 활용한 사용자 참여형 오퍼월 솔루션입니다.

<figure><img src="/files/5Azo8tGaVG1WU8BFmuxb" alt=""><figcaption></figcaption></figure>

## 기본 사용법

### 전체 화면 오퍼월

가장 일반적인 방법입니다. 버튼을 누르면 오퍼월이 전체 화면으로 뜹니다.

```typescript
import AdchainSdk from '@1selfworld/adchain-sdk-core-react-native';

const openOfferwall = async () => {
  try {
    await AdchainSdk.openOfferwall('main_button');
  } catch (error) {
    console.error('오퍼월 열기 실패:', error);
  }
};
```

### placementId는 뭔가요?

오퍼월을 다양한 위치에서 열 수 있습니다. 메인 화면 버튼, 설정 화면, 프로필 화면 등이 있습니다. `placementId`는 어느 위치에서 오퍼월이 열렸는지 구분하기 위해 사용됩니다.

placementId를 활용하여 데이터 분석과 어느 지면에서 사용자들의 오퍼월 활용이 많았는지 확인할 수 있습니다. placementId는 사용하는 API에 따라 해석 방법이 달라질 수 있으므로, 애드체인 개발팀과 사전 협의하는 것이 좋습니다:

* `"main_button"` — 메인 화면 버튼
* `"profile_menu"` — 프로필 메뉴
* `"daily_mission"` — 데일리 미션에서
* `"tab_benefits"` — 혜택 탭에서

## 임베디드 오퍼월 (화면 일부에 넣기)

전체 화면이 아니라 앱 화면의 일부(예: 탭이나 섹션)에 오퍼월을 계속 띄워두고 싶을 수 있습니다.

```typescript
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { AdchainOfferwallView } from '@1selfworld/adchain-sdk-core-react-native';

function BenefitsScreen() {
  return (
    <View style={styles.container}>
      <AdchainOfferwallView
        style={styles.offerwall}
        placementId="benefits_tab"
        onOfferwallOpened={() => console.log('로드됨')}
        onOfferwallError={(error: string) => console.error('에러:', error)}
      />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
  },
  offerwall: {
    flex: 1,
  },
});
```

더 자세한 임베디드 구현 패턴은 [임베디드 오퍼월 통합](/undefined-5/embedded-offerwall-integration.md)을 참고하세요.

## 커스텀 URL로 오퍼월 열기

특수한 경우에, 애드체인 서버에서 받은 URL로 오퍼월을 열어야 할 수도 있습니다:

```typescript
await AdchainSdk.openOfferwallWithUrl(
  'https://hub.adchain.com/custom/path',
  'custom'
);
```

일반적으로는 사용하지 않습니다. 특별한 프로모션 페이지를 열어야 하는 경우 사용할 수 있습니다.

## 오퍼월이 안 열리는 경우

오퍼월이 안 열린다면 다음을 확인해보세요:

1. **SDK 초기화 확인** — `AdchainSdk.isInitialized()`로 확인
2. **로그인 확인** — `AdchainSdk.isLoggedIn()`로 확인
3. **인터넷 연결 확인** — 오퍼월은 WebView로 작동하기 때문에 인터넷이 필요합니다
4. **로그 확인** — Metro 콘솔에서 `AdChain` 관련 로그 확인. Android는 `npx react-native log-android`, iOS는 `npx react-native log-ios`로 네이티브 로그도 확인 가능

## 오퍼월이 느릴 때

오퍼월 첫 로딩이 느리다면:

* 첫 로딩은 WebView 초기화 + 콘텐츠 로드 때문에 2-3초 걸릴 수 있습니다
* 두 번째부터는 캐시가 있어서 빠릅니다
* 사용자 네트워크 상태에 따라 다를 수 있습니다

## 다음 단계

* [퀴즈 기능 사용하기](/undefined-2/quiz.md)
* [미션 기능 사용하기](/undefined-2/mission.md)
* [임베디드 오퍼월 통합](/undefined-5/embedded-offerwall-integration.md)


---

# 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://adchain-doc.1self.world/undefined-2/offerwall.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.
