mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
enable to get appVerion and platformName
This commit is contained in:
@@ -2,6 +2,9 @@ const AWS = require('aws-sdk')
|
||||
const AMA = require('aws-sdk-mobile-analytics')
|
||||
const ConfigManager = require('browser/main/lib/ConfigManager')
|
||||
|
||||
const remote = require('electron').remote
|
||||
const os = require('os')
|
||||
|
||||
AWS.config.region = 'us-east-1'
|
||||
if (process.env.NODE_ENV === 'production' && ConfigManager.default.get().amaEnabled) {
|
||||
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
|
||||
@@ -9,7 +12,9 @@ if (process.env.NODE_ENV === 'production' && ConfigManager.default.get().amaEnab
|
||||
})
|
||||
const mobileAnalyticsClient = new AMA.Manager({
|
||||
appId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
|
||||
appTitle: 'xxxxxxxxxx'
|
||||
appTitle: 'xxxxxxxxxx',
|
||||
appVersionName: remote.app.getVersion().toString(),
|
||||
platform: os.platform()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user