# Plugin development

**URL:** <https://forum.ionicframework.com/t/plugin-development/241273>\
**Category:** Capacitor\
**Created:** [April 26, 2024, 7:04pm UTC](https://forum.ionicframework.com/t/plugin-development/241273 "2024-04-26T19:04:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![amss](https://avatars.discourse-cdn.com/v4/letter/a/7bcc69/32.png) [@amss](https://forum.ionicframework.com/u/amss)\
**Post date:** [April 26, 2024, 7:04pm UTC](https://forum.ionicframework.com/t/plugin-development/241273/1 "2024-04-26T19:04:31Z")

</div>

Hi,

We have a mobile library (Android and iOS) and we also have a JS library, now we have an App developer who wants to integrate our library into his App, the App is built using Capacitor framework, so I checked the docs and some topics in here in the forum and what I understood is that we should build a custom plugin which will call the native SDKs directly, but while I was working on this plugin I discovered that Android opens to a certain URL based on this configurations,

```auto
{
  "appId": "com.xxx.yyy,
  "appName": "XXX-App",
  "bundledWebRuntime": false,
  "webDir": "build",
  "server": {
    "url": "http://192.168.28.43:8100"
  }
}

```

this URL I guess represents the website in a mobile view, so now I’m a little bit confused, should we integrate our JS library directly into the Capacitor App or should we build a custom plugin that is a wrapper around the native SDK.

Note: I’m a native mobile developer.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![julio-ionic](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@julio-ionic](https://forum.ionicframework.com/u/julio-ionic)\
**Post date:** [April 29, 2024, 8:38am UTC](https://forum.ionicframework.com/t/plugin-development/241273/2 "2024-04-29T08:38:22Z")

</div>

The url is used mostly for development, while there are people using it to point to production websites, is not recommended.  
Anyway, that doesn’t change anything.

What you should ask yourself is if the js SDK and the native SDK are equivalent or not.  
If the native SDK has features that are not available on web and you would prefer your Capacitor users to use, then create a plugin.  
If everything works from the js SDK and there are no benefits for users when using the native SDK, then don’t create a plugin and use the js SDK.

I say “if everything works”, because some javascript APIs might not work when using them inside a WebView, or some things might work but a bit different, like if using fetch/XHR to a server, they are affected by CORS, so if you don’t have the server configured to allow requests from the apps they will fail, while native connections won’t.

---

<div class="post-metadata">

**Author:** ![amss](https://avatars.discourse-cdn.com/v4/letter/a/7bcc69/32.png) [@amss](https://forum.ionicframework.com/u/amss)\
**Post date:** [April 29, 2024, 11:00am UTC](https://forum.ionicframework.com/t/plugin-development/241273/3 "2024-04-29T11:00:24Z")

</div>

Thank you for your detailed answer.  
I read [here](https://capacitorjs.com/docs/guides/storage) that when it comes to the device’s local storage it is not recommended to rely on the local storage of the webview as it is wiped after a short period by the OS, and in both the JS SDK and the mobile one, we rely a lot on the local storage of the browser and mobile, in addition to the CORS, so I guess I won’t be able to use the JS SDK, right ?

---

<div class="post-metadata">

**Author:** ![amss](https://avatars.discourse-cdn.com/v4/letter/a/7bcc69/32.png) [@amss](https://forum.ionicframework.com/u/amss)\
**Post date:** [May 1, 2024, 3:21pm UTC](https://forum.ionicframework.com/t/plugin-development/241273/4 "2024-05-01T15:21:19Z")

</div>

@julio-ionic I would appreciate your answer.
