Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using this plugin with Capcitor #61

Open
Groganj89 opened this issue Dec 12, 2023 · 3 comments
Open

Using this plugin with Capcitor #61

Groganj89 opened this issue Dec 12, 2023 · 3 comments

Comments

@Groganj89
Copy link

I am trying to use this plugin with capacitor.

I have followed instruction to run:

npm install cordova-plugin-brother-label-printer

I have then ran npx cap sync to which I get this:

⠙ update ios [info] Found 1 Cordova plugin for ios:
[email protected]

From this point, how do I call the function such as findPrinters within the www/printers.js.

I am about to yeet myself out of a window...

@arcadius
Copy link

@Groganj89
Copy link
Author

https://github.com/AbobosSoftware/cordova-plugin-brother-label-printer#sample-code

I tried this but I do not have access to Cordova as it is not defined in a Capacitor application.

@arcadius
Copy link

arcadius commented Dec 12, 2023

When you install the plugin, capacitor brings in cordova code .... so cordova becomes available.
Before using the sample code, you only need to declare cordova like
declare var cordova: any

I updated the sample code at
https://github.com/AbobosSoftware/cordova-plugin-brother-label-printer#sample-code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants