Skip to content

Commit

Permalink
Merge pull request #582 from Expensify/joe-crashlytics
Browse files Browse the repository at this point in the history
Add Crashlytics to Chat
  • Loading branch information
Tim Szot authored Oct 16, 2020
2 parents bfddec0 + 0b3c821 commit d570a50
Show file tree
Hide file tree
Showing 12 changed files with 403 additions and 7 deletions.
9 changes: 9 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ android {
applicationId "com.expensify.chat"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 125
versionName "1.0.1-124"
}
Expand Down Expand Up @@ -226,6 +227,12 @@ dependencies {

// Android support library
implementation 'com.android.support:support-core-utils:28.0.0'

// Multi Dex Support: https://developer.android.com/studio/build/multidex#mdex-gradle
implementation 'com.android.support:multidex:1.0.3'

// Crashlytics
implementation 'com.google.firebase:firebase-crashlytics:17.2.2'
}

// Run this once to be able to run the application with BUCK
Expand All @@ -236,3 +243,5 @@ task copyDownloadableDepsToLibs(type: Copy) {
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
47 changes: 47 additions & 0 deletions android/app/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"project_info": {
"project_number": "921154746561",
"firebase_url": "https://expensify-chat.firebaseio.com",
"project_id": "expensify-chat",
"storage_bucket": "expensify-chat.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:921154746561:android:4f04268f25f84eaf027c40",
"android_client_info": {
"package_name": "com.expensify.chat"
}
},
"oauth_client": [
{
"client_id": "921154746561-gpsoaqgqfuqrfsjdf8l7vohfkfj7b9up.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCVwQb9lBI06bDIwHOw10AkdJyquXoMngk"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "921154746561-gpsoaqgqfuqrfsjdf8l7vohfkfj7b9up.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "921154746561-s3uqn2oe4m85tufi6mqflbfbuajrm2i3.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.chat.expensify.chat"
}
}
]
}
}
}
],
"configuration_version": "1"
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
package com.expensify.chat;

import android.app.Application;
import android.content.Context;
import androidx.multidex.MultiDexApplication;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.lugg.ReactNativeConfig.ReactNativeConfigPackage;
import com.reactnativecommunity.asyncstorage.AsyncStoragePackage;
import com.google.firebase.crashlytics.FirebaseCrashlytics;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.soloader.SoLoader;
import java.lang.reflect.InvocationTargetException;
import java.util.List;

