Commit 703e7285 by Nguyễn Thị Thúy

fix bug notification

parent fde92410
...@@ -192,26 +192,22 @@ dependencies { ...@@ -192,26 +192,22 @@ dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"]) implementation fileTree(dir: "libs", include: ["*.jar"])
//noinspection GradleDynamicVersion //noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules implementation "com.facebook.react:react-native:+" // From node_modules
implementation platform('com.google.firebase:firebase-bom:26.6.0')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'androidx.appcompat:appcompat:1.1.0-rc01' implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni' exclude group: 'com.facebook.fbjni'
} }
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper' exclude group: 'com.facebook.flipper'
} }
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper' exclude group: 'com.facebook.flipper'
} }
if (enableHermes) { if (enableHermes) {
...@@ -221,6 +217,8 @@ implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02' ...@@ -221,6 +217,8 @@ implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02'
} else { } else {
implementation jscFlavor implementation jscFlavor
} }
implementation 'com.google.firebase:firebase-analytics:17.2.2'
} }
// Run this once to be able to run the application with BUCK // Run this once to be able to run the application with BUCK
......
...@@ -16,13 +16,6 @@ ...@@ -16,13 +16,6 @@
android:usesCleartextTraffic="true" android:usesCleartextTraffic="true"
> >
<service android:name="io.invertase.firebase.messaging.RNFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:label="@string/app_name" android:label="@string/app_name"
......
...@@ -6,7 +6,6 @@ import com.facebook.react.PackageList; ...@@ -6,7 +6,6 @@ import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication; import com.facebook.react.ReactApplication;
import com.BV.LinearGradient.LinearGradientPackage; import com.BV.LinearGradient.LinearGradientPackage;
import com.oblador.vectoricons.VectorIconsPackage; import com.oblador.vectoricons.VectorIconsPackage;
import io.invertase.firebase.RNFirebasePackage;
import com.oblador.vectoricons.VectorIconsPackage; import com.oblador.vectoricons.VectorIconsPackage;
import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactNativeHost;
...@@ -15,8 +14,6 @@ import com.facebook.soloader.SoLoader; ...@@ -15,8 +14,6 @@ import com.facebook.soloader.SoLoader;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.util.List; import java.util.List;
import com.facebook.react.ReactApplication; //<- Dòng này import com.facebook.react.ReactApplication; //<- Dòng này
import io.invertase.firebase.messaging.RNFirebaseMessagingPackage;//<- Dòng này
import io.invertase.firebase.notifications.RNFirebaseNotificationsPackage;//<- Dòng này
public class MainApplication extends Application implements ReactApplication { public class MainApplication extends Application implements ReactApplication {
...@@ -33,8 +30,6 @@ public class MainApplication extends Application implements ReactApplication { ...@@ -33,8 +30,6 @@ public class MainApplication extends Application implements ReactApplication {
List<ReactPackage> packages = new PackageList(this).getPackages(); List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example: // Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage()); // packages.add(new MyReactNativePackage());
packages.add(new RNFirebaseMessagingPackage());//<- Dòng này
packages.add(new RNFirebaseNotificationsPackage());//<- Dòng này
return packages; return packages;
} }
......
#Mon Mar 01 17:26:16 ICT 2021 #Tue Apr 13 09:02:37 ICT 2021
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
...@@ -3,9 +3,11 @@ include ':react-native-linear-gradient' ...@@ -3,9 +3,11 @@ include ':react-native-linear-gradient'
project(':react-native-linear-gradient').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linear-gradient/android') project(':react-native-linear-gradient').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linear-gradient/android')
include ':react-native-vector-icons' include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android') project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':react-native-firebase'
project(':react-native-firebase').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase/android')
include ':react-native-vector-icons' include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android') project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':@react-native-firebase_messaging'
project(':@react-native-firebase_messaging').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-firebase/messaging/android')
include ':@react-native-firebase_app'
project(':@react-native-firebase_app').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-firebase/app/android')
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app' include ':app'
...@@ -31,6 +31,6 @@ ...@@ -31,6 +31,6 @@
<key>IS_SIGNIN_ENABLED</key> <key>IS_SIGNIN_ENABLED</key>
<true></true> <true></true>
<key>GOOGLE_APP_ID</key> <key>GOOGLE_APP_ID</key>
<string>1:1070545778193:ios:de8b945376b0af910a23b0</string> <string>1:1070545778193:ios:0d1e7e537998d02b0a23b0</string>
</dict> </dict>
</plist> </plist>
\ No newline at end of file
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
00E356F31AD99517003FC87E /* InvestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* InvestTests.m */; }; 00E356F31AD99517003FC87E /* InvestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* InvestTests.m */; };
13869AC326244FB000412A7A /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 13869AC226244FB000412A7A /* GoogleService-Info.plist */; };
13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
...@@ -18,8 +19,6 @@ ...@@ -18,8 +19,6 @@
2DCD954D1E0B4F2C00145EB5 /* InvestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* InvestTests.m */; }; 2DCD954D1E0B4F2C00145EB5 /* InvestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* InvestTests.m */; };
2FCC6749524E697FC9323F22 /* libPods-Invest-InvestTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ABCEBFE5646F1EF68E7C87AB /* libPods-Invest-InvestTests.a */; }; 2FCC6749524E697FC9323F22 /* libPods-Invest-InvestTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ABCEBFE5646F1EF68E7C87AB /* libPods-Invest-InvestTests.a */; };
48E6A9A75AE9C55476F21D2D /* libPods-Invest-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4ECD31835B4784D2DC719E76 /* libPods-Invest-tvOSTests.a */; }; 48E6A9A75AE9C55476F21D2D /* libPods-Invest-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4ECD31835B4784D2DC719E76 /* libPods-Invest-tvOSTests.a */; };
52B7A0A425F722CF00CEDA09 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 52B7A0A325F722CF00CEDA09 /* GoogleService-Info.plist */; };
52B7A0A525F722CF00CEDA09 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 52B7A0A325F722CF00CEDA09 /* GoogleService-Info.plist */; };
BEE4F63E354049C2D225330D /* libPods-Invest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F96EA7789D1E36A43479651 /* libPods-Invest.a */; }; BEE4F63E354049C2D225330D /* libPods-Invest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F96EA7789D1E36A43479651 /* libPods-Invest.a */; };
C58809ADB943708AF0E7E27E /* libPods-Invest-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FC653233E0AC368FCB03B57C /* libPods-Invest-tvOS.a */; }; C58809ADB943708AF0E7E27E /* libPods-Invest-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FC653233E0AC368FCB03B57C /* libPods-Invest-tvOS.a */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
...@@ -47,6 +46,7 @@ ...@@ -47,6 +46,7 @@
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
00E356F21AD99517003FC87E /* InvestTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InvestTests.m; sourceTree = "<group>"; }; 00E356F21AD99517003FC87E /* InvestTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InvestTests.m; sourceTree = "<group>"; };
12715EC58B6699B513B54F09 /* Pods-Invest.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Invest.debug.xcconfig"; path = "Target Support Files/Pods-Invest/Pods-Invest.debug.xcconfig"; sourceTree = "<group>"; }; 12715EC58B6699B513B54F09 /* Pods-Invest.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Invest.debug.xcconfig"; path = "Target Support Files/Pods-Invest/Pods-Invest.debug.xcconfig"; sourceTree = "<group>"; };
13869AC226244FB000412A7A /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* Invest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Invest.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07F961A680F5B00A75B9A /* Invest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Invest.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Invest/AppDelegate.h; sourceTree = "<group>"; }; 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Invest/AppDelegate.h; sourceTree = "<group>"; };
13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Invest/AppDelegate.m; sourceTree = "<group>"; }; 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Invest/AppDelegate.m; sourceTree = "<group>"; };
...@@ -58,7 +58,6 @@ ...@@ -58,7 +58,6 @@
2D02E47B1E0B4A5D006451C7 /* Invest-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Invest-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 2D02E47B1E0B4A5D006451C7 /* Invest-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Invest-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
2D02E4901E0B4A5D006451C7 /* Invest-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Invest-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 2D02E4901E0B4A5D006451C7 /* Invest-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Invest-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
4ECD31835B4784D2DC719E76 /* libPods-Invest-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Invest-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 4ECD31835B4784D2DC719E76 /* libPods-Invest-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Invest-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
52B7A0A325F722CF00CEDA09 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
52E1A15225F1255E00EA970D /* Invest.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = Invest.entitlements; path = Invest/Invest.entitlements; sourceTree = "<group>"; }; 52E1A15225F1255E00EA970D /* Invest.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = Invest.entitlements; path = Invest/Invest.entitlements; sourceTree = "<group>"; };
5F96EA7789D1E36A43479651 /* libPods-Invest.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Invest.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 5F96EA7789D1E36A43479651 /* libPods-Invest.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Invest.a"; sourceTree = BUILT_PRODUCTS_DIR; };
72B39130AB01DE9359CED049 /* Pods-Invest-InvestTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Invest-InvestTests.release.xcconfig"; path = "Target Support Files/Pods-Invest-InvestTests/Pods-Invest-InvestTests.release.xcconfig"; sourceTree = "<group>"; }; 72B39130AB01DE9359CED049 /* Pods-Invest-InvestTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Invest-InvestTests.release.xcconfig"; path = "Target Support Files/Pods-Invest-InvestTests/Pods-Invest-InvestTests.release.xcconfig"; sourceTree = "<group>"; };
...@@ -146,7 +145,6 @@ ...@@ -146,7 +145,6 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
9345F6C125FF213F006B5233 /* Fonts */, 9345F6C125FF213F006B5233 /* Fonts */,
52B7A0A325F722CF00CEDA09 /* GoogleService-Info.plist */,
52E1A15225F1255E00EA970D /* Invest.entitlements */, 52E1A15225F1255E00EA970D /* Invest.entitlements */,
008F07F21AC5B25A0029DE68 /* main.jsbundle */, 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
13B07FAF1A68108700A75B9A /* AppDelegate.h */, 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
...@@ -204,6 +202,7 @@ ...@@ -204,6 +202,7 @@
83CBB9F61A601CBA00E9B192 = { 83CBB9F61A601CBA00E9B192 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
13869AC226244FB000412A7A /* GoogleService-Info.plist */,
13B07FAE1A68108700A75B9A /* Invest */, 13B07FAE1A68108700A75B9A /* Invest */,
832341AE1AAA6A7D00B99B32 /* Libraries */, 832341AE1AAA6A7D00B99B32 /* Libraries */,
00E356EF1AD99517003FC87E /* InvestTests */, 00E356EF1AD99517003FC87E /* InvestTests */,
...@@ -401,7 +400,7 @@ ...@@ -401,7 +400,7 @@
files = ( files = (
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
52B7A0A425F722CF00CEDA09 /* GoogleService-Info.plist in Resources */, 13869AC326244FB000412A7A /* GoogleService-Info.plist in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -410,7 +409,6 @@ ...@@ -410,7 +409,6 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */, 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */,
52B7A0A525F722CF00CEDA09 /* GoogleService-Info.plist in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
......
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
#import <React/RCTBundleURLProvider.h> #import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h> #import <React/RCTRootView.h>
#import "Firebase.h" @import Firebase;
#import "RNFirebaseMessaging.h"
#import <AVFoundation/AVFoundation.h> #import <AVFoundation/AVFoundation.h>
...@@ -37,14 +36,12 @@ static void InitializeFlipper(UIApplication *application) { ...@@ -37,14 +36,12 @@ static void InitializeFlipper(UIApplication *application) {
InitializeFlipper(application); InitializeFlipper(application);
#endif #endif
[FIRApp configure];
[[UNUserNotificationCenter currentNotificationCenter] setDelegate:self];
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error: nil]; [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error: nil];
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"Invest" moduleName:@"Invest"
initialProperties:nil]; initialProperties:nil];
[FIRApp configure];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</dict> </dict>
</dict> </dict>
<key>NSLocationWhenInUseUsageDescription</key> <key>NSLocationWhenInUseUsageDescription</key>
<string></string> <string/>
<key>NSPhotoLibraryUsageDescription</key> <key>NSPhotoLibraryUsageDescription</key>
<string>To upload images</string> <string>To upload images</string>
<key>UIAppFonts</key> <key>UIAppFonts</key>
......
...@@ -45,10 +45,6 @@ def flipper_post_install(installer) ...@@ -45,10 +45,6 @@ def flipper_post_install(installer)
end end
target 'Invest' do target 'Invest' do
pod 'Firebase/Auth'
pod 'Firebase/Core'
pod 'Firebase/Messaging'
# Pods for Invest # Pods for Invest
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector" pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec" pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
...@@ -80,7 +76,8 @@ target 'Invest' do ...@@ -80,7 +76,8 @@ target 'Invest' do
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec' pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'RNFBApp', :path => '../node_modules/@react-native-firebase/app'
pod 'RNFBMessaging', :path => '../node_modules/@react-native-firebase/messaging'
......
...@@ -4,10 +4,7 @@ PODS: ...@@ -4,10 +4,7 @@ PODS:
- React - React
- CocoaAsyncSocket (7.6.5) - CocoaAsyncSocket (7.6.5)
- CocoaLibEvent (1.0.0) - CocoaLibEvent (1.0.0)
- Crashlytics (3.14.0):
- Fabric (~> 1.10.2)
- DoubleConversion (1.1.6) - DoubleConversion (1.1.6)
- Fabric (1.10.2)
- FBLazyVector (0.62.2) - FBLazyVector (0.62.2)
- FBReactNativeSpec (0.62.2): - FBReactNativeSpec (0.62.2):
- Folly (= 2018.10.22.00) - Folly (= 2018.10.22.00)
...@@ -16,57 +13,41 @@ PODS: ...@@ -16,57 +13,41 @@ PODS:
- React-Core (= 0.62.2) - React-Core (= 0.62.2)
- React-jsi (= 0.62.2) - React-jsi (= 0.62.2)
- ReactCommon/turbomodule/core (= 0.62.2) - ReactCommon/turbomodule/core (= 0.62.2)
- Firebase/Auth (6.34.0): - Firebase/CoreOnly (6.25.0):
- FirebaseCore (= 6.7.1)
- Firebase/Messaging (6.25.0):
- Firebase/CoreOnly - Firebase/CoreOnly
- FirebaseAuth (~> 6.9.2) - FirebaseMessaging (~> 4.4.1)
- Firebase/Core (6.34.0): - FirebaseAnalyticsInterop (1.5.0)
- Firebase/CoreOnly - FirebaseCore (6.7.1):
- FirebaseAnalytics (= 6.9.0) - FirebaseCoreDiagnostics (~> 1.3)
- Firebase/CoreOnly (6.34.0): - FirebaseCoreDiagnosticsInterop (~> 1.2)
- FirebaseCore (= 6.10.4) - GoogleUtilities/Environment (~> 6.5)
- Firebase/Messaging (6.34.0): - GoogleUtilities/Logger (~> 6.5)
- Firebase/CoreOnly
- FirebaseMessaging (~> 4.7.1)
- FirebaseAnalytics (6.9.0):
- FirebaseCore (~> 6.10)
- FirebaseInstallations (~> 1.7)
- GoogleAppMeasurement (= 6.9.0)
- GoogleUtilities/AppDelegateSwizzler (~> 6.7)
- GoogleUtilities/MethodSwizzler (~> 6.7)
- GoogleUtilities/Network (~> 6.7)
- "GoogleUtilities/NSData+zlib (~> 6.7)"
- nanopb (~> 1.30906.0)
- FirebaseAuth (6.9.2):
- FirebaseCore (~> 6.10)
- GoogleUtilities/AppDelegateSwizzler (~> 6.7)
- GoogleUtilities/Environment (~> 6.7)
- GTMSessionFetcher/Core (~> 1.1)
- FirebaseCore (6.10.4):
- FirebaseCoreDiagnostics (~> 1.6)
- GoogleUtilities/Environment (~> 6.7)
- GoogleUtilities/Logger (~> 6.7)
- FirebaseCoreDiagnostics (1.7.0): - FirebaseCoreDiagnostics (1.7.0):
- GoogleDataTransport (~> 7.4) - GoogleDataTransport (~> 7.4)
- GoogleUtilities/Environment (~> 6.7) - GoogleUtilities/Environment (~> 6.7)
- GoogleUtilities/Logger (~> 6.7) - GoogleUtilities/Logger (~> 6.7)
- nanopb (~> 1.30906.0) - nanopb (~> 1.30906.0)
- FirebaseInstallations (1.7.0): - FirebaseCoreDiagnosticsInterop (1.2.0)
- FirebaseCore (~> 6.10) - FirebaseInstallations (1.3.0):
- GoogleUtilities/Environment (~> 6.7) - FirebaseCore (~> 6.6)
- GoogleUtilities/UserDefaults (~> 6.7) - GoogleUtilities/Environment (~> 6.6)
- GoogleUtilities/UserDefaults (~> 6.6)
- PromisesObjC (~> 1.2) - PromisesObjC (~> 1.2)
- FirebaseInstanceID (4.8.0): - FirebaseInstanceID (4.3.4):
- FirebaseCore (~> 6.10) - FirebaseCore (~> 6.6)
- FirebaseInstallations (~> 1.6) - FirebaseInstallations (~> 1.0)
- GoogleUtilities/Environment (~> 6.7) - GoogleUtilities/Environment (~> 6.5)
- GoogleUtilities/UserDefaults (~> 6.7) - GoogleUtilities/UserDefaults (~> 6.5)
- FirebaseMessaging (4.7.1): - FirebaseMessaging (4.4.1):
- FirebaseCore (~> 6.10) - FirebaseAnalyticsInterop (~> 1.5)
- FirebaseInstanceID (~> 4.7) - FirebaseCore (~> 6.6)
- GoogleUtilities/AppDelegateSwizzler (~> 6.7) - FirebaseInstanceID (~> 4.3)
- GoogleUtilities/Environment (~> 6.7) - GoogleUtilities/AppDelegateSwizzler (~> 6.5)
- GoogleUtilities/Reachability (~> 6.7) - GoogleUtilities/Environment (~> 6.5)
- GoogleUtilities/UserDefaults (~> 6.7) - GoogleUtilities/Reachability (~> 6.5)
- GoogleUtilities/UserDefaults (~> 6.5)
- Protobuf (>= 3.9.2, ~> 3.9) - Protobuf (>= 3.9.2, ~> 3.9)
- Flipper (0.33.1): - Flipper (0.33.1):
- Flipper-Folly (~> 2.1) - Flipper-Folly (~> 2.1)
...@@ -124,12 +105,6 @@ PODS: ...@@ -124,12 +105,6 @@ PODS:
- DoubleConversion - DoubleConversion
- glog - glog
- glog (0.3.5) - glog (0.3.5)
- GoogleAppMeasurement (6.9.0):
- GoogleUtilities/AppDelegateSwizzler (~> 6.7)
- GoogleUtilities/MethodSwizzler (~> 6.7)
- GoogleUtilities/Network (~> 6.7)
- "GoogleUtilities/NSData+zlib (~> 6.7)"
- nanopb (~> 1.30906.0)
- GoogleDataTransport (7.5.1): - GoogleDataTransport (7.5.1):
- nanopb (~> 1.30906.0) - nanopb (~> 1.30906.0)
- GoogleUtilities/AppDelegateSwizzler (6.7.2): - GoogleUtilities/AppDelegateSwizzler (6.7.2):
...@@ -140,8 +115,6 @@ PODS: ...@@ -140,8 +115,6 @@ PODS:
- PromisesObjC (~> 1.2) - PromisesObjC (~> 1.2)
- GoogleUtilities/Logger (6.7.2): - GoogleUtilities/Logger (6.7.2):
- GoogleUtilities/Environment - GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (6.7.2):
- GoogleUtilities/Logger
- GoogleUtilities/Network (6.7.2): - GoogleUtilities/Network (6.7.2):
- GoogleUtilities/Logger - GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib" - "GoogleUtilities/NSData+zlib"
...@@ -151,7 +124,6 @@ PODS: ...@@ -151,7 +124,6 @@ PODS:
- GoogleUtilities/Logger - GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (6.7.2): - GoogleUtilities/UserDefaults (6.7.2):
- GoogleUtilities/Logger - GoogleUtilities/Logger
- GTMSessionFetcher/Core (1.5.0)
- nanopb (1.30906.0): - nanopb (1.30906.0):
- nanopb/decode (= 1.30906.0) - nanopb/decode (= 1.30906.0)
- nanopb/encode (= 1.30906.0) - nanopb/encode (= 1.30906.0)
...@@ -159,7 +131,7 @@ PODS: ...@@ -159,7 +131,7 @@ PODS:
- nanopb/encode (1.30906.0) - nanopb/encode (1.30906.0)
- OpenSSL-Universal (1.1.180) - OpenSSL-Universal (1.1.180)
- PromisesObjC (1.2.12) - PromisesObjC (1.2.12)
- Protobuf (3.14.0) - Protobuf (3.15.8)
- RCTRequired (0.62.2) - RCTRequired (0.62.2)
- RCTTypeSafety (0.62.2): - RCTTypeSafety (0.62.2):
- FBLazyVector (= 0.62.2) - FBLazyVector (= 0.62.2)
...@@ -397,15 +369,13 @@ PODS: ...@@ -397,15 +369,13 @@ PODS:
- React-Core - React-Core
- RNCMaskedView (0.1.10): - RNCMaskedView (0.1.10):
- React - React
- RNFirebase (5.6.0): - RNFBApp (7.3.1):
- Firebase/Core - Firebase/CoreOnly (~> 6.25.0)
- React
- RNFirebase/Crashlytics (= 5.6.0)
- RNFirebase/Crashlytics (5.6.0):
- Crashlytics
- Fabric
- Firebase/Core
- React - React
- RNFBMessaging (7.9.2):
- Firebase/Messaging (~> 6.25.0)
- React-Core
- RNFBApp
- RNGestureHandler (1.10.3): - RNGestureHandler (1.10.3):
- React-Core - React-Core
- RNImageCropPicker (0.36.0): - RNImageCropPicker (0.36.0):
...@@ -434,9 +404,6 @@ DEPENDENCIES: ...@@ -434,9 +404,6 @@ DEPENDENCIES:
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
- FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`) - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
- Firebase/Auth
- Firebase/Core
- Firebase/Messaging
- Flipper (~> 0.33.1) - Flipper (~> 0.33.1)
- Flipper-DoubleConversion (= 1.1.7) - Flipper-DoubleConversion (= 1.1.7)
- Flipper-Folly (~> 2.1) - Flipper-Folly (~> 2.1)
...@@ -487,7 +454,8 @@ DEPENDENCIES: ...@@ -487,7 +454,8 @@ DEPENDENCIES:
- "RNCCheckbox (from `../node_modules/@react-native-community/checkbox`)" - "RNCCheckbox (from `../node_modules/@react-native-community/checkbox`)"
- "RNCClipboard (from `../node_modules/@react-native-clipboard/clipboard`)" - "RNCClipboard (from `../node_modules/@react-native-clipboard/clipboard`)"
- "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)" - "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)"
- RNFirebase (from `../node_modules/react-native-firebase/ios`) - "RNFBApp (from `../node_modules/@react-native-firebase/app`)"
- "RNFBMessaging (from `../node_modules/@react-native-firebase/messaging`)"
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`) - RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
- RNImageCropPicker (from `../node_modules/react-native-image-crop-picker`) - RNImageCropPicker (from `../node_modules/react-native-image-crop-picker`)
- RNReanimated (from `../node_modules/react-native-reanimated`) - RNReanimated (from `../node_modules/react-native-reanimated`)
...@@ -500,13 +468,11 @@ SPEC REPOS: ...@@ -500,13 +468,11 @@ SPEC REPOS:
- boost-for-react-native - boost-for-react-native
- CocoaAsyncSocket - CocoaAsyncSocket
- CocoaLibEvent - CocoaLibEvent
- Crashlytics
- Fabric
- Firebase - Firebase
- FirebaseAnalytics - FirebaseAnalyticsInterop
- FirebaseAuth
- FirebaseCore - FirebaseCore
- FirebaseCoreDiagnostics - FirebaseCoreDiagnostics
- FirebaseCoreDiagnosticsInterop
- FirebaseInstallations - FirebaseInstallations
- FirebaseInstanceID - FirebaseInstanceID
- FirebaseMessaging - FirebaseMessaging
...@@ -517,10 +483,8 @@ SPEC REPOS: ...@@ -517,10 +483,8 @@ SPEC REPOS:
- Flipper-PeerTalk - Flipper-PeerTalk
- Flipper-RSocket - Flipper-RSocket
- FlipperKit - FlipperKit
- GoogleAppMeasurement
- GoogleDataTransport - GoogleDataTransport
- GoogleUtilities - GoogleUtilities
- GTMSessionFetcher
- nanopb - nanopb
- OpenSSL-Universal - OpenSSL-Universal
- PromisesObjC - PromisesObjC
...@@ -594,8 +558,10 @@ EXTERNAL SOURCES: ...@@ -594,8 +558,10 @@ EXTERNAL SOURCES:
:path: "../node_modules/@react-native-clipboard/clipboard" :path: "../node_modules/@react-native-clipboard/clipboard"
RNCMaskedView: RNCMaskedView:
:path: "../node_modules/@react-native-community/masked-view" :path: "../node_modules/@react-native-community/masked-view"
RNFirebase: RNFBApp:
:path: "../node_modules/react-native-firebase/ios" :path: "../node_modules/@react-native-firebase/app"
RNFBMessaging:
:path: "../node_modules/@react-native-firebase/messaging"
RNGestureHandler: RNGestureHandler:
:path: "../node_modules/react-native-gesture-handler" :path: "../node_modules/react-native-gesture-handler"
RNImageCropPicker: RNImageCropPicker:
...@@ -614,19 +580,17 @@ SPEC CHECKSUMS: ...@@ -614,19 +580,17 @@ SPEC CHECKSUMS:
BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872 BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f
Crashlytics: 9220f5bc89e7a618df411b4f639389dbfb0e03d2
DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2 DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
Fabric: ea977e3cd9c20425516d3dafd3bf8c941c51223f
FBLazyVector: 4aab18c93cd9546e4bfed752b4084585eca8b245 FBLazyVector: 4aab18c93cd9546e4bfed752b4084585eca8b245
FBReactNativeSpec: 5465d51ccfeecb7faa12f9ae0024f2044ce4044e FBReactNativeSpec: 5465d51ccfeecb7faa12f9ae0024f2044ce4044e
Firebase: c23a36d9e4cdf7877dfcba8dd0c58add66358999 Firebase: 5719b4f965f76643241a1bb8244483ff6117db39
FirebaseAnalytics: 3bb096873ee0d7fa4b6c70f5e9166b6da413cc7f FirebaseAnalyticsInterop: 3f86269c38ae41f47afeb43ebf32a001f58fcdae
FirebaseAuth: c92d49ada7948d1a23466e3db17bc4c2039dddc3 FirebaseCore: 6023faeada5afa95a349fccafb40900e32e9ac42
FirebaseCore: d3a978a3cfa3240bf7e4ba7d137fdf5b22b628ec
FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1 FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1
FirebaseInstallations: 466c7b4d1f58fe16707693091da253726a731ed2 FirebaseCoreDiagnosticsInterop: 296e2c5f5314500a850ad0b83e9e7c10b011a850
FirebaseInstanceID: bd3ffc24367f901a43c063b36c640b345a4a5dd1 FirebaseInstallations: 6f5f680e65dc374397a483c32d1799ba822a395b
FirebaseMessaging: 5eca4ef173de76253352511aafef774caa1cba2a FirebaseInstanceID: cef67c4967c7cecb56ea65d8acbb4834825c587b
FirebaseMessaging: 29543feb343b09546ab3aa04d008ee8595b43c44
Flipper: 6c1f484f9a88d30ab3e272800d53688439e50f69 Flipper: 6c1f484f9a88d30ab3e272800d53688439e50f69
Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41 Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41
Flipper-Folly: ac90e2debaad40c347b90058feb263a80a3ba657 Flipper-Folly: ac90e2debaad40c347b90058feb263a80a3ba657
...@@ -636,14 +600,12 @@ SPEC CHECKSUMS: ...@@ -636,14 +600,12 @@ SPEC CHECKSUMS:
FlipperKit: 6dc9b8f4ef60d9e5ded7f0264db299c91f18832e FlipperKit: 6dc9b8f4ef60d9e5ded7f0264db299c91f18832e
Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51 Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
glog: 1f3da668190260b06b429bb211bfbee5cd790c28 glog: 1f3da668190260b06b429bb211bfbee5cd790c28
GoogleAppMeasurement: a6a3a066369828db64eda428cb2856dc1cdc7c4e
GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833 GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833
GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3 GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3
GTMSessionFetcher: b3503b20a988c4e20cc189aa798fd18220133f52
nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc
OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b
PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97 PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97
Protobuf: 0cde852566359049847168e51bd1c690e0f70056 Protobuf: adb85cd18a15bd1a777c158af9fd6e612a0e6d69
RCTRequired: cec6a34b3ac8a9915c37e7e4ad3aa74726ce4035 RCTRequired: cec6a34b3ac8a9915c37e7e4ad3aa74726ce4035
RCTTypeSafety: 93006131180074cffa227a1075802c89a49dd4ce RCTTypeSafety: 93006131180074cffa227a1075802c89a49dd4ce
RCTYouTube: 4509d59a7de050dd0c7c6cb1f427d37678d63b5c RCTYouTube: 4509d59a7de050dd0c7c6cb1f427d37678d63b5c
...@@ -670,7 +632,8 @@ SPEC CHECKSUMS: ...@@ -670,7 +632,8 @@ SPEC CHECKSUMS:
RNCCheckbox: d1749e6a92178ce5dbc31e63becd1f34f0c76bbd RNCCheckbox: d1749e6a92178ce5dbc31e63becd1f34f0c76bbd
RNCClipboard: 245417a78ab585e0d4d83926c28907e7b2bc24bd RNCClipboard: 245417a78ab585e0d4d83926c28907e7b2bc24bd
RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f
RNFirebase: 37daa9a346d070f9f6ee1f3b4aaf4c8e3b1d5d1c RNFBApp: cd70a6c061bc485994e28c7d58ab760538850f0e
RNFBMessaging: c32b623b46dbbabf19079f801f053be75f428398
RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211 RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211
RNImageCropPicker: e641bf83ac47324994cac139bde74635ec52c17c RNImageCropPicker: e641bf83ac47324994cac139bde74635ec52c17c
RNReanimated: e03f7425cb7a38dcf1b644d680d1bfc91c3337ad RNReanimated: e03f7425cb7a38dcf1b644d680d1bfc91c3337ad
...@@ -681,6 +644,6 @@ SPEC CHECKSUMS: ...@@ -681,6 +644,6 @@ SPEC CHECKSUMS:
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
YoutubePlayer-in-WKWebView: cfbf46da51d7370662a695a8f351e5fa1d3e1008 YoutubePlayer-in-WKWebView: cfbf46da51d7370662a695a8f351e5fa1d3e1008
PODFILE CHECKSUM: f02917090f1c2c208cddccf3054d7b56a8888192 PODFILE CHECKSUM: 0aed8e9b9bcc932aca0489409733bbdf33d0b8bc
COCOAPODS: 1.10.1 COCOAPODS: 1.10.1
...@@ -8,17 +8,55 @@ import {SkypeIndicator} from 'react-native-indicators'; ...@@ -8,17 +8,55 @@ import {SkypeIndicator} from 'react-native-indicators';
import {HEIGHT, HEIGHTXD} from './Config/Functions'; import {HEIGHT, HEIGHTXD} from './Config/Functions';
import R from './assets/R'; import R from './assets/R';
import FirebaseNotification from './helper/FirebaseNotification'; import FirebaseNotification from './helper/FirebaseNotification';
import messaging from '@react-native-firebase/messaging';
import {enableScreens} from 'react-native-screens'; import {enableScreens} from 'react-native-screens';
import AsyncStorage from "@react-native-community/async-storage";
import KEY from "./assets/AsynStorage";
import firebase from "@react-native-firebase/app";
enableScreens(); enableScreens();
const RootView = (props) => { const RootView = (props) => {
messaging().setBackgroundMessageHandler(async remoteMessage => {
console.log('Message handled in the background!', remoteMessage);
});
useEffect(() => {
requestUserPermission();
const unsubscribe = messaging().onMessage(async remoteMessage => {
console.log('A new FCM message arrived!', remoteMessage);
});
return unsubscribe;
}, []);
const requestUserPermission = async () => {
const authStatus = await messaging().requestPermission();
const enabled =
authStatus === messaging.AuthorizationStatus.AUTHORIZED ||
authStatus === messaging.AuthorizationStatus.PROVISIONAL;
if (enabled) {
getFcmToken()
console.log('Authorization status:', authStatus);
}
}
const getFcmToken = async () => {
let fcmToken = await AsyncStorage.getItem(KEY.FIREBASE);
console.log('Dat tao', fcmToken);
if (!fcmToken) {
fcmToken = await messaging().getToken();
console.log('Vua tao', fcmToken);
if (fcmToken) {
AsyncStorage.setItem(KEY.FIREBASE, fcmToken);
}
}
}
onReceived = (notification) => {}; onReceived = (notification) => {};
onOpened = (notification) => { onOpened = (notification) => {
console.log(('notification', notification)); console.log(('notification', notification));
}; };
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<FirebaseNotification onReceived={onReceived} onOpened={onOpened} /> {/*<FirebaseNotification onReceived={onReceived} onOpened={onOpened} />*/}
<Modal isVisible={props.loadingModal.isVisible}> <Modal isVisible={props.loadingModal.isVisible}>
<SkypeIndicator color={'white'} /> <SkypeIndicator color={'white'} />
</Modal> </Modal>
......
/* eslint-disable no-console */ /* eslint-disable no-console */
import React from 'react'; import React from 'react';
import {Platform, View, Alert} from 'react-native'; import {Platform, View, Alert} from 'react-native';
import firebase from 'react-native-firebase'; import firebase from '@react-native-firebase/app';
import {Notification} from 'react-native-firebase';
import sampleaudio from '../../sampleaudio.mp3'; import sampleaudio from '../../sampleaudio.mp3';
import AsyncStorage from '@react-native-community/async-storage'; import AsyncStorage from '@react-native-community/async-storage';
import KEY from '../assets/AsynStorage'; import KEY from '../assets/AsynStorage';
......
...@@ -1199,6 +1199,25 @@ ...@@ -1199,6 +1199,25 @@
resolved "https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.10.tgz" resolved "https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.10.tgz"
integrity sha512-rk4sWFsmtOw8oyx8SD3KSvawwaK7gRBSEIy2TAwURyGt+3TizssXP1r8nx3zY+R7v2vYYHXZ+k2/GULAT/bcaQ== integrity sha512-rk4sWFsmtOw8oyx8SD3KSvawwaK7gRBSEIy2TAwURyGt+3TizssXP1r8nx3zY+R7v2vYYHXZ+k2/GULAT/bcaQ==
"@react-native-firebase/app-types@6.7.2":
version "6.7.2"
resolved "https://registry.yarnpkg.com/@react-native-firebase/app-types/-/app-types-6.7.2.tgz#d2e1530af5702e00578914b41468898c10d3289c"
integrity sha512-pIwc6e0ZINw6PJqNVsAxzOVJUDg6au2TdulY+ZOYQ11SPDs5I2n9likoGrElPmJjajT4s9h87uz/6PWP2k9PxQ==
"@react-native-firebase/app@^7.1.0":
version "7.3.1"
resolved "https://registry.yarnpkg.com/@react-native-firebase/app/-/app-7.3.1.tgz#432a93cae79295df7e881437029a5eeb522a1b79"
integrity sha512-pQM4YnPRl1PaXqdFEfJSSCB5ETM303Rwucy015K1YKANtcB4r5VlXYgVHOx7BesXMxOjkzYfXH8WLtnC8PD/Xw==
dependencies:
"@react-native-firebase/app-types" "6.7.2"
opencollective-postinstall "^2.0.1"
superstruct "^0.6.2"
"@react-native-firebase/messaging@^7.1.0":
version "7.9.2"
resolved "https://registry.yarnpkg.com/@react-native-firebase/messaging/-/messaging-7.9.2.tgz#f5946ce0da4c1454df4701de7284d52a4ccc8d5b"
integrity sha512-xK9oRkQAxJ5+9e3W9EUnxqhecA2iwZb4OCYPWyO5BzldIMa1B4UdYLHDHU8oYpgsefqS51bPDdczC0yn+/8RTA==
"@react-navigation/bottom-tabs@^5.11.7": "@react-navigation/bottom-tabs@^5.11.7":
version "5.11.8" version "5.11.8"
resolved "https://registry.yarnpkg.com/@react-navigation/bottom-tabs/-/bottom-tabs-5.11.8.tgz" resolved "https://registry.yarnpkg.com/@react-navigation/bottom-tabs/-/bottom-tabs-5.11.8.tgz"
...@@ -2257,6 +2276,16 @@ cliui@^7.0.2: ...@@ -2257,6 +2276,16 @@ cliui@^7.0.2:
strip-ansi "^6.0.0" strip-ansi "^6.0.0"
wrap-ansi "^7.0.0" wrap-ansi "^7.0.0"
clone-deep@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-2.0.2.tgz#00db3a1e173656730d1188c3d6aced6d7ea97713"
integrity sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==
dependencies:
for-own "^1.0.0"
is-plain-object "^2.0.4"
kind-of "^6.0.0"
shallow-clone "^1.0.0"
clone@^1.0.2: clone@^1.0.2:
version "1.0.4" version "1.0.4"
resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e"
...@@ -3340,11 +3369,23 @@ follow-redirects@^1.10.0: ...@@ -3340,11 +3369,23 @@ follow-redirects@^1.10.0:
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.3.tgz" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.3.tgz"
integrity sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA== integrity sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA==
for-in@^1.0.2: for-in@^0.1.3:
version "0.1.8"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.8.tgz#d8773908e31256109952b1fdb9b3fa867d2775e1"
integrity sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=
for-in@^1.0.1, for-in@^1.0.2:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz"
integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=
for-own@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b"
integrity sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=
dependencies:
for-in "^1.0.1"
forever-agent@~0.6.1: forever-agent@~0.6.1:
version "0.6.1" version "0.6.1"
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz"
...@@ -4706,7 +4747,7 @@ kind-of@^5.0.0: ...@@ -4706,7 +4747,7 @@ kind-of@^5.0.0:
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz"
integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==
kind-of@^6.0.0, kind-of@^6.0.2: kind-of@^6.0.0, kind-of@^6.0.1, kind-of@^6.0.2:
version "6.0.3" version "6.0.3"
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz"
integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==
...@@ -5370,6 +5411,14 @@ mixin-deep@^1.2.0: ...@@ -5370,6 +5411,14 @@ mixin-deep@^1.2.0:
for-in "^1.0.2" for-in "^1.0.2"
is-extendable "^1.0.1" is-extendable "^1.0.1"
mixin-object@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/mixin-object/-/mixin-object-2.0.1.tgz#4fb949441dab182540f1fe035ba60e1947a5e57e"
integrity sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=
dependencies:
for-in "^0.1.3"
is-extendable "^0.1.1"
mkdirp@^0.5.1: mkdirp@^0.5.1:
version "0.5.5" version "0.5.5"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz"
...@@ -5673,9 +5722,9 @@ open@^6.2.0: ...@@ -5673,9 +5722,9 @@ open@^6.2.0:
dependencies: dependencies:
is-wsl "^1.1.0" is-wsl "^1.1.0"
opencollective-postinstall@^2.0.0: opencollective-postinstall@^2.0.1:
version "2.0.3" version "2.0.3"
resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz" resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259"
integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q== integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==
optionator@^0.8.1: optionator@^0.8.1:
...@@ -6067,14 +6116,6 @@ react-native-datepicker@^1.7.2: ...@@ -6067,14 +6116,6 @@ react-native-datepicker@^1.7.2:
dependencies: dependencies:
moment "^2.22.0" moment "^2.22.0"
react-native-firebase@^5.6.0:
version "5.6.0"
resolved "https://registry.yarnpkg.com/react-native-firebase/-/react-native-firebase-5.6.0.tgz"
integrity sha512-I+o3zNLdIz4pxWTCSZH70M1BcPl+SdqKQfurOT0sWcaMSL2ecDqVy0PCTmN7ORt7/Z879Er6PLgA/psjArQlmw==
dependencies:
opencollective-postinstall "^2.0.0"
prop-types "^15.7.2"
react-native-gesture-handler@^1.9.0: react-native-gesture-handler@^1.9.0:
version "1.10.3" version "1.10.3"
resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.10.3.tgz" resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.10.3.tgz"
...@@ -6674,6 +6715,15 @@ sha256@^0.2.0: ...@@ -6674,6 +6715,15 @@ sha256@^0.2.0:
convert-hex "~0.1.0" convert-hex "~0.1.0"
convert-string "~0.1.0" convert-string "~0.1.0"
shallow-clone@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-1.0.0.tgz#4480cd06e882ef68b2ad88a3ea54832e2c48b571"
integrity sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==
dependencies:
is-extendable "^0.1.1"
kind-of "^5.0.0"
mixin-object "^2.0.1"
shebang-command@^1.2.0: shebang-command@^1.2.0:
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz"
...@@ -7078,6 +7128,14 @@ sudo-prompt@^9.0.0: ...@@ -7078,6 +7128,14 @@ sudo-prompt@^9.0.0:
resolved "https://registry.yarnpkg.com/sudo-prompt/-/sudo-prompt-9.2.1.tgz" resolved "https://registry.yarnpkg.com/sudo-prompt/-/sudo-prompt-9.2.1.tgz"
integrity sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw== integrity sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw==
superstruct@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.6.2.tgz#c5eb034806a17ff98d036674169ef85e4c7f6a1c"
integrity sha512-lvA97MFAJng3rfjcafT/zGTSWm6Tbpk++DP6It4Qg7oNaeM+2tdJMuVgGje21/bIpBEs6iQql1PJH6dKTjl4Ig==
dependencies:
clone-deep "^2.0.1"
kind-of "^6.0.1"
supports-color@^5.3.0: supports-color@^5.3.0:
version "5.5.0" version "5.5.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment