capacitor

'rm' is not recognized as an internal or external command when trying publish a capacitor plugin

跟風遠走 提交于 2021-02-10 03:59:26
问题 I am trying to publish a capacitor plugin. According to the error it is not able to recognize rm . I am using Window's Powershell (VC Code) The following error is being generated in the powershell when npm publish in run PS C:\Users\xxxxx\Documents\demo-plugin> npm run build demo-plugin@0.0.1 build C:\Users\xxxxx\Documents\demo-plugin npm run clean && tsc demo-plugin@0.0.1 clean C:\Users\xxxxxx\Documents\demo-plugin rm -rf ./dist 'rm' is not recognized as an internal or external command,

What is the right way to use Ionic Native / Cordova Plugins with Ionic (React) & Capacitor?

不打扰是莪最后的温柔 提交于 2021-02-06 19:56:34
问题 How can I use Ionic Native / Cordova Plugins with Ionic React (not Angular) using Capacitor instead of Cordova? I want to make use of Screen Orientation Plugin with Capacitor and Ionic React. This is because Cordova is not officially supported for Ionic React projects. Know More. This is what I have tried. import { ScreenOrientation } from '@ionic-native/screen-orientation' . . . . useEffect(() => { ScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE) }, []) My package.json has

Ionic + Capacitor: Motion does not work on device

北战南征 提交于 2021-01-29 11:31:14
问题 I have a simple Ionic page that should tap into the Motion plugin of Capacitor and show the orientation of the compass the device. Works fine in the Chrome dev console but not on the device itself - whether accessing the ionic server og via XCode. Code comes here: import {Component} from '@angular/core'; import {MotionOrientationEventResult, PluginListenerHandle, Capacitor} from '@capacitor/core'; const {Motion} = Capacitor.Plugins; @Component({ selector: 'app-home', templateUrl: 'home.page

Why is Capacitor Storage not storing or retrieving any information from Storage with Ionic React?

99封情书 提交于 2021-01-29 05:12:44
问题 I am trying to implement Capacitor Storage with Ionic React, but in the web it works properly, while when I build the application in Android it is not working, i.e. it does not read or save anything from/in local Storage, does anyone know why is this happening? 来源: https://stackoverflow.com/questions/63871319/why-is-capacitor-storage-not-storing-or-retrieving-any-information-from-storage

Why is Capacitor Storage not storing or retrieving any information from Storage with Ionic React?

旧城冷巷雨未停 提交于 2021-01-29 05:09:02
问题 I am trying to implement Capacitor Storage with Ionic React, but in the web it works properly, while when I build the application in Android it is not working, i.e. it does not read or save anything from/in local Storage, does anyone know why is this happening? 来源: https://stackoverflow.com/questions/63871319/why-is-capacitor-storage-not-storing-or-retrieving-any-information-from-storage

Capacitor livereload not working

我的梦境 提交于 2021-01-23 06:18:08
问题 I can't figure out how to use livereload with ionic 4 and Capacitor on ios. I'm running this command ionic cap run ios -l which add my local ip address to capacitor.config.json . however, it seems like I'm missing something in here. Note: according to Provide live-reload functionality #3130 this should work. my environment setup: Ionic: ionic (Ionic CLI) : 4.1.0 (/usr/local/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.0.0-beta.2 @angular-devkit/core : 0.7.3 @angular-devkit

Capacitor livereload not working

做~自己de王妃 提交于 2021-01-23 06:17:51
问题 I can't figure out how to use livereload with ionic 4 and Capacitor on ios. I'm running this command ionic cap run ios -l which add my local ip address to capacitor.config.json . however, it seems like I'm missing something in here. Note: according to Provide live-reload functionality #3130 this should work. my environment setup: Ionic: ionic (Ionic CLI) : 4.1.0 (/usr/local/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.0.0-beta.2 @angular-devkit/core : 0.7.3 @angular-devkit

Capacitor livereload not working

北战南征 提交于 2021-01-23 06:17:11
问题 I can't figure out how to use livereload with ionic 4 and Capacitor on ios. I'm running this command ionic cap run ios -l which add my local ip address to capacitor.config.json . however, it seems like I'm missing something in here. Note: according to Provide live-reload functionality #3130 this should work. my environment setup: Ionic: ionic (Ionic CLI) : 4.1.0 (/usr/local/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.0.0-beta.2 @angular-devkit/core : 0.7.3 @angular-devkit

Capacitor livereload not working

被刻印的时光 ゝ 提交于 2021-01-23 06:16:50
问题 I can't figure out how to use livereload with ionic 4 and Capacitor on ios. I'm running this command ionic cap run ios -l which add my local ip address to capacitor.config.json . however, it seems like I'm missing something in here. Note: according to Provide live-reload functionality #3130 this should work. my environment setup: Ionic: ionic (Ionic CLI) : 4.1.0 (/usr/local/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.0.0-beta.2 @angular-devkit/core : 0.7.3 @angular-devkit

Ionic 5/Capacitor ERR_CLEARTEXT_NOT_PERMITTED in Android

点点圈 提交于 2021-01-15 19:46:53
问题 I'm using Capacitor for building the Ionic app. These are the following commands run in order to open the android app in Android Studio. npx cap add android ionic build npx cap copy npx cap open android In Android Studio, I ran the build and click on Run after which I see the error net::ERR_CLEARTEXT_NOT_PERMITTED in my device. I have seen various posts having the same error but those are with Cordova build. In my case, I'm not using Cordova for preparing the android app. Here are few