码迷,mamicode.com
首页 > 其他好文 > 详细

ionic常用命令

时间:2019-08-31 01:24:30      阅读:180      评论:0      收藏:0      [点我收藏+]

标签:efi   hid   imp   core   building   ble   prepare   http   cti   

ionic cordova prepare android 
ionic cordova run android -l


If the Logcat window is hidden, you can enable it in View » Tool Windows » Logcat.

File Protocol

Cordova and Capacitor apps are hosted on a local HTTP server and are served with the http:// protocol. Some plugins, however, attempt to access device files via the file:// protocol. To avoid difficulties between http:// and file://, paths to device files must be rewritten to use the local HTTP server. For example, file:///path/to/device/file must be rewritten as http://<host>:<port>/<prefix>/path/to/device/file before being rendered in the app.

For Cordova apps, the Ionic Web View plugin provides a utility function for converting File URIs: window.Ionic.WebView.convertFileSrc(). There is also a corresponding Ionic Native plugin: @ionic-native/ionic-webview.

For Capacitor apps, converting file URIs is very similar:

import { Capacitor } from ‘@capacitor/core‘;

Capacitor.convertFileSrc(filePath);

ionic cordova plugin add cordova-sqlite-storage

npm install @ionic-native/camera
ionic cordova plugin add cordova-plugin-camera
 

 

 

ionic常用命令

标签:efi   hid   imp   core   building   ble   prepare   http   cti   

原文地址:https://www.cnblogs.com/znsongshu/p/11437557.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!