Skip to content

Commit

Permalink
appcenter removed, ios build succeeded (#3)
Browse files Browse the repository at this point in the history
(cherry picked from commit 0d7d85c)
  • Loading branch information
Kamill90 authored and mdfkbtc committed Apr 13, 2020
1 parent b736ee0 commit 5a7ec88
Show file tree
Hide file tree
Showing 12 changed files with 9,895 additions and 153 deletions.
30 changes: 0 additions & 30 deletions analytics.js
Original file line number Diff line number Diff line change
@@ -1,30 +0,0 @@
import amplitude from "amplitude-js";
import Analytics from "appcenter-analytics";
import { getVersion } from "react-native-device-info";
import { Platform } from "react-native";

amplitude.getInstance().init("8b7cf19e8eea3cdcf16340f5fbf16330", null, {
useNativeDeviceInfo: true,
platform: Platform.OS
});
amplitude.getInstance().setVersionName(getVersion());

const A = async event => {
amplitude.getInstance().logEvent(event, {});
try {
Analytics.trackEvent(event);
} catch (err) {
console.log(err);
}
};

A.ENUM = {
INIT: "INIT",
GOT_NONZERO_BALANCE: "GOT_NONZERO_BALANCE",
GOT_ZERO_BALANCE: "GOT_ZERO_BALANCE",
CREATED_WALLET: "CREATED_WALLET",
CREATED_LIGHTNING_WALLET: "CREATED_LIGHTNING_WALLET",
APP_UNSUSPENDED: "APP_UNSUSPENDED"
};

module.exports = A;
1 change: 0 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ project.ext.react = [
]

apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/@sentry/react-native/sentry.gradle"

/**
* Set this to true to create two separate APKs instead of one:
Expand Down
3 changes: 0 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import App from "./App";
import LottieView from "lottie-react-native";
import UnlockWith from "./UnlockWith.js";

const A = require("./analytics");

if (!Error.captureStackTrace) {
// captureStackTrace is only available when debugging
Error.captureStackTrace = () => {};
Expand All @@ -32,7 +30,6 @@ class BlueAppComponent extends React.Component {
}

setIsMigratingData = async () => {
A(A.ENUM.INIT);
this.setState({ isMigratingData: false });
};

Expand Down
70 changes: 18 additions & 52 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -131,7 +113,7 @@ PODS:
- React
- RemobileReactNativeQrcodeLocalImage (1.0.4):
- React
- RNCAsyncStorage (1.6.2):
- RNCAsyncStorage (1.7.1):
- React
- RNDefaultPreference (1.4.1):
- React
Expand Down Expand Up @@ -160,9 +142,9 @@ PODS:
- React
- RNWatch (0.4.1):
- React
- Sentry (4.4.2):
- Sentry/Core (= 4.4.2)
- Sentry/Core (4.4.2)
- Sentry (4.4.3):
- Sentry/Core (= 4.4.3)
- Sentry/Core (4.4.3)
- swift_qrcodejs (1.1.2)
- TcpSockets (3.3.2):
- React
Expand All @@ -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)
Expand Down Expand Up @@ -226,22 +205,14 @@ DEPENDENCIES:
- yoga (from `../node_modules/react-native/ReactCommon/yoga`)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
- AppCenter
- AppCenterReactNativeShared
trunk:
- boost-for-react-native
- EFQRCode
- lottie-ios
- Sentry
- 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:
Expand Down Expand Up @@ -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
Expand All @@ -364,12 +330,12 @@ SPEC CHECKSUMS:
React-jsinspector: e08662d1bf5b129a3d556eb9ea343a3f40353ae4
react-native-biometrics: c892904948a32295b128f633bcc11eda020645c5
react-native-blur: cad4d93b364f91e7b7931b3fa935455487e5c33c
react-native-camera: 203091b4bf99d48b788a0682ad573e8718724893
react-native-camera: f4f2144140ae1e808cad97cc7caf013767c11f1b
react-native-haptic-feedback: 22c9dc85fd8059f83bf9edd9212ac4bd4ae6074d
react-native-image-picker: 3637d63fef7e32a230141ab4660d3ceb773c824f
react-native-randombytes: 991545e6eaaf700b4ee384c291ef3d572e0b2ca8
react-native-slider: 6d83f7b8076a84e965a43fbdcfcf9dac19cea42e
react-native-webview: f72ac4078e115dfa741cc588acb1cca25566457d
react-native-image-picker: 7a85cf7b0a53845f03ae52fb4592a2748ded069b
react-native-randombytes: 3638d24759d67c68f6ccba60c52a7a8a8faa6a23
react-native-slider: 884693dd50f84745baa511ecdcde4c16f32182fb
react-native-webview: 2d8de2be422f0f8b9ba38db3f013f9ebfdb9b78f
React-RCTActionSheet: b0f1ea83f4bf75fb966eae9bfc47b78c8d3efd90
React-RCTAnimation: 359ba1b5690b1e87cc173558a78e82d35919333e
React-RCTBlob: 5e2b55f76e9a1c7ae52b826923502ddc3238df24
Expand All @@ -382,9 +348,9 @@ SPEC CHECKSUMS:
React-RCTWebSocket: cd932a16b7214898b6b7f788c8bddb3637246ac4
ReactNativePrivacySnapshot: cc295e45dc22810e9ff2c93380d643de20a77015
RemobileReactNativeQrcodeLocalImage: 57aadc12896b148fb5e04bc7c6805f3565f5c3fa
RNCAsyncStorage: 5ae4d57458804e99f73d427214442a6b10a53856
RNDefaultPreference: 12d246dd2222e66dadcd76cc1250560663befc3a
RNDeviceInfo: 12faae605ba42a1a5041c3c41a77834bc23f049d
RNCAsyncStorage: 44395cb9c7c1523104c2b499eb426ef7aff82bca
RNDefaultPreference: 628cb35719f2fe4111c000ccfa7e186400bbc47e
RNDeviceInfo: 687c1b2ab6d86ff1ca1208783320cd144138c7f2
RNFS: c9bbde46b0d59619f8e7b735991c60e0f73d22c1
RNGestureHandler: 5329a942fce3d41c68b84c2c2276ce06a696d8b0
RNHandoff: d3b0754cca3a6bcd9b25f544f733f7f033ccf5fa
Expand All @@ -396,12 +362,12 @@ SPEC CHECKSUMS:
RNSVG: 0eb087cfb5d7937be93c45b163b26352a647e681
RNVectorIcons: 0bb4def82230be1333ddaeee9fcba45f0b288ed4
RNWatch: a14e378448e187cc12f307f61d41fe8a65400e86
Sentry: bba998b0fb157fdd6596aa73290a9d67ae47be79
Sentry: 14bdd673870e8cf64932b149fad5bbbf39a9b390
swift_qrcodejs: 4d024fc98b0778b804ec6a5c810880fd092aec9d
TcpSockets: 8d839b9b14f6f344d98e4642ded13ab3112b462d
ToolTipMenu: bdcaa0e888bcf44778a67fe34639b094352e904e
TcpSockets: 14306fb79f9750ea7d2ddd02d8bed182abb01797
ToolTipMenu: 8ac61aded0fbc4acfe7e84a7d0c9479d15a9a382
yoga: 312528f5bbbba37b4dcea5ef00e8b4033fdd9411

PODFILE CHECKSUM: f93db402b02d7f01a8bc51d9b2cc10a39391b081
PODFILE CHECKSUM: 6e4becf6b95fb1241cd3ac1084da0a8cb3db7069

COCOAPODS: 1.7.5
COCOAPODS: 1.8.4
20 changes: 2 additions & 18 deletions ios/VelesWallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
};
objectVersion = 46;
objects = {

/* Begin PBXBuildFile section */
00E356F31AD99517003FC87E /* VelesWalletTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* VelesWalletTests.m */; };
036397B3AA70DD314F31661C /* libPods-VelesWalletWatch Extension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 154B05BEF3C3512F67A08374 /* libPods-VelesWalletWatch Extension.a */; };
Expand Down Expand Up @@ -572,7 +571,6 @@
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
B40D4E2D225841C300428FCC /* Embed Watch Content */,
791C03B6EF06B63A39F55115 /* [CP] Copy Pods Resources */,
2130DE983D1D45AC8FC45F7E /* Upload Debug Symbols to Sentry */,
3271B0B6236E2E0700DA766F /* Embed App Extensions */,
);
buildRules = (
Expand Down Expand Up @@ -832,7 +830,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export SENTRY_PROPERTIES=sentry.properties\nexport NODE_BINARY=node\n../node_modules/@sentry/cli/bin/sentry-cli react-native xcode ../node_modules/react-native/scripts/react-native-xcode.sh\n";
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
};
0E6D0FA885BDBE9988699506 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
Expand All @@ -856,20 +854,6 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
2130DE983D1D45AC8FC45F7E /* Upload Debug Symbols to Sentry */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Upload Debug Symbols to Sentry";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export SENTRY_PROPERTIES=sentry.properties\n../node_modules/@sentry/cli/bin/sentry-cli upload-dsym";
};
2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -882,7 +866,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export SENTRY_PROPERTIES=sentry.properties\nexport NODE_BINARY=node\n../node_modules/@sentry/cli/bin/sentry-cli react-native xcode ../node_modules/react-native/scripts/react-native-xcode.sh";
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
};
310D9B5C1860199135C315EC /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
Expand Down
9 changes: 1 addition & 8 deletions ios/VelesWallet/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,12 @@
#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];
Expand Down
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@
"prepare": "./patches/fix_mangle.sh; git apply patches/minifier.js.patch; git apply patches/minify.js.patch",
"clean": "cd android/; ./gradlew clean; cd ..; rm -r -f /tmp/metro-cache/; rm -r -f node_modules/; npm cache clean --force; npm i; npm start -- --reset-cache",
"releasenotes2json": "./release-notes.sh > release-notes.txt; node -e 'console.log(JSON.stringify(require(\"fs\").readFileSync(\"release-notes.txt\", \"utf8\")));' > release-notes.json",
"podinstall": "./podinstall.sh",
"start": "node node_modules/react-native/local-cli/cli.js start",
"android": "react-native run-android",
"ios": "react-native run-ios",
"postinstall": "./node_modules/.bin/rn-nodeify --install buffer,events,process,stream,util,inherits,fs,path --hack; npm run releasenotes2json; npm run podinstall; npx jetify",
"test": "npm run unit && npm run jest",
"postinstall": "./node_modules/.bin/rn-nodeify --install buffer,events,process,stream,util,inherits,fs,path --hack; npm run releasenotes2json; npx jetify",
"test": "npm run unit && npm run jest && npm run lint",
"jest": "node node_modules/jest/bin/jest.js tests/integration/*",
"lint": "eslint *.js screen/**/*.js screen/ class/ models/ loc/ tests/integration/",
"lint:fix": "npm run lint --fix",
Expand All @@ -60,9 +59,6 @@
"@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",
"bech32": "1.1.3",
"bignumber.js": "9.0.0",
"bip21": "git+https://github.com/velescore/bip21.git",
Expand Down
9 changes: 0 additions & 9 deletions podinstall.sh

