Skip to content

Commit

Permalink
chore: Revert "feat: Integrate Firebase libraries and initial config …
Browse files Browse the repository at this point in the history
…to enable Push Notifications FCM." (MetaMask#10143)

Reverts MetaMask#10085 due the lack of
`GOOGLE_SERVICES_B64` on our CI.
  • Loading branch information
Jonathansoufer authored Jun 27, 2024
1 parent 7b0aab4 commit c11c609
Show file tree
Hide file tree
Showing 14 changed files with 7 additions and 344 deletions.
8 changes: 0 additions & 8 deletions .android.env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
export MM_FOX_CODE="EXAMPLE_FOX_CODE"
export MM_BRANCH_KEY_TEST=
export MM_BRANCH_KEY_LIVE=
# Firebase
export FCM_CONFIG_API_KEY=
export FCM_CONFIG_AUTH_DOMAIN=
export FCM_CONFIG_PROJECT_ID=
export FCM_CONFIG_STORAGE_BUCKET=
export FCM_CONFIG_MESSAGING_SENDER_ID=
export FCM_CONFIG_APP_ID=
export GOOGLE_SERVICES_B64=
8 changes: 0 additions & 8 deletions .ios.env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
MM_FOX_CODE = EXAMPLE_FOX_CODE
MM_BRANCH_KEY_TEST =
MM_BRANCH_KEY_LIVE =
# Firebase
FCM_CONFIG_API_KEY=
FCM_CONFIG_AUTH_DOMAIN=
FCM_CONFIG_PROJECT_ID=
FCM_CONFIG_STORAGE_BUCKET=
FCM_CONFIG_MESSAGING_SENDER_ID=
FCM_CONFIG_APP_ID=
GOOGLE_SERVICES_B64=
9 changes: 0 additions & 9 deletions .js.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,3 @@ export SECURITY_ALERTS_API_URL="http://localhost:3000"

# Temporary mechanism to enable security alerts API prior to release.
export SECURITY_ALERTS_API_ENABLED="true"

# Firebase
export FCM_CONFIG_API_KEY=""
export FCM_CONFIG_AUTH_DOMAIN=""
export FCM_CONFIG_PROJECT_ID=""
export FCM_CONFIG_STORAGE_BUCKET=""
export FCM_CONFIG_MESSAGING_SENDER_ID=""
export FCM_CONFIG_APP_ID=""
export GOOGLE_SERVICES_B64=""
1 change: 0 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apply plugin: "com.android.application"
apply plugin: "com.facebook.react"
apply plugin: "io.sentry.android.gradle"
apply plugin: "com.google.gms.google-services"

import com.android.build.OutputFile

Expand Down
1 change: 0 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("io.sentry:sentry-android-gradle-plugin:4.2.0")
classpath("com.google.gms:google-services:4.3.15")
}
allprojects {
repositories {
Expand Down
83 changes: 0 additions & 83 deletions app/util/notifications/methods/fcmHelper.test.ts

This file was deleted.

99 changes: 0 additions & 99 deletions app/util/notifications/methods/fcmHelper.ts

This file was deleted.

7 changes: 0 additions & 7 deletions firebase.json

This file was deleted.

30 changes: 0 additions & 30 deletions ios/GoogleService-Info.plist

This file was deleted.

5 changes: 1 addition & 4 deletions ios/MetaMask/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#import <React/RCTRootView.h>
#import <React/RCTPushNotificationManager.h>
#import <RNBranch/RNBranch.h>
#import <Firebase.h>
#if DEBUG
#ifdef FB_SONARKIT_ENABLED
#import <FlipperKit/FlipperClient.h>
Expand All @@ -30,8 +29,6 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
} else {
foxCode = @"debug";
}
// Implements Firebase
[FIRApp configure];

// Uncomment this line to use the test key instead of the live one.
// [RNBranch useTestInstance];
Expand All @@ -58,7 +55,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
UIView* launchScreenView = [[[NSBundle mainBundle] loadNibNamed:@"LaunchScreen" owner:self options:nil] objectAtIndex:0];
launchScreenView.frame = self.window.bounds;
rootView.loadingView = launchScreenView;

[self initializeFlipper:application];

//Uncomment the following line to enable the splashscreen on ios
Expand Down
6 changes: 1 addition & 5 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ def common_target_logic
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
# 27/06/2024 - Disabled in favor of Firebase Messaging usage due incompatibility. Source: https://rnfirebase.io/#altering-cocoapods-to-use-frameworks
#:flipper_configuration => flipper_config,
:flipper_configuration => flipper_config,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/..",
)
Expand Down Expand Up @@ -105,9 +104,6 @@ end

target 'MetaMask' do
common_target_logic
# https://rnfirebase.io/
use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true
end

target 'MetaMask-QA' do
Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,6 @@
"@react-native-community/checkbox": "^0.5.12",
"@react-native-community/netinfo": "6.0.0",
"@react-native-cookies/cookies": "^6.2.1",
"@react-native-firebase/app": "^20.1.0",
"@react-native-firebase/messaging": "^20.1.0",
"@react-native-masked-view/masked-view": "^0.2.6",
"@react-native-picker/picker": "^2.2.1",
"@react-navigation/bottom-tabs": "^5.11.11",
Expand Down
15 changes: 4 additions & 11 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ printTitle(){
echo ''
}


printError(){
ERROR_ICON=$'\342\235\214'
echo ''
Expand Down Expand Up @@ -159,6 +160,7 @@ loadJSEnv(){
export SENTRY_DISABLE_AUTO_UPLOAD=${SENTRY_DISABLE_AUTO_UPLOAD:-"true"}
}


prebuild(){
# Import provider
yarn --ignore-engines build:static-logos
Expand Down Expand Up @@ -187,16 +189,6 @@ prebuild_android(){
# Copy fonts with iconset
yes | cp -rf ./app/fonts/Metamask.ttf ./android/app/src/main/assets/fonts/Metamask.ttf

#Create google-services.json file to be used by the Firebase services.
# Check if GOOGLE_SERVICES_B64 is set
if [ ! -z "$GOOGLE_SERVICES_B64" ]; then
echo -n $GOOGLE_SERVICES_B64 | base64 -d > ./android/app/google-services.json
echo "google-services.json has been created successfully."
else
echo "GOOGLE_SERVICES_B64 is not set in the .env file."
exit 1
fi

if [ "$PRE_RELEASE" = false ] ; then
if [ -e $ANDROID_ENV_FILE ]
then
Expand Down Expand Up @@ -378,9 +370,10 @@ buildIosQA(){
fi
}


buildAndroidQA(){
remapEnvVariableQA

if [ "$PRE_RELEASE" = false ] ; then
adb uninstall io.metamask.qa
fi
Expand Down
Loading

0 comments on commit c11c609

Please sign in to comment.