{"_id":"@alitajs/cordova-native","_rev":"77-f930830521d25c084c79418627b1758f","name":"@alitajs/cordova-native","dist-tags":{"next":"2.8.33-beta.0","latest":"2.9.0"},"versions":{"2.6.2-beta.2":{"name":"@alitajs/cordova-native","version":"2.6.2-beta.2","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.6.2-beta.2","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-BLJGTlypP5fC1ofdv8/p+plVcBt0UK5IdlAffFN+FeJVvXQhJfdU6pI/bSvezVyhWYOP5XWjKwgcPeDT/6XzDQ==","shasum":"79dfc82040c43d6b5d6f8ed3544cacff6045f00b","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.6.2-beta.2.tgz","fileCount":5,"unpackedSize":24447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrP8wCRA9TVsSAnZWagAAxRIP+gOkAukdrq4s6/oDrxf7\naqC+4GWpCay39vVspab1kdaA/sIzRWJByvFtbHIJibSbSrFfPS1VNgPN0Ah+\n5J+bLqPe6poiOgbEJGjA746F95Y0T9QMGLSoM4+24s6SGquuqvgYiE+EheMe\nYzzUVlDsTsT3N/4irq5NWGA1MtiV62ua9kCNlA/rn+XJ2Z1C//iVKPOI5rjV\n/su5kn6KBGSEzGl/lUWSsM8lwnFKN4t/0Qh33TIqBfj1OBZijKa5emkfpNgP\nnc1ZZ99sys9uK3jmeR1k2IvlFcs3qA4Bli8L83wbk1+P/PGi4nLQaLRUnzr5\neGG/K7rLjyqyinU4B9dSk9YkGWmN98Y2sPm32YbYD57y0q91lpR3YQtwG/aq\nwZ+9AnN1SHRYcqFLKTt04RxaqqZBjYlIE5NPG/5sySpu4rg4TBgD0zSQT3KJ\nGzsYyTjySmnJ51QZnTHV2aY1S+sSC8Li/6BUeUAJJVk5Ayo9FWGqdy9bzecq\nMptCKimO346HE+imw5uH6TKkVtScEzSrF/9bUT6zMprdfNyQirQl0geAW0Bw\n35n1gzikYA1dzEfkj0M6iSI4rnpZClyQOBxmoF908P0lvcbVMLo0vgtOt+r9\nJDVfbuB98EtS8pYmgHH85HdnfmdO6m7T/vS7AbOURsz/fuONODoYMmlZeSNF\n0pf1\r\n=TSZ6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCD477UNdanzaUy8Q2TPeybVmLOBLUKNjvLk3BBuc4azQIgGiSJx+XV31HDGbP495GTK/G1gYM7EDLtylWARQfuanU="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"qclong","email":"1270253618@qq.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"xiaohuoni","email":"448627663@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.6.2-beta.2_1605173039907_0.7549802868533222"},"_hasShrinkwrap":false},"2.6.2-beta.3":{"name":"@alitajs/cordova-native","version":"2.6.2-beta.3","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.6.2-beta.3","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-cPJuu7F+TfOTzHm41hHY1Q0Ud+jEfMrrgO0jAK4xjQepM14HEwvV3amcKVXMYmTYBpzmbezkOS0CcjZuw/ChOg==","shasum":"fbe4fafdfa5c6b1defabc7dc5269e40ba88bd49a","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.6.2-beta.3.tgz","fileCount":5,"unpackedSize":24447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfsefVCRA9TVsSAnZWagAAXDMP/3/qK7hKM72j72BAMP9E\nlKJ1clMfSASaZLiXEib8+PfixpRdBUYJBIXH3KI+GiiYaq2Qo4dAXjNJxcx1\nlqKDWDoXr7k+xQ2NzWdsyFi7D+kDYcaNLqgapZUWyJkTdTFDyrAt+CwCf97A\nKWNe9OOCU2u3tRowEtAbUMP2GVycf3bFr3nldCHSbV4A9h74DLXf56cPWEpD\nzdi4l4kYTit5twcmeLoqlRIxu+49vo8/ZOmBUcRlmKi8zfQo9g4bX5ztWCp8\nD2xocl/G1XCb3OGA9yd51Y9I5Tnvm7YPyd5CeBtir3XHiw/v2G4hJ+BKggUn\nEAIEFG+WwPegNQYjzeNNXSehH5XtTP5ewQKhVty55BS9brQDlEl00VBKUQO0\nqbhbU0OOHlhSb6IIE6bcKiyIYEH72bF/tjirgfcAmlNm/P8mGJ329m+A+jZb\nx9OzlUD/bsn1jkV+2f8bNzVsluebrcI06jaN+luIHTBHIUeDfZCn5nvQeNYy\nTnuhIUQSFDHqr9BJKTjmLI/m8wBjB+vC1UtjUIN6DxX14OTQh0lw45/gm3F2\n4JNS4ED/KttHGOoVxJX+YX1ocumj4g3ipMkFRS8InsYlr2ude8NqK8YM/ctz\n9dFxXOjzBLH2h/+w/3wqlakb5FKtDgc57idSJ+4AJM2QKtIGs3DZfSOx0gI3\nZoHE\r\n=wg+r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICJlNu2TsnjmUWicqYs5ao6p+jxH4fORd1bbBG5sA9sGAiBbPyZFoe8hbpRDGrXj/mcP9Ji0AGVvqPzSCskZuBHvEw=="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"qclong","email":"1270253618@qq.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"xiaohuoni","email":"448627663@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.6.2-beta.3_1605494740701_0.0013749707746031348"},"_hasShrinkwrap":false},"2.6.2-beta.4":{"name":"@alitajs/cordova-native","version":"2.6.2-beta.4","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.6.2-beta.4","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-PDC8ex0QqVvT8Ol7+E++IeUcrTx5CUooopyvj/MS2vzDcmNc4YRG23JKVNdKQkd8mo/mc5cHR/jl3rmuB6qAFw==","shasum":"5a8cc5b9fb04926f410a18c2b3338f186dfbad24","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.6.2-beta.4.tgz","fileCount":5,"unpackedSize":24447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfse8MCRA9TVsSAnZWagAAwLUP/3OMS675Ii4jcKAy5iTu\nCv4MPUgjxV9+taAKbf+RomzegPA7bobJUMylPkBKyzJ70zjd2ce00ZCws0qF\n/g31kDw0HG5nQ7Anys/O5+tAwnzIi+30MumFINh8YjGPo9ZVWcQVNjV5op7Y\nJFxDY678wmWlfPeESOqQlqCgNU3m9aUFdzpVMyog8YAqBnHOl3SqkpTCJtW6\nVTWOldM9fUyK+JcaDercuJxSiRJ94Qc2XNZ2X1DbmJdKeZbnojkwWOJvH+8W\nA6YRTrowiUmW7+X6+jhFzMZzhK6cz9w0Nf1+oJCH+vgw3qALbRCawhIBpTdk\nGpfSds/LxKvuVzszlhtRxPBuutIO4oYgLUMAPUo523B8TzJPe2DTd65y13rv\nst/F/sgPPYoWdS8ssGBUkrOic/Ogb6l6oLpX32HRMZI3klLti+QCynY1BSMP\nFTDePwqRMaiECJeRmZB6zofHrI+iZbsGR9+GZTn8sNEEpwtsvZc/IF280ehG\ngzRKjxYBmKvrjs1kSHXoGcaLtoNSKLUKPQbPNuRzsr5dIVHPZ4/5WWVju1v9\nbFWwPs07/J/itH6HMMu72PEVZCdQjEeMWlUGipEuu+eHEWvUBJ6QfLx9+7cg\ndLrwE+Q5m1jhgVOUlZGJ45ucb5HfOGTQ4H/OKAFhESW/jzdx8YZI5mVsybGx\nFZrC\r\n=+RY/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3yk3r7F2yYcDGbI8XIX4wo8s3U7BpbTym3m1igyzkMwIgBNtwxVzqGDQxnUakjLn5Y0At9+NHTAU4vBk1AKQoFXA="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"qclong","email":"1270253618@qq.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"xiaohuoni","email":"448627663@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.6.2-beta.4_1605496587681_0.10748146438067852"},"_hasShrinkwrap":false},"2.6.2-beta.6":{"name":"@alitajs/cordova-native","version":"2.6.2-beta.6","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.6.2-beta.6","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-m4155r4IqxMvPaYBqEDerD+lo91xo+zDsmJvR1cHJhZhevXcRJ3cIN71McvqaQn9rxSwFyjQ9y8RkBe/QA9+0w==","shasum":"28fd170e9d7df83be51fab8aa22787238cd8a68c","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.6.2-beta.6.tgz","fileCount":5,"unpackedSize":24447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfs5OXCRA9TVsSAnZWagAA5JwP+QG1RaWdGxUWZ5f96/em\nVEJNV+w+o/hVxc9V23Klpcy9oVQ6MxDnQqYtF2jLH9qCKK0cm2lBiGfoo7bA\nD19ZcTUz/+885UOFIV/qx72cFeJYiEYfWTRjepSh2BN41yJ9zjPQpj0T3FP2\nLbJX7EQHAN1nMS6UGWXaUlW83DPO8sCQf22x+CoAnI0z3jkYrFpe/HxJtg7A\n6qudVRJF+RzrFgBsTanFzHDJM3pSySlJ9qz3fD8U5gPCfk7/i8WQ85ULvrBn\nI8Zd4mLBkJhgD547Oo19McVyBrmRxIgAFFg1MZk+UzQU3ix2hZ7bV5ONBVK6\nVE88rbc66QGoiymzDtmLPqY9k4eQ38PckZ1ry05Dc1dXk3iRmWCKZzbuDelD\nsXHcokOUZLquKaqtOwV5G5WqpUYxSFuBPeQCJTsMqQETyyUWEK5Pe7SvG91L\nSTUR7sFJXI9E/S1qOc4stjvGBQMxrqt7WtwyunDXG67k8yLtiFivgUGa6yOr\nWV/HGuPErDnFJ9YHF1JjWABdlN3q2YccVgjTUOrtNiWnSki+7GX8hq6daV9s\nFdO9+2WU1AOhaGvYmG2dUKNR/jvZD/VtH8bfAbkAETRqI26+f8HHqQWwwEFV\nhE8A5NioaRRjuDx5XzMlDE3vVhEXE7+2alNYK2ZuONJ5nHYDq4bQP5NaN7+F\n00bg\r\n=iBI9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6LdUli2kNeqIOA7dHS/t/aybPycn6wLd9yIh3gE+nCQIgaV+Ym/4KjrWtYBP9xyam7gyTkQFyQ9Cn0gx9HI6d3Yw="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"qclong","email":"1270253618@qq.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"xiaohuoni","email":"448627663@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.6.2-beta.6_1605604247144_0.21153485889573642"},"_hasShrinkwrap":false},"2.6.2-beta.7":{"name":"@alitajs/cordova-native","version":"2.6.2-beta.7","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.6.2-beta.7","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-HiJBoyjKcDbxp6kz9O6M0MNn3DBfw2rl/6orOB79MpXtpC6BOyGrzjtbEypJ895FbAhIDR02XvejMoTvHVDa9g==","shasum":"720a8e5615f8780cac03c122225ee540b8ee0f30","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.6.2-beta.7.tgz","fileCount":5,"unpackedSize":24447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfs5czCRA9TVsSAnZWagAAvzcP+gI86c1rg5TfacSnFVsp\nwNHPWcDbj7vAsFIAzlXY2YD+16UN1Guub96dQNNLGtGAb2fBSlJlUBZhNRAM\n+fcnaOgVf7jbua5sfFPujPayZUssXqeLke0evXuGhG7mGaLM5TXueuOQ6T0A\nazUmC8FBwjARzHVTrtqYfuT/UjZep0nL93eGmSgcQmy0EtRMdqGvb7UqDONb\nBfLfnGHdosjUoFhino6L0mnEnydEYO2JSXDnix1N6MM+AejgqY+S+Ac3Fp7G\n7276h5yq4N9iibl760lsgDvyCjl+Bs51VHc5qupA58rWoYZmCi9NR4XNXvno\nQZ8AhCatRTx5E23Z1DZ+RrrAwkhS3YbxvJe6GIbUG2nCupe8vDei7qD/du5i\n24Ehmjgyk5JzH9HPbfzHBLB7U9Ms5C+vsbJ7ZeK7U1kWiYnKkibDE77ZL7kT\n7L4UutsECeqK2qwXJNrFpWpbH9mhr5QrjCURYHegltKROI4QE5FK9e5Oqs1a\nphRWkCIuV/u6jhilwzZurg9vyBhdwb3MrS8Mi8DTx04QrfKqmHEQuzGIauNc\nT0T1AnEfyLz3/aMdYdchDCOkCl46fedEBxxiNya7WqYF0Tti/5d66yz5xzVO\ncjH/c67nBd4//v7zN6YN0+u14Az2oWZTrVXIMeoG1B8/2pJ/LJnuCDjsfCKr\nyHah\r\n=fd8B\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICdbOfeRwta8V6NZUYH4oY7iX20+Hn651VzD+wKm89otAiEA6KxEivkhfEBjq8BNFf6F/WjlNCV1A/5hfE7cJ8JlNGc="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"qclong","email":"1270253618@qq.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"xiaohuoni","email":"448627663@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.6.2-beta.7_1605605171098_0.9591983929081391"},"_hasShrinkwrap":false},"2.6.2-beta.8":{"name":"@alitajs/cordova-native","version":"2.6.2-beta.8","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.6.2-beta.8","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-2Tlrmq1MHtt3RdHrBbrVX/KsIEpO8Rixa4DybegcwAxaJ3MXHrIF6h0pSLDFNMqJlJ9LbLiUOWYJ0oxY2UerWQ==","shasum":"396e6f4a04325d53eeb6fda19d70bfb4aeef733a","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.6.2-beta.8.tgz","fileCount":5,"unpackedSize":24447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftOLiCRA9TVsSAnZWagAAMPwP/3mLOFrv8GCuFiQu7bB1\nn7ak2r7ub26WB5uiRErhWxyGqDVquvzlrig0paqav05R4T19wbljOx1cKj4/\nv4EhUHjleEPq0ktjf5flPV48PmKyxcEdT100+qUv3AUweu0KkbzukJDYG6H3\nrSUYUSqRm3r1CDBzV9X3CwmTDwdFqKYbMNVy47ggrOEXJKcW2pcADtQ+J7Jy\nZ1TVdcu6ZYFaa3cMr/PZohmjNosW69HexxK5jYosj0nM4DYxg5RIGQZJ95fL\nPZSMxyLuUWOIB+NBuPC+lPCxVz1peCmZ//XQ+bjhKddbwSgPHyGBnveMJxZa\nSG8ozR2dKto5Add8mIdMMsXwxzeM09iTpwOSrHDmevW+kCSNfbkaywIRhS2J\nOyCsIopOanP7ckefwA6jQEeTz6EngDzB7C+eqAfJbFPUCamCgASX9IhyYtPp\nV0jtihWRG5YbeVQnHFSln4orn/F7ik5+h+MXed8+HP8F/bzN+E8bp8X9a8Ma\nwNxb9gtpaov06euHkhgdkXMEXdwgYzCYz1lRmw3oNQVE6H0oJ97m59+T74b+\nJgfTAy/JhnXuIJlDlE73NBWgVmRvEiCOqelY7BT56CPMm2k1m/v68R//Os9w\n5FLK+M/tJnSm4ujXwr+IGYy7rv4oa6HUsTIVX3LUTX9Lj7mX1d7v77DJIr3x\n2HlO\r\n=mp6n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYFsZPAxUCuEmnfFM4+I22jaeTMSwqAYbc2XfjQtgVfwIhAL6gDJHBMRp6sCQCaYUmx7LKc7bIvLDSXc5GiHiFU+vu"}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"qclong","email":"1270253618@qq.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"xiaohuoni","email":"448627663@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.6.2-beta.8_1605690081942_0.14045130967461805"},"_hasShrinkwrap":false},"2.6.3":{"name":"@alitajs/cordova-native","version":"2.6.3","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.6.3","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-vLnUUX8nYXNvVJIeDnVRCfMSUQdqCU4zaBrJRSCrWqUZzrLoZRPTZ0/LYXlhWrl6O9o7BI46qg3Vj6rjLBk4xQ==","shasum":"ecc7de9e91505f096492724fdaaeb5edfe3ae245","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.6.3.tgz","fileCount":5,"unpackedSize":24440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfu0yrCRA9TVsSAnZWagAAfAYP/iyexjpozHa4tJZGl16G\nNRQWUxbvuzBaHAzuq7dluOJDtIK9FFISIOvWhod4+S4PHiPc7BQoHJEQhNbv\nfyZUkDlfS3vp26/w++722kma+u+BdRxY+I8lvHS4ZJ5tKZIwLbl6TpRzOyOT\nkZI5cLpqm6Hp4t/Llm6ahxxI5CimloY7L/7N5l9AEVtxC1aG9DhWaGdUQt+a\nId5qY8fZOcU1EzIrjn7lO0ci9ss8m/ba5XP5GjNr03q3LBZ78E8ySqVdakbv\nes7Xje68VhzxYyYoBNgK7dx1rLfwSIizD9UflfL8BkZr4T77qrRMJbToo8u4\n22euwHa4feOW4VS7OMQPyqsD2N22z9K0O1il7PJtr47vNGHqf9J3aEiBG3kl\nM5eb6OOGCFN+jLDQwnnhtFwzq8g7zfRzeRgOX1cJ/vFQyHtOeuJh7FCV1+EQ\nm90TG2/7S/lETnLhZbrPKAf3M3SGH5aQ5h4bGYgF5GW9Gh6yKCgb3FppMEVp\ndzO5cAyNNyv2tItDWPRh2KKLSjPUwIJicvNtubKALkyG2PMJIxq/08OuiT1T\n/0h/CS7AM0zm54ID7PBo9rQnNt/TnhZQl3crVQdu1bWjIa7y3XtSmJhcjkzf\ni1Qdv33IeeEr7wOIfpcaJvfV1bOUkQXjcqomXA/0xO+FP35AIYLPLVTb7vd4\nuj7X\r\n=9ek0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAeWt2AZOmEKJj6Jn9LkzVF3/CzUVm2/ZP/f7s/CpsIBAiAtfEqHoePX+hpu9wQtt67VQrS+NjiGBgHD8VZ3RURMsA=="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"qclong","email":"1270253618@qq.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"xiaohuoni","email":"448627663@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.6.3_1606110379127_0.019177651062603163"},"_hasShrinkwrap":false},"2.6.5":{"name":"@alitajs/cordova-native","version":"2.6.5","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.6.5","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-93RCkdHFros+7Is/MkTetOh5VclWSyfFLH2T+uxGrDEl4Q14JZYf4Vx31XtLU858I2b+Y/3q4DcUeBJLzUL5QQ==","shasum":"324c311401025809661846d666d24ba7a557a414","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.6.5.tgz","fileCount":5,"unpackedSize":24440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvKenCRA9TVsSAnZWagAAuJAP/A34ligsZsTGgZtgP9Qf\n+krpa65fVVNPKk1/MS+8OiTGwYvQeG8PALUZg4LdGpnDPaWEGqLtjik/PS9z\nbBNu5smvroWx0FnG2koJhLCDGmoeroWYgpuW2or3jqyT+6iRp+js5EwXYbj9\ntgqtN7JA8Ljz+68IQ+Aj4+9N7lv1H3Qq4JrqP0C0YaR1aaVBojTZumemTcr+\n5CNNNf+eaRCm0Z1cUuJ42cSHllTLp1FAfK7WgaNN19LOX18Yt0EJqn/3RS1L\nh7bVpssWOW0p5Z+UlbViNQ2iIV7l4uCraa+6PEfqtW/7Kgk+0JQXtsz4e6Gs\nS/20WOeI2qcRxCVIc6WR6SQ6rDo46/dPwhgbdmwHchwVnXSnS8mOlVn/jPlM\nwv6g0zfQFjfWV3pkXt71i9cFVymD8vQgyBHrp/jTgkJrOyKMOPDrYGbJoFLG\n19SRXrzHGlbdaRuk8G0jm6EvGffcG7BGJ3d7hFKHpMzQzw1FSCOF7b5859EI\nwwdE5z+c2gFsbRpIaDSNuTm7EiWCk9oIwZgDoU4iUm/Zcdq7HNm6t9oShkrP\nxHqsBLkiyUYLDWlOn2wfP9fb+hreJ3PvsjKi2tSrA+4xdQLHrSotEFfs4Rjo\npjskOXtPDJUb+4GWWlXDpW9ylW+n0QPOyl6N1Yo+bU4Lj+7DM9icXgVpAInV\nd9VM\r\n=eODc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD24kJl9M+LV3Y4HTbh2Pl+ZpCbpCs6PEMJO8pxlqaCuAIhALksDebXKM4VlVJSMcE2dyl+IYmWmscdjixvaIGEJB2w"}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"qclong","email":"1270253618@qq.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"xiaohuoni","email":"448627663@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.6.5_1606199206786_0.2996644761970655"},"_hasShrinkwrap":false},"2.6.6":{"name":"@alitajs/cordova-native","version":"2.6.6","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.6.6","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-KKZ3RQHX7fSHpqtDu5gNT2i1lm38GbVr3itysVEuyYhtgUDHKcCNvwsiX2p/YiuAWtzogfsBKkAFMlXXJjD+vA==","shasum":"82cb30534ef01f4b73f205dd4b2c8fa704af81ff","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.6.6.tgz","fileCount":5,"unpackedSize":24440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvx01CRA9TVsSAnZWagAAROAP/iNZBSYAS0FMkjGQeApO\n0HaT0Yl398/yKWRstxYiviwhRbRS4pBU5Fn7UmC5JrRiQSnvVGiYZJHNfi4/\nZVF7Q8FaB7qXO7xC+EFsljWw7xMdmuxtXU0zjpKu8F7b12zmf4xl1AOECiyj\nmxd6U8ZvXo+5D2Ry3CrI+inEg1tfXoRuZ7VTHy3TWTMdqUTFiJDASXaiyvXs\ncUUCgTwLGj7hH6AlKAa0So7W82dBKHLyQiAOn5CX7pmuqUkx5Yd2AqeWRGWY\n5IBCeJ4rjQTGAEtZfWF1hJTfjjAx0nd1clgI5OfNNrGwNys24KCh5bf2V/n3\n2inGaSXAT1JU2LUMYHaEvm9O1Bu2NJYqtSzeIfD3DBnWjPKG4LFAIDJyEZ+I\nwjng1qrdo2rlhsI+jTDvWPCYVYHuHA9ruZ7Q8JJdYOdSmWr3jkAbQvS7hA3X\n3K9aHYHZPXxx17r7VIkBE2wa88dvhJBdulGMjpiAdgFlV5AGeEAPb7x7RVpd\nLD7BB12v3wE1iSNQm4hlFJHyWmKffm5Y9EtPZmao1By6pmPnF1Rq2r/KWQGm\nNOb2pearcWyHl6IaNXv7EJRMO2q4fOtN0tfo9wfpzaUlqUxCYPsQlBywXtyn\nmJpO1SnhMU9f6BAnwOfQYk/7DNYXvmC+mxyq29lpu/oeoGXVfHhgiuGlZ0KW\nG524\r\n=Fx6y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE96tPaJIyVqYM3GU69QSpxVvyeD6fFBMHN/w75zDhZ0AiEArs8FMQjEFyW9WpfgqO53ujEckmKk9bHMwaFojD+DQbc="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"qclong","email":"1270253618@qq.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"xiaohuoni","email":"448627663@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.6.6_1606360373432_0.24687290681318497"},"_hasShrinkwrap":false},"2.6.7":{"name":"@alitajs/cordova-native","version":"2.6.7","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.6.7","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-KcDDD/Hs71FRmVmHUvxUXX3TvwQdcLOjZ/+7GZjmxCyYASvTIww/2SQEVepaZv8BkJdsrru6LN10O1arE97oZA==","shasum":"51404fd19bb78a50d4ba5b9d83bfb6459c142c4e","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.6.7.tgz","fileCount":5,"unpackedSize":24440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfv3CzCRA9TVsSAnZWagAAMPMP/ROUNkZQY3b3ykzd3nzM\ngnSasuLfMn6J46oRKULQ2J0UZ7Ad1JOjudI8F6DUPVFzWjkhGPupOxcbPviC\n01whoCVoIBN+vxT3z+HBxrtl9acGmOjFcPEdY8EU66K5wTktLBCNABH7N+K1\nGdC7HPFoc5qv9CGS2UWzdDqhjaDLb4Zs40wtXTIFF7yg8x2eAWv2kA04vSlY\nb4VymKRpo8oGi31NtVUsNJHgqaT+3vchZscsdi0/5Ljph+nYTnZ46D0euGIK\nYYIeU12+Pwz188orMj0KjXpz5ZZuCoUn9rLsyGTO2Ru8+bwU2qofa8LgIXXr\nAG6e2w0rbjXBFXopisrVS9j2KHhYYuz/gDGzuAgOXd2fs+WQw7VwG5r3QzNk\n7zxIX/YXgiroijvklCaVQU2VlagFWtQkZsA28nA2Cp6YyJKbuanFoxFzaIuO\nXiV7NfoeuQDbMN3OCL+5otucJQ/2llhcTK00tkjzNI5I19jEICan0ZGkPtwR\nVf+SJyKZn0zSykv9krmOK5AHuBpN7GR3sBFxYOkrVI13b8HCeOCqpshdn+n5\n8ybJtD7G/N8/7Ey0UqTkyea7SDmPfbMxwaIAVzuFFYET+gVZtVoK0PGYghu+\ndI1eEPwNzdSUwD7pZPl2jsX3jj0wjQC6mEGn2GO4a9c4AttPFurfll3neLCQ\ngE+/\r\n=qntA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEYlettgFVWHB27dymtJgZFajH4X6CWWEKlCus3VBKqzAiEAq0s6xA7m/sIk8qkdIdWO9JPT2KizZa+Fm8cATzf0wNY="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"qclong","email":"1270253618@qq.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"xiaohuoni","email":"448627663@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.6.7_1606381746566_0.8127487352110432"},"_hasShrinkwrap":false},"2.6.8":{"name":"@alitajs/cordova-native","version":"2.6.8","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.6.8","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-WqFlLCnKxydgUoEZIq3WrIvV6FfiHGe5Q8+LNF7fCkkbbMBA+s/dsGBvn79M4ZXMom3PwTiDNLuyCfWatcnJdw==","shasum":"0e10ecd3f422ae0e14de0c807a4f6758353230a6","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.6.8.tgz","fileCount":5,"unpackedSize":24440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfv3pwCRA9TVsSAnZWagAAXZgP/i33l/6p3R7wfEiWjGuY\nHNqs6u7NbqGkHHfkgPUl+FKS8HYIVrBl+7e7NIcw6eriKkMQlz4J2eNwBa0H\nY547oXF9noXNIJssRFzSghj73zkvME2igX55a+yTmS9kpF8nmUVuoYQcX17t\na7PSNrx2wfQPNkZmS/XRJ72BDwEi26oCcftlU2r3CsSYYMslvVstCdRCNDpj\n6wSkWPguPb30FuI+quUasRRAgjJq/g6Wg5+Pt7aJZZhBiSUwhQUZ1GS2r9L3\nwmmljclweVnH3km8zEt1ErntiSYBKJIhp2C3LilWP7RagVCGZrJmyfW8zmpu\n0e6lwwaCz/iNnLuyKttAi0tZZCGwJOnq+/RCQ2YCBnOQRCy7k45kPFbCgZrw\njbTKEFZNU+YxdZac+wHHqWzIr+/K9H/wo7wzCBiTaZxEbkdv7PXOYyvbfYQx\nPOn2087mCFgweohiVG6nhNHGB6aQw1Nn6SuhrxsDCJ1p0CXfba2xQv+HiLXh\nrZMm/ISFvrMcWl0NwvdEWkDzuhRldWQ0oqEbJkbeJvzpr7Aj67YOtaEY0K+f\nGlMvB6y8ho3VLGMuqukOSm6bHXIn66Kny3tNOEmWHmXoPiQcihICc/DU85lB\n8dyia4i6BAd1uvGnW+LZvGeIMw8sx8zdD8YVeBoqQiGmsMSlBUGIbMMuY2L8\nNxeu\r\n=LVK5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCN4BsADJ4fTrjy/4FzpxC9yfjOqhZNO28BDqjtT3enIgIhANVof9hGJhR6UwBYMny4iKdtAb72k8XgruCjYMSaTxHT"}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"qclong","email":"1270253618@qq.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"xiaohuoni","email":"448627663@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.6.8_1606384239928_0.7599405315897179"},"_hasShrinkwrap":false},"2.6.10":{"name":"@alitajs/cordova-native","version":"2.6.10","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.6.10","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-DBi7ifOwaoc60qfpLAqoMKGA7PZZklL5ukA5WzhjQBg22YjTlsVPp0aQfkNVdtNpmsYNj9t9IT7IxqcrTGHQpg==","shasum":"85d73a240dd54ef480ecf0b7fd053a47ed58b58d","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.6.10.tgz","fileCount":5,"unpackedSize":24441,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxvXbCRA9TVsSAnZWagAA92gP/2rwGkK7M2qlD9/P1DkB\nmA+lIsXZErgEnrPo3eccxTCyg5fPPwuIeEcIWn57avtQdsK++NmEttPvU6DU\n6RDcIgzJCJ7FDSV6aDa2k8MwmjoAwAxdkbtOOfmZzMoyfIgyzSzk/7K82TuV\nKzUNAEyEa21qaW1L0mFLtV64CeG/bbboq/V8NenhfE7jxb5bSwa8SN6v4bWN\nsP3bZWhKqPhCcWgPFgYQke5duJsKyVeXjp3HPEDf2IePwKvCIyHAqdJmBknM\nebW06bsiEeVVGTwo9MasNPeBGY7+b2/b9Pg4qhWS3lx2YpqvLGFzeBwTBrfb\nmiPFXolxsgdRZw/++czm+4OqgJ2J6tREJwqIkTmRuNqkLuLTAzuylbsXkB98\nig1EK/LSU8WMp305wLvFSEa+8nGowvCdKC4Xe5oHoGGuYQDl44CjKPmikTXy\nhf2cj4HUNfawvwnxFtdIQvbBgkD+Gxxn4bjmx0gu77FtqfCoUAWjv8/uqpGM\nmfDPrUZrpfyeBkBZaDHnTW0lRbj+JBnhDwxKGQCN+ouqd5iXgYmwc/+Qa+2R\ndpn0KzKYPBw13tiFAtAZwfrcE3rrPQfHpwpbbAlURXIkQqYuGs4DWuaj/erN\nuXjPATL8F/4krvcjYa1n6hQzUyWUWNx9X+DN/8Bd/LoxAitI9vHffDz2BErZ\nYfSH\r\n=IPWF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+0BE/lWVcFveWcSrvtCoHNyjdOxi3bfKOiq6D7c06swIgC3c0l+AR3MSBTO1b3DYHgqxsMeCwGkNdGmvscYG3rGI="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"qclong","email":"1270253618@qq.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"xiaohuoni","email":"448627663@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.6.10_1606874587459_0.3218994411626295"},"_hasShrinkwrap":false},"2.6.14":{"name":"@alitajs/cordova-native","version":"2.6.14","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.6.14","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-BDVAxaADCzlrVSQcGaKfSSai9dKmFvwBZ1zWdFUCGEmQHbK8pTEELzi5zBiXcuTyHIdqOToIwTWMnFAywrJbyg==","shasum":"78f6af706d37c9d7539e53d52c9829d83c276d2f","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.6.14.tgz","fileCount":5,"unpackedSize":24441,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2yWuCRA9TVsSAnZWagAAkE0P/iJ4bkrVgxnJYuvHS9gG\nJK8JgVcyr3tCGCfZ56h2WN26VOvmruYWYbkmCnG8HOApHlVH7PoHMfk935n+\nEJ7LcNDl0gPOvsZYTsAfigb6eDn9qz1OPKwjrIRIj9RhVIQVJAzWWXDzTTLM\nfGuxKBm9sNLmrk6U3ycDssODi8LkDXAmejvS97hBinwfQIg0HkMSExuuAW26\nwdFRx7R7d6CWawCuSDH7T2d3dxzfiDhk5lizakWcrIknvDbCWSaRrB/fDlXO\nHvme7QdL/nbgxJ1HGHS6yB8QvKfQ7U+STnyzKbFT+YBbY9mUlA4ZkpvL9ANt\n8aiEnLZbjBm1ATQU9OQKp1w1eTWdqOT5Jo2CjjdT5qpqL+D3EGlUvQDlFZgP\nTR9Li8n5KVcKflZy6GUPeVYc7p6RhrMXMFZD0zj79moo+35tYKshLP6PRMTX\n/HAyFZqLJq2o1msdD+xsjnWWt77Mcz3NUfO6L1tB4A1KZWvOwh6PYBRnsnuZ\npPjJUaonurSPjaP6QzYvjUUCr0beGPyZy78ycD7y2XvzVKpLf8rZGbToUqfB\ng5va7R1MGH8WT4JDcV3QEAv9NWkcKtX8OH1xiG6tO1786RpR+jOerqI2p/+u\nM2/O7LXp+QzwquiaMOwu9VpV2m8btg0OdpU4bQUZ74dJxCNrkwNzOPjXtlvB\nFYSe\r\n=K0BU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYaUWRXe2I65xdzFFUXLbVlhfIlfkDWEqOxVWlOY2COQIhAIoOtGa+KNBMZYu9hXvzM7FtGJeCwwrsTh6edPPe12ih"}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"qclong","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.6.14_1608197550502_0.01941223024472305"},"_hasShrinkwrap":false},"2.6.16":{"name":"@alitajs/cordova-native","version":"2.6.16","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.6.16","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-uwLRegi099e1uzDlbhvCmC0JmKM+S4wDOA7/MUT0NpJujnwHTZ0wP6+yKVzw5Dn0bFcp1Wm1TyzgIM1Xk3bDxQ==","shasum":"1852b0a9a62b5081e646fe45f67e498c73a0fcf9","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.6.16.tgz","fileCount":5,"unpackedSize":24441,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4cJJCRA9TVsSAnZWagAA9RMQAIxhxrs+9ez7h+DhmPA/\ndU3ZB/FRlIqK8O3faXlCqMq2PBTzr4DKt8HhfZ47nkSUkSWBwZ2/j1m2nwXi\njySpVN/oZghvg83UQnGJFIcl82Pkk+u+S0KWvkMzshWKko9lDqpweRTmt99I\n3B2Kktu6E1BvWjM6I2Ikd+WlYMgA1b5gZnyZ/g4BOdgnQDkzPY/W9fRPkINt\nh+0ZtefuVjLoqAM/ugGN4BwBaqHJ7nhrcw08GVXeEBE+bzcbGyZFQRvRQFX4\nVgLF4aX9NEwWy0wjhrKdfwnqwco1/+pL35WQkHZYgsVQxix0njQgA97IDIHY\nRN/rmQQC+6WTF1ngwbseaxwMQOSYivTWqz0wZSg1zhXQ66vucFhYIq2olcaM\nSvOV1jTCYbaIl5zwYsHjBJkK1aTKYkQHC4L+zinI7ayOo1wj0otyiuMToQ/a\nDDiL+FI1DFmuSkQjxtnlT15VspG1LSJPM0DzsEMdFM1nK8LB5QCPQOyhMDT+\nIsHVaIfXNz/5P2OQYIKoQtd+pn1/culehTy6+H7kbzXkV0BJvXXxjmg5HozS\nVS/hdg8kzD89A3YtkKeccB8QAn8d6r1asNXC7vq7rm+gzIpyJRlGjmTheP72\nbXq8zMGvxUPrMcOPM68pqOiaQ2mwETwh9br0h9EGd0dBFnrjXqSVjELUaj1k\nFahL\r\n=HLsl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCO6qWUWUKZqkNs7lrJLXaZQrVZ5TDOmDkjOV323gtOuAIgDFX9lo8l8FZOrtyzUntDUi6GMO0N8j/dzalkUXdwRiE="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"qclong","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.6.16_1608630856532_0.38995888667321976"},"_hasShrinkwrap":false},"2.7.0":{"name":"@alitajs/cordova-native","version":"2.7.0","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.7.0","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-RbaWSYBXAG3EliJPi4tJskI/QvD1+yzAiScms5Edv1ehEXU9wdyW31VBtBBb7m39CI47LMPgshJDOfhQhO7ixA==","shasum":"e760d894cf6df82668a41f618afef444fadd89eb","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.7.0.tgz","fileCount":5,"unpackedSize":24440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHQRSCRA9TVsSAnZWagAAVg8QAIYHKTWYrryhb99C6OPd\nDcDAmeMwW47fjv7IFqFvediAlbqrqhkuCTJHPDWyeRsVSm8FUdH+csOY6k6K\nWNUne1zIXTq5NYe3ovnPVtjgbK0qEJ6XUIohyUdTNNWXB9ZZjttBYuGG5oXp\n37bWOU2FrZeV68MrX9/W8GzIE+Hryhksyhh4TdhuNtg90hItgUGXGkD+dDGB\nsdFb7JRuTGd0gC7JXLwh71Oot1x+ipp8N88pb+WpSsMozh05R5QOYemuOGGi\nruW2N1UimI8DQmPnum1SIquqaiMrMA3O1oTk0R/pvSIitqTKSSdnfoPGNrXK\n2OxMYKgnEMXbTgx7Mpkk1rEethBrsSU7ybVCr471WuzQwV/7rBQAYGWC/XaP\nU2muYWE5ncrtIk7gp0LlBgIv3G+gU9RW8SwHqL9mkDY+5m9/b6z9TtWpTUXQ\n9jwWn+0KTx8q2sFPuW0E9RFOBBDxQXICre2kLTa85PxKLq50SkjJxnFzxDdH\nhGwb4VwZRHmRKo0p5/3uK9NRXGuZoSchjkdZXiBgKwIxisQu7GXLDR9xQQ7W\n8U602XqiI/YRDEJnS4JasXnKc09zfuuiAmxkN7/WhRvkHDK+BbQBC/AnYKv3\nFSAdM/ulKEqEY4Zieu7303g3ZWC//Jmh4n9XIXCkTT4qp4e7tlRdKI+77PQj\nXqn/\r\n=FNdV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdp8CLZtSTk3ZUuom9wqTZYc5sdb6RpuK5uP5QgTA7RQIhAPB/9D/ysnFRKiXi/1rFRnHRe0T/SsLaH0TZ0qPUR4eu"}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"qclong","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.7.0_1612514385976_0.41430995954396255"},"_hasShrinkwrap":false},"2.7.3":{"name":"@alitajs/cordova-native","version":"2.7.3","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.7.3","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-v2d6sMTRQqqmWK6UN8QyNk3tTwMvmIx2Rc2jzKWaCsn8jnoKnY66dduanbaEov9dYTpJk9RqND7rJGOACRZDCg==","shasum":"ad6b636be3547f0878649a0ba84b066c5624b340","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.7.3.tgz","fileCount":5,"unpackedSize":24440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHQ2sCRA9TVsSAnZWagAAULMP/i4XN/LDxdzf00Eqhd71\nFLaijTKuls1OP4JF5yuzGSB2gH/OelRgZKGWAtjYdt0VE4KogNDN2Tjf7Gp5\nVd62btjzqNUo6WFo7b6h1ed194y2WDOr/gYY2aAR9vTaC1XqoxBl2REKQ6u/\n45VB5GU7fBk0Vn1x+tRQSVP0e+sJuM75eaPibV9bBiqaN3OI20TDVbKZdUgC\nsSp6sRL5IC7pWcc1uml2+mSkECFiednctKp3OdFuZCCzRb+yXIfYRYIMkUqv\nyz8RMP1bNckt/grHJqtzurvoyAU56k1mVaWN+V589MwQ3BqWq67D/ypqFiaR\nktoHVsOQmLfYLmevDWJvS3HXab4rMOuB8E6zvaEBWg+bZq6j0UrHFHd6Bqih\nd/LPVtXkbCwRnglm7as2z9KZihJqtvivHU/4/lWcqOkqOlMTU9O4xMHdayOT\nzeceP13f+zCiHuMJ77Tay2XWI+gYmTF6f3YCdJPleBVtHjWsBMbipAfG+cZq\nnXOLRL8KfvlfwYiNFg4J+8P7CyRpNh9Wx1DyulPnLU7mVgpUtGlqfsetDs08\nifIXlfakAOmXqTvZVdGfMSIGSxg3diJWNv/GeyjbXPRoR0+tfWk104HnrAOT\nEpCMkdyWNZH/mOt4CN9uQc2nAbMDd71baphfp6dF8doE75weg/8C+0Qdpivd\n+d4B\r\n=sEg1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID+tAXFo67pKGWFI3ln043fRITNfyYzTqK7X1xr32bg1AiAbh15FtwSOWNgde4rsSbkLZfu8JhEMpYqeTzTdquEKHw=="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"qclong","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.7.3_1612516779564_0.18666020870427302"},"_hasShrinkwrap":false},"2.7.4":{"name":"@alitajs/cordova-native","version":"2.7.4","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.7.4","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-Za68/8PqVeUC0FBNiaTWEQ6iWPg4OI/J9/F70LvsskivBUud4GZyBTYPGWa/+Zxq7FCthjhe7uOSHuwBb8Vaog==","shasum":"7995ad68c25538a190159378a92de06497cc8641","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.7.4.tgz","fileCount":5,"unpackedSize":24440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIicUCRA9TVsSAnZWagAAsIMQAIu9PxWSkg/F4BML49PN\nB6JpkGGvZ4rTnoCGRHcI+etcF1jrbl3jT3yfTqkOKbV0qojgImeJ+G2FZl0x\nHjo5zcsTFNXdgsfIuB2p2qDo6BWpo0LmZgU98OlhaVGGJ/w0RwYcwKP5GAY4\nCejV2ess1MQey0f3oEvBPzpn/o0atyy9beyRUSzbThji6xgx23nspCKA2uOD\ng2oyTa805GhON5jcFhfd0+6EWApWLU7brs3eNhQ9j/4iSajFDxQFsL9dRpjk\nH14+bRWYQj1ITA0F327BF1p/YcFDqsFPzo45bLn2e00akp5Svnlugx+eqRoY\ngvwA0S37JwvsxUs7+NFG3dOWWYn+DiEGm3a+Ey3jv/61gwb+D1GBYgugTrJL\nkezDxrcS1rXXrPa/4argbhYEa6b9+Nmt9uBMRo2kIL/54TgAG9muxA5ozTC5\nmDxTbT60sPfzPOjldR0I3SEvmatc5IxhXA9uKqFg5EF7x3kzj/O3njRhZjHy\n/AOTq38Gn5f9TaFmPyAEIbZgAeAYtxV49ldUnh5YboNZ56LnBJqY9IpmU1Yt\nJGRuxATcwh6ihy9G/7H7aafWxc3VA9XIlawQXfYSuX8c+QCLYE5GTAtILON7\nt26e0nP5VwfToYhmzWkQejoaXTOFfze8IPon8HhMvbamf05ECJp1z1UeYSY6\ntrOP\r\n=Q6jg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWhFC/98VaYnbKzi1ujg11Jql4KfrgGkAsbjxkxOyEkgIgf8BV6va6C69RGfGZP1HVViVm34tyRtvDLnNd/UPImEk="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"qclong","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.7.4_1612850963853_0.413559703385848"},"_hasShrinkwrap":false},"2.7.5":{"name":"@alitajs/cordova-native","version":"2.7.5","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.7.5","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-yhUP7qybvje5iSEqK80jrG6NzF5bMH5mxU+m4wmLP8TyXpdK41wboCvfrjFMuoI63DvWUI5pzd34uzWdwVx9tg==","shasum":"cd5a9c1b77322879d8abcf8067bedc22903c89da","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.7.5.tgz","fileCount":5,"unpackedSize":24440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMxD1CRA9TVsSAnZWagAAcpgP/3MCzLugAQLG3dTxq9ov\nsozP6CHHG9keWd4ato3umxtlQA+GmmYgzAnOiejC9r5GW+vGnZF26aI+8CNY\n+6ur0QBMkA/d2kuGn+Z2klnCY98VVX5D54oVRUlmttk6ms4j14VBlcWRDkJM\nPzOmIeCepUa/+jJgbjel+sW8LQkmR8KYJZGcPI5Imzsx8C83gTDtNiOzALfO\nRhR7iE8Ct4tX1ms9WzLe5dWOigacXaHTzgm3OmyaGQBxi9bVwZMQ3s3cONGa\n2L8iNM5tt1pS/TdyqitYzkYOHzZVdMQln236W2UAfIZOzJH2RI/NxcXmOSaO\n45EmbI/sv4vZF3RC4uDti88FSFjRJphp8Vc0zRYh0CX4Rjw8TZ8YW25dw46o\ncakf7RmnKVbx0qaOoV7HptZhj3KZLy8OW+JCXxQ6GdbYrAV3SVU9NZQFgftf\nxxo+oFU7CPpCd7lqdG1r+Hpvjn6GosmKw8cf+62A1vwAubW91FqH6lbTP8LC\nlFnqckLvsZL9vE/KruM+9TXe9vaJw3JauG2iLvUVpC1Rg+4wTa2CCv360Q+O\ng69kCo1jN2wftJSOu0tzq9U80tGKx23i5hHH096iaje7+FVis282ynhDRUp3\nj10Y3BzOHHkoDtXV5JtpxfLgEKNKwuO0kx+1UAXjAbb1T+kiwJ4svZpNOUpq\ntZ6+\r\n=3m6t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlF/Resx37nED48He79mFZQ6ozQmg0nLjKfSYXBtaZvwIgfN5I+zHou3drmoOr5qH8cqzuKaNlxJQuLYGZcF38v7M="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"qclong","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.7.5_1613959412613_0.33052260735753847"},"_hasShrinkwrap":false},"2.7.6":{"name":"@alitajs/cordova-native","version":"2.7.6","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.7.6","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-I+H/czUFnHwMmof4CX+GymJZN9eax7YuaVYlNH8RpsPXSD6rRbjN83TVaHV9WAzBYLk4XCt/wAKvIqOQE6DMMw==","shasum":"f5f215f13c7213e7e944adfa4dd5b2bb862c0ab8","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.7.6.tgz","fileCount":5,"unpackedSize":24440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNN55CRA9TVsSAnZWagAAtRgP/jYjR8LNCh9ff+J/4WL7\nsKbOVc+8If+eIPsHbm1MQasZRf50KtNuHfLH2MUQdhF8YXIXVSyvFQ2hGyez\nRS2ngjTJ7Lckehf/cle1GX/xzmWc1pMY5JqesnxhZJAd2lUhlumgOsGzAwAG\n88AVp9TZA5WZQePo6TWgINT2FRYcmSz+bVfUs6t9brSBCN7gupWn5+sglaZg\nhB6CZFydNA8dReMbnzMxO7wiMOqNU8y3N0aubjx19YUE08s10mULD3BfKWoJ\nwBf4Fthp4odb+abwBiDC0krCeRW+7brkn8YiQvUFy+iXReorRQmEa2E3LGOW\n/RLXdkqCB3cJjpXcATzAvbzWLgCzGNbBefQmyc30dmJdIMjAhhr5LnfG8xiQ\nqQKzXhSuJg7pB1F28mXhSiqQNsFPF97XATiOaPX4hFsGUEtu6K7OVXkYmYbw\nI2YrMz0b5R0y9lDRnT8GJD+WMVNdkHy5TUcdJ8DuEW/ooga/YOR94YMcKHTi\n/o99QT36Y9ZkfXfHX78TqIeBphg1i2uiu5+ngCoQO46imTIx4mlgH1Gql+Me\n1+1sgmxJez87uU09FmAz3COv2/+dSwawS66eu6lUfjeUv0k/k1meNvwukzVo\nzQU+JVfVPU0KEVCr2lFb21xHzfBK2FUdvGh7NrhkSECC/fUithnI7ruv9wKG\nWq/g\r\n=jyUM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAUTMT0azAe9KKndKJdfWrJoEo7ReSRYKrWvxVqQpJFAAiEA7ZcVn/vuCWTxegVkGkhMG/D9K1feAvz1YTVi7tfiu50="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"qclong","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.7.6_1614077560695_0.30921299999947216"},"_hasShrinkwrap":false},"2.7.9":{"name":"@alitajs/cordova-native","version":"2.7.9","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.7.9","_nodeVersion":"12.18.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-H00MDw/6azysO2ga2TXz9T9MRXGDqDsc7iZZLX/oEZQB1ccFqzg5B6KSOjy/UTL4rwpRBax6zAesex9wzHDBxg==","shasum":"5d7131b9a3418ddb512de6e28c380378d677b1db","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.7.9.tgz","fileCount":5,"unpackedSize":24440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTx/xCRA9TVsSAnZWagAAtaUQAKRyISMOdq6GONfbS7CO\nzPlWwcK9N+8zD57PY2j9tcnyqapluFT7cTLcZuZ4w1gKsAO6qP6n51bg0o+s\nhaoR1pg6XVVQVJXUZCf1p7J2WGJ2N4ZTCjgV0h758r80YDX6Wg/rAKkTLfoZ\n5721V8iUYDWIWR014daX7q+6x8wFQrRYuGbbmXvtY/ycp4u76sRZkzWbuAGe\nv9OaeXu1HPt1r0vXwJ6Igh6hwkn5ck5OTLK10CG5gyfSVvhXo6VQ50hH0NTm\njhtS5SKejO7gr5a1OuYqE8cRKxJhAsjBetM6xsrgLceUrzuyQLUtzlfHqTur\nT0CW/p/O68AiyiD6E6GsjVFkoaH1r0JslXqR4iZfuDI5MUsooyrc5fX6Xh/P\nFjQ+tqfnqsoSZXxTU1Lj5YWYgXR5ayVWDi9JeA9vWNsf9PVBpx52/YnzcZrk\nmD4ae7PEfuWtnO4/p22qtAHezdpZMtiuBEWZa4PbNgp+WxnZKoRiVoLt6AJF\nC9Ix7T+UbGPpIgWafYttf7thd7Ooy9ZDzFQ9PBFdCVKlV8Tmhx08DIePV+gm\ngVU8nqBVrrcYW0AjlVOFEBveGTgRrMjNQ/bnXj0+ATtcykXcHA2PocI/M8bn\n6AeJItyo++I2yQ8R8yEkiryCypA/8jsbP95THMM9Gnkt/RwtBgs26n/nME/O\nS0sE\r\n=YJ2Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIErwKYxuW+mgcWr3kmVjTTy/nY0PJcw6hzD/hKp2EIOuAiBnHtDH3KCmIdS/S7wWcIJtZb5zlohgtz/PSKkgDh0gww=="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"hammersjs","email":"1270253618@qq.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.7.9_1615798257347_0.7796138718383188"},"_hasShrinkwrap":false},"2.8.0":{"name":"@alitajs/cordova-native","version":"2.8.0","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.0","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-PHLK1N7MwlcxcdH6jmg+PyRSH1cAeAQZ8gWWsQhpYjskiW13O2L2qEEafVtUJk18SXxYbbYyD6r1tf6ubD5DVw==","shasum":"ed16ba5bea9a65428467c5271618ac21d5696bb6","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.0.tgz","fileCount":5,"unpackedSize":24440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWYgDCRA9TVsSAnZWagAAoFQQAIdCsg1n5ZUdhb2uSMFk\nEK6QsLJN+1ZqZv2RqNT4L3StIF8KZhNJrchS1xRSK9z9dx5qA4Kto9v7p0xR\n15r5xVW99cT5XMlnVRQQ1xUYaDc5aszc46hV6FjWx6rXXvEd8My5GAXUgVEu\nl+DXWB3E6eA7Vz3if5dlB9WwQBJPT4QMY3wy8wJQsMSy6i3kj73HnFttHxjF\nzxwAWldg3p+wRnouft01ZA3HMnQ4MOmGvDvU3KwC70/0BQ7eVDsvAeHv+FQz\nOva1UpThZ4PtD5A/sdPHrAnJOYe4sAjNf1Lodjlmw//M9jCX6HTqt94IV9S5\n90yRm3gQR2eJA5UwRmoMfuo3jKE9zhN9Co9dnfAt8/n3nA6agNCBiJurHxaE\nZHm+877+0CWFRSIeSApbl5TeW3HY0hUP5pQybmsDZu3saTul7Bars54qf2XA\nmhuKlzZ0nLiFANhqiDWbPZPavXgtK0BgTQvps0mKBkz/uCpBuOpsfvSRhN0y\ne2qHNmIKZA4+sh2MC7xcMPURhQKlI9OICpdpzDtfokqD/W8DBud//lue8G/a\ncW2ZtHptiF6ZSjFDGo5LNZbX8Q9G+CEuRkcNxqz6s8eZREoNrtqVkAEE7Cfp\nhUDDng460OIDjussrfH+3pqCtxkYJbwQvDiit+YfxmUJHU1pl4kZNbOQpE+p\nAoK2\r\n=uwOC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHiTY1HOdVdu11k7cuiA5DExvLB8EGSANWiQ3uJFTK0vAiEA8JAb9vWXc62T4z8aKVlxb4Q+9luid50MUghln/zWohY="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"hammersjs","email":"1270253618@qq.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.0_1616480258778_0.09689753766371068"},"_hasShrinkwrap":false},"2.8.1":{"name":"@alitajs/cordova-native","version":"2.8.1","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.1","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-kQDT1isTuAZw+QbhxbVGCTrklLU3UiH3D2V6NOssNYyxtNSRi3bOtUdvUDLNpcx4Fo76SmULS+HUCo48g8ZB2Q==","shasum":"21de9064ccef760a00baf17829431368a2fe768c","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.1.tgz","fileCount":5,"unpackedSize":24440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY+bKCRA9TVsSAnZWagAArgwP/RfLWaU/90wdptky2WeI\n/CkOXWla5RQtUc6vPfFLU738f/RVOQCCmJGkuV7zOHA92u6ouslVRpdV2ImA\nJJlZtuCFonZdVukyMpAiAb8dNPpYX28ItS1wzHEWVOhPZIlHC8uetbwwZSqg\nDBVL1CrP79PS4qfP0P8Ql4VM4S6INTGofIc+YozxTTuUIrDQG2LyentLTq4K\nXEkMI5SaCG11ep+Qsr1Qb6ErIf/W8Jiyi9T0f+pxkzZdHHfcdMptZppPmhF9\nFtAWqCutxOKfXKijqHJWUff1Lr8h+LltI1scABo7qyFpZ6AgGQ1SLvP0SnKv\nm+dm/bydj3zTHAZAqKllxxI+Pu6+iE20ZE8R4ixssqraGRC/MGI6JfP4jixc\ntOgrWU554NZ8Jwi45rXCkgxaR2SGowPRn2m7Xg9H69HjgmQCY5i/p5af55FA\nVf1H7zo7NOZzw5xyWwl9C8wVSzdKy2Nr1vfUN+bngg7lm3lqtLUgOGfBYwim\nwV/vfA/1Z8EwU6+Q8C7BdPwqsckaxgLLG8zRDaf+1XoEJaSmc5GVrKDzEDH7\nzkZTHRFN95X6DMqOa9bNDlZh4XdFKaTJWBpxFzkzWM+Alkt+PQ3/zvrqpXub\nU9qwVz1x8X5E/SCJ6HXSzUJjyymg0tAnFWMyP1pSalhmH3kn8dYhRr1CbRyk\n06Sb\r\n=zJ7r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBb4EdYBZ9GHqcyVAyWxTkW9FB8jjD8nsQ+vR1pyqoeMAiEAzfVaCHwEn5N7UH/PYrVZmkuGfn5bbAKaNld8+zdrISQ="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"hammersjs","email":"1270253618@qq.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.1_1617159881827_0.4480547178632899"},"_hasShrinkwrap":false},"2.8.2-beta.1":{"name":"@alitajs/cordova-native","version":"2.8.2-beta.1","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.8.2-beta.1","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-6HpJ0d/TnMe4tK02TIc7CFy5GsmjR27G9IHiHzCJzKEI9uPJLAcUJ0VSWyI6/QABbUJGIc2DXvacPtW06X4Tkg==","shasum":"33e4cf8abeb1f2850554dfa3009e06ef29fa3e0e","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.2-beta.1.tgz","fileCount":5,"unpackedSize":24447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZSqYCRA9TVsSAnZWagAAXEMP/RF9oMIWwXUKJMFv5/x1\nQe8BJlERAPXQkaKpHlMJZwU8F/qPYtv+gC85lCuk/EFrgjZOTfrc5fIxQRlR\nywfCXyKhI2Aj4XSOBZiSJ6DvpHtx5i0t4vz3N9yh9Dqo/Lfe8AMiUs1X6XHW\nRWCK+86aKL57miirPeypAIN11SItJuMTDPNR9KG+ZhpJdzeUu1PefvYCQajc\nALdITiMURVuZI43rPBx3NCs0LqpeS7QgsgXR49jAQWEQwAyrNNxAU7NJFP7D\npUAI+0Hhz9mhdw2hgC8FOqiFlTgKz8Jc+GSLmQhgw9bj7pTqh22tXHx2rt6j\nkimFR9/3ghrOlAX+1evRiO8eiXDWmuf+ogm+L7yuW860p1wast1TQxbvUNlh\nMP0mSp0mFF8G/nIj9W0QgvXgrR/6kpOJgq6cjAF5eOXJSkxDz3Wx/hmY0zkT\n2itp9x0trAgog5G+x6fwRua0iopSV6tRBJUEwJk9f++Rg9BAaagzXW8yQmJS\ntmxGKV5kdwse7925sgQu0H8uVdtn/mLz+tqR3tmsdi6yYRVyZJAjTNpyONYN\naJAoelI4J2aE3PYW0RKVQ+15dqqfh1wQZVOHrU5z2tXDTbszSj7ja6G2UmGh\n+5R0NK9Gqk5BU2/Nq9g2jM5mPFKiL/BtcagUgBYDWAiwTHI+bJ6KkTWhaz4w\n1hvq\r\n=2yxI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6eZPuut64snyngHQqpQ/UFnFH8VUArelgk6ScpAAytQIgYLiPJ3aa00F64+EEbrl640AVAFIu/mH3LXRExzKAO/g="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"hammersjs","email":"1270253618@qq.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.2-beta.1_1617242776020_0.6900201330997464"},"_hasShrinkwrap":false},"2.8.2-bate.2":{"name":"@alitajs/cordova-native","version":"2.8.2-bate.2","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.2-bate.2","_nodeVersion":"14.16.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-kSUNR74o+R18Z0k0yXew++MicqLqKTrvNRolMHovEA8CESopuT75XIK4hO85KFuEQKyRFsH5UpCuxBei8jAUAA==","shasum":"5a66d615e5b0f01f4d8d2083f8befc58057e03bc","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.2-bate.2.tgz","fileCount":5,"unpackedSize":24447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgilruCRA9TVsSAnZWagAA9M8QAKBgjYO+AgWNOM+7LWmx\n6ThRmLf/WW0cvvakV5+TOn9i1SFtf5CqWGH3z1OeyS0WQZYEy5pHWaaY/KyL\nxajAJBn60keSZlCtMRjsJQqLIhM0Ln+HcNvuYksdAs3gXsi94OA3etSQLKz5\npCHOX1TQEhbc4jMCyrU8EBTLbbHGs/bGUjLakcDIYf50VeJORxdo7FAg8Z+P\n7QDefjHuRaJ0feJtSUw2bUsIO3WLf2O8mXj6Eg03ovMCMIQ0HIqIZHJ3yiOq\nXOp0LdGIz5LirQ7fqnlNHWnW5dEZRR93C9xNdTlxSBpuXo4qAx55Zb3GjVSn\n/bi6P2UU5Y8d6zDhdKmLbOas01c98eDtOYnxIJqe6i1Eud9YSbB3NvGc0A2K\ne6wGU6xVTk60unHCCsTiBzpB9/bv2Q1EcO6fbquhzsFz2C1D2GYQMuaE8mwP\nCYVcHElTrwbqswJ6gcZFUSwUSBZe6Gjn+PcGkmI1BIwzpHVFcv41/VVNUZO1\nK9durSTfTtMSielRKXXbC1s6zH66dNjD/5rs923UA5miZMw24nhLg3vmn/Pi\neHYiOFNBwjVYt963BNRhGBnBZlO6xJVa6X/rjIiR0z/t0hLk+/6vNqzNIx2P\n//xucEJIuzr94de13XnJtdcztLlZmP3y8thUuEB7ukRaPBBnH1Xj2lHt4hcl\nkEHc\r\n=+7lS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE+x3PQyEc7EHWI5/x0SqZuMILEAyTBUqSz/hs6/mPzsAiAJ4EM/yh+dYUL4y1AZ7WfHe7PLWgiX5wp2HfHg/rr75A=="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"hammersjs","email":"1270253618@qq.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.2-bate.2_1619679982096_0.8516745364162588"},"_hasShrinkwrap":false},"2.8.2":{"name":"@alitajs/cordova-native","version":"2.8.2","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.2","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-zz5u+MgchMNMgRK9c7VYd6t6/EEMbyP+bZc+icCeumMvPJV9tnE44lGE81XLvfTso+8b9oLd5GA5gr7vaRlnlA==","shasum":"34fc816fdcd6a84b95d14e9620252603c52d9a09","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.2.tgz","fileCount":5,"unpackedSize":24440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgm5jKCRA9TVsSAnZWagAAu/IQAItaHZfxJEZ+tawVLW6K\nqgzAjS0qth1bm3Cb7U4g6Z4NlrsyQvOW3cWRiUgVMG1jcXPoAQzvrDOEaGcw\nwrJXy9jUOL9HNu8RZn6g0Dv/Eqyr/QBATpagpfSrV4Lmm7wFrklRBZRj6+uP\n10M8CdoaVjzBgAo08/fbmdO0e7E9RzDGssZ6AWYaE6dyYPaJm3BIkhvayQEM\nIu+ngIuBE6g+G2I5LVAl2qHZiiX8r+IkyolTgJprFsu+Mv6CoGvoTSbKJ3KF\naITD+5bZGyZTSujvXs1vhWt7sLCA3XUyMzIgumG3rCWPg/RLLqt9AKV8vimw\nhQEjJEKY2GsqzjcDgGMfoYsirzk3kgui+7j1odnu9Yj5+D9oaiFyTZ6wXm+y\nXT5QYlimMlcRGSjig9ZQYJ5nmUg15B24pCXwLNnk7iCkBBLWS+qIFAZkT9XT\nKcgqZnpcrixfpTlDIk+Z4gEPXX8UJOZP7V9l/G8kqujqFHlzcw+Eri4pye8t\ncw6Kpygp+jatAwV/IaCozsM5EbnVqnx9ZDtkVbFb8Sssxcpe9d+1ZaK4Tl+x\nPYHOuMcVoFeCaT3nDMJxm0OwGQY7pvFVfBxvRutrGij33W1jEyovcszLdsGX\nolLeyJKETt2yQ8V5va+/SWdLcC5dGumjMAwI84lejSzInNkn+PKM+BBtqq3q\n2dnc\r\n=YUIT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF0vvc7Aj7CcLoE+LKF4PMplRbNar0xFaYf7jXJ6tcJXAiBLlT6Vak0V2YIXRbhAU83tdlAUuspducIpj8IsJsTmxA=="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"hammersjs","email":"1270253618@qq.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.2_1620809929717_0.12855935150688236"},"_hasShrinkwrap":false},"2.8.3-alpha.0":{"name":"@alitajs/cordova-native","version":"2.8.3-alpha.0","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.8.3-alpha.0","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-crcM5wpWwzlcrVV1Zci2n7KEClHWMAduqaSmginKioKXkn95sqdQuLeNOuBUi0ZbozsG7+cnJiHa5pqhVevPmA==","shasum":"8d9afded4d07f9135be0438a4876eea5f8d2309f","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.3-alpha.0.tgz","fileCount":5,"unpackedSize":24455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrwlxCRA9TVsSAnZWagAAX4AP/3s8bBe84OKXYK0Hra+/\nVvpDirW//aze8E7afP4rzktCThpw/eYJ2uejQUhNyWKCUYWWIj6GgNLVRaHF\nnCu+Y9p0fGYIRi6hasHHz4b7LaWMP7KpzqYcxaMQgPKsvSdRTnppo+1fOa9N\nSB/DwRpZttmSBOTJXj6zwhRi5QnSbt0aZ7LpJ9VyMSJHEBh+31oyxyzoq4d3\nMk1Z84w3zV988DDgJbMqhX/G8KVWWRt+1lEecxWgmz6iUR0XSWVKXQN2Gwyr\nquYT/tBIixi6L5KXmC0WoQNi14GTchC63GJDHyMKbVCChCBVKT2jTD5Bnn1J\nhYd/ofkCQXfWUZd2HXD3v16paF6horP/Nfjzf9KEDgYuREFI/09GJPDqXfJ/\nQCPF84NHsNxGnacvj/wtSie9CwIYCTw5naBmPBsebsAVnXelcyAm1ul/eW3h\nkBKdVRcw1yYcTlxyM3rMK5rJP1sLPdwxavQ3XjIFD8xo8cAEQLQACTJObKmP\nq9OtJbIU+hEIZZcdG7BexKCyEyt0PtE2UoeGlzxAZ3x7+ey4yLpGXIv0f2Et\nKFxX4MOyjwgmKf90lzN9NRMHs+RgVgzITzr6Vxlvj4FtaUBvVarcX3Jhs0Y9\nGjH2WeQqGBDQ5O0Sar4wGIhe03/6DuPx06Kxh0Yg8lPzF5dtA1jkx3f7LDqA\nBqwR\r\n=8CmA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIESDpkfBfDtqnrMPnkplDQcnkLLbk21DvgzVN3lztUnxAiBszDBMOGM+Hq7mCbyOwNT7IUfiLk10bMzdBRh5ddS59g=="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"hammersjs","email":"1270253618@qq.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.3-alpha.0_1622083953122_0.7167138003191476"},"_hasShrinkwrap":false},"2.8.3-alpha.1":{"name":"@alitajs/cordova-native","version":"2.8.3-alpha.1","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.8.3-alpha.1","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-Vf628sA3hiudIHvHP8i7qGW0Qh+QhRjXTzvNtVz0E3XFKx/RBYePOJWwsSpzg2ME4zSJXPpG37pvWORWXmfoGg==","shasum":"55f77b3ca89b6afc24a199507e66b7578995eb27","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.3-alpha.1.tgz","fileCount":5,"unpackedSize":24455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrzuCCRA9TVsSAnZWagAAeKUQAIrl622bMGb/bgph4b8E\nBOI0njXiX6c8DkRTKBE/tMclGLbgrVpfoi+wpOjVN3nQnK2WlRMQYPFhpSQc\nq0/HKCIY6JDCq4Ge7ogPGNFGPPnxfvaz6WeVHPASSRKeuXPN4YU3zqZ1aigo\nr5tUHBwDUR4tm+dJdDbBqby2uYWsNO2Cuinefn8V7YYvInfAm3cAtyVqRaK9\nGu3S5gBdyOWBJFO9BMdO+iSQ1bZzQVQuEJlETisrbwJ9tcpslylEsGDmcL/D\nCaT+yNLSgpM6o4Y6D61L132IQ2DyvFNFBl00ADVEH7KS2cIngkzkf5fnfyyW\nH+Co7rnsBf8iYEnQ1mVzasjI6x3w7MCyA2W6eiMVbKmwtiiLvOnhC/LBH74n\nxlFnZhiLTWClA7NjIDFbkLTf5AwwJlH6sI88n3nX2XTx9nahg8+9cuu0/piy\nj3SPubfLNwkdTDIiBqdgy62A8Zg8XB7jAbWsRPI+kUAoEcRGCzSIBvXNo4NK\nEOyx6Knb5RgglX1ICGLIPAV+Of9Wfs8YVDy164YQPMpdh0HEUPtAp8zuHkR+\nWuiktccx2sDe56cF1iDc7syVUFAEn71btomS4luViYKOEvuFBGOyxDdShW4+\nM7cbWTyd0IMsqDyau3PMhjTISS+xn5Cjcw2EnmH3KDLOE7TZxxMl5e8yjjHw\nHsBv\r\n=rtwO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICAYpwupbShY0PMEDXD+kEXCei9i4AmIC88wVb4I5qkuAiActLekN87qb2t9d/8DN7TZdCv+NGcE55kwIZtlxFls4w=="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"hammersjs","email":"1270253618@qq.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.3-alpha.1_1622096770474_0.5771431567565202"},"_hasShrinkwrap":false},"2.8.3":{"name":"@alitajs/cordova-native","version":"2.8.3","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.3","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-x0/36jXZj3kDuUepdJujvVgVv5JD8onCi9ZNgfQ2h4IyWYQVely4WkqDKZyqU7qFTxepTU379dpo2AxHW3esHw==","shasum":"15fd11e98840ecacd26207164a58ea6de7cd446e","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.3.tgz","fileCount":5,"unpackedSize":24447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsEubCRA9TVsSAnZWagAAuugP/jnlya1wB1UQxpEktn0F\nBpXHRuShQUBjrlypeBdweTlYsQQQvR90qqd2BrZgAVgJupvFUItWGBRAZtGa\nEaeO0MFXrJ8N0XGkVlm7uIVRXogI8sh8uAbH/uJwYXUqsrkXxdBTn7Up2Vd+\nBrg1cvXBjBYwiji90tYFhehqa9IWxCnTeyN6J4PZQh8yqMccw+ppclAwzYp7\nUaHfItjeEMT8/Lm43AXiySRafgBwzrQZC+Xt/i1eYZSBZwYOsjPbl9ek8kJ5\n19yStPFSknbKpa/3cN+t0zgBjkwG0JDjnAjc52b4kIrWfTFYQTc3YHg0bu4/\nsOsV8Xi8hRRplarObmvHUsXZPR/g/UyPjD+BnLLno9m+B6eFT1vNNziKd5T7\nJT9ExgiK3Hts4YksbjEw10JWKJ/nWScoszHRYffjTqg0LwEiy+49ADGznqQq\n0veLUfNUp8t1CHvdKochEB/yYCIDSM3MuEOwevAva/VIu56fVwMdYpDNtxwE\nDPPbaw2FEy6r+uCOOxTN5OX1QNzjdy+bdqvRYf7TW/B+PPeDFx5vFciE8DiG\nz6Tt7+t0IiNQpmI3hpDt5GJc54XX6cfV1sFyyRB0OXQHRBE2+Y2FK6pspk86\nSbW0MZI1+YA7OSb5LLG4NoFmdeEcJf58tePNC9rkhw4bb6mCG118kjK/8AsV\njKHo\r\n=RQyl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFzU3deCjUWoiXNAaF0zE1W1h5z5fWN+fI15iO78YSMmAiEAp+MSskKDysdERs0e6J/UJ5XiiXtuO5deuiamDbTB1RU="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"hammersjs","email":"1270253618@qq.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.3_1622166426558_0.6270225736099713"},"_hasShrinkwrap":false},"2.8.4":{"name":"@alitajs/cordova-native","version":"2.8.4","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.4","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-pKA6TWY7Vuyc/XJDju7VCFej1KmLYxkhj8l+9cEOxR7nh76CnA7tKmdBP4KQ+yCLaLf6Wkh2ubGQJjztE4tIwg==","shasum":"0ec52ef234b49b4691036f7e5278f7047507d124","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.4.tgz","fileCount":5,"unpackedSize":24447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwWi4CRA9TVsSAnZWagAAN6IP/jp3D9Wdb7YmC2ZATk13\n4p5etbfKQijqL1Mh2RdpC7lEx2oZ0ii9Lwl1RCsClTZ93SA8OJ2YTpzu9Srz\nb7UelbBGOTAhVgzXRNtDPq1/RFa9ahthopT9aXPbT50tKokiQwJgXukiSps2\nthtAWGjZozObO7SfScLeJX1C5KJAFzC+0yJV4aAyDCKutSt/G+TYw31nJ4ZP\nb/enegHTBOV/fiusk1WAO5lqFK7xxqk/kta97IwPa7mp6TjoqyRRmlnLymgu\nj3eK3+kQQloYukgK8CWcIBvLD8nn0Zb9oWb0gRWVqri2Rtl5QaleJ2YFX2FX\nHIYE06WYySk5uXEv+V6yF+Uci/ivQDMhnTTcNMRb0z1mw6W2eOBAmZmMhsjI\npwOzujaT/n4ozfsTu5E+uuOt6TzojHx4DaMlU4mZJUuOK5WfmOrOTRUFYRlQ\nM1GPTsS8nMgirdsNdUcFuX7KIGXNxWrtLuFcl15WdrNybtLJDytm3GAnSJfu\nEEXr239kY7p/VKw5vLmSx6UgIMk8WTo/aAA0lRsRsfaltl0AiqMi2q0voLZs\nLCSvK01Y/bGTpp+nx6G2DilbfIuRd4ObJQetzbp7vjBZJtXfNEadEF0SwHIn\nPeUjV9fnr4KFY2pXH9eteAiU3v6Istfxf5OQuAFeOxITZfeCBmcdR1JSSf9q\nUodL\r\n=+vh+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDA7ICqjH5S51E/EqUx9WdDVUSN6/cHg4mAa8vl8GN3twIhAPujdK3xVC8cWQtGllchADnekgS3uWVrWIgYaMIb2TO3"}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"hammersjs","email":"1270253618@qq.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.4_1623287992569_0.2791836586879808"},"_hasShrinkwrap":false},"2.8.4-beta.2":{"name":"@alitajs/cordova-native","version":"2.8.4-beta.2","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.8.4-beta.2","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-vpfg/y/g/NDFNds04rNxx0SBrgbl39lkmmR2HK22cyuJhC/6qJgsjJfvp+k6RqAigza/JRSmAq0KV/w5CWo24A==","shasum":"f921f8ad9d4842894822badd23ea149a347a8ee3","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.4-beta.2.tgz","fileCount":5,"unpackedSize":24454,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwcN+CRA9TVsSAnZWagAA0IUP/jj6AP55MkpExsN671+6\nGIfzmHmtSvGnussF9PsFAxF+yBs1j6MEKyz6vsZn9vADW7jyDkR/yP5ik3YO\nXD4vzk7RxzHEciDle7blavtC33bWUssFxyWXuDFyxQd/xeSLENQDVDN61K9y\nhvvPzBeY7TL7GsLIZuRnpmZOV4MZbMfsNAB0aykkXoO7DpuY0+LsZgNFe1sU\nsjuYDJT0RVEOelb2axqaTkpx49RNpCvYAzXIslyCzDI3JgeHHTfjPRplw5nV\ni7xNhta8i3IVZFJuHIA50o9V7krVtJCLdmcZYInsWKqyW2H6bU0tiMkcYbmX\nSmmo2sTuDFY73WGGqImtbqeA43tro/qxuZe4s2DxtUXm0CPEdpCJ2VYwNbeE\nhP5nypZOPSnQgMFr2oWaN10V42Oye5c6rfjGtWZlA3gdEuQkGAzTsmQIY/sK\n2/Hu8v/wYyMr5l6zfvuZg2Oh9XDJtUe+jZKu8JC9J8EjrRGnaLdujeK6WAdQ\nr5hfSFCF47NKdRj6DE2GoPqbvZA5YW4zRT3ay4KlZZk+BSMIuRVSuNGGY3N/\nEnqrMrA0EIuvghyutfcegKy3mEuJuPGe106UoZpzxm8+BHJl34CjHRKhgXQM\nQba3z1IiDJCPNC8B8r/c7LHwhOEKot9PxrOC5701n36h0j+L+Li1ENxZcfYl\n1hS6\r\n=jL4o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG82pTC+iaJWcbJAtvitqsT7fu8xZAl0YdhhAp+sBrvGAiANpuvZHKylkNIRwdH1oECtTIntB3N+PYlb1hC5ismXrw=="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"hammersjs","email":"1270253618@qq.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.4-beta.2_1623311229983_0.8957315860477755"},"_hasShrinkwrap":false},"2.8.5":{"name":"@alitajs/cordova-native","version":"2.8.5","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.5","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-dDXEfdgodQQoU3he1YNLaWxlldkirxSUv80oiDiy/HnJSxSpVXeHVYVXl/USOCo/p6eYPejXiM4pgK1lXrsbtg==","shasum":"328b478dad584fc57086cabae9fc36c67df1ef7c","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.5.tgz","fileCount":5,"unpackedSize":24447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwcmMCRA9TVsSAnZWagAAGakQAKK1fLwtv/bYp7xdv5Vs\nMLgqefXoY1HncsW2B0lxjZ7rdSyuoM41UqGMh90V70W4Ji++Vlpwg66nmJ0i\n0zfuZsInaLeGBlBeDFFNxw0ycZ4bI2aSr7rfz1vyCH47xeTsr5wP8c+Kn4nh\nXsHfqysmJ5MPTfj7mu6QGHOsDclTYjsRfleHP6sVGKu7kszMOsaEIagzo83s\nguzC5pz9xZlt2jmKZlZ+3vTeneaU09yiRhFqp01+8ilOmWO37PWsff0dgC9l\n6zrrLNXip4mEp0DNUIrNSQr00iIAM4yXUh+dpx4q3ja8nr7zBKpNK9agne7Q\n0LrGZqvh9x/x8wuodohmxLUvEmk/75XbQ7losOlo7lSLCAE67yPW1hBsZjWD\nTt/aWJTVwwyAn3is1Lo54XfrQ3Zs0J78lB37Nyz+m0GwgIyfrFX0opm/O7JK\nbW7kzZ84yG1FdyAWwMVkQQ34/VIBfSPYQjyre1YyPrZOlXbAwY0qtn6xVJg/\nd1ksXyTK4whCMT9tbugTCeTInDHOmuYp/6XFF9pzgr1+ZK7xN2r6kL6SH1WV\nNotjIOymNE8Y8tvLRZnFJjg7PHyLhod6q9o/OQmu3O4NELzpDqPY7G4cYICv\nrExisgaMuwKCnzVTmdX+zfLzyFfaqCLEswkUf77hGZDvxIyY/SLqP7GxDyNs\nul2b\r\n=aCy7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG/WHguh7qcN5juLQiNM2B3ixjvOQiyGwekmqmriPKrpAiEAn7pon1ABqS9A/4PFg8hwa48JVfeS4ujyjDR4aO7DAYc="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"hammersjs","email":"1270253618@qq.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.5_1623312780836_0.2531281585738612"},"_hasShrinkwrap":false},"2.8.5-bate.1":{"name":"@alitajs/cordova-native","version":"2.8.5-bate.1","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.5-bate.1","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-NPGeUqJ6IcY+bs2tZXXrtwDacn/PORiCV1OD2drdBrW8ZqhBgpuTzg4S/S5qOTpNp/3SQJVYFb7yW5Kv+dL78A==","shasum":"274caa5377fc6f95029153c57f452346dd28da55","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.5-bate.1.tgz","fileCount":5,"unpackedSize":24454,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwy6nCRA9TVsSAnZWagAAQW8P/1DGMiA9Zk237ownj0Za\nlXlLBzK7mKcKJOCCshBTZ53JmWZruZjVfXr2BuaHn+6EzzwpoIWsedRhS5El\nDhLJ2oL0moFm0BTQn6t6a0dNLl6jkDdbWJXzAViuSvVE5xx0LOffgn7QcsKU\nuHABbeh/WmKq/WFnvoFmq8hAnd1d+I3fUXgZoes/DPUrWfUtrAB3t/AvtPc2\nJ8rzZK0OUGr0otpBEGvDEWDsEX3qZtHGngtgTjCM2O98E2+FEQMufPi3EsTt\nPJI22kTRxv4iWChgJhkhNv0j8fNQ/sKUpJFaZy80hkngBWwZtUZ/9HeIopfN\nOqKPE2kVfNFbjYQeVW53luucotkz1wccUkOLB+pi9KfdPLW+TzEpTazgK8A/\nJhEwOAgnLIBQB+xP+UTR9sNr+lAAGRBX09gNI15nUyQyA6tzjKM1ngfJa51f\nsvWXAbo1H448jH0ANqAd6PnAmUUy0H/Z9PupEfUkuNNo6/O+fvJCSu8sHemk\nNQLtad32l1+r9/dAVFCtkiCz8AdmTmKowfPpO4ZKtXOonYFbO6q2cilwT9TN\nXAhrhEA09+ZDyoDJb5dx8o6Im+uAdJsTQAVVZ3olG2SHzvMY/EiXls1oMVkQ\nbVYEzSUH8kQer0GIq87nDQbx189ErnfvO7zaQDIccqfcgGS7868SnB77RiN6\n7ukd\r\n=YAFQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCH1AolXbJ45i1LtmpBi57+veDcVNnF6/YQzwKybzDfFwCIQCqdVgKnEKuCEbp46klYbs1Lzi6VQuxSM8vBAup6knnbQ=="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"hammersjs","email":"1270253618@qq.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.5-bate.1_1623404199182_0.06225257106236093"},"_hasShrinkwrap":false},"2.8.6":{"name":"@alitajs/cordova-native","version":"2.8.6","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.6","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-VOajVHOy6Bg0wa7Mxdt3amff+8TIRw2rwFzx/tsHpQ8q/xRIuOrawpZS/VclwbSAP1gMXxiNpu/vIsegwJiLIQ==","shasum":"a7ab60d2177a22718199dcd7c4fab4326cd838ab","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.6.tgz","fileCount":5,"unpackedSize":24447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgw08FCRA9TVsSAnZWagAAmHYP/1eqMprYU1CbDE4qN5E9\nU8cQzuWlgKb7y6gQbafNreqCmsrjathPje4eo/pY7JdFBXGJ3zAAY0oKu4ca\nUo3/+Oy1tAYSx7fWSZ38P3l2uEYZbTsU1kuj8mVwZTzQyVwm1r46gZRzAK9s\nDOixjk3FKbjYP3Crq9BVklOTobI1PkyeRMoP56GSOAkB4eX3CNvV6rKSwwU+\nz3WjIAMdIvWZ1yxZoZcz9r/E7AotCRaDZEFS9L/oCObzRTt4Y0/ccSrfniYx\nyQwBiDJhi+1dlvUfHaAHMhTiKnfKpeKAz0ijEx1tba5SuXPrUpZQOcA03N9/\nY8J/Hl0DYnkfhbkbDjZVThXLXf12oCFxF+A1YU741cBmsAS32IRMN9SB3RXG\n1rMIWi3zizFmuTiVv7ytv3AqLWkWI/YwYM6TkG7b4R77pwIJQ5M7wjgcmFf2\n+WU2UYSveJiFix2nW6wNtYQilk6F2ck/IJT2UgjIMIBin3TzdK8aQ1dMJTtx\nOISqknzzkAzVB96+on8ML1QRRgelZP8FYs+EdMvpbdR/zpnGWsNFCaIR/oD8\n5GLFoCGOB6dwYTG/8Hog6RWR0Qs4wmXvxjvyt344BqXY4DClNoXEXvlDuZOz\n5fF/oYA7mswtR1+xujpZqLwkWcVbSADFgS2tDBv/MohjiNt9NyVdmjhHIOk2\nncpr\r\n=24ht\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUPfbVxnRV+bD/oTPyhjI98x/+9SFAdY5EwbE5kYiq/gIgIJnPL+DUuQgEbLTGb2k9aWg+z5ZqkkPryZFMwMWHNE0="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"hammersjs","email":"1270253618@qq.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.6_1623412485171_0.07111850681690624"},"_hasShrinkwrap":false},"2.8.7-alpha.0":{"name":"@alitajs/cordova-native","version":"2.8.7-alpha.0","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.8.7-alpha.0","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-COWB0bqx1ywXG1Sueo5+KvTXeYk1fIXy8oDKS5Flaad1Neey30AbBe1hy1mYz/MPIWIV/r40AtgnNlCuzW61lg==","shasum":"356eb6c92daa8b0d3e36af5c41d8979eb391a06a","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.7-alpha.0.tgz","fileCount":5,"unpackedSize":24455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0+W/CRA9TVsSAnZWagAAhT0P/2u2WtGHrRuQ6AGoZmCG\nAJ2sSFjtlh9MQoLV3qnGjWJSzWTtJmRWWZBYopoLdqiLr3MwpnmZLmTRWIcw\n9gmNIdRu5e7NLNx0gdElMS/pCoetaMQP658qAWrRgG/j2kVdJ/lYD66hWMse\nvGfMvibpRsYJ4WB9eUZg5uynrmupYFfhFsE5mXo4aGJ14i/fEf5Fvtuxw9QD\nWCN/rCd6EkMFbM72Yd1DcatLaG9OZr1BPmGjTYTryirorMXMZrI/z+hwSP6u\nNJNSRnnX7ggjOiJqU5MdWCu1mN76YLrQeqeSGnqDb2ddzh3z/AF+0yumrWvK\nmUPXzVCVVpjT3LKxI19PpxD/bYGph3LVaB7etxeXIqOkNWy+GX7nFwql8yjh\nK63sv27eAkLV+gBaH9Z1um3y2Qskpfd/iHDwf/qQ4E9BFO3taA7zmBA0yI2a\nPsfLRoLs1Qt/NtZvqAr3AQSvVA+r7mhp6C4Asc2qDya1Ixj75JsleddQfVcP\n5LnbuTCL1gsYA2hHR960s6yQdP2CvzMS+BpJytjuljSiUgQR2/2RAPge1s+O\nKdH/pPpQTcwLV/d34uOO9Ms8fwfpJmM7hu4j+a4SjIM3DF0xS3xZvvcGrvyd\n0sU4GmYhIgkL84XtR+X9Bi5o5K4rq/ih7JBJIONK0BM29FKfaVWo/RfFGXHk\nzUll\r\n=turg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYz7tLSrEi0Ul4zbFl5D6NAhH9xxRzK5qCBOOG/F8QBwIhAOj8ehMaSfvXcxCudnQj8E9ZThzEtJVwBP9f2P+TD/Ww"}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"hammersjs","email":"1270253618@qq.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.7-alpha.0_1624499646985_0.5096059900841003"},"_hasShrinkwrap":false},"2.8.7-alpha.1":{"name":"@alitajs/cordova-native","version":"2.8.7-alpha.1","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.8.7-alpha.1","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-B9sTv+Zmg+vGdx+piIkpzxAV0X4UJBfMzVhQowpI/iOi2X/ElZsvgeBfG0M7YH98n5pLFcW7B3OLBa8vd5hxBA==","shasum":"8ca8a75830cb1382e7b6436d970e9a334dae09a2","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.7-alpha.1.tgz","fileCount":5,"unpackedSize":24455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1DUhCRA9TVsSAnZWagAAX00P/RckJN/+ONKVc337nugz\nrkJueDmScElbzHSAoe/jbkDWunCgSpWEzLUllhWnsEDPYl0gTBAdSHo25fGD\nP9OFC7zh4wRGWlg6ZyCO/XA+VmI5PbI7MlQ4NWVP3VGhwOMqfQ3UehnGrmMz\n1+lvv5O//Tk57Po5fsCEk8/OoGymryLn+wk78L2ePGud58a7GTM/S9f3795X\nXQ6RIGLtvuS0XU23db+e2KX44dkCC4DeltNUSVWiVUc4Q2GpGoZrT5jQ9BOG\nYVd/EARcBfKBSi9cUa937y89uI5O3f1avrAtyQllMPn3gr7hVSpr1rf/J+jh\neNLixG9I2tV6BLMFSx5YAFlPkssWfEN+0/aQds1BDj8ad47YIYoHYpicAIJa\nX2JenACX5RUd360fdVAgNnE6B2fK/hRTlCYykjsJQikfJrpc2B0+RIniWOi5\ng9Tc0xqMICh1OANL/4JmfeBDo0t1DfE8mzgrscAdTnS5VD2bir8U+6e/wTF1\nx8UeQkbXPAvQomiur/ZQDr645YVvrSoCUDSFS1ExNXQ2xl6H72qLYCiMoloD\nZrSTJBtXNdDgHmarJoWyoBO4S3eU4zIW+k+pa+hK/50UZ6CPWJwSBFHXhLvq\n8CjNJJjcnG+KXeRwtdLjD4Vefg4E5JU51M7CcxyOnCjlHjLUL8fkFK8trEXp\nLQJ9\r\n=PNbs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMi7gBY6A7HfO9AFEF62//PAhvbiejO09zjGIv/wvPqQIhAI1mo2lWwx+KfhwFmyk5/HjUjKk2KZRnObMRnkHdHX6n"}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"hammersjs","email":"1270253618@qq.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.7-alpha.1_1624519968855_0.5580921975061757"},"_hasShrinkwrap":false},"2.8.7-alpha.2":{"name":"@alitajs/cordova-native","version":"2.8.7-alpha.2","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.8.7-alpha.2","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-Mx1eNttuWmjMgFB87TZusXpoElZCBYDHreygNiMtrfrrVY9sTqx9Pjg2+tdy1huaDb3fsBK/C6xqy9+IyIDKXQ==","shasum":"56a1ab3c5a18290fa5c5c3de33715d71da30cea7","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.7-alpha.2.tgz","fileCount":5,"unpackedSize":24455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1EsHCRA9TVsSAnZWagAAVwwP/0a0zt4veWi+jb9Ic9Wh\nIBfnyReE2Vu9tR4mrIPEebaIiAoqY5Hn2c4bi8w0HsU1XWRQ9JFR/nM1FNRY\nJoP/uH5v4GWHOUj11KLYO8q/fIexhFUzFaGdEqV9SFfDBBV5efizwyqbqM1t\n4iuzDrTa4so8tuR1Zh9cJjMC3bhARmj9zLDNQCOpPC0bsFNYM9vYICOdO2hV\nPMrfFWWr1137W0nhWAWGflH6l20FMxdUJtZqrac1LS+oxWJr0lKJNv5mLlJo\nlJJhTLa2iiii0FQPLlCz2yv8iRiwj8bJ8hpu9xq5Cqnwc5KrO8/f1U0aPfD5\nUBMJpDZ50eOY6FYUGQY5WPAua/858EbyJ2QU+sPxfWHKoaFr/3hQufHpi2gS\ng040pw5YVGODt44K6rdzLXD9XvfTF4M57DfLg4v5Ved0XN6JAPe6wAdrB7N2\nYaofr0VwBsO0/2/lI8Kul6PhD3xrxl4t5YdDFssH4ZLejUi/1F1CzF9mf8tp\nmwQtuFta7f2dTSN7oMUM98ZmFMNRszZE4UiH30T2Hb3ZyR29/Kbxyd7sUYrE\nAsL7cYvnGF19AjgKlRrp0hh+9kekSarEylbEVqZpbXrHrgmof5E470HWP11A\nfu23y6JIm/Uaw+/g46uuWYzT5dGnn3Ohr12sZlTf1FIt+rZfru+adu0zlVGG\n1ldk\r\n=TNZ9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHlGR4n2rQJXBfnOF0kRD6QvguoM6ETpX4sQ1OJpzZP1AiAPiLpO0Ty5xKNPif/jWqMu7CMnSuH4t5JINXgZValr6g=="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"hammersjs","email":"1270253618@qq.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.7-alpha.2_1624525574884_0.6460170200657702"},"_hasShrinkwrap":false},"2.8.7":{"name":"@alitajs/cordova-native","version":"2.8.7","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.7","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-Q+/uNDIATVvwV6JNzDO53UYMTG4aTJ1uXexen6q2R1QA1q03XNoWVJVG7d3pANpsUoizc1dM2EQRk+DEEyAd4A==","shasum":"0830011e2676e326d8f786c3ca45803f8f2e9c44","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.7.tgz","fileCount":5,"unpackedSize":24447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3n7jCRA9TVsSAnZWagAA1ssP/0Wpw7VZpB4XM4gdM04+\nCpjqN+UzaPXhOdKQVHl54sAEJxo9NQK9sBZbJvAQVl6952XT0ew3vCbyVV8Z\nViUOPP/lNt66/q0QVRHBDKew9C5X+jkBnUz3iUo2OWsXS7laJSp8odyFkapj\nLsL80eC1Mo0ox2PlQuTLnG7LVBmptPgB0tI8rWW6O9kWkivgKeCFXmixFTSV\nL1X056JMcXhFkesks9c7Gru4r49R9Ex2vIGoSW8BdDizK/mCJ1iY7KNII/OZ\n/ujlYe3Hu6RVVmA/MZQE1ToA8FQ60RYCR6zTCkIKk7kE06Fi4YqVCvFwF86p\nLQrVpVVZPmhNJvE7hy3Pt6Uxq3hacT9xhrraiaZJ4A1w+JhuJIPUYBVYWSk+\nDc31bEE26EObwUdPEHDD+tQutcrcCghZ3IsVJ+x52OVogd0L77p9Pc00Pfm4\nuGnhLz3zdlhEEeGDDT/Gp6MA8zbCNo3x2oNMtKskgdZ/mR9gYgI9C4n8NPo/\nIAUF0YECwVTDuZ7y7A7KBd3HosvlC3epUMXRInuHXWfo5towkUa1tN2oDJx/\nGb/bBY13bSPwmDP5dzsDO+f96VhSPeMwRXz5pnBHdvxhXCMmI25K7cfrLFxW\nVR1XM5ATqR1QCdRWMu7KjL2Yy83QjLdjwIUUmOnm9AJfgIZpyhVYqCayhbnG\nUa9R\r\n=pPha\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCssnOl5+9nUH2bBOuOJupjSr+/QuYv/gnLhjJ5FwF68wIhAMASyRdZYAwEwba/VN0Gwld/SZU4nyRCTQyGjBI0VGW8"}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"hammersjs","email":"1270253618@qq.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.7_1625194211296_0.2124738722864168"},"_hasShrinkwrap":false},"2.8.7-alpha.3":{"name":"@alitajs/cordova-native","version":"2.8.7-alpha.3","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.8.7-alpha.3","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-u3+ZP6m1hVnLj2MBfp8qws2MdUeQ9blz5nImUsBKZC9af9vgXLi9BZi+Wfbmws242Gpq8ItALqelTIg/xFVyyQ==","shasum":"874795e78eea9db45ff817012c8a9e151ce1184b","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.7-alpha.3.tgz","fileCount":5,"unpackedSize":24455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7AtVCRA9TVsSAnZWagAA00AQAIt65nqJRnGtUPSmGB2x\nClY25/ftu2AjdrcA2i4PojOJkH4hElhj3vt8jXKr0hHdR5uVCINwPZkImz6m\nXlotuxBG+ydIvMeSmu5piwjwhxszVwaQu0Z27OXM34jrB+fzuLkXG9+uqqDC\ns+um+ldubabPCNa90kR3BXAYix1R206R4puZ9ChmGHfWEl3Il7wqKltrYKmm\nMQihl3ev+WnjiEYBJZtAIal4prrIJhVbZtUHnS+s+gzCw2LC2J8CVe/GcUjZ\nAs8zoo04/AzQ0iZn5cGU69wfNptLW4rEsAzxRVi7J38r0S4rMJjA+cvCFEnQ\nnMI45vkLbJ4tdbP+9abpoFpNq+d6nqLn+RbdM+iRIE5T3qplwYksw+1qXyM3\nRHnsQcU4WiCqcrhDn1yTiq3RygkuumM44E8rKZDUjK2dijuc3V9595MtfhNp\nCywSx7gqieTAC3E+kCuyrlJrJarMbd08i+dZq7Tz7I9Z7lFuqo+NMhpfe3wE\numTjrLd2A3mLtBbjy+KnW4U0yyAExTn7JZ2q1GjWuPee4iw9M2Bbubug0vYU\nR7rLAh2q1cXvwREyCCZin5Gi8TYa9gECIZMiQ445Aohbp+MIuii78nxcQUU9\nZPjWOxJY+2CyQbSdRPchO0Wqzmh9XVwNCE68T/wrNsOn+yGgPXEanLSYx5yc\njY0P\r\n=Aaxx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAuOY2fqjZEzOFlW8uj4qrVYmqVQkVvxRFgq29DhJNKXAiAex2hKux26ItMEOhU3yc3CScMui1JmhWxE2R9q50V08g=="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"hammersjs","email":"1270253618@qq.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.7-alpha.3_1626082132920_0.05016224702292793"},"_hasShrinkwrap":false},"2.8.8":{"name":"@alitajs/cordova-native","version":"2.8.8","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.8","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-02KpORNeRYbZEB4M8wcsJLkgKGJuY0uaHVZ2zzCge5yrubzxWNBr/NDJCCnfXuNnPunpC3/eb8IzDT1tRv1nig==","shasum":"6f7cd9abee2d5bb3b73fdb2979b019f7afa2170d","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.8.tgz","fileCount":5,"unpackedSize":24447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7P/PCRA9TVsSAnZWagAAEOoQAJgQcGjSdADEeSWr0nC+\nOyLvx9BZs0OYqy+d2CzXE0/bBdgROnOlZOrrulC7B/UTzAfAXuDA66qHbjYY\no6TJ8Rq3cw0W6gfs4t6rJ3rjHDazx9NrmEGA9yhEbDcRCxhTuGdJeDdeLGln\nJVZ5uuaYu3oCQtoHZpk5f+I0+tAY1WSdI+pC1PP3gBGa9EZGvBhZ23kRILJ3\n3zDLDDF68wB6Zjzyn66fe1uIAtl3kAlb2GB+f/0acdlXdiqF4AqIfUE4Lr7s\ncGfkcnYQQqa6HfkDW/rHdXMbK43U6FQxKKsn6PORHcLzMt61mEfWGQSLqftE\nTlwrkFzjci8rh9A0d9MkzTcR8SkDmzYMl247orBZzcDhmYWOnxRHFf646+sq\nEzNuGrWL2F1hQVC7bh/9nh0H7YrknVq4eF0qdWgu8Z+yJybscF/c3SpDvDxN\nbwvFVAKmvys/uXP8kYiO6OY65VNGvFXX/FuUpI3XTzUZTuEfr0rE6VN02zCi\nfRHD5w+PIbzPPhMl2aHiXFLLFUVtkRmDfotl1Sm0nd5aoXcYRxH0XR5dBMTH\n9LEfOcUmbrUFXlJwMWh6L8s+WgWViKaZwTLh0ROfwNRGafo/Xski+ODMURxY\ncpSh40ZIbF7IecoDHKwS8UlzehZj8SicXuA96wxB8ztzBVKUBwXDw0HTcqkf\nzy1t\r\n=pC/C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEc7Igo3cCkzz5/IRKGwGgVE5OFwETRQMrNAY/nCS78eAiBFu4ash/QcHDxrtuJ1ZESnDgOJjyfzZoIeEIuSKPzgAw=="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"hammersjs","email":"1270253618@qq.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.8_1626144718943_0.8682729628439134"},"_hasShrinkwrap":false},"2.8.9":{"name":"@alitajs/cordova-native","version":"2.8.9","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.9","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-HWmgyJ4wzYdEWcq0jfnxWfPvJjuCYINp5XUplo37GrpGv6qqiQWsV3IHnTDyqXs6dV8xJwfdizqrkr0k78FNgA==","shasum":"3a8c4bcd3deb71b8cf7ed55836054a0fff013599","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.9.tgz","fileCount":5,"unpackedSize":24447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9UVyCRA9TVsSAnZWagAAflUQAJW8+QP47gl6wskRY6MZ\n0prn2D/INIsn9/SUenkkJ3sP3ldqPzXDTn4FnDKl2G1yh5MXs9DC7rGHFN7l\nce6ejkGmXLoNx3/s6NNooDjHxoPR5me3R6APUtDPQURxapV1/68onH2DybSi\nqNXwVJ3YMGO3auZZ25yT/z6kAF9oab8S+bxEA0UCW+SMXbmJO0DGUPijzXkv\ngu3NGdWJiiXI+tiXxSHQk96+0W6KB4urxlNXyflztK9lOzTp3kIACJJU5qt/\nSZOxgWkb4chWpOefJNWxdcTnFXeU5doCsusnayRY4IF+BaL9nZw9pl7yYCY5\n1C0homZMRLSFm/i6UrF7c2EfrP+Qx+JgsJ5m2GSfZZeAEgEjFi/iSJgr/YsU\nhINQKSV9ayalUvo72xDHjKSNt/rDyugj9iJdl8Z5WR+ed4dZRn91gGyb+6rf\nE/iHMAzM6RmgvTv5VU7wmHi+ttdGwKOnjcNhKTxB4h8Chub/rbkseTIDAfTK\naozFOpqPsMhhQ7JEMaCEv/qYvDtpUvPl1aM9YZzxT7AmO5IAhe2CbvuteQhC\n1C+1DooZ15IzFs/W89RHXMnyCbQSr286NgCcnzApJgdAz6vZxevO3DvmGd6i\nV1loH68tPweCRrJTg40C5xrhkUIde9cpTUu4ggb4KN75NORW8I0k5MHoMcUQ\nyxB9\r\n=8T+6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYqMfA1oE7aj12KT4rTPy/fxKxcIjcasISWIjpV6LKjwIgNB5tjPUbaOu5SjTFMbOdP26VUHaEj51V6tW5kx40z44="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"hammersjs","email":"1270253618@qq.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.9_1626686834688_0.11150708818311261"},"_hasShrinkwrap":false},"2.8.10-alpha.0":{"name":"@alitajs/cordova-native","version":"2.8.10-alpha.0","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.8.10-alpha.0","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-n/nwZ9FUMJtr6TLt+AiqRxFJR0xq9fIIbyduOpB3nbW3O71Zq873Bmj14miyKifimrakNvbLRVWAjxm0MrZRKA==","shasum":"52f93f18060ccb055666870603f3b46b5dfba27e","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.10-alpha.0.tgz","fileCount":5,"unpackedSize":24456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg945JCRA9TVsSAnZWagAA0XMP/3sMYlkPpMeDNRjSY4q6\nvhcsWIwXcMXPqJ2iTWVg4pZSIL8xoFy7cW8iQ/TuNGSZCEc3Y3iIyJ0Bu+XV\n2nRM5ejoHuv1k8PAnJcvZrmWO0amgwn/chncd64r72d/ozvSA7ykC7tHBDo8\nRu9nqlr0teTTvD8w2MweRCL8pDA3en15gcvnxsMsxZ64ti4RctUqSEguHVdO\nIg0jNCaFb+i11F2+ubiE50DWL5YCqEUkgV42KRVPCKehUPNxeLEY/6UQ8lZc\nx97kUw0spfu0NcNlvzkE/B7+oVD1zuTX75k/jLAe1SGXl8Cu9FWvEvPIHcQu\nl1cH4hUZ5o934kk11BX5W72CTGvDe5mqUFGuYliAhRLzixg1xqC6cEAiMJdI\n/l0DI+QsAnUDPHH+DENM80PcWxJk0zpZZHa/SMzoSfj/zHZc9RWxYz7mZ0wW\nc5VVtO7ZfuVXYRo6CoJZXWAeJOeYuO+hFfSKu9WAl0YP6jx7lSjxXv5J66Wb\ncKM3UBLrbgTpDNizb4SxlSOajkrhZHxifG7EkcZhwNfRlj6xGKNJVLmzOZlv\na5Q9WENnildRJcpthdFZEAlmfMMY9xPiPT14mAR49PDmc6VT2dJ+bxFnBhNd\nwYEXrYfT2ihQITA9kjpGUbvoB/uLKBsiIQxAGLgg63q8GuGbVaVsbKER7kSN\nbG4Z\r\n=H0Ab\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsm+n3a0QQgluTQIEhxWntqmmz6tmZwfItvfkgCsNe4AIgcxwd1/yDt7wXPYjkmimhS+2Q50lKad7aL4NcxAoRaDk="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.10-alpha.0_1626836553605_0.38026957831660146"},"_hasShrinkwrap":false},"2.8.11":{"name":"@alitajs/cordova-native","version":"2.8.11","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.11","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-dm/t9+yc/i3eRK4xWawvHH72bU4Xs7SpLjsZ8gQ3nDU2HFay4pePQ74GvoH+9RwAkAVd+04CnzVESsWm4k6pWw==","shasum":"955ada8235041127f878aa508bb879afd1724511","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.11.tgz","fileCount":5,"unpackedSize":24448,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+jFJCRA9TVsSAnZWagAA1fgP/0AbBeE2L/XvDfKc2FiD\nCUR3PCQgjVb4bLS/JpcJq9ioOSipl1cw1lpwAlZ1P23wGZdSrcim7a1o20RX\nuyFS8vVCdJ2YGXLXtsTvIa1siylZAs11IWzBhSuzBOSboGj1Rp/VnXp1enyl\n2u8ADx9LoFnxKnpiwA4F5qZ7YnzrAdsugHaHRzY1l+kBJ2x2GxRyJunnnGzD\nCmv+S+m1MapbuIhnPqyyxvP+VDwy8mrCJaNYax9OzMwgp2IJG7iWVfPkwZ7j\nyrUdQQZS4PQ1jcHZgJuwJB9dqkm90GWdZHG5gBRHd6wEizVVAew8gMc+6pi/\ndRtLQz/2OnysLXgGG818PQeapFrmDaZW0ZXG09JU/U5furjdmnkJFhQVTXED\nmTgYLLntitcsnjCjzcxCJwGIy9a3hpyq4wwUc8qIVnz9TiqQY0wV5wTf7ICp\nqGP+sVU2EYVDw6F23nIQ5mNvSX1aISST4yXpjBVod7BwWEz5M2+zPqRmfy0V\nZ0gp/kQEiYoHzV/w2i1CStaRYDwBQ+55Qkw5LGtywznJq7+WRaWb9oRJ7glF\nOe2paDc7UV0W+awym1TCn7zESN2K5ZlnU3QIq9vj0qD3frWxlZA6FIlpuRnu\naI11s8LkyirEv2HFCJs1vJAFgRxuFhXZ15Qt2atHWvhQtGtXbkI00tj053X/\nmE0m\r\n=UACo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3Ruf0crYs/z1lNnGRPZDIR6eFNPoc1heCWDU3p9236AIhAOd1M6zxPNgR6bmfpAuyJTzw1GyZCvW5Xm02pcqO94YL"}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.11_1627009352979_0.5633930981462132"},"_hasShrinkwrap":false},"2.8.12-alpha.0":{"name":"@alitajs/cordova-native","version":"2.8.12-alpha.0","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.8.12-alpha.0","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-VCZ0FEytkhfXg8nPkO6/MBxxUjN3Gtj/rTJGGjlsC+u/Ji8MggS9dCySS6resEWuN3zztqdPFyP4oDqjdoqLWw==","shasum":"063a8cf68fb4aedfe0f6128c2a0566cf272d6356","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.12-alpha.0.tgz","fileCount":5,"unpackedSize":24456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+pMUCRA9TVsSAnZWagAAxmwP/303necZ8uwYGAWlWInx\nvZ9wifCqAj7ZNnth+QYo+Sr0YZLZwaq08ufm5LaUywEvb3VxzoWuWmz0f2LH\nhaIe2QsxJlRk1yU/kGZ1in1t/D3oTYlYv45OHkPEIT+M8XbSXkiI3WPSWdni\niddtofiyE85MiQy875+dCGiPgfXrryxrKFJ+HvMKE51qpLCMGc9642YqAbSJ\nGnCF804mJbN+d6TlFPRAb7MhQrU5ivDnNhBO+XpKO2VtetVFmystD1wBOUZi\nuhTlcY8tRWTu/YJ/C/45azcyP7+RxzpLVA/XhU1/UdcIMyCHBJOTT0KYW0lG\n1FsalROIZSUHFsruU3uryYAoglv204mLQfcxI3Jy0It0np/QiJvqW7xqC7iA\nE2lW7GjExfBruuqLvyAuZfm2cy5LYQ2Do8T6u7alXfji042nv428PMgiVLyy\n/OHeuhKxAOgFzfaTguav4M+7KdxocH2jXObQnm2oa4lu76fznyiQtrBNOl27\nNLclt02732Bf3wuLvKF78p/jXQNTnP8BDph9xEqeb4KyCrNX1t6doL3JDDdj\nC/DzGgVPv+5P7mlettmdV6C886XGs9Q35SWWrpZDn3HTyDPxbqaNeITB/wwb\nrDRCmDH9v3VsLc5pIAYy1gvLHPRx0lEVBmCdg6bnulb02u2lEKZKRsYdVE/2\nMAnc\r\n=ebBf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDj5EZlvPxMpc+LHOqqVmhXwiSC2Rad7Z9QDoL3eonqCgIgVVLngFyf1sayJBedz+bd7Q69zuAQJzwhgNkVi7UcOhg="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.12-alpha.0_1627034388788_0.9222203085735112"},"_hasShrinkwrap":false},"2.8.12":{"name":"@alitajs/cordova-native","version":"2.8.12","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.12","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-hpeOnsyWo8QzpPguY2bnHnbQKU2BPuKhXF1twOUXVGIku/+dOjo4fQD3jePsn5S2cOwOgjkAJ8aSEMZEgWurow==","shasum":"d3cabcbf8bf0c8782287fe28d154d090425cbb0f","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.12.tgz","fileCount":5,"unpackedSize":24448,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/ntbCRA9TVsSAnZWagAAP6sP/R1EPL7VqmVjxAaEgLsG\nzr7uFdziTJJeYnnxl1TBDONOgDNHh/oes4mIs5tToQHIs4OjYm5VtTjsBa2y\ndFDwRt6EZ4u2pVxCapph+2Ltay7rW2xFkRDdoR8CrS+OGezivUAuivAJzNVx\nGRbUeb0LrLJWodP+PeeSZJtiWtSPR7OAQEDqTGwxiuwJvyrUV/9tH2OxaYFi\nQzLnktShUHIB9/USeacxgvctx+nzlbFztQBF8rOqr73HFU6YxpOqkErN4KEE\nA+LU1MquxjrWOPTZHeGNOn/+ue+nnjBxTO55ZvnYvkatT4VMkMNzAQUDlBYV\n3toDdPuLIbEPRvWq1i2Xq2HsMHk//YugCY/ZNvGy0ssKEe+cpbWURWIxs7ED\n1PKx3xAW/hKOhLpnAYy+WTt+3xU3uqIxKeTq2Lm4kXnwoc4HWMi90AZMAvbi\nt/NRe6bxzBcxSK/ICdhWhSG8B3/TKFQVVlWjrDI6TB0/4sguK+wv0uYZHz3W\n4F2Gd1NjyKeUsuN8xhYWW5u30t5l0bhxNpwDk2sCTigxiKV6rIgQg7+PZcT5\nmTTkPbz8JRI3fnBhcoDlF8WylGFsGK8V6k5+a3WrcjyfCOBQJWFmEw3P/Fmk\nuV+JWh5KtpGy4H1+2GhZC6MNgT9HmgCiDqC8Ijd8OulxuVOs5QzpfkYZEDU1\no1E7\r\n=tHnv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF40835kwQXmAbAUQOoXnR0ISOkWmmJK8kihky/md1dAAiEA6ZR1RNakZ2KL7Hlo9dpbiuRfh2BrbOiDbCWZFUCAzps="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.12_1627290458944_0.4122596430713972"},"_hasShrinkwrap":false},"2.8.13-alpha.1":{"name":"@alitajs/cordova-native","version":"2.8.13-alpha.1","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.8.13-alpha.1","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-uncqF/sMRrZNL6Q5oOMlhF8KKbv3for5L+0tP3QKkyEeZGa3QK038E7YymWZx9QhcemTb63e05DSerXFrHl/3g==","shasum":"80fe3e4b0988d35d23c00d0c2d099ed74d96aecc","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.13-alpha.1.tgz","fileCount":5,"unpackedSize":24456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAMIdCRA9TVsSAnZWagAARksP/0/nukTIkmYciA37oH38\n9cDF8yUtn3b3VuQ+lGeMG6yNrDO/QWFSzZVNmRzGqDpcBHIzmD7a3YCvVJLb\no2sAuB2MPi1d8xnTSMbo4BDeFFysUa6bWT6/kQOfTGxj7WOVvHb8y8PpiPu/\nXfkar23X2ribhTKSSiXL03101FdUwt8x3LHC7YIVOWf3yajOdEZNaB4SqGju\nwYkfqxusbOiFpPz0IZf45032AU3YO1baKCS0jvUGUVzKi3C9+dfvGuVIgGU4\ngDkSFEUxI6O5cSrMQPRZTvuiLF3gIACfumUSkYrIvRk+9Qh85/2JrfOJAVC2\nJJPL3Bgmz1jGJWbJ/BgU0RmJoOj2mFzacthL2GdpP5rhH2U8Ug+vKycvUSLt\nbpQAdlFsLWidHnzF5YpTMo414GmnHec47EKOuRDQ9nlnTtK3NnXrriWa65T2\nvugBoKVVgSJTui2L6pFHjwvCA1G26+Xq37t/ZG2Ze37VklnCrDxTMWBe/dvr\nlwjMrxXHWLIgeA/p5i5y5jA8TFom4ovZ8qv2Vpz9LefKCprqXO8LHxssqF0h\nt6X977Q+azjZOW48J8133Zf7g9WW1BOpZDvcB03B+/SDeXiCyVtfjRRuH7lH\nHXAmORG4uNikwqGNjOHYiKquLxvq0laGG/cCik0B3u7PdM5Iu9SZAIOCuAYL\nzgBt\r\n=Rx4w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEryA7/eknDw9s8uTdX+VDisFPqvBbR9BCkxnWOeMosQIhAKdu77IXaTOWh+HMhBVbFQXZ9B9gTsB4/csYDZyLelbY"}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.13-alpha.1_1627439644259_0.07450745125272307"},"_hasShrinkwrap":false},"2.8.13":{"name":"@alitajs/cordova-native","version":"2.8.13","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.13","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-bPUbydNeoPUNGlQ44Ox4UoNBGyP6f/ZfK9cwAaQ780UGKNnBT7i1kPOu9gkOVWRQXAG90ysG1QBUGlhhRW8HRg==","shasum":"bd969b11786c21ea59508d4ee1cf8fda531a542b","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.13.tgz","fileCount":5,"unpackedSize":24448,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAM+YCRA9TVsSAnZWagAA+9IQAJlOnc6t4Y30Uki8ZybX\nEMHZe6ZobSWIIQCMGLIluTMQ2xuExmIRpdVbs2n0GvqyVWm5Nn62Afunf6Hz\nQVWsUQZUlcS8sKq1LXCWEon4gFokCPtUcp0K7vwqbbjFTTkQeS0Yo8e/Z7sk\ns1hMP8NUMhFr0VoFe0Gc3SY/NTQeTkUXdVDlvd+fFTk6Mv5y4fM6oqGR/pgW\nqHZwIzws6YGuLBKaOjPu2OlJ4vP0odahfVyPVXbrO2pfVHBP3xczCNqmcBHn\nIiCr5Xjl80n6CdvUkGXk/aCBLjW2a7t2KRs9bpShsXAcb1BgbJvsSe+JD7JZ\nFKRaoahqj7fW9vsNL2HmN/n9GOp9dyKjpdc9q+t1J/J8VY4I66b2aaArk6eo\n11JTtCwm2t63UNZAJWd+Sd3SqP+ntvbe9koUNxy2Bm/0dbRfARxhyD4bRaZA\npxW8yYqLWpi/vZdcIgM1c/g6Z7YkYTQPEbp3iBc+hdntLIcWwm7U/4s7Fpp4\njMowH2V9K12JdbhxPAUaPMJks7FkueKSkwEtfeIlznh6nDgw7uUIsb04zGAN\n3UUw2Gfnesh5jl8eKHjs+XJ5OF9gqPylBRE9bxk3lhqi+PZWxYkO08elMSea\ny2uGGA/TqQQ6Qu4UL1aSUo75MXo+J4jqhG8Hh42obNljxS52BRMUL4BaG1MY\n89wW\r\n=aPUV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyO2S6v59wwNHS27H5co5G3ve5XI/cQbiMijjiONT4DAIgEhaTOS0rsYIjUMJfgricdLvheAIpDXrPqN0SFWazAf0="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.13_1627443096438_0.12088436966744553"},"_hasShrinkwrap":false},"2.8.14":{"name":"@alitajs/cordova-native","version":"2.8.14","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.14","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-Cnfkv7YqriJPdyKd+hO7xv5Nj2L8KE/3FIZLZ7wSnZ0a7TztyaIKHoqGAQyqysF7NQQhaNlNuJ/1t5nKkkA/3w==","shasum":"23f349c116d2ba2c08b469b705cc47978102ada2","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.14.tgz","fileCount":5,"unpackedSize":24448,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEmQfCRA9TVsSAnZWagAAPlMP/jFPYhHTwTKqNLOtiPH5\nMxjXkdKUCGzazx+rbN5kj/Hby67Pdr+zrA4b7XgRb9PzaAj5je8FoYjzWE12\n4VqsNAuxSCSTpKxk2gPySoTks/0jll1swn9GKGcLFbF+oqgvUGQ9Cp9ySwNZ\nOrZ4Uh+6tSKILLOWZUB48sZS/Esyxch80/VgwXXoNvSIJNhEWw88rbFzIJ3G\n6Z3BbkZAKrNoaGyHgAj/XwyCC99lExT+ecYmGw0b/Ar+VOTfpGJzEMKHpDIQ\nA4Tp2uyGgTtSB9WdKmR4v0hfV8G9ICiCHt9COBN9sP5cbkIprjrbaqrbKdkT\nU1GoWp1NnXN2kHO8GxX9BFpaawNzcRUXmF4v5O+iU9iiSD1C/MH8gpm6kmXL\ncFSKvnYJCmC9PQBDiM4w5lk5PQaZB2a6GxuSZEMyWUL/Idr7zCd4cgdw2uIM\nblS7bKdvYBeSRgzHGcTWJ1i+TIrHEAGNhFPo+z7C9Pi/724ABjFV4FkuWWs3\n1RaDDq8prC/3NLZCsovY4JRldOl7xc+sMGhHWfnPmFgrQoMp8PERPKXt2PFm\nGejw+gW4/sqwPhXI9HL78nDugaT8JACEL37p5+yWWGGTvwqe9n9xMKZGKKRo\nVZdAT8fU7bSJMqI4Ao6PivDrYzTi/vAL5FJdSaBmqdTh4h1CLdkePAlKakOu\nyjl9\r\n=EnrQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVER91iL7qOuA8BJTWW6a8nhs/JeLtkCFZ/nuXtZXWUgIhAOqnQIT9lE8W6Fhf8GpTLrDaAusGXnHjA+cHBIeQ9z/j"}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.14_1628595231265_0.15933971897346422"},"_hasShrinkwrap":false},"2.8.15-alpha.2":{"name":"@alitajs/cordova-native","version":"2.8.15-alpha.2","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.8.15-alpha.2","_nodeVersion":"12.18.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-aW2MUR4FU0RYsQaBiLHte19fGQnwDMyOXo/hU9fHWlNDS8gMfxbosaN89RrWHdMugioWoYGNKVkLYaXOUzwf7Q==","shasum":"969a71a3c227a1ef42700ddbae93b269b42a42d0","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.15-alpha.2.tgz","fileCount":5,"unpackedSize":24456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHHkbCRA9TVsSAnZWagAAn1MP/0woa5vKRxGCN4p4QriE\n/02nRbRSfvEqHn2xaJ7X6RyE+vYfHxd2xot84A6jb/fgWKhcm9JRmR0F0BvX\nqedfJM1lZUgot2IxV2QUB+u14QEIYSnOYcMyT09HiabY8Kukdk2D44poB8X2\nmuxJNtcT8PmWZBBublxNnFWvFycgJfAeQOF8AeYPnmx0/NpQJaEDj/0ab0vx\nMuU4botxOP6EQkf8VK3aUchYnjHJJYEnQi541dvdZwH+CPRv8URpYTig6DTU\nIn5aMwXKvqIo23kJHVha5F5M67izarL2hWsd3AUOWuNmzQS5jsL/njOYydzH\nI1ETkvPT45rDKB2bnfCvVEZFdfYOG4PXK7d5NrMqLVPMucP27C8p/nFJAMcc\nbdy9y5+9oTQ4NAElQg1E/CAFgKO8NpE0Zaa/e2BzI4V3J4tY2XccUxzvTzra\nm9B7J84uvTYG/NoYri5mSqkAF8Gu1RlORu1i7o9Majm5OFAr+UfghHlcvPmf\nxdti8n60b8vMm6R65Xg3GefJnxMYWjNityswb+ETx6JK+9IehzS5Yzqwi0FO\nWDHN96eDJbVHLdt+P5u1g4OnBlXVGMGKf0C/qxgokYh1mIQnGpy8TEQ1US38\nig+PMN/v2zShIJtyP3haYhV2gD5tJQz2WpNrIFiWKqhG7QeJGfu8rx6pJFNE\nKZoY\r\n=vJ3J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCG/0xz+eLilsHMKTWNzJmyKHgJE1BL2IV6tJKdwdGFKAIhAO8IwiA9Rm8SzGoT4SM+edgObIu3HpihKl7WYD3lzrJQ"}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.15-alpha.2_1629255963318_0.9349936067032354"},"_hasShrinkwrap":false},"2.8.15-alpha.3":{"name":"@alitajs/cordova-native","version":"2.8.15-alpha.3","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.8.15-alpha.3","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-/0prhfhCrvyJpSeD/FL8qT4ivHeZfxV5aCSVQf3Qxmg2HlTk6n9ri/G8D/h19CL4+24mix6ZKqooktH5oNLU9Q==","shasum":"d527315245b1f4bbbd25bb1fb5e91f13add256c9","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.15-alpha.3.tgz","fileCount":5,"unpackedSize":24456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJKw4CRA9TVsSAnZWagAAs1YP/3uC4WCw/bEaQqbgXrHb\nDAA9ODdw3kBgiT1kegGirABhXluOXNNkUZQqnqa2b3hR6T60y18bzvLOsTSG\n9vPS9U6uTCGeF1h5LRcaFnupBGIkBq7PBJR1k1HkV4gKVjj+3lfODy4OxZA4\nSgEsIjNdOE2hdpRKrfSP8+EpJer9we7CWo7GpbB0ixrkF5WxiQaRopjHQxA2\nOZJz8K1j5tCt+GLT0QP+QDNnFjYsB7zP1NKTjhVQefJAEoAzuZSxfr3hfTtc\n+AmAxQl2D8CIKE34QdhYvVaioV4BblbI4dS/pJws13GAmTvxupkGvZJUG4W1\nJw5MwQLF8yuoiG6pfYAKrNORcONgDrAoWsqUpyS7Ey7WGADEXgB5SROAfcnf\ncA4bREMaUdJNTU+szwWmU5VhgWs/D5MIHCz63L0EXo+o2aSSCy6KT/AWvXVO\ndVmWGVpV1SbIwcaCz2whDzR+YtOm65EeQdgsP/YHYrbutVmFLpLmi8c84neO\nDXNLlJPvEHvWkaFXbFnTytfXU/O4sJsYSeJyTLKD/JhqGExFu6N/fWOBu8Tj\nX5voyE8WxRDMivdH074V0W2O+WmJ0pLla8siTsqyFZdH14gPYBved7kq2kI5\nXPJ3DNGcMFrJLNUHI7yMZNEXadEUlelHh7XDf53UXqVpPKSYsxOBWYGRGKfw\nJdFb\r\n=PRcL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCdd38QSgZITJIka4dQNuJ1miTKANsmJqj+E5uFXVwA+wIgVasExJcxO7atSYZPJEW+WJgKqWxpKP6+Qka19GLFPiM="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.15-alpha.3_1629793335932_0.5481811726129946"},"_hasShrinkwrap":false},"2.8.15":{"name":"@alitajs/cordova-native","version":"2.8.15","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.15","_nodeVersion":"14.16.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-kg64Y6kL6cDewJnWtKGdSwjd8lnOOXhPBoZPJAswI1rBeAp0fBAiQdkzNQKrEsfwaQKLZZ8vgHuskWiaUMr1Ag==","shasum":"27e5ea0a3bcfd35ef453bd98c780c402fec2767b","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.15.tgz","fileCount":5,"unpackedSize":24448,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJMBWCRA9TVsSAnZWagAAKm8P/ivf1TcmAYz7rm9bPY+q\nXLLrVaLNGlBAHNTG8Tqb2f9AiUbIRMntVlX/CAfLrSdlz/qWS7QvrIFXlUVT\nfI3LIdArOSJ0bG8MEnkpVG0nBro8uA4JqTZzqEqmG7y1SW0UeFRqRKmD9+fN\neIqj0CFsA4PqHUcFjmOSk9vQLZ4MJVMTjPsl2hW6qbpkL0JEw10+kAvyM/Lb\nrkvwHppi4yJgnEYvcA9Ppzpo8tLYA19rWA0TqlrO/UpJ0i2gJJvONLf25WWV\n4QOaNK5N/HnA2DjUeFJgcr89AxsrE08nl4zEAIdK2rWAGrM1RmnuIO0tcGI3\n/n3V5aMk24ccCVJYtO3TctwOIhUv5EPF5hWgyfshWGXZs3fbq0CBpyImqndI\nhEG2CzkdkxEe59YPNdyQnC2TLehAIO5liGLyViIcpyjJ91gXlmOc09vNIN0Q\nAbYyr5K5nm5eNRFCeVxP3ir306e9JV+dY0frK7q8ko1dc8ldADUu1DI5wU/F\nOOPovhqYni4LiXFLQWkFAa8LpQVVChJW6C+el0iOZJPYEZcmke+YKKfZVdIJ\nkCNwbYLpUTsBVyEUZVKcmoOdFr46Iz+Mf5cn1KsRiayf1MdMsh76VTKbFduO\nQ+5zCV8HN02TceSl0gGx8PHQB4jw8ey05SzWcr9GojE+cDY+WhVBRGT+WhbT\nmpLA\r\n=n6kJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG+Y7qzW+HliGwiacg5lCEuNl/iKgwy+8UObCCmraMKJAiEAm+d7+Yiy0fFTY+X4Hqc0H8iPtgFoy/VByW828hMrNWc="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.15_1629798486550_0.6605428346871205"},"_hasShrinkwrap":false},"2.8.16":{"name":"@alitajs/cordova-native","version":"2.8.16","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.16","_nodeVersion":"14.16.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-AtvDxrXvcy4F5GKWPNzwO0eBQ9sTgbAWKAyX4+VGY/KeLmSFqPyPL1isM9I4BozfOuD7kfwm7yRysLb3rEFCow==","shasum":"b1d09d72999a5e2e1a73283a23aeaa22c455dc68","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.16.tgz","fileCount":5,"unpackedSize":23900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJwkGCRA9TVsSAnZWagAAHRgP/3rUz9FayT5GwsxNRIry\nDWJ4GUG38ijvL5lwgnFjps8U2eqN+DcYoB9vxlqC43h7p8R0elB+jx0N51Zo\nKpRBU3ucWDiO4NW3AjYy3tG3TYWtVohKFEN6ayH2vpMgHXJlOFKIEskOL/EX\np+LYfvPWkjUpCpz//vTXZVdjr8PC6obN3LjoI9o6wJQhQ4YcbiRzrqFc4dP9\nZc2/nnFfu/g6wqPHfnwGMqgfRjQuiJQaMe1ZGzacSRXiC2dYPlaTihV+feod\nGzu8LUxj7Q5c581Hurs6IL7FgKP00XKy04H+6tWwXR95nyDUHaF55C9mxcNb\nbHJJQTQcXzzZ4BZGCAkdo70rCX1gNVjQpuY3jYy9cFcvs+BvAyPca4319ymo\nEA4nrv+p1nkknM2qb+Jpgvxc5Xa6VBAxm0/WP0OCMS1vkXNNgb1v6UeRH5j4\nAuvXKAMZiorkVzKmRSfmRO3iDi83+9nafc+SlTvOJpSyvqymDVKuCeLFMznq\nyJHJxUtoQ4q2MASJn7nQ2dA96mxR5b3zD747zV17pwIRNqC1pSNsfs0i6Osx\n1iXIbqwCtKcNdRlmIUmckeST958Z6qwwLIT69wwgk8bW2kNZREBNLhWHzei7\nwiFViXW22zEwu1chRYvItuJBSQOLg6fn1Bd/TwaTPpR4D3g5fke7UECLeTxy\nxTgk\r\n=t6ZY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEboKmj2YBr1pRD1Tb+Oh44vIs6K7COwLiTUupwq9w1AAiEAuQHurv0E/OoRFlmLQwslbcE1Fio2LGUS4BZ8AOYc95o="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.16_1629948166538_0.8509876706449748"},"_hasShrinkwrap":false},"2.8.18":{"name":"@alitajs/cordova-native","version":"2.8.18","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.18","_nodeVersion":"14.16.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-cG9A+v3s2y/IWZ/KiE/DXJasy7ndSEdbvRpSaVxPSpMG9/uncG4qc3D5Hs4E43X5Kl1FWxHm1m5kvVRshHXtZQ==","shasum":"11ebe80cf255277d950a634e389951010df53577","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.18.tgz","fileCount":5,"unpackedSize":23900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJ0GrCRA9TVsSAnZWagAANYYP/j1SXrEACGUg/G7AljP5\nDr8t4m/YbjZQ6RSXejrg4AqM6ycFIujPfFIjDq+0BE4YcKYkSN+hQ51POpfu\nLr1mgfh2PXvudlmdcxUSwlwdyRLbJcPsOuH3IGqfZ2H8fDNopMafUhd9QaRm\nyl0/tQqmn5DI1/zQsbZdV4GdkFl2VEPDuwLniflbm1PtlDjaPR8LKoV+9bKs\nohSZ0BSIoKNnb9qqKtXcVUzh6Upo/MoW0LPEVNjiGdkBauFRXhdAKkvC9X5K\nDs4siBCvxV2orwWRv5PgOc0JpDIdsYlEe7aG8aLWdQspc2BgzF+FZUWEGb60\nhD4O4QaP3RrY5S2ZkF5zHO/s3sVEMW+8N/zp6dCDpooI85EqDByzI4Lixwyl\nmi9/f1ndJ9xIycKp4MJLMZYJi8z0Us2JZHTC9c+12zSneqksuFu/aJnQG+0N\nREgFAaFvleJd8gcApZnlR2Jq0pImBsLL8szU18D7ovtuHo1xgLjIbYP5Bje2\nAz+Glb+S9SEzVUg55aoEChd1vX/l4qm9kwnRytNLLMSaT8qV7bNJrj1NcHfb\nxiv1JJJuSWDEgVYpGW+V2mzva1e4cH1nELr1V2JolX/rm/k9RvLgUmbOC4FZ\n4HF68p92v9t3zlFOX9XVZNtSOIdRz3yAVaV3Xa2EYppxOVqNeTurNqm0eSyF\noq1S\r\n=WLTi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBEvgjTUXKj0iDAXQfL2qg4k84sGdCloatPSQc7QO9ShAiEAnRypchNSL9wh9w8Q2tSQdlxtDFacVEUflmj9LnjnNFk="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.18_1629962667592_0.8003896554451124"},"_hasShrinkwrap":false},"2.8.19":{"name":"@alitajs/cordova-native","version":"2.8.19","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.19","_nodeVersion":"14.16.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-a7WEpBW3ufL5xKHQLiGHr1XS3hUBvkPKGhy7YjseCb9jQ23Tbo7kTzwMZsnJeaSJQIdHDR2SHjbsfsL9IkMDfw==","shasum":"173407e798cd720107e53783e431fbc387d21d4f","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.19.tgz","fileCount":5,"unpackedSize":23900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLhBsCRA9TVsSAnZWagAAZlkP/2RkinPnrB5pYlqKqoyk\nmoduId4J3byJ3+nEfqAZlb6M8+aKVq5bdnJ41o2MjlTBKL6yqjPkjCT2F650\nK47attiwjSwpLRgiQYg96U+DbTOplnR5xsatHoB55WyXqCCMSt81fD0YGXbl\nuxAvxlEXadK0ojArc4FSb/D+89poOPKjCt09E5+vhp5A90Uw3YEhH1dFNgRm\nqhcBvvpmnHIhO6MMcBKJhfC0TztV+3v2P5usY3Yx/Gb63xXb4U7loVtc9acI\nQ5AnUZ4xC6Iazfv1MpgpmtzHRg8S0YRpBPtjXQ3UyOUhaPsAGLL+Tc8ChSnm\nO/D0UU9NQotfsEA3zuOhyArFheXDTn7BNS3CW4uJzYTRHlfL1arOUVwB+YcN\nSozp7ATtbVDw05VXg3k03DqBMYpehZ4XXKBR/rYYU7Z2hoFtgeS+pXqG10/6\ntK+urx5Cru9mfjiEnC4bY/r5ZGqCbhBBuPnkBDvp9p4oWQkKbROUCiT2QRLf\ntE8BSZtwKev5ax2xLmDUEI6hO5ZLXJSBRJh3H1S9OLac7I79MxwjAZ+5/4hR\ney/YDt8rbuh1i085u2wkOxWvDD2wkA2uiXvgX59GXtLb+1uGNkLKnbsv23Wb\nq5lIyWYqvus9TXzc36AprdgJivsdDSfGnkdzqgbgjzpgPhgAo13r6LY26cSZ\nvX73\r\n=gt92\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjFJRvdlcbTHd1hma8o6EzE/gb+zqEW1rrCUx3mCvSbwIgR7lAUnZHr05KM4TK0MdO+JiQtU/tEgBFTyt7ibQS+kQ="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.19_1630408812537_0.225335938349575"},"_hasShrinkwrap":false},"2.8.21":{"name":"@alitajs/cordova-native","version":"2.8.21","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.21","_nodeVersion":"14.16.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-xMR5y/CUitMx4sz1pnqRusVmHf9morpl/yAaFErKYy6N68iefPKAXVNG2H3L0OdE/KHkCLQmEpJGhtxmjy8ZkA==","shasum":"a0bb4aac9a79930ca1ad596860c0937037df9f03","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.21.tgz","fileCount":5,"unpackedSize":23900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQFY+CRA9TVsSAnZWagAAOg0P/jIPisDTdWCiruc6r9JE\nzniDd2x1AnhfVGe6gsBjohxlXORJOvGtJiKODY47G5HjYFBfFqXJi5r3jRkZ\nPHAnVeRPFqZAcr2AIynDoezHNZVEueEvSBNV5Z1SFEpZorKaa8Byf63/2AR9\nJoMhMBPwUD8781VeSMSwMXcv129GTUSOxojDMFPiOZUv+hzmScHhcYOVQWdo\n4VjcKTG0frPHEzA4Ms5cV3qjMHw31khCNqV4TQ5RGv2pJPFNeIzGCsIT0okQ\nezt8rGZpoV/QMMiuwR8PYltUkalyFQoRIi/kZCX6kQyZ7wKRsastvS8VVyep\n2xzWG89sNMjGsniwyh37MkPYeOKNjiWlfHbtRG5qfeOa/mtUJ8DnTfAQTxQz\npD6ie0IcOCR1d6AOoFiqEudbiBEeHp7IAd9Y80DH8h74TARRuSc2sN5YRdi/\nMJxd4Er+MUbKWRmzDD+4/SSikD89yToreqDaCA6JZfrsrBJBhZ8Ptcw6XcvF\nUkFGZwoPnDf5s2Sk/4JWLtEOJQoRmGn7XtRQV5O8n/w2Q1o5IfFns7hyFzan\n+Wioh9+p8Qub1gztKNuImfl063OqPPejybqnXFRszL9pmQxAtqrONBwtfbW8\nM1l9CVBY+cAU7rLFedlhUa0Jro4YO6Jsy19UGFOcq5OD2ekjSGtChfs+XUeW\nCWbb\r\n=Z/nS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1xNUhUQtKwmiQ6pCG49qE4kKIGs8BRIT5aNXVgdfH4AIgBOeNsAVWmfAYY6hS6JjM83DSKSafCbEpdCbmq/RwHqA="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.21_1631606334660_0.6663796392499137"},"_hasShrinkwrap":false},"2.8.23":{"name":"@alitajs/cordova-native","version":"2.8.23","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.23","_nodeVersion":"14.16.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-s/Ml/B512eR7hbHkVgm9emOPx2rHmy0IlwZfa++/kM3ZR4q+sb6sHTmt5MKTcYqh3q3AULX84f4P/avuUAc6ug==","shasum":"82509b44fc7e5c23baffcd1ba0b5d4aff2e2ccb3","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.23.tgz","fileCount":5,"unpackedSize":23900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQHC0CRA9TVsSAnZWagAAhlQP/1Q5YRCISkj6tvee3Itj\nblwl92IuUUQQE2WUqzPxhOmxCF38nF3uQR2/kbpW7Twyv0AA8cB6jLnEp+yn\nyZW8EGj0mqJOSY4PuOmuzQS1INaO4fWakiCiuGG+Gmbimw7YdVN4HbTLcvSu\nqAwGsA2oq6pfpyAaJoHx0UHSLAkuiB5ova9GW4drYz8tIlSsoOusC3RyUV/r\nS0UjIO6fatar2MDyZ5zlgwxRHVVAkhJuQX0dPumxoKN6iEbk5IDCJq6ftOry\nxo6kNFNIfzbpm48jAmPG2+qh5REt4CJNdBcL0n4di3sSdr0Ld2xmaPRz+kFz\nHK+Kvo1U9eFBcmrrYVIrgEwWb9b0bzjhg7DbKJWF9ADb2dd6xFJIqDzvzOwv\nmDGLeBC97yTuXF9Z9qvfTShQUjUw+sIG9XuGqK6vJpk8YvjFJnTNdMd+odJn\n2GSmQxxILvcXsLtuo9NcYVSvLbhSjYaDliXF8NcBnd60LX4So4xLBOTEgNwB\nLDw11gx2AGdz8viplFHug7J8aDkZRqHk3P5Jp6tiem7qkXaaeKkgcRBzOzrr\n1q9plw2JpYE9h9et1L1wF4J7yK+mLerZ8PIw7j9AU54PLPkKqBkZlbJWAk8z\nS2m1lbviiKUVpaKJhMgir2TB1V5U4WkjiCdQxb7eKG9J0NR/EiWnGG6Wd7od\n77xI\r\n=SLkv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE+DnlKQ7XdekklcU7HXT8rmZHwDqO6Li1iJrJz6lqoAAiEAw7uvoA/ExEJsmqYN9dKO2stVGK8YUdfV5EbvE+gWzeU="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.23_1631613107966_0.9658699366441286"},"_hasShrinkwrap":false},"2.8.24":{"name":"@alitajs/cordova-native","version":"2.8.24","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.24","_nodeVersion":"14.16.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-olmV0bOBDOrcEC31SeRJw31yBfcVfzUJKGZTStUnUtjrMN9PH6/aJ7Nu+WJfY3A/iX8HE5ggVZRmCpim+XjLxw==","shasum":"62db6a9b5eba103c88c5327fbf280554dfab2b03","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.24.tgz","fileCount":5,"unpackedSize":23900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQHOACRA9TVsSAnZWagAAVrYP/0DxKKUTvqllOKqkR9oY\npB64wbxYGelB0el1CKqoUmlZipv23SM4yZJg/GDvILY6djlnWrJbT8lDyGCr\n6qDUsqPug8ai1MYdv08oMskZvQMNwaTRGErU87n1AuL/i6tJ0jyczun6eJCN\nDcTnz1qSMZVWv0JHXCyJ3E0UFaTb+DEMXCEq5Ss6p7Q2NNLMVt09TnhIXtaj\n6FkV6eEzcp1yFidM4scJvwYufaxiXyzXFdLnmgPsG3ZgwiXoAGPIB9CgsPmk\nqcilS5+dIL7jzjQaQmeqfCyH8va0mI5jCG1dSW8UANVnYLuI9ILubx/DO5rK\nN5drjedCgF5hn3NqbiW9Y4k+ylWtq4D0xKEKAMynmv8mIB9YJZIwJ1CXAb1d\nupK3l8wa0CQf/rdBZpUpqFJZhxS6XFm9uwg8FS07N+sWJs6VzNmOc/QPfHYz\ngkON/DicXLHvH/iBgV9yTKoUEysp6RmuUosQk4ztidrW8YrGM74ATs3/ajrN\nNAh9qVmYsf5FAk5WMxXQ2fnDpzQl0+pRKUeoR7+np9A76AsxpI/Cm8f+uMdz\nEavPbIeTvnX7RE7F2GNus6kQ1xxe3VMZhv0HxxnJOP/bN7oZp5pjRVIyOmWS\n0AJynh3YlQTNDnsMJaawdce+v6Ax9fAT0NWB5pIk11a0wiPFGjfoPXlfl43h\n6JZA\r\n=o08h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFgQ/bQn9VArw2BsYWFlNzPYOk/DZkJH2PYrCLEao+g+AiAIXWeBFBx4mWQf1twfqFzFwcusZs+JlOjzrmWp0gYaMA=="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.24_1631613823824_0.18594633431766416"},"_hasShrinkwrap":false},"2.8.25":{"name":"@alitajs/cordova-native","version":"2.8.25","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.25","_nodeVersion":"16.13.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-2TFAh9HlCan4LFyOKjOvh6M+GNM7KYjHPe0e/872z1AtYBHzx2wgFBH+9zpTREAGv7qkTSEs2pWVG6NSndgg9Q==","shasum":"d4bdafef97522a1ade911f9a583c867dade0133e","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.25.tgz","fileCount":5,"unpackedSize":23900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhlKqPCRA9TVsSAnZWagAAYkgP/1g7vUwly7S5HMxXbj6U\nw6BrgHN4psMmJdSBSboaUX0yu8tm+WtvZjGk/xnlTgvPdf5uhqXpHgIHdu4+\npVeHGttp2r5cV+gsHVinMa37ifUInpwek+4YganVIaz9SJwwxP4sdgWllrhJ\nNEP2Ju0x+lU2wJGxb8VXFE0Wci2HfvCzXiiloGnEs/PwNz8Wvulc0lh+vXrs\nCwuNhdAkIiDfneqIXgE9fNaSylpxd4J/3fQXvafbbtB3km5Hpdc3gUVJruW6\nuxMHvDh8IL9bID0sSkXf8WDhK8w30LwIXEYkBtoUCn7lx74Zd2+MnjI+NzHn\nV7TKJaItlig3TSQxMzEDpD3ifdHcm/uhcD8gbezWvYrpvuiAMK7wZd21W9XA\nXrJ+Cj9iqlzvi43cTs9KW4MyafGiRCPatfOTLPxnZmHmLvrGnUceAGJJx6Ao\nXs4YCRna7UZT/y9zTql3cU66Pr8Udo+CdqyNTuXfKlzZ0Hqtf+QddTwI71Qb\ndKtcaWW2TEYlr1IbfVVXOYan/3TTzmXBw9chamrFSepyUeIj/G3IjM9/t/ec\nUgXJEUv8JQ9crzNDVFYcE3mwTuPUS+UjgVBAcQn/+EKKl8QXVjEAeloDA+B8\nIZySdWJmVddSq2FmokzYHxvq9qZCMviYxORdJceOAYzMHPK2eI0SLBQ9DBgX\n4aKY\r\n=WGhh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBgR0QiTztUTNSi4V1E2X3RBThrPMdfzM6YFUCx96YPwAiBzIm1JH3NK0ns0ngOHc4hW7sta4gVVCnVEnvnIRuFsGw=="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.25_1637132942878_0.24556890154063993"},"_hasShrinkwrap":false},"2.8.26-beta.2":{"name":"@alitajs/cordova-native","version":"2.8.26-beta.2","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.8.26-beta.2","_nodeVersion":"16.13.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-ejhePm0pdcmy3msbX4B+lwYpATvEG+/+irrbGZ0LeSs1Vaw7WZs3b8I4zf7o1eLVuD8PNmhVFoyFc1ZIZunSJg==","shasum":"387b2f3445cfbdeded63380e677f21e1b447c6e3","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.26-beta.2.tgz","fileCount":5,"unpackedSize":23907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhldQPCRA9TVsSAnZWagAAIJYP/jzJj1/wimrj8f+Hq3AT\nKAnpNnxI+QxDXiYq45nhDz1RPWhRFH2VCKEkkFFgo4wDNAC5/vEBId495HDR\n2/PPS1iFVKiaHA5woua4Ogb8h4yOSmckjeV/xehlUrujMxRuI96ZPumhR9/h\nYPvVk0tUilbj4Xgte9hPtl+EgjFsfb2gIQeslSh0QbY+k+H5mmNHr05yyHVl\nzbGBvsYqVAqWKiiGrFTYG5r6riElSaKhnzAQGb+kji5Cf0uQL7Rh55wyW2HN\nD3N/lqUk5IJfL5PsGrtb5tDLIO7sOm8BI0lFu7JuYYRMfdjcGKffe5EriyYi\npNrNYdrhULxKOq+37m/wahfnlQ1FRWrvdPIyudkPdRkguxM9pZ4YurfSfHU6\n+B/H4puFZWToIC1jfikn+jUhhai6TshNMItmpZyXpbvcsfQhv00/A0SA4MWs\nNrBLSMK6QQZWR04o21BoAjH1D24pD/XH1PKLYru3dE3ypOpKA1NBduTRCSeA\nXrlCiZ2SIcd6xQ1OpEUOOh61FJsTK+5EGUi3sGw5GTkjZwYcUWD+la9CqKJT\nv0ecKlGNnmUAWse7OQCeBZ27+zbNqKEv6SOC6BG2ddb1U1LqmDDX5aIrVXDo\nQ6kheocfTucmmBBahg2Ktl2EHqdaCXVmVmJk2cBZEeFa+rvCyaFqc8bheYPP\n4D50\r\n=AieK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrX233Nw2lDG99sZ1IzQqKBKkAnOV/UEc9res6Lm4qXwIhANQ1Gi+YJWZbCCWtAXzDohbW1cPrBJdfSw2VTf47+lDv"}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.26-beta.2_1637209103142_0.9614593999729322"},"_hasShrinkwrap":false},"2.8.27-beta.0":{"name":"@alitajs/cordova-native","version":"2.8.27-beta.0","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.8.27-beta.0","_nodeVersion":"16.13.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-bk+zcUul4hf2wrCMtMSa25NrR70158tclUKMunn28rDZfH/UpLhrKOw0cU5Qbl029Goyfu6eoE83MTK66QrBWg==","shasum":"606ffcde19dae56d5c2a892a1ae4126e2efdc45b","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.27-beta.0.tgz","fileCount":5,"unpackedSize":23907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnggKCRA9TVsSAnZWagAANxcP/AgIuIUEdf/sCMuauB7m\ngiou72mMaGfmqFGLO+fFZYSVfuOlwTvs0xBI9+0x9VsrhWuBzcfq/XF5xP4k\nZ52pBKVOQBTAJWKlQBB4l0nttycKPb6ZZAXATeAA9lRRmXTP2aihcdR38lmO\nWCT+qSTVOGs9ZY5cyQz3cayN6C3irEyGhfbtqHtM/ylxdDJxsdAAYIqwSDD4\nSo8Evj6J8oT98LrJf0/Blejdn71CX/nU87qgGRJKp+DKAqlv+bTfyV8suzMS\nB2F7ghDmnDYArZWEN/FOmGbckDpngVrqurwL9RaFhrFoV4dACBSiwWqythMX\nJ//BMRGRhzOlOGGN9yo1yQnM6JJoI956xQdJiMQUZNe0QNOviDCdrBjnrS73\nkWggcJGNsaBgDCiR3cWkLyIBToHcnQO5UawIcWiXdlgIlvb/MxAuusSvfw5w\nlRMI0/uiRkKEWbUHH43R3oWELhbPTgz9fAd4nNaKEEMDyqjk3/Y510jizRV1\nTmTdCEp3D/mAchiQvVKd1k2sfM+f4MFGJj2lVoy4rOe4/WG8KERZf7QMehzH\n0tXpfVxYu+PIwEPa9A2t1X1cu/8FVtQ8ppwCg003YztLNZRVJkrOaRbigzEw\nwjmb6g/oIdQ2F3hn7KcOV7cm0rgmYRnurpwANb+ZPRZVAz9lQXz+UguCrV+d\n1XUV\r\n=cGJL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9WN5vnXnMdiiswzhcSIVtHycYviQZzIfsRWqb0EAXtQIhALTN7BLg6IKowsSpft0d9HBrykihmKT4Uf8xxqZTP6DL"}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.27-beta.0_1637746698802_0.790976776695306"},"_hasShrinkwrap":false},"2.8.27-beta.1":{"name":"@alitajs/cordova-native","version":"2.8.27-beta.1","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.8.27-beta.1","_nodeVersion":"16.13.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-9yAmni04o5C8SaR1oo21FQKIeVlwaCHFktDuQMhewgGT8DrwBPqTjonygElKvalMYFWTTYO3LyM8emxtTPkVIg==","shasum":"f0aa0ddec6cfb82f4cde45c97be7f012f2908e2e","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.27-beta.1.tgz","fileCount":5,"unpackedSize":23907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhngluCRA9TVsSAnZWagAAmasP+wRIdnKs+zbM+PS/7r0d\nOuuqvedfBqhaHBLXJ3kER/LamIMtgu9TQNjeRe7YesZCmdDzifQBl76LG600\nB1iFJe9tYBaz1/yNVub06qub9iIsdRpDSSSYVH4HLEs7xjkj19Ijx9aujErw\nN1zz0DDFahSNj5bkzG1sH36ni2BOpte+MhplElx8muTwd8l1/gYT+SnDyKkA\nycyE07KMgAEQGU5MTaE8WswmRZ3FM2qtwBxRRuN8eTVlafRaBjQ3LGJioMI+\nyT4yHFVIEFd1Kanq9tOg/vd+3VfOg9GXKY9G2yTHrsmjyP7tvfnLnENXeslH\nAKaJxx+AO8H3XqYCjkAGMUORkLM4aKhp+SYzCufIKV5RPB1SfM45d3HtPaZr\nq+NT782AAJZ0NUtY8SYfWeWkD7Rf//tiQXQJLzQeOMWdQ9NFZ9RX2chNkhaL\nc/U2bkoEUeV/310DH/7VsfoeIrlgkUgzM2i4goWSW4+JL4QB1fr3tW+AZYzU\nxVBEKDaT/GhQYazi5iKJjabDMFmX0VFtD7+jMnXf8gQh9qF+XAYCfWWJdHiL\nMyaw262ql7KwCIiko2DgTOuKrABGwy46t39fTVMzFLCXCns+pJq/Pt/1Plwu\nRz0UOAPLSl7S6IqoQyAKWTo61d2SfWd0cZdzDoLUJe7O35Mme9ejDAZ8UKLd\n0rIA\r\n=4UvR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0w+BC4MwUIfqSkiXDbzUbq4nlOA3CKNkYSyW3fXZuYAIgDar9IgapDAZ7YRmcIJasEPUsI5it1GIPPNtYHUvMdoM="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.27-beta.1_1637747054796_0.21231756080921294"},"_hasShrinkwrap":false},"2.8.27-beta.2":{"name":"@alitajs/cordova-native","version":"2.8.27-beta.2","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.8.27-beta.2","_nodeVersion":"16.13.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-153G9v3pPeUidO4nE73kQKv7ERHwWhjD1ttcynxM3EVa64FW9sIFle0SSODP2iRjM29PlPUM9JGq8NSX8ExjFQ==","shasum":"c6d241cfe09bd2849ad537379c555a84bfd4162e","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.27-beta.2.tgz","fileCount":5,"unpackedSize":23907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhny0rCRA9TVsSAnZWagAAZ9EP/0CbaNJlOf7VDqy3ZH8e\nrNgFFBw++hOknAmQRir9BTCpD2C7JoL60yitXL2oMv633VjGv0LHJuraIQiH\noRB3kSQ4B36shdP5UboSI+IUIBIurUcCYUVUWncHorllGyMh8taM9+cNtOz+\ntcuF7e05Ens+lZKKbegE2ja0TuE1yLwJC7Q2Tn8zZytpKki5Ec39n1IpXeIC\nIj75UjW0vbhN1FVF5yNhpFq47HPZkXlvwwyYp1OObcVKhvofjqGunc1sM71A\nTvwea0zK8vMbLIytw9OoqbPOBycklIWQe3R71hHehiH/MZuizZl7E7kWt6bU\ndTnyTYab6VW7SFAUaSd/ImAzA5BHoyN3ERqwNC83xAHNEvyqu2qi3LhAYnZI\nK0laZOUgUOMFdlCfjGZaVP2uHXbWoQ3r+nO3HZp1aojW9C4oZfknqIL3a7HN\ncjjNH5mE3MgZCHCG587628w1YC6xLc0Pug3qRXlxw7LYhm9TD7eLqb5fMzA+\n3ZAtZUpvXpwCNjZ94LCr+bzguNx+bFbRxAhqbg08Da5i53CiThWp0GVSM8xb\ntEtOF/hJDt5y6z3+UYPhZvk6f2ZVderhyiApl1yM3SdnHQxZr6kj0HU6cEt8\nTqLCX4mvmpMIR1jn4KBdfvDFooRFWf+YPu6pyeBMNLmaj5nIYIVi20P93AeU\n0Fpi\r\n=gPn3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCUy+L8PrGksqleLsiNtek5IFLcnPtdqOUoqONkx5KzwIhALP6RXM3E7VblHZRT3qaxOQ9OWL27ONvfquvIcDB+7Jv"}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.27-beta.2_1637821739142_0.41700792578752033"},"_hasShrinkwrap":false},"2.8.27-beta.3":{"name":"@alitajs/cordova-native","version":"2.8.27-beta.3","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.8.27-beta.3","_nodeVersion":"16.13.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-aKRcp8ECnrWcIXDsC73JImNP77OZ50DmwV5GKQxM0Wc9xQZG5/KwnN5biThxQwq1Z+AOof8o87mrBrrV/820KQ==","shasum":"cf7c8a32f98d4639148b0c5f78ad2f69f6cd3bcc","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.27-beta.3.tgz","fileCount":5,"unpackedSize":23907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnzUjCRA9TVsSAnZWagAAYCIQAImk2HehfbByfIzIYxcX\nWZlDkmy7+YO9vDw/X+5NshaGrr7qs2JZ96B/23sLOw5Xp7PWNpr+gK9VRtq8\nC2/qRxuy504P/W1LEvqiwObYB7CKpPKY+v8HgOdGQCjX33nCSzV1CumLgp0m\n9wEJ6iX8mxu4+wG5FpJiCK5s5bppYNUV7RUJwi6/WCXFW3C6Xnplo9wz6k0N\nyW8hxdfj3pt70QmwBguft+ej29HB37FMOBRtryxiqnJM1cOfxVj93HHHcORG\nx8KUfOQk+BJnDvHmIq8pED3AzElvrPmj6FsyR0azAJaDegYn9oLBjEOoxDxr\nYosyCDJucz+VZyb/KQuEzc/JBBnADgfd3EMENpkekL32ex3eJobyYppOvJV+\ng492lvnFiGRgWDIEZp2te0Gpjatiuq1k39L7n3BX8TAYaeJiUXDejPJjH2YO\noysmazdagEWADUrchMKT7wxFY666odSoNFM9hbVDtyAZBTtiRAWPrUg/PBsI\notHgpGiV+pnS3JPGWhLgd1yN4uTqGnJuCaMVnIb2pLn8CZciCJTkleY/56ZN\nYDleet6k2ImYXQUJ6pJK5d3YEwk3gF/nKXwSryYIM9zSBXRn2Roq4FAaAYhi\ndB4V52LLSCGG1pFrZ1EbvcPmFvJMM8BCUEmiYeMVeOPjGClge9hsIIRqUUD/\numii\r\n=XaPu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+r1JIoRXQmZbe4PZYp0PmSSQ/ncMKcAB4PBu+PO4oUgIgbiJdg7bfMD58h3jc4Zr/R4P860Oh74REkAN2LguCKJE="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.27-beta.3_1637823779453_0.3553478579570992"},"_hasShrinkwrap":false},"2.8.27":{"name":"@alitajs/cordova-native","version":"2.8.27","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.27","_nodeVersion":"16.13.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-i7hbsGXQB0RQiVjKwHoMlfBT8RS1NKW9FWUqm24Lun+cQpuvSwrw4HfMta3N4W8ROJmh6P8pXb1lZ3W0kgYcjw==","shasum":"153c9139129b6a6755344f4ac830b732cba15acc","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.27.tgz","fileCount":5,"unpackedSize":23900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhn15pCRA9TVsSAnZWagAAuZ4P/3C60vYFpTcJowe6zcLg\n6LnB9FeLB8ieOc+DKvjpSHnOQNB/i3uLdv1f6YS0ifpagcrvhrSdI9qAokQy\n00tmAq506Y4XLyHuUiJBONsdO5MCqM2uEbAVD1DwY3rbypb8PgIp+OychGuz\n+3ACodfimX6JQ+QikZPxMXpB1QUIJOiqKjh71DBuyfVZfiNFCyja21jZOnHb\nbgIBCv0JqOqpzgijcj37DRK+fAfBnSApJIW8X2WHKeF8xcUAXJQQYzNHCoO7\niIuUdEPyTCvIywA7wg2UXeRU8s3jesYfCUTR9skaunArTUh8nHPidaLTclM5\nvPYRoO6cSTMRgjhvYxIZg05n2yq/Shnvo+fvCn1P8aPmSMP4tajYqyn2L9Ow\n9p+dYvWFsS08Lv1zvd0tQJQAgaMXYRMlZzQXcpM70hNCBR5JhdzjjMmFqN3G\n01AgO+MMDUqmRrP2JrWYhoyLTQM/Z4pyXhd1e3HSJZiw0uPmerbKcPlYnUU8\noh+EHIPsmxHtqnsOl42Nuch/dJv/GDonaPLxbzpBEUplJesR4GSZ0b6CALFD\nOWW7g/0hOLuNRTGUMmXLvk4EF51xCn2f2TgXuRgPprofdQxmjMFrZys0fX19\njd2hWnxsrEXgclHEqPtRKfRe/WuJxgBGkVIl2aD79baQLJqbT8uq41Hr/7ZV\n4buD\r\n=HsFw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2xrykz91Gb/qh2NyHm+cmuEuvstmgZpCk8xaRJkiV0wIhAIW9CRsxgxS6obrM6sRBs1hkw/CQigBm+QnDRR+vAAVv"}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.27_1637834345763_0.45740534992645654"},"_hasShrinkwrap":false},"2.8.28":{"name":"@alitajs/cordova-native","version":"2.8.28","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.28","_nodeVersion":"16.13.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-RHdqhXHNPM9OTPgO/++OKnBCxzIrnlB3KthsHvoSxLpjozvvlqiZro+jLmLm2+p5t9Zn4Le8NFh0Pl5V+bt//w==","shasum":"374db43b52cb9e151c7a86951996e2fe2b3f6601","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.28.tgz","fileCount":5,"unpackedSize":23900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoIK7CRA9TVsSAnZWagAAfasP/RBx1e8WVbzyAYRIA+Pt\ngK5cAqZ8l1dvgnoKQaXBLJgF0AWLtd4Qs0dVTYEXJjutoEFvQxVbp8n+7SWs\ncU9Gy0Ay5r9y4FOn01l5YCETILOiMoBEIiFZI31zt5+xKqh/roDvBAhRAi+q\ny6l/DWr5jassvkL0se53ttZhiIzIkrgHC/O8FzP56nLEeKhN7u26T+D3BUdD\nQN7Z6h8gMXauAZN23GW8wUlq/WeN32ivh6rePRMQ9lOVkIEsW7Eaa7Wa+98x\nkXbfXbnOvy4Zsviqdsk0doKWmFpeg2XH+e9wMZQ1nDaWZah+b1qD59Q6zoZu\nGU3aW6c30MYuGStyyql8+gh3nYhyg7rmXnDOpInJks++pmOnC1p2aBhKxHyT\nnlcuvUAKCHKAf6jFje446qABXkdqOrXkW76Cin+q9v3KntJMqwH4NERD7gDD\nR6w81xAVBmfTkz4Gvbz72YrO99CHJWrH3nUFOCm5K16r/3CmdU8cpdMAHOgQ\n/uyaFhtQ2O3VELitZgPB70rBYfa8KEHjtCZIIIfUg3zlErn1kvOWO6B0YiD+\nsO/BGfJJ+MTysE0c873vIZ3Gfs2thjkxBk9TdV7r3t0UDC5aV9G4MuFB4RVs\ne3qdImgf0EVuccLXVWyWi+JErwi2YIsNLToTay+d0a0Bi/EvEwlr8p5coYU5\n/Y5T\r\n=w1yw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCSON0qpE4/b0RnD0kk0uP0PQUSwSnV4DaK5lLia81drwIge+zNDXi8tCgMY0sGAhJQQoD2p5p2OX4XnSK4UH7eC+I="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.28_1637909179317_0.4803031659050183"},"_hasShrinkwrap":false},"2.8.29":{"name":"@alitajs/cordova-native","version":"2.8.29","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.29","_nodeVersion":"16.13.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-JplPPZQl73r29ZEzWvcIB2mR6d15vEjZaIdU3Sn2PpFyP8ZdTJPqc6ACMBw0wMbZxCjNjs7CTfQW+jL5UDaOQw==","shasum":"d71604c34ce3f8d9594f315c8deeabf3a8446905","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.29.tgz","fileCount":5,"unpackedSize":23900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhpX58CRA9TVsSAnZWagAAUBoP/1IHtwzRJuptpzy+G4Mt\nafDUS3TJYoNQVmqvJ2RlsNKXYS6b+WIenWq+aL59KhfyJvd+CU3B2VNe9URs\nux042dL7Hex1MxGrMp6sD64Z+RMOLQ3YO85ZKb4ATVQ8uszEPzW4xVXAYldA\nJoL138w+PvrPiamw15zm2+USAiSrOEzAgkfEpT41oZCuhkkc9OwUGH6CDndh\nJbM6x9WZspxAayk7IBDqI6CpqGjG3Hq5SsIOuTY6Jqo4pyn4+4NlNmHnR9eh\nvUMw5FxAVyfr1/ra5E/0l1/P76jkvja1rtFQHdfYhk6g0KXYSFYQNjSP7Dc0\nCX3cwK3m65C3Qb+Fj57Y30hVNvCjFVFKB1RsIvZXkpqosW20WxabVAOvWcXe\nuOUwuEKnCTIZzTc5hcMRYvIwmA777HDPsANI9rAjFp5HCPplbTsiESLuyRqJ\nXagF13mNdwURax60jC6cnREw1zqOLy+fGodSf28xEo9WmvM1trvnPsq8gUEN\nk8adMr5+a6nbClhYuwKJwoEgSrHc1982iqMeRcjWNhN7bX/PoY+vRv0d7QOA\n+jbDK7/1Rtx+G23A4u5NjOCU1UbxdD+9jHiSBPXsnRi0/hleCDJnUqho3dw3\nQ/xGc7OI3XmSOr2ljAFWPuojK8L5NiLmW311/yhXnkdN+ccmSeY2EqOTTLkH\nQ/rA\r\n=JFYq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDfpv5j5y/C2R/dSw0lLweuNjXCzhBmGwuAuHvqaiA9jQIgBAV5rGxDtBlmWkRE6gqWXHT+cgwXXFFQWc8rfRgOraI="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.29_1638235771917_0.7911074097438839"},"_hasShrinkwrap":false},"2.8.30":{"name":"@alitajs/cordova-native","version":"2.8.30","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.30","_nodeVersion":"16.13.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-UG49hii/pB6V8im9x+HEcdEyEY3Xw2sePZzTLsN25ap+mEDKbUJpELdIWfZZ6x4xSiuFVC0dpkXsHlQUEOAfJQ==","shasum":"23af044b6ffa90e8d58702aab417c9d757232276","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.30.tgz","fileCount":5,"unpackedSize":23900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhwv1zCRA9TVsSAnZWagAAfK0P/0sFTa86JmRdlDGdu6AE\nVyhBv2mE5RCe+rK+5jFnWqpoH+n/1h5E5kl0DDWQja2TYefYTXyV5YqVSqWk\n3CL7qNcNO+3ZyQkiO+f+qHFCAAypI/wuME/T/2qdqttX0Jd6ezngFhS9pMgf\nX+wW8E1f/IF3/2MRjWWKKMOcu4REYOVH66SguXeUX17SB9mwXNMBbC/9Kn5P\npSU8m9Dp0qfkXLF/xHvCTuGzPV+0FQIg+MBFmdiC1l0hgl8GIzfNdwjcPsZY\n8Vgfg4rnhJeYg18K2MRoASGTmcLPM1LPWyygRrq/WWYeogvcaPqmm6rdtwso\njJuP3t7G+voKUbDX1KRFQxed8jPEPoDyjEojNBKSQyvjf+1JbCRluXI3p0zr\no52D/dteC62fhG1/csu8Z4kMwUm8SCRUnr07VcvrZ1DtUE9PeBmhhawf4BPV\nDUXAS050SwXnruK+EeoF12ZD9hIaVytP/MNhtUNsdH70f9vOdvc6ro2srPHk\nYcoNUMtCZsOA9Ou1VDBnkqpNjAkRq2YHJUCkl+6HsmFiISN0hXPeePMdR2KS\nJKyP7OUPaijDM5vFqgrKLaPmgzutBzKHDWBnqn6vaj7W2brvXMrfpwm4s5qy\nm+NznAz9OAAF6I+BZGFIOk30E2DmGgK+vZVFssh5u8QLWlx/28Xze5ll1CVl\n+7Ji\r\n=QRL0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+/wK4Z1tUIpHLNpF+CfEtjw/ljVH3i05CDTZezz7MigIgTHvlBlRnw6q93nmxFinuwoHys6EcD53PxdWW4DjyjzQ="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.30_1640168819359_0.24548981787987345"},"_hasShrinkwrap":false},"2.8.31":{"name":"@alitajs/cordova-native","version":"2.8.31","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.31","_nodeVersion":"16.13.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-MirJR7/RR3SsxynCidFf2VN4+Gy/9dkcVUN+RV2azf1b+4+G0OKw9lvaU6fnZn5jH4AXU4c+cW8/0HbYZ2Z1Cw==","shasum":"8cc77d182912a38edf4a3b9d5b0d6007f4cc2bf8","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.31.tgz","fileCount":5,"unpackedSize":23900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3i8sCRA9TVsSAnZWagAAi5cP/1yPEv0I1czWmKt4HN9p\nIho73VFMxwew6j4sUkQH1bOVHo5jOvtY9fahloBTW/UikgLw/ha1ZSm88EFs\nulMTg1u/W+k/5WcrZgwlnPCD57K/G2kv+B2YS2xqDYV5JIpDsN7rgEtdZ2Zo\nmC7H3oUxS1yajQS//N0ABB74yP25KsBxScBjPbmsQ8zye/+tTCycF/z2EcOy\n0dRDpiFfXxJyM4oNkgCQdi73djl3jrSUICd5Y290P3ppkUhOB5YQ3HJZmdPP\nXi5ThQlGgGzFuvET8yYe5sh5JB2keEEepCUz2Tur0ZYHexQgdUqZO2Y0fGqQ\nU4DpFf08y2wXRVsvzcCHAKoPTS4lsF0bprgZNxjP4Rs0qrwL30xkvjKxCPf9\nK6NG0nV2bE65lOJQ7lT0L0LtF6kQe1fEkk4WuwlHGZGtCYaGQMi8WJ5M0coY\nbQEOnn+c7/yNIqpgggC1yiVpQEe6UkmQb2T/Rf+5IOux6dVQQnZNoV7J8R5F\nO6xaWorm8JE6UIpfFZT+jm6QTU0T7GOqEHAmFuk1toJTYcU6fBYIOFenpa+w\n55ZsGdBsoERCVNayaB4g7sJo13MnKF8L0qEZRYRZJIAJ13K9YzRiDqn0f+zz\nttNtutnALMRNk+nIxPfdy5QDeHLGZzXRylZDiMszVBodCPikiG0K+pUN7yo1\nfZ9a\r\n=DKe1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICAEl27D5QdYKQmWFA+mtJN8fortaLLJ7o4PuXIsjMKPAiEAkPu3ILXGL3bnQF2aYfLu/v1KHRw1+e+wkD3CREuD3DY="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"shawdanon@foxmail.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.31_1641951020319_0.4546490539654173"},"_hasShrinkwrap":false},"2.8.32":{"name":"@alitajs/cordova-native","version":"2.8.32","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.32","_nodeVersion":"16.13.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-y+w+OaDBycehzTGluBDUIgHSwIGlv91zSdEC2n01HpjFoVs557CbFEEBLiuWebercajGkMufYQ/b2Gsod440HQ==","shasum":"f3772b82c8a087154fe16f392bb4cb288f34f2f0","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.32.tgz","fileCount":5,"unpackedSize":23900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQYnuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoolA/+I2ceV9mkwNAONBVK5m5oxnmEs5KJaifeYBFHbTb+1rkZRUQl\r\nUNOAFim4nBKOG11PlzOoPI72Xcm0qEua24j94yFQ212GhO1fbBaQ3Gp+vZx4\r\nfSZS3xt6/RVtN7TTFnoWSw0aEw7tydz4qtAssb4DIXJgTxY7XgLQgiZnyQnK\r\nAVHEXuq+C9WzCNwYXOBU4qm8Hbaa/CHRdn05x02gZQaVzqp4pwtCLy5/pwsN\r\naqfZocUKMv41p723N/TYl2eyH2ZXkbCsdeobgOHY09XF2FK0zCdrQfmPesYp\r\nGL5+GPiXMoVjvhEmWVeSTOiUBXvcyoC2ObqMpW6UJMTsSEXZ9jOqP2pWksLh\r\nkQ3wLWN7zb2Nlvb6gKr2mMid/XcwrAo7zyAA5D5GuWUpdPXHoh2VDcAM36n1\r\nreqx7jTHCWZZ2P57mM96cxO9ce9DmcUXZsaacw03kIlR6vBCZZz/JI6CF7Mf\r\nnCmCfcDCO0zoiKz2Ne0lrqS2FGh1guRAORSM7S45NGuzy3vLtAti5V0zaBxR\r\nTC1izTmIoavj9eMk/iFiLmWZ/aYUmX1HTDk7GG30CZnYAG7a7cLPYg8gzy1m\r\nVAkqMI4S7XNNcjZYmilrY0FY+lwwxA+Rtd5OGEyt1Lc0k/SLf+lf3Mlmy7yC\r\nMs2tDdLrpWOAfk1EwjBCChbfZVBw2WLTHJg=\r\n=T9qv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCX8TqdN/o4uL2ZIZ0EVdZo3+o8+P2D9YMSO3DeS0Aa+AIgT3NruNdsb32t8aIRWFY484NRUmkd1Rm7NWJCp6MziiY="}]},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"ashoka_j","email":"savebtc11@gmail.com"},{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"292973338@qq.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.32_1648462318800_0.39604490379231216"},"_hasShrinkwrap":false},"2.8.33-beta.0":{"name":"@alitajs/cordova-native","version":"2.8.33-beta.0","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md","_id":"@alitajs/cordova-native@2.8.33-beta.0","_nodeVersion":"16.13.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-paCsCGWKJgL2ZwioLZmJLnxB+XT0M1P5SH72xIExqre/msi4jpLWxERAW6BicZtP6KHDtLEO48LcZczf/tSOXA==","shasum":"d4b7664fc53e3d3b240b41c784cfdc55da243170","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.33-beta.0.tgz","fileCount":5,"unpackedSize":23907,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUXo5tjynLV9cxfdHLbSicZ5PeP5rk1Z4u36KEiN2oAwIgMAzUDEDehESG3xfjtT/XUbL0rTAQ4sV+9T6p5YOiWHU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiVVB/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq1Kg/9GvTdA5+sPanSk+ZWEvnpJHft/WbOTHhJ2YhwHXZoNBsVunuf\r\nkII1EZtexLu5OOnTYj+bc00Fa5+jnft3q6OYgZLo7mF33kBj2torRZPGq1p7\r\nLmkaWZisYVEaXmmREiYDKK9G6ijncwHj4DnOr0/Gu7JkUjO/hAmp9f+NM3cb\r\n6Q3GSWkv//RIfHW4w6nHqXtIhC4p29LFRaVD48IbR/hs8lGvbAoHmtmMX8H/\r\nMwf83sQBO5H8z6lXjaqIAwtQdpTVtgVyAkuscFooAT8qdKrpPmOEWtY3xWYf\r\nbl1uVmfbEUrRIZ7ObaFSxYa8pOSOvAbIbuTGeHBvf0RQKHhWWMsYwhi+I+u7\r\nE6lj1bb5Ugz9nptB73knM38HjdfkIyrOcMCnDl+zclB/8FmIn+Ah+Kt5T0PF\r\n4DnITveB1vNjoAsFAaZWg6S8VDOVjuqkRmdvyNURt5Yc6oVRcl4sA84aGe6B\r\neiXsZL2+FaISHYeFeM2Va2DAfZjaLzbrpnpLpGce7hOYp5uBqUmrXrBc9+oy\r\nBKGmKavOvRscNa4HAqsjrwClndT2aD5d0V+p5Do8hC8BBwPA3fejzGBohXyU\r\nqwzE/svmoRlEAC4aayidxn7meEqBfVXrk5A9vsc3foZeTfUHbD/rqcYx6Lvw\r\nRVZJTTDEbsji+Q/Q7E1aEIGvt5/xxpR7Zzo=\r\n=GOcY\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"ashoka_j","email":"savebtc11@gmail.com"},{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"292973338@qq.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.33-beta.0_1649758335516_0.8307627718183874"},"_hasShrinkwrap":false},"2.8.35":{"name":"@alitajs/cordova-native","version":"2.8.35","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"gitHead":"dd52a54008f92c9762ec6aca92e8b1754c795a2c","_id":"@alitajs/cordova-native@2.8.35","_nodeVersion":"16.13.1","_npmVersion":"8.1.0","dist":{"integrity":"sha512-Jv8HA9BGazIdZMB3lKePyoCBDa/skgcgE49CEkF44KftJokZMG/0d4OdUVs9N3sdPoXk+WaAYm4tfX6ou/sZTg==","shasum":"775cfbc283f83df4f2abcc239a5998001bd66425","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.35.tgz","fileCount":5,"unpackedSize":23900,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPtu078utrcYeGEE+ZyuVSClNq0ASxkVDfnkVf5ehjPgIhAKTFNECUvKyWsVALbOrOTKx7Y8uyC3w+ngNL2dvqL9mz"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiWAMXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrxlA/+Lz6vib/SBgnq0JGL1kW9lXVvrSzkhsCuhX9TfQEpbueBJY3R\r\nbdJmm7z03Bi8+35KQ7r39JLvJDIXVHjU6t0IneM/JymWq34JVCtQI8WMwR4y\r\nEVfpYBr7HJq3fIB/WYJLeqhwTN/Miqco21y8N/48zryYPSqEThUhb9CCH2B3\r\n03a9iR3i+K9YDUPcQcTQ8DngvqLBJTRpTOfLoMQ6WXFagHH7Yd7YZAMZzKQe\r\nISkk/364AAiFD4a9qthDTT3MQ1IxkHXGr7eWGzj631S/6K5DjjaHFmPhE27J\r\nrDj0e5sYXnwxjVQ+muoxgZJZWhBLXEoB74fL3MYiwM5gy0WmMYUhL7go5Ccw\r\ns8yCxRVF9hr4w3ILwSth80YYkbzr3Jz7oBhra54ts4W/L6SxH/isMuj8ro3q\r\n9w5GY4SHpJ15vQG2+vGeAKEQ+kY6XG8VShKo9HFzOkX27i6yvMQ7BHt/QIO8\r\nxEBBMGFD+7x3IJeKAS3DNkfkYofoAv60p9yiVmCbFbqC1rb7BLLlCquvFu8n\r\n5qIiz4OT3CSm/FWpf/Y0Sb9jX6L83c94Y+fNu3tSSaR6J/JUrxoGboyNNY7B\r\n+sIriP8Zcovofx58lgU1MvVsPj2vuSrA5vrtP83cqPmCxM+k4A8Qoo2yrokd\r\n9BWjClfLZgW7g/zwuml7dYB7QOwSak+hD4I=\r\n=g1JX\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"ashoka_j","email":"savebtc11@gmail.com"},{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"292973338@qq.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.35_1649935127287_0.8940453096428278"},"_hasShrinkwrap":false},"2.8.36":{"name":"@alitajs/cordova-native","version":"2.8.36","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.36","_nodeVersion":"16.13.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-afo11GHmsZm1aYxevakO43qEWnMbxtSEaKBd7wvnc793JKCQVTKj+vyAGGCaSmLsQtpd/maQZl8r8ky6vBz01w==","shasum":"7dd5d3dcf2662cbefc2d56c95d0fa75452bdc232","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.36.tgz","fileCount":5,"unpackedSize":23900,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJbB3guMiegfJhI9eGZKLbcE2DUHlX/QLahg32nEKO2wIhAM8//ug5z3Bg6RMjDi+3YYzr5PW7VpSZSAF+Sbs/mkug"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiXNCaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqO4BAAgUud3UCJlcX/chQ5Qht0t+yJmkgVkq3l6V4Tc1jjK1YXPoTO\r\nTf8dim/Q6sa4G0dl42Yx0pnDVPuz7OFIrbfeIrhfRVvHDGUozYmumOCbzC5Z\r\n+qPS5mUkIYrR+E5np7EEp9xbXq1n+9PCo5iOcsMtS1h/G/24RosTZxGbAn0R\r\nJMrWsBVpx8fFqif8mmt/81opHUoz1a8hemgl/d4wKa7+kZVr4CDLOwLPy/ia\r\nrkce5a27nYaLZGqo5VkYXRJud8TVmVFvhQd1Vq6zl3L8G7mjxVOUFvrvxGuJ\r\n2gAIqqOc/DKC19fBkdNGAyouwpwcoe6i0Wk6XWN3MiAxO2Jf4STdHQnnlNru\r\nHbgnFz+iHJCLuRy5QaBDQO+rgZSSOZ60YQlt0zK0mGUrGiye/2zlHuEp9kUw\r\nD9F5a6dP1oQ/g8bQCrcFZjj2hmj4qtQnu4nV5RZqAF510G60SKdweSxMd+Vi\r\nUkdlwX/WJBsivmCgDivRrr+KEjhZlLQ+h6TtWPOHWRFCko8pzUr65TDgT47d\r\nTMbaTmjVE8tloYyWPD+oDMdCBsyZXYqVwaRRpgDfq8jQwWugfJDWDAB0FsXJ\r\ntrxdYu6SUJV6wAIruDnGXP7h7ILRoakKHsJdtPTcUxCvucW47YydeGKROqgK\r\nvdxdDLgqHRWz2QcMHqC1IjyzKDNAj6AEqiQ=\r\n=EjCp\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"ashoka_j","email":"savebtc11@gmail.com"},{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"292973338@qq.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.36_1650249882410_0.40759968997933216"},"_hasShrinkwrap":false},"2.8.37":{"name":"@alitajs/cordova-native","version":"2.8.37","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"_id":"@alitajs/cordova-native@2.8.37","_nodeVersion":"16.13.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-0eRSVdI9qhGsRbhX5lIJGPovMe6xwMcSCTtHZfsSiVsjuEgPofYdpNDrFjZgL+DV5FNQKXY8bfFtwEZ913QjTQ==","shasum":"8d9b8e12ad627c942d30b59faaf806994ee0bf02","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.8.37.tgz","fileCount":5,"unpackedSize":23900,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDBB3Iml6hsr12+hqmjfJ7WdhOJhJyi7x6Kotec8hbGIAiEA/Fk6XcVBTvJr4mCRD/VThB0huJ0kraNDyT7gd7QmWbE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJipuUQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrfVBAAntxQeMjVdly8yr5AAV1Kravz0RojPzHhaf1GJUeh8Gu2snfk\r\nxYOgBfndiFolYyp2yEWVLvtsdMI68PCF9jc/vxf8qv4Bkwu6+zogmRXdszff\r\n1lXch8yKm9px/sL3I2vlkl0tmd8LysKU6Rc9+wOpccT8+5MDD9kPscdlr+3R\r\nPzaD6avXcQJYS2UPRPmoKMEN9lk+NayEMMK/Bq8MBQTwCVS3u6jADAN6svMJ\r\nQKBLniGG9HCNpKM9fx4jMSV2suNlPT6RMYdlCBiVoydIOdxyL5RfoapPyBcU\r\najJBJZ2ds00gplOpAZKuMtlFHQS0eHZ+Uc4baEYPKrPm0qJ0NlSt2loVBwBi\r\n6bJC24dhnNzZNNJNpuZlPV+yRcyCBJ6pe3x64TXFoMvF+ZwXB3b+Gt393uc9\r\n/JAyVlpS90q3xcysMow4vT5p2ds0GUV7BM8u3R6UIc6w/F0ntLwfOcroFisi\r\nUXrL7c+7erZP1nouu77B9Cd9+uzxMjuf3qx0/10qk5+/zAABMU/52qnIB8v2\r\nmOZ978skQReAM86UrhjStypDQmaUc+HP0YcNi1isrxHqsu7wB3Ctc9Cu95yG\r\noCoH1fhs7mPWPL8Q10Dbccf6MU1nursFAGxc7ktvwxDVxYobnz8fRW7pSz0V\r\nlFfBSdm6OmOB5sW7bQuHEI4ZIKK+x8jqe1w=\r\n=s+Ay\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"pengyh","email":"pt370390794@126.com"},{"name":"ashoka_j","email":"savebtc11@gmail.com"},{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"292973338@qq.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.8.37_1655104784259_0.397563241715748"},"_hasShrinkwrap":false},"2.9.0":{"name":"@alitajs/cordova-native","version":"2.9.0","description":"@alitajs/cordova-native","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"keywords":["umi","alita"],"authors":["xiaohuoni <448627663@qq.com> (https://github.com/xiaohuoni)","ashoka <savebtc11@gmail.com> (https://github.com/falcon11)"],"license":"MIT","bugs":{"url":"http://github.com/alitajs/alita/issues"},"homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","publishConfig":{"access":"public"},"gitHead":"58e8f183dc1d56872022772a2ce27a77ed7a14b5","_id":"@alitajs/cordova-native@2.9.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.0","dist":{"integrity":"sha512-7oIdn3o3PLGKDWuwtH4WnB00uRjArUDvvn/ewtQK/7yDdDNwQ50jsp6Lz4hU9hkCE5jH4PUGexzCdDN7b73/nQ==","shasum":"53573db927293d98ae6be76799b725d4f781ecbd","tarball":"https://registry.npmjs.org/@alitajs/cordova-native/-/cordova-native-2.9.0.tgz","fileCount":5,"unpackedSize":23899,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDLGbE6xZgVbH20jW6vF4VuqzJvuVgBLXhGgkPw/c+7OAiEA2Xn6LUXK/kUzElrNaea23B15I97Y1le6iXV5XbwhND0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJisYeIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoFYw/+JlTOpcaWX3pFYj8BIpweF7qn936DLR3+78iV0cIJ1arHOpo3\r\n/e3Y9REsc3rFdUH+4qa5Hgk1qtOdUzFiD5y0kpFdrtyuSCerC1gEGmL6DKQM\r\nyzUnRT2FttzgYokPukLKukOvaFbYqV7DOiouIlFFa/vEhLQleqaBgeSADlx6\r\n2jliHI3ETri6+td0KCVmZ+s0KWnZiH2/sIZEf2D4IqaMmHnDN9Gk3VVGinoJ\r\nqCCLrI6Gk+rPJVmNSzmMQbWr74MOSwoGrUGON+gGUjNplS5jsinLlVT2ui8y\r\ncHDl4tWzlRFtoWxZXjESVDe5ODgeSt05KT4Oi1B5dIx1ZOtz7zsCerBX04PU\r\ni4NBkEjyDmqo9oxuT/dCX1/QA//NXpw1m2PBqjrshFQxN7wbS4Lb2ZIXvmRr\r\nDzRT93WH39BOLQk8IuMqWfwW3PP969sORNKV+Koju2teISRmQg1+rVYKdRN4\r\nTpVJAMnHbV8B2Zd/YVHdmACxQzllJwx/MkW65IWLBjinrbFyfozph3afx+sl\r\nZayqLElgAqPOCwctO28kq1XGXxPqWwzVrnayYrQXaKZ8ckkkkCKZkNz7gG5J\r\nIagn31dY+iGFRiZMumqVjskoOtYLEhjA8WF7If+LwSCSlWR7RVQj0x4XyD7e\r\nXbxQuB8LMXX2gDRrGLsPDS+H1ghnhU5oBPo=\r\n=Zf/P\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"xiaohuoni","email":"448627663@qq.com"},"directories":{},"maintainers":[{"name":"pengyh","email":"pt370390794@126.com"},{"name":"ashoka_j","email":"savebtc11@gmail.com"},{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"292973338@qq.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-native_2.9.0_1655801736216_0.8844508481521958"},"_hasShrinkwrap":false}},"time":{"created":"2020-11-12T09:23:59.713Z","2.6.2-beta.2":"2020-11-12T09:24:00.044Z","modified":"2022-06-21T08:55:36.551Z","2.6.2-beta.3":"2020-11-16T02:45:41.335Z","2.6.2-beta.4":"2020-11-16T03:16:27.866Z","2.6.2-beta.6":"2020-11-17T09:10:47.252Z","2.6.2-beta.7":"2020-11-17T09:26:11.236Z","2.6.2-beta.8":"2020-11-18T09:01:22.066Z","2.6.3":"2020-11-23T05:46:19.270Z","2.6.5":"2020-11-24T06:26:46.905Z","2.6.6":"2020-11-26T03:12:53.575Z","2.6.7":"2020-11-26T09:09:06.748Z","2.6.8":"2020-11-26T09:50:40.050Z","2.6.10":"2020-12-02T02:03:07.623Z","2.6.14":"2020-12-17T09:32:30.644Z","2.6.16":"2020-12-22T09:54:16.686Z","2.7.0":"2021-02-05T08:39:46.140Z","2.7.3":"2021-02-05T09:19:39.700Z","2.7.4":"2021-02-09T06:09:24.049Z","2.7.5":"2021-02-22T02:03:32.989Z","2.7.6":"2021-02-23T10:52:40.840Z","2.7.9":"2021-03-15T08:50:57.526Z","2.8.0":"2021-03-23T06:17:38.978Z","2.8.1":"2021-03-31T03:04:41.986Z","2.8.2-beta.1":"2021-04-01T02:06:16.206Z","2.8.2-bate.2":"2021-04-29T07:06:22.250Z","2.8.2":"2021-05-12T08:58:49.859Z","2.8.3-alpha.0":"2021-05-27T02:52:33.287Z","2.8.3-alpha.1":"2021-05-27T06:26:10.584Z","2.8.3":"2021-05-28T01:47:06.667Z","2.8.4":"2021-06-10T01:19:52.752Z","2.8.4-beta.2":"2021-06-10T07:47:10.125Z","2.8.5":"2021-06-10T08:13:00.962Z","2.8.5-bate.1":"2021-06-11T09:36:39.337Z","2.8.6":"2021-06-11T11:54:45.278Z","2.8.7-alpha.0":"2021-06-24T01:54:07.102Z","2.8.7-alpha.1":"2021-06-24T07:32:48.982Z","2.8.7-alpha.2":"2021-06-24T09:06:14.998Z","2.8.7":"2021-07-02T02:50:11.651Z","2.8.7-alpha.3":"2021-07-12T09:28:53.046Z","2.8.8":"2021-07-13T02:51:59.162Z","2.8.9":"2021-07-19T09:27:14.853Z","2.8.10-alpha.0":"2021-07-21T03:02:33.752Z","2.8.11":"2021-07-23T03:02:33.108Z","2.8.12-alpha.0":"2021-07-23T09:59:48.943Z","2.8.12":"2021-07-26T09:07:39.101Z","2.8.13-alpha.1":"2021-07-28T02:34:05.218Z","2.8.13":"2021-07-28T03:31:36.602Z","2.8.14":"2021-08-10T11:33:51.402Z","2.8.15-alpha.2":"2021-08-18T03:06:03.452Z","2.8.15-alpha.3":"2021-08-24T08:22:16.084Z","2.8.15":"2021-08-24T09:48:06.665Z","2.8.16":"2021-08-26T03:22:46.659Z","2.8.18":"2021-08-26T07:24:27.763Z","2.8.19":"2021-08-31T11:20:12.690Z","2.8.21":"2021-09-14T07:58:54.812Z","2.8.23":"2021-09-14T09:51:48.129Z","2.8.24":"2021-09-14T10:03:44.015Z","2.8.25":"2021-11-17T07:09:03.006Z","2.8.26-beta.2":"2021-11-18T04:18:23.306Z","2.8.27-beta.0":"2021-11-24T09:38:18.923Z","2.8.27-beta.1":"2021-11-24T09:44:14.983Z","2.8.27-beta.2":"2021-11-25T06:28:59.300Z","2.8.27-beta.3":"2021-11-25T07:02:59.606Z","2.8.27":"2021-11-25T09:59:05.913Z","2.8.28":"2021-11-26T06:46:19.465Z","2.8.29":"2021-11-30T01:29:32.044Z","2.8.30":"2021-12-22T10:26:59.561Z","2.8.31":"2022-01-12T01:30:20.593Z","2.8.32":"2022-03-28T10:11:58.933Z","2.8.33-beta.0":"2022-04-12T10:12:15.725Z","2.8.35":"2022-04-14T11:18:47.448Z","2.8.36":"2022-04-18T02:44:42.574Z","2.8.37":"2022-06-13T07:19:44.434Z","2.9.0":"2022-06-21T08:55:36.335Z"},"maintainers":[{"name":"pengyh","email":"pt370390794@126.com"},{"name":"ashoka_j","email":"savebtc11@gmail.com"},{"name":"diyc","email":"13067111941x@gmail.com"},{"name":"xiaohuoni","email":"448627663@qq.com"},{"name":"imhele","email":"work@imhele.com"},{"name":"wangxingkang","email":"156148958@qq.com"},{"name":"shawdanon","email":"292973338@qq.com"},{"name":"cjy0208","email":"fanluan058@gmail.com"},{"name":"sorrycc","email":"sorrycc@gmail.com"},{"name":"hang1017","email":"437132124@qq.com"},{"name":"hammersjs","email":"1270253618@qq.com"}],"description":"@alitajs/cordova-native","homepage":"https://github.com/alitajs/alita/tree/master/packages/native#readme","keywords":["umi","alita"],"repository":{"type":"git","url":"git+https://github.com/alitajs/alita.git"},"bugs":{"url":"http://github.com/alitajs/alita/issues"},"license":"MIT","readme":"# @alitajs/cordova-native\n\n> 由于这个包不常用，又和 `native` 冲突，因此将这个包改名为 `@alitajs/cordova-native` ，相应的配置和命令也修改为 `cordovanative`。\n\n## 支持配置的插件\n\n`camera`, `device`, `dialogs`, `file`, `geolocation`, `inappbrowser`, `media`, `media-capture`, `keyboard`, `secure-storage`, `network`, `screen-orientation`, `statusbar`, `vibration`, `document-viewer`, `file-opener`, `fingerprint-aio`, `native-storage`, `qr-scanner`, `sqlite-storage`,\n\n## 用法\n\n`config/config.ts`\n\n```\nexport default {\n  appType: 'cordova',\n  cordovanative: ['file', 'device', 'camera', 'qr-scanner'],   // 数组里的名字只能用上面的插件名\n};\n```\n\n在项目根目录运行\n\n```shell\nalita cordovanative\n```\n\n## 各插件用法\n\n### camera\n\n相机组件，可用来拍照等\n\n对应的 `cordova` 插件: [cordova-plugin-camera](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html)\n\n`config.xml` 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to get pictures from there</string>\n</edit-config>\n\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n\n<edit-config target=\"NSPhotoLibraryAddUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need photo library access to save pictures there</string>\n</edit-config>\n```\n\n用法\n\n```js\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nconst options: CameraOptions = {\n  quality: 100,\n  destinationType: Camera.DestinationType.FILE_URI,\n  encodingType: Camera.EncodingType.JPEG,\n  mediaType: Camera.MediaType.PICTURE,\n};\nCamera.getPicture(options).then(\n  (imageData) => {\n    // imageData is either a base64 encoded string or a file URI\n    // If it's base64 (DATA_URL):\n    let base64Image = 'data:image/jpeg;base64,' + imageData;\n  },\n  (err) => {\n    // Handle error\n  },\n);\n```\n\n### device\n\n用于获取设备信息，比如 platform, uuid, version 等\n\n对应的 `cordova` 插件: [cordova-plugin-device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n\n用法\n\n```js\nimport { Device } from '@ionic-native/device';\n\n...\n\nconsole.log('Device UUID is: ' + Device.uuid);\n```\n\n### dialogs\n\n弹窗组件\n\n对应的 `cordova` 插件: [cordova-plugin-dialogs](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html)\n\n用法\n\n```js\nimport { Dialogs } from '@ionic-native/dialogs';\nDialogs.alert('Hello world')\n  .then(() => console.log('Dialog dismissed'))\n  .catch((e) => console.log('Error displaying dialog', e));\n```\n\n### file\n\n文件组件，用于读写原生文件系统\n\n对应的 `cordova` 插件: [cordova-plugin-file](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n\n用法\n\n```typescript\nimport { File } from '@ionic-native/file';\nFile.checkDir(File.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>\n  console.log('Directory doesn't exist'));\n```\n\n### secure-storage\n\n调原生方法加密保存数据\n\n对应的 `cordova` 插件: [cordova-plugin-secure-storage](https://github.com/Crypho/cordova-plugin-secure-storage)\n\n`config.xml` 配置\n\n```xml\n<platform name=\"ios\">\n    <preference name=\"KeychainAccessibility\" value=\"WhenUnlocked\"/>\n</platform>\n```\n\n支持的配置:\n\n```\nAfterFirstUnlock\nAfterFirstUnlockThisDeviceOnly\nWhenUnlocked (default)\nWhenUnlockedThisDeviceOnly\nWhenPasscodeSetThisDeviceOnly (this option is available only on iOS8 and later)\n```\n\n用法\n\n```typescript\nimport {\n  SecureStorage,\n  SecureStorageObject,\n} from '@ionic-native/secure-storage';\n\nSecureStorage.create('my_store_name').then((storage: SecureStorageObject) => {\n  storage.get('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.set('key', 'value').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n\n  storage.remove('key').then(\n    (data) => console.log(data),\n    (error) => console.log(error),\n  );\n});\n```\n\n### geolocation\n\n获取当前位置组件\n\n对应的 `cordova` 插件: [cordova-plugin-geolocation](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html)\n\n- ios\n\n```xml\n<edit-config target=\"NSLocationWhenInUseUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need location access to find things nearby</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport { Geolocation } from '@ionic-native/geolocation';\n\nGeolocation.getCurrentPosition()\n  .then((resp) => {\n    // resp.coords.latitude\n    // resp.coords.longitude\n  })\n  .catch((error) => {\n    console.log('Error getting location', error);\n  });\n\nlet watch = Geolocation.watchPosition();\nwatch.subscribe((data) => {\n  // data can be a set of coordinates, or an error (if an error occurred).\n  // data.coords.latitude\n  // data.coords.longitude\n});\n```\n\n### inappbrowser\n\n应用内浏览器组件\n\n对应的 `cordova` 插件: [cordova-plugin-inappbrowser](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html)\n\n```typescript\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\n\nconst browser = InAppBrowser.create('https://ionicframework.com/');\n\nbrowser.executeScript(...);\n\nbrowser.insertCSS(...);\nbrowser.on('loadstop').subscribe(event => {\n   browser.insertCSS({ code: \"body{color: red;\" });\n});\n\nbrowser.close();\n```\n\n### media\n\n音频播放、录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html)\n\n用法\n\n```typescript\nimport { Media, MediaObject } from '@ionic-native/media';\n\n// Create a Media instance.  Expects path to file or url as argument\n// We can optionally pass a second argument to track the status of the media\n\nconst file: MediaObject = Media.create('file.mp3');\n\n// to listen to plugin events:\n\nfile.onStatusUpdate.subscribe((status) => console.log(status)); // fires when file status changes\n\nfile.onSuccess.subscribe(() => console.log('Action is successful'));\n\nfile.onError.subscribe((error) => console.log('Error!', error));\n\n// play the file\nfile.play();\n\n// pause the file\nfile.pause();\n\n// get current playback position\nfile.getCurrentPosition().then((position) => {\n  console.log(position);\n});\n\n// get file duration\nlet duration = file.getDuration();\nconsole.log(duration);\n\n// skip to 10 seconds (expects int value in ms)\nfile.seekTo(10000);\n\n// stop playing the file\nfile.stop();\n\n// release the native audio resource\n// Platform Quirks:\n// iOS simply create a new instance and the old one will be overwritten\n// Android you must call release() to destroy instances of media when you are done\nfile.release();\n\n// Recording to a file\nconst file: MediaObject = Media.create('path/to/file.mp3');\n\nfile.startRecord();\n\nfile.stopRecord();\n```\n\n### media-capture\n\n照片、音频、视频录制组件\n\n对应的 `cordova` 插件: [cordova-plugin-media-capture](https://github.com/apache/cordova-plugin-media-capture)\n\n- ios 配置\n\n```xml\n<edit-config target=\"NSCameraUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need camera access to take pictures</string>\n</edit-config>\n<edit-config target=\"NSMicrophoneUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need microphone access to record sounds</string>\n</edit-config>\n<edit-config target=\"NSPhotoLibraryUsageDescription\" file=\"*-Info.plist\" mode=\"merge\">\n    <string>need to photo library access to get pictures from there</string>\n</edit-config>\n```\n\n用法\n\n```typescript\nimport {\n  MediaCapture,\n  MediaFile,\n  CaptureError,\n  CaptureImageOptions,\n} from '@ionic-native/media-capture';\n\nlet options: CaptureImageOptions = { limit: 3 };\nMediaCapture.captureImage(options).then(\n  (data: MediaFile[]) => console.log(data),\n  (err: CaptureError) => console.error(err),\n);\n```\n\n### keyboard\n\n键盘插件，支持键盘弹起或隐藏，需要安装 ionic webview\n\n- https://github.com/ionic-team/cordova-plugin-ionic-webview\n- https://ionicframework.com/docs/wkwebview/\n\n对应的 `cordova` 插件: [cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)\n\n用法\n\n```typescript\nimport { Keyboard } from '@ionic-native/keyboard';\n\nKeyboard.show();\n\nKeyboard.hide();\n```\n\n### network\n\n网络连接监听插件，可以获取网络连接状态，连接变化\n\n对应的 `cordova` 插件: [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information)\n\n用法\n\n```typescript\nimport { Network } from '@ionic-native/network';\n\n// watch network for a disconnection\nlet disconnectSubscription = Network.onDisconnect().subscribe(() => {\n  console.log('network was disconnected :-(');\n});\n\n// stop disconnect watch\ndisconnectSubscription.unsubscribe();\n\n// watch network for a connection\nlet connectSubscription = Network.onConnect().subscribe(() => {\n  console.log('network connected!');\n  // We just got a connection but we need to wait briefly\n  // before we determine the connection type. Might need to wait.\n  // prior to doing any api requests as well.\n  setTimeout(() => {\n    if (Network.type === 'wifi') {\n      console.log('we got a wifi connection, woohoo!');\n    }\n  }, 3000);\n});\n\n// stop connect watch\nconnectSubscription.unsubscribe();\n```\n\n### screen-orientation\n\n控制屏幕旋转\n\n对应的 `cordova` 插件: [cordova-plugin-screen-orientation](https://github.com/apache/cordova-plugin-screen-orientation)\n\n用法\n\n```typescript\nimport { ScreenOrientation } from '@ionic-native/screen-orientation';\n\n// get current\nconsole.log(ScreenOrientation.type); // logs the current orientation, example: 'landscape'\n\n// set to landscape\nScreenOrientation.lock(ScreenOrientation.ORIENTATIONS.LANDSCAPE);\n\n// allow user rotate\nScreenOrientation.unlock();\n\n// detect orientation changes\nScreenOrientation.onChange().subscribe(() => {\n  console.log('Orientation Changed');\n});\n```\n\n### statusbar\n\n状态栏组件\n\n对应的 `cordova` 插件: [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)\n\n```typescript\nimport { StatusBar } from '@ionic-native/status-bar';\n\n// let status bar overlay webview\nStatusBar.overlaysWebView(true);\n\n// set status bar to white\nStatusBar.backgroundColorByHexString('#ffffff');\n```\n\n### vibration\n\n震动控制\n\n对应的 `cordova` 插件: [cordova-plugin-vibration](https://github.com/apache/cordova-plugin-vibration)\n\n用法\n\n```typescript\nimport { Vibration } from '@ionic-native/vibration';\n\n// Vibrate the device for a second\n// Duration is ignored on iOS.\nVibration.vibrate(1000);\n\n// Vibrate 2 seconds\n// Pause for 1 second\n// Vibrate for 2 seconds\n// Patterns work on Android and Windows only\nVibration.vibrate([2000, 1000, 2000]);\n\n// Stop any current vibrations immediately\n// Works on Android and Windows only\nVibration.vibrate(0);\n```\n\n### file-opener\n\n使用系统默认软件打开文件\n\n对应的 `cordova` 插件: [cordova-plugin-file-opener2](https://github.com/pwlin/cordova-plugin-file-opener2)\n\n用法\n\n```typescript\nimport { FileOpener } from '@ionic-native/file-opener';\n\nFileOpener.open('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n\nFileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')\n  .then(() => console.log('File is opened'))\n  .catch((e) => console.log('Error opening file', e));\n```\n\n### document-viewer\n\npdf 查看组件\n\n对应的 `cordova` 插件: [cordova-plugin-document-viewer](https://github.com/sitewaerts/cordova-plugin-document-viewer)\n\n用法\n\n```typescript\nimport {\n  DocumentViewer,\n  DocumentViewerOptions,\n} from '@ionic-native/document-viewer';\n\nconst options: DocumentViewerOptions = {\n  title: 'My PDF',\n};\n\nDocumentViewer.viewDocument('assets/myFile.pdf', 'application/pdf', options);\n```\n\n### fingerprint-aio\n\n生物识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-fingerprint-aio](https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio)\n\n#### 配置\n\n- iOS - 需要 XCode 9.2 及以上版本，Please set `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`，在 config.xml 里设置 `<preference name=\"UseSwiftLanguageVersion\" value=\"4.0\" />`\n- 如果使用 Face ID，在 info.plist 里添加 NSFaceIDUsageDescription\n\n用法\n\n```typescript\nimport { FingerprintAIO } from '@ionic-native/fingerprint-aio';\n\nFingerprintAIO.show({\n    clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no `localizedReason` is given.\n    clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.\n    disableBackup:true,  //Only for Android(optional)\n    localizedFallbackTitle: 'Use Pin', //Only for iOS\n    localizedReason: 'Please authenticate' //Only for iOS\n})\n.then((result: any) => console.log(result))\n.catch((error: any) => console.log(error));\n```\n\n### native-storage\n\n使用原生存储，`Sharedpreferences` in Android and `NSUserDefaults` in iOS.\n\n对应的 `cordova` 插件: [cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage)\n\n用法\n\n```typescript\nimport { NativeStorage } from '@ionic-native/native-storage';\n\nNativeStorage.setItem('myitem', {\n  property: 'value',\n  anotherProperty: 'anotherValue',\n}).then(\n  () => console.log('Stored item!'),\n  (error) => console.error('Error storing item', error),\n);\n\nNativeStorage.getItem('myitem').then(\n  (data) => console.log(data),\n  (error) => console.error(error),\n);\n```\n\n### qr-scanner\n\n二维码识别组件\n\n对应的 `cordova` 插件: [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner)\n\n用法\n\n```typescript\nimport { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';\n\n// Optionally request the permission early\nQRScanner.prepare()\n  .then((status: QRScannerStatus) => {\n    if (status.authorized) {\n      // camera permission was granted\n\n      // start scanning\n      let scanSub = QRScanner.scan().subscribe((text: string) => {\n        console.log('Scanned something', text);\n\n        QRScanner.hide(); // hide camera preview\n        scanSub.unsubscribe(); // stop scanning\n      });\n    } else if (status.denied) {\n      // camera permission was permanently denied\n      // you must use QRScanner.openSettings() method to guide the user to the settings page\n      // then they can grant the permission from there\n    } else {\n      // permission was denied, but not permanently. You can ask for permission again at a later time.\n    }\n  })\n  .catch((e: any) => console.log('Error is', e));\n```\n\n### sqlite-storage\n\nsqlite 数据库插件\n\n对应的 `cordova` 插件: [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage)\n\n用法\n\n```typescript\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite';\n\nSQLite.create({\n  name: 'data.db',\n  location: 'default',\n})\n  .then((db: SQLiteObject) => {\n    db.executeSql('create table danceMoves(name VARCHAR(32))', [])\n      .then(() => console.log('Executed SQL'))\n      .catch((e) => console.log(e));\n  })\n  .catch((e) => console.log(e));\n```\n","readmeFilename":"README.md"}