mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-20 14:05:27 +01:00
REF: analytics
This commit is contained in:
parent
6589ccca58
commit
4f50e08411
11 changed files with 1109 additions and 2990 deletions
2
App.js
2
App.js
|
@ -111,7 +111,7 @@ export default class App extends React.Component {
|
|||
_handleAppStateChange = async nextAppState => {
|
||||
if (BlueApp.getWallets().length > 0) {
|
||||
if (this.state.appState.match(/inactive|background/) && nextAppState === 'active') {
|
||||
A(A.ENUM.APP_UNSUSPENDED);
|
||||
setTimeout(() => A(A.ENUM.APP_UNSUSPENDED), 2000);
|
||||
const clipboard = await Clipboard.getString();
|
||||
const isAddressFromStoredWallet = BlueApp.getWallets().some(wallet =>
|
||||
wallet.chain === Chain.ONCHAIN ? wallet.weOwnAddress(clipboard) : wallet.isInvoiceGeneratedByWallet(clipboard),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import amplitude from 'amplitude-js';
|
||||
import Analytics from 'appcenter-analytics';
|
||||
import { getVersion } from 'react-native-device-info';
|
||||
import { Platform } from 'react-native';
|
||||
|
||||
|
@ -10,9 +9,9 @@ amplitude.getInstance().init('8b7cf19e8eea3cdcf16340f5fbf16330', null, {
|
|||
amplitude.getInstance().setVersionName(getVersion());
|
||||
|
||||
let A = async event => {
|
||||
amplitude.getInstance().logEvent(event, {});
|
||||
console.log('posting analytics...', event);
|
||||
try {
|
||||
Analytics.trackEvent(event);
|
||||
amplitude.getInstance().logEvent(event);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"app_secret": "7a010505-cccc-4e40-aa6b-fbbe0624c8d9"
|
||||
}
|
|
@ -1,5 +1,3 @@
|
|||
<resources>
|
||||
<string name="app_name">BlueWallet</string>
|
||||
<string name="appCenterCrashes_whenToSendCrashes" moduleConfig="true" translatable="false">ASK_JAVASCRIPT</string>
|
||||
<string name="appCenterAnalytics_whenToEnableAnalytics" moduleConfig="true" translatable="false">ALWAYS_SEND</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AppSecret</key>
|
||||
<string>e83710b1-61c2-497b-b0f7-c3b6ab79f2d8</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -20,7 +20,6 @@
|
|||
2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; };
|
||||
2DCD954D1E0B4F2C00145EB5 /* BlueWalletTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* BlueWalletTests.m */; };
|
||||
32002D9D236FAA9F00B93396 /* TodayDataStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32002D9C236FAA9F00B93396 /* TodayDataStore.swift */; };
|
||||
3208E93922F63279007F5A27 /* AppCenter-Config.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3208E93822F63279007F5A27 /* AppCenter-Config.plist */; };
|
||||
3271B0AB236E2E0700DA766F /* NotificationCenter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3271B0AA236E2E0700DA766F /* NotificationCenter.framework */; };
|
||||
3271B0AE236E2E0700DA766F /* TodayViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3271B0AD236E2E0700DA766F /* TodayViewController.swift */; };
|
||||
3271B0B1236E2E0700DA766F /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3271B0AF236E2E0700DA766F /* MainInterface.storyboard */; };
|
||||
|
@ -156,7 +155,6 @@
|
|||
2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2FCC2CD6FF4448229D0CE0F3 /* MaterialCommunityIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialCommunityIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf"; sourceTree = "<group>"; };
|
||||
32002D9C236FAA9F00B93396 /* TodayDataStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayDataStore.swift; sourceTree = "<group>"; };
|
||||
3208E93822F63279007F5A27 /* AppCenter-Config.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "AppCenter-Config.plist"; sourceTree = "<group>"; };
|
||||
32475F792370F6D30070E6CF /* BlueWallet - Bitcoin Price.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "BlueWallet - Bitcoin Price.entitlements"; sourceTree = "<group>"; };
|
||||
3271B0A9236E2E0700DA766F /* BlueWallet - Bitcoin Price.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "BlueWallet - Bitcoin Price.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3271B0AA236E2E0700DA766F /* NotificationCenter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NotificationCenter.framework; path = System/Library/Frameworks/NotificationCenter.framework; sourceTree = SDKROOT; };
|
||||
|
@ -335,7 +333,6 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
32F0A2502310B0910095C559 /* BlueWallet.entitlements */,
|
||||
3208E93822F63279007F5A27 /* AppCenter-Config.plist */,
|
||||
008F07F21AC5B25A0029DE68 /* main.jsbundle */,
|
||||
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
|
||||
13B07FB01A68108700A75B9A /* AppDelegate.m */,
|
||||
|
@ -773,7 +770,6 @@
|
|||
files = (
|
||||
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
|
||||
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
|
||||
3208E93922F63279007F5A27 /* AppCenter-Config.plist in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
@ -11,19 +11,11 @@
|
|||
#import <React/RCTBundleURLProvider.h>
|
||||
#import <React/RCTRootView.h>
|
||||
#import "RNQuickActionManager.h"
|
||||
#import <AppCenterReactNativeShared/AppCenterReactNativeShared.h>
|
||||
#import <AppCenterReactNative.h>
|
||||
#import <AppCenterReactNativeAnalytics.h>
|
||||
#import <AppCenterReactNativeCrashes.h>
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
[AppCenterReactNative register];
|
||||
[AppCenterReactNativeAnalytics registerWithInitiallyEnabled:true];
|
||||
[AppCenterReactNativeCrashes registerWithAutomaticProcessing];
|
||||
|
||||
{
|
||||
NSURL *jsCodeLocation;
|
||||
|
||||
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
|
||||
|
|
|
@ -1,22 +1,4 @@
|
|||
PODS:
|
||||
- appcenter (2.6.0):
|
||||
- AppCenterReactNativeShared
|
||||
- React
|
||||
- appcenter-analytics (2.6.0):
|
||||
- AppCenter/Analytics
|
||||
- AppCenterReactNativeShared
|
||||
- React
|
||||
- appcenter-crashes (2.6.0):
|
||||
- AppCenter/Crashes
|
||||
- AppCenterReactNativeShared
|
||||
- React
|
||||
- AppCenter/Analytics (2.5.1):
|
||||
- AppCenter/Core
|
||||
- AppCenter/Core (2.5.1)
|
||||
- AppCenter/Crashes (2.5.1):
|
||||
- AppCenter/Core
|
||||
- AppCenterReactNativeShared (2.6.0):
|
||||
- AppCenter/Core (= 2.5.1)
|
||||
- boost-for-react-native (1.63.0)
|
||||
- BVLinearGradient (2.5.4):
|
||||
- React
|
||||
|
@ -171,9 +153,6 @@ PODS:
|
|||
- yoga (0.60.5.React)
|
||||
|
||||
DEPENDENCIES:
|
||||
- appcenter (from `../node_modules/appcenter/ios`)
|
||||
- appcenter-analytics (from `../node_modules/appcenter-analytics/ios`)
|
||||
- appcenter-crashes (from `../node_modules/appcenter-crashes/ios`)
|
||||
- BVLinearGradient (from `../node_modules/react-native-linear-gradient`)
|
||||
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
|
||||
- EFQRCode (= 5.1.0)
|
||||
|
@ -227,8 +206,6 @@ DEPENDENCIES:
|
|||
|
||||
SPEC REPOS:
|
||||
https://github.com/cocoapods/specs.git:
|
||||
- AppCenter
|
||||
- AppCenterReactNativeShared
|
||||
- boost-for-react-native
|
||||
- EFQRCode
|
||||
- lottie-ios
|
||||
|
@ -236,12 +213,6 @@ SPEC REPOS:
|
|||
- swift_qrcodejs
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
appcenter:
|
||||
:path: "../node_modules/appcenter/ios"
|
||||
appcenter-analytics:
|
||||
:path: "../node_modules/appcenter-analytics/ios"
|
||||
appcenter-crashes:
|
||||
:path: "../node_modules/appcenter-crashes/ios"
|
||||
BVLinearGradient:
|
||||
:path: "../node_modules/react-native-linear-gradient"
|
||||
DoubleConversion:
|
||||
|
@ -342,11 +313,6 @@ EXTERNAL SOURCES:
|
|||
:path: "../node_modules/react-native/ReactCommon/yoga"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
AppCenter: fddcbac6e4baae3d93a196ceb0bfe0e4ce407dec
|
||||
appcenter: dc687dcf81280ccab1dc938b0b974d265144a802
|
||||
appcenter-analytics: fa8dba207d07733dcbda749d262fde3e7161258d
|
||||
appcenter-crashes: fa97ffec69882486d7183193cc9394473757d1ad
|
||||
AppCenterReactNativeShared: d5e360f8a4cb5126d29e31ab98051d2f070ba631
|
||||
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
|
||||
BVLinearGradient: 8cbc5155c978f2e43098818c91d206d07aae6d30
|
||||
DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
|
||||
|
|
4007
package-lock.json
generated
4007
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -53,10 +53,7 @@
|
|||
"@react-native-community/slider": "2.0.0-rc.1",
|
||||
"@remobile/react-native-qrcode-local-image": "git+https://github.com/BlueWallet/react-native-qrcode-local-image.git",
|
||||
"@sentry/react-native": "1.0.9",
|
||||
"amplitude-js": "5.7.0",
|
||||
"appcenter": "2.6.0",
|
||||
"appcenter-analytics": "2.6.0",
|
||||
"appcenter-crashes": "2.6.0",
|
||||
"amplitude-js": "5.6.0",
|
||||
"bech32": "1.1.3",
|
||||
"bignumber.js": "9.0.0",
|
||||
"bip21": "2.0.2",
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
module.exports = {
|
||||
dependencies: {
|
||||
appcenter: {
|
||||
platforms: {
|
||||
android: null, // disable Android platform, other platforms will still autolink if provided
|
||||
},
|
||||
},
|
||||
'appcenter-analytics': {
|
||||
platforms: {
|
||||
android: null, // disable Android platform, other platforms will still autolink if provided
|
||||
},
|
||||
},
|
||||
'appcenter-crashes': {
|
||||
platforms: {
|
||||
android: null, // disable Android platform, other platforms will still autolink if provided
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
Loading…
Add table
Reference in a new issue