> For the complete documentation index, see [llms.txt](https://docs.caf.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.caf.io/caf-docs/caf-product-guides-pt-br/guias-de-inicio-rapido/onboardings-integration/webview/webview_react_native.md).

# React Native

### Dependências

Adicione react-native-webview às suas dependências

```
yarn add react-native-webview
```

ou

```
npm install --save react-native-webview
```

### Manifesto do Android

Adicione estas linhas ao arquivo AndroidManifest.xml no módulo do seu app Android:

```xml
<uses-feature
    android:name="android.hardware.camera"
    android:required="true" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
```

### Info.plist do iOS

Adicione estas linhas ao arquivo Info.plist no seu módulo iOS:

```plist
<key>NSCameraUsageDescription</key>
<string>Permissão da câmera</string>
<key>NSMotionUsageDescription</key>
<string>Permissão de movimento</string>
```

### WebView do React Native

```typescript
import React, { useEffect } from "react";
import {
  SafeAreaView,
  StyleSheet,
  PermissionsAndroid,
  Platform,
} from "react-native";
import { WebView } from "react-native-webview";

function App(): React.JSX.Element {
  return (
    <SafeAreaView style={styles.container}>
      <WebView
        style={styles.container}
        mediaPlaybackRequiresUserAction={false}
        allowsFullscreenVideo
        allowsInlineMediaPlayback
        source={{
          uri: "https://cadastro.io/:token",
        }}
      />
    </SafeAreaView>
  );
}

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

export default App;
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.caf.io/caf-docs/caf-product-guides-pt-br/guias-de-inicio-rapido/onboardings-integration/webview/webview_react_native.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
