Skip to content

docs: provide information how to build a partly native plugin #83

Open
@MasonVX

Description

@MasonVX

Bachground:
There are some things within the SDKs of Android and iOS and also the capabilities of the Webviews which make it necessary to implement a plugin for one platform und use the web version for the other.

e.g. iOS has a great PDFKit SDK and and the same time a bad pdf implementation in the Webview (yes, pdf.js is not very great as well, some edge cases are not working at all and the performance is bad)
Android is good enough with the build in viewer.

Propose:
Document how to create such plugins.
You have to include the web part in the index.ts

const CustomPlugin = registerPlugin< CustomPlugin >('Custom', {
  android: () => import('./web').then(m => new m.CustomWeb()),
  web: () => import('./web').then(m => new m.CustomWeb()),
});

And in this case remove android from the capacitor property of the package.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions