> For the complete documentation index, see [llms.txt](https://docs.hackle.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hackle.io/en/development-guide/faq/webview-wrapper-intergration.md).

# WebView Wrapper Integration

{% hint style="danger" %}
**When integrating using this method, Hackle features will not be available in the app layer.**

* A/B Tests, Feature Flags, Remote Config, and other Hackle features cannot be used in the app layer.
* User Identifiers cannot be set in the app layer.
* MMP solutions such as Appsflyer cannot be integrated via the Hackle App SDK.
  {% endhint %}

{% hint style="info" %}
**WebApp Integration is recommended.**

* When rendering your own website in a WebView, WebApp Integration is recommended.
* Refer to the [WebApp Integration guide](/en/development-guide/faq/web-app-intergration.md) for integration instructions.
  {% endhint %}

If your app uses a WebView to render your own website and you do not need to use Hackle features in the app layer, you may consider WebView Wrapper Integration.

WebView Wrapper Integration is recommended when you use Hackle features on the web and only use Hackle push in the app.

With WebView Wrapper Integration, Hackle features called from the web will operate through the Web SDK.

### App SDK Integration

#### Android SDK

When integrating with Android in WebView Wrapper mode, set the `mode` as shown below when initializing the app SDK.

```kotlin
val config = HackleConfig.builder()
  .mode(HackleAppMode.WEB_VIEW_WRAPPER) // <-- add WebView Wrapper mode
  .build()

Hackle.initialize(applicationContext, YOUR_APP_SDK_KEY, config) {
  // SDK ready to use.
}
```

#### iOS SDK

When integrating with iOS in WebView Wrapper mode, set the `mode` as shown below when initializing the app SDK.

```swift
var config = HackleConfigBuilder()
  .mode(.web_view_wrapper) // <-- add WebView Wrapper mode
  .build()

Hackle.initialize(sdkKey: sdkKey,config: config) {
  // SDK ready to use.
}

```

#### Flutter SDK

When using Flutter in WebView Wrapper mode, set the `hackleAppMode` as shown below when initializing the app SDK.

```javascript
var config = HackleConfigBuilder()
  .hackleAppMode(HackleAppMode.webViewWrapper) // <-- add WebView Wrapper mode
  .build()

await HackleApp.initialize(sdkKey, hackleConfig: config);
```


---

# 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.hackle.io/en/development-guide/faq/webview-wrapper-intergration.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.
