This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const replace = require('replace'); | |
/** | |
* Update version and versionCode in capacitor Android and iOS | |
*/ | |
const appVersion = require("./package.json").version; | |
const appVersionSplitted = appVersion.split('.'); | |
const appVersionCode = appVersionSplitted[0] * 100000 + appVersionSplitted[1] * 1000 + appVersionSplitted[2] * 10 | |
// Android |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Plugins } from '@capacitor/core'; | |
import 'capacitor-data-storage-sqlite'; | |
export function useStorage(options: any = {}) { | |
const { CapacitorDataStorageSqlite } = Plugins; | |
const storage: any = CapacitorDataStorageSqlite; | |
let opened = false; | |
const openStorage = async (): Promise<boolean> => { |