crossan007 commented on issue #949:
URL: 
https://github.com/apache/cordova-plugin-inappbrowser/issues/949#issuecomment-2274220173

   I had a similar problem with using `@awesome-cordova-plugins/in-app-browser` 
 in my Ionic Capacitor app.
   
   It would open the native device browser outside of the app.
   
   It was a silly misunderstanding on my part:  
`"@awesome-cordova-plugins/in-app-browser"` is just a TypeScript wrapper for 
`cordova-plugin-inappbrowser` so I had to `npm i --save 
cordova-plugin-inappbrowser`
   
   The official docs for` @awesome-cordova-plugins` 
(https://danielsogl.gitbook.io/awesome-cordova-plugins/in-app-browser) 
indicates running these commands to install it:
   ```
   $ ionic cordova plugin add cordova-plugin-inappbrowser
   $ npm install @awesome-cordova-plugins/in-app-browser
   ```
   
   However, when using Capacitor, the `cordova plugin add` command is rejected:
   ```
   [ERROR] Refusing to run ionic cordova plugin inside a Capacitor project.
   
           In Capacitor projects, Cordova plugins are just regular npm 
dependencies.
   
           - To add a plugin, use npm i cordova-plugin-inappbrowser
           - To remove, use npm uninstall cordova-plugin-inappbrowser
   ```
   This is because Capacitor just uses npm dependencies + `cap sync` to manage 
plugins.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to