1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00
joplin/packages/app-mobile/utils/getPackageInfo.ts

22 lines
562 B
TypeScript

import shim from '@joplin/lib/shim';
import { PackageInfo } from '@joplin/lib/versionInfo';
import ReactNativeVersionInfo from 'react-native-version-info';
const basePackageInfo = require('../packageInfo.js');
const getPackageInfo = (): PackageInfo => {
const version = shim.appVersion();
return {
...basePackageInfo,
// Android, iOS, and Web have independent versions -- fetch this
// information at runtime:
name: 'Joplin Mobile',
version,
build: {
appId: ReactNativeVersionInfo.bundleIdentifier,
},
};
};
export default getPackageInfo;