# Self-developed App Plugin

## Runtime Environment

{% content-ref url="/pages/V7G4uKVUp6TmGSfartxU" %}
[Requirements](/overview/requirements.md)
{% endcontent-ref %}

***

## Comparison of Plugin Methods

| **Plugin Method**     | **Advantages**                                                                       | **Disadvantages**                                                                             |
| --------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------- |
| **WebAR SDK**         | <ul><li>Can support a wider range of system versions (iOS 11+, Android 7+)</li></ul> | <ul><li>Requires certain development access cost</li></ul>                                    |
| **System WebView**    | <ul><li>Lower development access cost </li></ul>                                     | <ul><li>Supports iOS 14.3+</li><li>Requires Android 5.0+ and system WebView support</li></ul> |
| **Browser Component** | <ul><li>Low development access cost</li><li>Support iOS 13+</li></ul>                | /                                                                                             |

***

## Notes

Regardless of the Plugin method, the UserAgent property of the WebView component must not be changed to non-standard content.

Kivicube uses industry-standard methods to obtain basic browser information from the UserAgent.

Therefore, once the UA is non-standard, it will cause unexpected runtime behavior — for example, mobile access may be mistakenly recognized as PC access.

Reference for standard UA format: \
[User-Agent - MDN ](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent)

Recommended UA handling method:

On the basis of the default UA, only add your own keywords or identification information at the end.

Exampl&#x65;**：WeChat WebView UA**

* **WeChat UA：**&#x4D;ozilla/5.0 (Linux; Android 15; wv) AppleWebKit/537.36 (KHTML, like Gecko)

  Version/4.0 Chrome/134.0.6998.136 Mobile Safari/537.36 XWEB/1340109 MMWEBSDK/20250201 MMWEBID/9925 MicroMessenger/8.0.58.2841(0x28003A3E)

  WeChat/arm64 Weixin NetType/WIFI Language/zh\_CN ABI/arm64
* **WebView Original UA：**&#x4D;ozilla/5.0 (Linux; Android 15; wv) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 Chrome/134.0.6998.136 Mobile Safari/537.36
* **Information added on WeChat：**&#x58;WEB/1340109 MMWEBSDK/20250201 MMWEBID/9925 MicroMessenger/8.0.58.2841(0x28003A3E) WeChat/arm64 Weixin NetType/WIFI Language/zh\_CN ABI/arm64

***

## **Plugin Method**

### System WebView

#### iOS

<https://github.com/kivisense/kivicube-ios-sample>

#### Android

<https://github.com/kivisense/kivicube-android-sample>

### Browser Component

iOS: [SFSafariViewController](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller)

Android：[Chrome Custom Tabs](https://developer.chrome.com/docs/android/custom-tabs/)

***

## Custom Webpage Development

Use the Kivicube Web AR Plugin for custom development.

{% content-ref url="/pages/iLaACNAtPtQh6PKKFWuf" %}
[Quick integration for Web AR Plugin](/dev/web-ar-plugin-quick-start.md)
{% endcontent-ref %}


---

# 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-en.kivicube.com/dev/app-dev.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.
