# Pre-requisite

## 1. **앱의 네이티브 권한 설정**

* `android>app>src>main>AndroidManifest.xml`

```jsx
<uses-permission android:name="android.permission.INTERNET" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature android:name="android.hardware.audio.output" />
<uses-feature android:name="android.hardware.microphone" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
```

* `ios>Runner>info.plist`

```jsx
<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) Camera Usage!</string>
<key>NSMicrophoneUsageDescription</key>
<string>$(PRODUCT_NAME) Microphone Usage!</string>
```

## **2. 패키지 지원 설정**

옴니톡 React-native SDK는 react-native-webrtc 라이브러리에 의존하고 있습니다. 관련 지원 설정이 필요합니다.

* react-native-webrtc (`^111.0.1`)

  * `android> app> build.gradle` android section

  ```groovy
  compileOptions {
          sourceCompatibility JavaVersion.VERSION_1_8
          targetCompatibility JavaVersion.VERSION_11
      }
  ```

  * `ios > Podfile`

  ```jsx
    platform ≥ 12.0
  ```

## **3. 최소 지원 사양**

지원 아키텍처는 다음과 같습니다.

* Android: armeabi-v7a, arm64-v8a, x86, x86\_64
* iOS: arm64, x86\_64

안드로이드 지원 최소 compile sdk 버전은 다음과 같습니다.

* `android> app> build.gradle`

<pre class="language-xml"><code class="lang-xml"><strong>android {
</strong>	compileSdkVersion 33
}
</code></pre>

## 4. 앱 개발 공통 사항

### Step 0. SDK 객체 초기화

[콘솔](https://omnitalk.io/console/service/service-id)에서 발급받은 Service Id와 Service Key로 SDK를 초기화 합니다. 해당 정보는 노출되지 않도록 주의하여야 합니다. 초기화된 SDK 객체는 이후 모든 메서드 호출에 사용됩니다.&#x20;

Omnitalk SDK는 싱글톤 패턴으로 제공됩니다. 아래 방법으로 SDK를 초기화시키고 객체를 얻을 수 있습니다.

```tsx
import Omnitalk from 'omnitalk-rn-sdk';
const SERVICE_ID = '발급받은 service id';
const SERVICE_KEY = '발급받은 service key';  

Omnitalk.sdkInit(SERVICE_ID, SERVICE_KEY);
const sdk = Omnitalk.getInstance();
```


---

# 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://docs.omnitalk.io/react-native/developers-guide/pre-requisite.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.
