Skip to content

Commit

Permalink
Merge pull request #654 from SUI-Components/feat/sui-app-minor-ajustm…
Browse files Browse the repository at this point in the history
…ents

feat(components/tool/app): Add capgo live updates to the wrapped API
  • Loading branch information
oegea authored Apr 23, 2024
2 parents 19fabda + c2e6801 commit 3e0d936
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions components/tool/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@capacitor/core": "^5.5.1",
"@capacitor/ios": "^5.5.1",
"@capgo/capacitor-native-biometric": "^5.1.0",
"@capgo/capacitor-updater": "^5.9.4",
"readline": "^1.3.0",
"xml2js": "^0.6.2",
"yargs": "^17.7.2"
Expand Down
3 changes: 2 additions & 1 deletion components/tool/app/src/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import * as biometric from './biometric.js'
import * as core from './core.js'
import * as liveUpdates from './liveUpdates.js'
import * as localNotifications from './localNotifications.js'

export default function SuiApp() {
throw new Error('sui-app is a set of tools and is not intended to be renderized as a React component')
}

export {biometric, core, localNotifications}
export {biometric, core, liveUpdates, localNotifications}
11 changes: 11 additions & 0 deletions components/tool/app/src/liveUpdates.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {CapacitorUpdater} from '@capgo/capacitor-updater'

export const notifyAppReady = () => CapacitorUpdater.notifyAppReady()

export const download = async ({url, version}) => {
return CapacitorUpdater.download({url, version})
}

export const set = async version => {
return CapacitorUpdater.set(version)
}

0 comments on commit 3e0d936

Please sign in to comment.