public class MainApplication extends Application implements ReactApplication {
public class MainApplication extends MultiDexApplication implements ReactApplication {

private final ReactNativeHost mReactNativeHost =
new ReactNativeHost(this) {
Expand Down Expand Up @@ -44,9 +43,12 @@ public ReactNativeHost getReactNativeHost() {

@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
if (BuildConfig.DEBUG) {
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(false);
}
}

/**
Expand Down
3 changes: 3 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ buildscript {
compileSdkVersion = 29
targetSdkVersion = 29
androidXCore = "1.0.2"
multiDexEnabled = true
}
repositories {
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:3.5.3")
classpath("com.google.gms:google-services:4.3.4")
classpath("com.google.firebase:firebase-crashlytics-gradle:2.3.0")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
5 changes: 5 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,10 @@ platform :ios do
notes: "Use the account provided. Thank you for the review."
}
)

upload_symbols_to_crashlytics(
dsym_path: "./ios/Chat.app.dSYM",
gsp_path: "./ios/GoogleService-Info.plist"
)
end
end
7 changes: 7 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"react-native": {
"crashlytics_disable_auto_disabler": true,
"crashlytics_debug_enabled": false,
"crashlytics_ndk_enabled": true
}
}
36 changes: 36 additions & 0 deletions ios/GoogleService-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>921154746561-s3uqn2oe4m85tufi6mqflbfbuajrm2i3.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.921154746561-s3uqn2oe4m85tufi6mqflbfbuajrm2i3</string>
<key>API_KEY</key>
<string>AIzaSyA9Qn7q5Iw26gTzjI7012C4PaFrFagpC_I</string>
<key>GCM_SENDER_ID</key>
<string>921154746561</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.chat.expensify.chat</string>
<key>PROJECT_ID</key>
<string>expensify-chat</string>
<key>STORAGE_BUCKET</key>
<string>expensify-chat.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:921154746561:ios:216bd10ccc947659027c40</string>
<key>DATABASE_URL</key>
<string>https://expensify-chat.firebaseio.com</string>
</dict>
</plist>
117 changes: 117 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,45 @@ PODS:
- React-Core (= 0.63.3)
- React-jsi (= 0.63.3)
- ReactCommon/turbomodule/core (= 0.63.3)
- Firebase/Analytics (6.30.0):
- Firebase/Core
- Firebase/Core (6.30.0):
- Firebase/CoreOnly
- FirebaseAnalytics (= 6.7.2)
- Firebase/CoreOnly (6.30.0):
- FirebaseCore (= 6.10.0)
- Firebase/Crashlytics (6.30.0):
- Firebase/CoreOnly
- FirebaseCrashlytics (~> 4.4.0)
- FirebaseAnalytics (6.7.2):
- FirebaseCore (~> 6.8)
- FirebaseInstallations (~> 1.4)
- GoogleAppMeasurement (= 6.7.2)
- GoogleUtilities/AppDelegateSwizzler (~> 6.7)
- GoogleUtilities/MethodSwizzler (~> 6.7)
- GoogleUtilities/Network (~> 6.7)
- "GoogleUtilities/NSData+zlib (~> 6.7)"
- nanopb (~> 1.30905.0)
- FirebaseCore (6.10.0):
- FirebaseCoreDiagnostics (~> 1.3)
- GoogleUtilities/Environment (~> 6.7)
- GoogleUtilities/Logger (~> 6.7)
- FirebaseCoreDiagnostics (1.5.0):
- GoogleDataTransport (~> 7.0)
- GoogleUtilities/Environment (~> 6.7)
- GoogleUtilities/Logger (~> 6.7)
- nanopb (~> 1.30905.0)
- FirebaseCrashlytics (4.4.0):
- FirebaseCore (~> 6.10)
- FirebaseInstallations (~> 1.6)
- GoogleDataTransport (~> 7.2)
- nanopb (~> 1.30905.0)
- PromisesObjC (~> 1.2)
- FirebaseInstallations (1.7.0):
- FirebaseCore (~> 6.10)
- GoogleUtilities/Environment (~> 6.7)
- GoogleUtilities/UserDefaults (~> 6.7)
- PromisesObjC (~> 1.2)
- Flipper (0.54.0):
- Flipper-Folly (~> 2.2)
- Flipper-RSocket (~> 1.1)
Expand Down Expand Up @@ -67,9 +106,42 @@ PODS:
- DoubleConversion
- glog
- glog (0.3.5)
- GoogleAppMeasurement (6.7.2):
- GoogleUtilities/AppDelegateSwizzler (~> 6.7)
- GoogleUtilities/MethodSwizzler (~> 6.7)
- GoogleUtilities/Network (~> 6.7)
- "GoogleUtilities/NSData+zlib (~> 6.7)"
- nanopb (~> 1.30905.0)
- GoogleDataTransport (7.2.0):
- nanopb (~> 1.30905.0)
- GoogleUtilities/AppDelegateSwizzler (6.7.2):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (6.7.2):
- PromisesObjC (~> 1.2)
- GoogleUtilities/Logger (6.7.2):
- GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (6.7.2):
- GoogleUtilities/Logger
- GoogleUtilities/Network (6.7.2):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (6.7.2)"
- GoogleUtilities/Reachability (6.7.2):
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (6.7.2):
- GoogleUtilities/Logger
- nanopb (1.30905.0):
- nanopb/decode (= 1.30905.0)
- nanopb/encode (= 1.30905.0)
- nanopb/decode (1.30905.0)
- nanopb/encode (1.30905.0)
- OpenSSL-Universal (1.0.2.19):
- OpenSSL-Universal/Static (= 1.0.2.19)
- OpenSSL-Universal/Static (1.0.2.19)
- PromisesObjC (1.2.11)
- RCTRequired (0.63.3)
- RCTTypeSafety (0.63.3):
- FBLazyVector (= 0.63.3)
Expand Down Expand Up @@ -312,6 +384,17 @@ PODS:
- React
- RNCPushNotificationIOS (1.5.0):
- React
- RNFBAnalytics (7.6.7):
- Firebase/Analytics (~> 6.30.0)
- React-Core
- RNFBApp
- RNFBApp (8.4.5):
- Firebase/CoreOnly (~> 6.30.0)
- React-Core
- RNFBCrashlytics (8.4.9):
- Firebase/Crashlytics (~> 6.30.0)
- React-Core
- RNFBApp
- Yoga (1.14.0)
- YogaKit (1.18.1):
- Yoga (~> 1.14)
Expand Down Expand Up @@ -370,21 +453,35 @@ DEPENDENCIES:
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- "RNCAsyncStorage (from `../node_modules/@react-native-community/async-storage`)"
- "RNCPushNotificationIOS (from `../node_modules/@react-native-community/push-notification-ios`)"
- "RNFBAnalytics (from `../node_modules/@react-native-firebase/analytics`)"
- "RNFBApp (from `../node_modules/@react-native-firebase/app`)"
- "RNFBCrashlytics (from `../node_modules/@react-native-firebase/crashlytics`)"
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)

SPEC REPOS:
trunk:
- boost-for-react-native
- CocoaAsyncSocket
- CocoaLibEvent
- Firebase
- FirebaseAnalytics
- FirebaseCore
- FirebaseCoreDiagnostics
- FirebaseCrashlytics
- FirebaseInstallations
- Flipper
- Flipper-DoubleConversion
- Flipper-Folly
- Flipper-Glog
- Flipper-PeerTalk
- Flipper-RSocket
- FlipperKit
- GoogleAppMeasurement
- GoogleDataTransport
- GoogleUtilities
- nanopb
- OpenSSL-Universal
- PromisesObjC
- YogaKit

EXTERNAL SOURCES:
Expand Down Expand Up @@ -452,6 +549,12 @@ EXTERNAL SOURCES:
:path: "../node_modules/@react-native-community/async-storage"
RNCPushNotificationIOS:
:path: "../node_modules/@react-native-community/push-notification-ios"
RNFBAnalytics:
:path: "../node_modules/@react-native-firebase/analytics"
RNFBApp:
:path: "../node_modules/@react-native-firebase/app"
RNFBCrashlytics:
:path: "../node_modules/@react-native-firebase/crashlytics"
Yoga:
:path: "../node_modules/react-native/ReactCommon/yoga"

Expand All @@ -462,6 +565,12 @@ SPEC CHECKSUMS:
DoubleConversion: cde416483dac037923206447da6e1454df403714
FBLazyVector: 878b59e31113e289e275165efbe4b54fa614d43d
FBReactNativeSpec: 7da9338acfb98d4ef9e5536805a0704572d33c2f
Firebase: 210f41ca352067d83b1ba4fd2e7fb49a0c017397
FirebaseAnalytics: a299a86ef70fcc6aa011418bc65a7e101fb9636c
FirebaseCore: 9a41e2de78fef10f63cee30ab10e2945266bc1fc
FirebaseCoreDiagnostics: 7535fe695737f8c5b350584292a70b7f8ff0357b
FirebaseCrashlytics: 859918905322e8816d2b5ab7fe54bf5a0c84d21c
FirebaseInstallations: 466c7b4d1f58fe16707693091da253726a731ed2
Flipper: be611d4b742d8c87fbae2ca5f44603a02539e365
Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41
Flipper-Folly: c12092ea368353b58e992843a990a3225d4533c3
Expand All @@ -471,7 +580,12 @@ SPEC CHECKSUMS:
FlipperKit: ab353d41aea8aae2ea6daaf813e67496642f3d7d
Folly: b73c3869541e86821df3c387eb0af5f65addfab4
glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3
GoogleAppMeasurement: 3def7652b1f5b5a576178dc332e2a36a260fbef6
GoogleDataTransport: 672fb0ce96fe7f7f31d43672fca62ad2c9c86f7b
GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3
nanopb: c43f40fadfe79e8b8db116583945847910cbabc9
OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355
PromisesObjC: 8c196f5a328c2cba3e74624585467a557dcb482f
RCTRequired: 48884c74035a0b5b76dbb7a998bd93bcfc5f2047
RCTTypeSafety: edf4b618033c2f1c5b7bc3d90d8e085ed95ba2ab
React: f36e90f3ceb976546e97df3403e37d226f79d0e3
Expand Down Expand Up @@ -499,6 +613,9 @@ SPEC CHECKSUMS:
ReactCommon: 4167844018c9ed375cc01a843e9ee564399e53c3
RNCAsyncStorage: db711e29e5e0500d9bd21aa0c2e397efa45302b1
RNCPushNotificationIOS: 8025ff0b610d7b28d29ddc1b619cd55814362e4c
RNFBAnalytics: 6fe130045b06fb4173d6f44058894007bb30b9a2
RNFBApp: 570b136767f588b7eef0ab918284e9fe364d0c3e
RNFBCrashlytics: 7b60463c742f830255fa76f13a837f95c6581700
Yoga: 7d13633d129fd179e01b8953d38d47be90db185a
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

Expand Down
Loading

0 comments on commit d570a50

Please sign in to comment.