This file was deleted.

18 changes: 1 addition & 17 deletions react-native.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
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
}
}
}
dependencies: {},
};
2 changes: 0 additions & 2 deletions screen/wallets/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import ReactNativeHapticFeedback from "react-native-haptic-feedback";
import Privacy from "../../Privacy";

const EV = require("../../events");
const A = require("../../analytics");
/** @type {AppStorage} */
const BlueApp = require("../../BlueApp");
const loc = require("../../loc");
Expand Down Expand Up @@ -81,7 +80,6 @@ export default class WalletsImport extends Component {
BlueApp.wallets.push(w);
await BlueApp.saveToDisk();
EV(EV.enum.WALLETS_COUNT_CHANGED);
A(A.ENUM.CREATED_WALLET);
this.props.navigation.dismiss();
}
}
Expand Down
8 changes: 1 addition & 7 deletions screen/wallets/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import ReactNativeHapticFeedback from "react-native-haptic-feedback";
import PropTypes from "prop-types";

const EV = require("../../events");
const A = require("../../analytics");
/** @type {AppStorage} */
const BlueApp = require("../../BlueApp");
const loc = require("../../loc");
Expand Down Expand Up @@ -153,12 +152,7 @@ export default class WalletsList extends Component {
}

redrawScreen() {
console.log("wallets/list redrawScreen()");
if (BlueApp.getBalance() !== 0) {
A(A.ENUM.GOT_NONZERO_BALANCE);
} else {
A(A.ENUM.GOT_ZERO_BALANCE);
}
console.log('wallets/list redrawScreen()');

this.setState({
isLoading: false,
Expand Down
Loading

0 comments on commit 5a7ec88

Please sign in to comment.