diff --git a/app/utils/analytics.ts b/app/utils/analytics.ts index bf5b13821..16600596b 100644 --- a/app/utils/analytics.ts +++ b/app/utils/analytics.ts @@ -1,5 +1,4 @@ import crypto from "crypto" -import { AppEventsLogger } from "react-native-fbsdk" import { logError } from "./error" import { setSentryUser, @@ -51,24 +50,18 @@ function filterPayloadByLimit(payload) { } export async function updateAnalyticsUser({ - email, authCoreUserId, userPIISalt, }: UserIdPayload) { - /* eslint-disable @typescript-eslint/camelcase */ - AppEventsLogger.setUserID(hashUserId(authCoreUserId, userPIISalt)) - AppEventsLogger.setUserData({ email }) await Promise.all([ setSentryUser({ id: hashUserId(authCoreUserId, userPIISalt) }), setCrashlyticsUserId(hashUserId(authCoreUserId, userPIISalt)), setAnalyticsUserId(hashUserId(authCoreUserId, userPIISalt)), ]) - /* eslint-enable @typescript-eslint/camelcase */ } export async function logoutAnalyticsUser() { await Promise.all([ - AppEventsLogger.setUserID(null), resetAnalyticsUser(), resetSentryUser(), resetCrashlyticsUserId(), @@ -120,7 +113,6 @@ export async function logAnalyticsEvent(event: string, payload?: any) { break } } - AppEventsLogger.logEvent(filterKeyLimit(eventCamel)) /* eslint-enable @typescript-eslint/camelcase */ } catch (err) { logError(err) diff --git a/ios/LikeCoinApp.xcodeproj/project.pbxproj b/ios/LikeCoinApp.xcodeproj/project.pbxproj index e5dc79d82..bb6d5002e 100644 --- a/ios/LikeCoinApp.xcodeproj/project.pbxproj +++ b/ios/LikeCoinApp.xcodeproj/project.pbxproj @@ -208,7 +208,6 @@ 3D2512B725CD2D4100DE881D /* Copy Google plist */, C76FA05B0208092CE895C07A /* [CP-User] [RNFB] Core Configuration */, CA245B537CEDD94F185A0102 /* [CP-User] [RNFB] Crashlytics Configuration */, - 512FB86A807CF2F0E223B7FC /* [CP] Copy Pods Resources */, 83FE4EA924064FE50073E6EA /* Embed App Extensions */, ); buildRules = ( @@ -230,7 +229,6 @@ 83FE4E9A24064FE50073E6EA /* Frameworks */, 83FE4E9B24064FE50073E6EA /* Resources */, 83FE4EB0240C0ABA0073E6EA /* Bundle React Native code and images */, - 127AFA9F1F2CAC72968EAAED /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -347,24 +345,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; }; - 127AFA9F1F2CAC72968EAAED /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-LikeCoinApp-LikerLandShare/Pods-LikeCoinApp-LikerLandShare-resources.sh", - "${PODS_ROOT}/FBSDKCoreKit/FacebookSDKStrings.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FacebookSDKStrings.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-LikeCoinApp-LikerLandShare/Pods-LikeCoinApp-LikerLandShare-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; 3D2512B725CD2D4100DE881D /* Copy Google plist */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -383,24 +363,6 @@ shellPath = /bin/sh; shellScript = "# Name of the resource we're selectively copying\nGOOGLESERVICE_INFO_PLIST=GoogleService-Info.plist\n\n# Get references to dev and prod versions of the GoogleService-Info.plist\n# NOTE: These should only live on the file system and should NOT be part of the target (since we'll be adding them to the target manually)\nGOOGLESERVICE_INFO_DEV=${PROJECT_DIR}/Debug/${GOOGLESERVICE_INFO_PLIST}\nGOOGLESERVICE_INFO_PROD=${PROJECT_DIR}/Release/${GOOGLESERVICE_INFO_PLIST}\n\n# Make sure the dev version of GoogleService-Info.plist exists\necho \"Looking for ${GOOGLESERVICE_INFO_PLIST} in ${GOOGLESERVICE_INFO_DEV}\"\nif [ ! -f $GOOGLESERVICE_INFO_DEV ]\nthen\n echo \"No Development GoogleService-Info.plist found. Please ensure it's in the proper directory.\"\n exit 1\nfi\n\n# Make sure the prod version of GoogleService-Info.plist exists\necho \"Looking for ${GOOGLESERVICE_INFO_PLIST} in ${GOOGLESERVICE_INFO_PROD}\"\nif [ ! -f $GOOGLESERVICE_INFO_PROD ]\nthen\n echo \"No Production GoogleService-Info.plist found. Please ensure it's in the proper directory.\"\n exit 1\nfi\n\n# Get a reference to the destination location for the GoogleService-Info.plist\nPLIST_DESTINATION=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app\necho \"Will copy ${GOOGLESERVICE_INFO_PLIST} to final destination: ${PLIST_DESTINATION}\"\n\n# Copy over the prod GoogleService-Info.plist for Release builds\nif [ \"${CONFIGURATION}\" == \"Release\" ]\nthen\n echo \"Using ${GOOGLESERVICE_INFO_PROD}\"\n cp \"${GOOGLESERVICE_INFO_PROD}\" \"${PLIST_DESTINATION}\"\nelse\n echo \"Using ${GOOGLESERVICE_INFO_DEV}\"\n cp \"${GOOGLESERVICE_INFO_DEV}\" \"${PLIST_DESTINATION}\"\nfi\n"; }; - 512FB86A807CF2F0E223B7FC /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-LikeCoinApp/Pods-LikeCoinApp-resources.sh", - "${PODS_ROOT}/FBSDKCoreKit/FacebookSDKStrings.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FacebookSDKStrings.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-LikeCoinApp/Pods-LikeCoinApp-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; 83FE4EB0240C0ABA0073E6EA /* Bundle React Native code and images */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/ios/LikeCoinApp/AppDelegate.m b/ios/LikeCoinApp/AppDelegate.m index e58f62860..db48e4cbc 100644 --- a/ios/LikeCoinApp/AppDelegate.m +++ b/ios/LikeCoinApp/AppDelegate.m @@ -12,7 +12,6 @@ #import #import #import -#import #import @import Firebase; @@ -47,8 +46,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:filePath]; [FIRApp configureWithOptions:options]; } - [[FBSDKApplicationDelegate sharedInstance] application:application - didFinishLaunchingWithOptions:launchOptions]; + #ifdef DEBUG [RNBranch useTestInstance]; #endif @@ -68,13 +66,7 @@ - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge - (BOOL)application:(UIApplication *)application openURL:(nonnull NSURL *)url options:(nonnull NSDictionary *)options { return [RNBranch.branch application:application openURL:url options:options] - || [[FBSDKApplicationDelegate sharedInstance] application:application - openURL:url - sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey] - annotation:options[UIApplicationOpenURLOptionsAnnotationKey] - ] || [RCTLinkingManager application:application - openURL:url - options:options]; + || [RCTLinkingManager application:application openURL:url options:options]; } - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray> * _Nullable))restorationHandler { diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 7e57ca618..a6938c877 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -6,20 +6,6 @@ PODS: - BVLinearGradient (2.5.6): - React - DoubleConversion (1.1.6) - - FBSDKCoreKit (5.8.0): - - FBSDKCoreKit/Basics (= 5.8.0) - - FBSDKCoreKit/Core (= 5.8.0) - - FBSDKCoreKit/Basics (5.8.0) - - FBSDKCoreKit/Core (5.8.0): - - FBSDKCoreKit/Basics - - FBSDKLoginKit (5.8.0): - - FBSDKLoginKit/Login (= 5.8.0) - - FBSDKLoginKit/Login (5.8.0): - - FBSDKCoreKit (~> 5.0) - - FBSDKShareKit (5.8.0): - - FBSDKShareKit/Share (= 5.8.0) - - FBSDKShareKit/Share (5.8.0): - - FBSDKCoreKit (~> 5.0) - Firebase/Analytics (7.1.0): - Firebase/Core - Firebase/Core (7.1.0): @@ -208,20 +194,6 @@ PODS: - React - react-native-camera/RN (3.8.0): - React - - react-native-fbsdk (1.1.2): - - React - - react-native-fbsdk/Core (= 1.1.2) - - react-native-fbsdk/Login (= 1.1.2) - - react-native-fbsdk/Share (= 1.1.2) - - react-native-fbsdk/Core (1.1.2): - - FBSDKCoreKit (= 5.8) - - React - - react-native-fbsdk/Login (1.1.2): - - FBSDKLoginKit (= 5.8) - - React - - react-native-fbsdk/Share (1.1.2): - - FBSDKShareKit (= 5.8) - - React - react-native-image-picker (4.8.1): - React-Core - react-native-image-sequence (0.7.0): @@ -342,7 +314,6 @@ DEPENDENCIES: - react-native-authcore (from `../node_modules/react-native-authcore`) - react-native-branch (from `../node_modules/react-native-branch`) - react-native-camera (from `../node_modules/react-native-camera`) - - react-native-fbsdk (from `../node_modules/react-native-fbsdk`) - react-native-image-picker (from `../node_modules/react-native-image-picker`) - react-native-image-sequence (from `../node_modules/react-native-image-sequence`) - react-native-randombytes (from `../node_modules/react-native-randombytes`) @@ -387,9 +358,6 @@ SPEC REPOS: trunk: - boost-for-react-native - Branch - - FBSDKCoreKit - - FBSDKLoginKit - - FBSDKShareKit - Firebase - FirebaseABTesting - FirebaseAnalytics @@ -442,8 +410,6 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native-branch" react-native-camera: :path: "../node_modules/react-native-camera" - react-native-fbsdk: - :path: "../node_modules/react-native-fbsdk" react-native-image-picker: :path: "../node_modules/react-native-image-picker" react-native-image-sequence: @@ -528,9 +494,6 @@ SPEC CHECKSUMS: Branch: 9b299693ee54b308ff8c18146afe1f711c2069ec BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872 DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2 - FBSDKCoreKit: e7dcac0aabcfb09d0166998edd95fe3b05a0ce5d - FBSDKLoginKit: 1b0cf04df0370b37404213157b060d6666ede814 - FBSDKShareKit: abc29e1bb4f9f59f679adf1ae191006d68455f96 Firebase: 78e8dd2e39d653de6270432ad84fe8b59f7bf4e8 FirebaseABTesting: f6853447dc61fa785df777748747c845f40fa7cd FirebaseAnalytics: 7f165a56dea86ddd5b8ce02af3bee982c683405c @@ -562,7 +525,6 @@ SPEC CHECKSUMS: react-native-authcore: cca08325158d4979caff295a8cd064733b78264f react-native-branch: a15b8ecb55c08139e06e7ea15bcadabc81a51e64 react-native-camera: 21cf4ed26cf432ceb1fae959aa6924943fd6f714 - react-native-fbsdk: c35d42169e64aaf66f01713c1e18d0674f7f6519 react-native-image-picker: 5640333245b448b0e64172576ea27760f4134099 react-native-image-sequence: b4cc7ce0ee9eeec7574b005e06059b3f7f818d96 react-native-randombytes: 3638d24759d67c68f6ccba60c52a7a8a8faa6a23 diff --git a/package.json b/package.json index 35ded9d32..e65a32f54 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,6 @@ "react-native-device-info": "^5.6.1", "react-native-exit-app": "^1.1.0", "react-native-fast-image": "^8.3.2", - "react-native-fbsdk": "^1.1.2", "react-native-gesture-handler": "1.7.0", "react-native-iap": "^7.5.6", "react-native-image-picker": "https://github.com/likecoin/react-native-image-picker#5e2f78f5e3f893b13a67482471655e1ebb75ad3b", diff --git a/yarn.lock b/yarn.lock index a921df01e..542ba3e56 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13116,11 +13116,6 @@ react-native-fast-image@^8.3.2: resolved "https://registry.yarnpkg.com/react-native-fast-image/-/react-native-fast-image-8.3.2.tgz#e9db271b70b9634b7be054760914d80954f9898c" integrity sha512-AJ0b4BEswRwa0bh4SibYUtXszEiaO88Lf4CZ1ib+t5ZfkAgsMk9Liv3L0LYnDblMJmSeGTr1+2ViIM8F2vamjg== -react-native-fbsdk@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/react-native-fbsdk/-/react-native-fbsdk-1.1.2.tgz#4264903add869d05b84ef55ade9ff720c2957781" - integrity sha512-Sp+oja868QVsB5vpEFbwZkEcCJOSBuZgh7UGJzUhaoTCs/zwSUHA6b4QichM7GiTxtQyKfT/F31DtvLj2N/qAQ== - react-native-flipper@^0.34.0: version "0.34.0" resolved "https://registry.yarnpkg.com/react-native-flipper/-/react-native-flipper-0.34.0.tgz#7df1f38ba5d97a9321125fe0fccbe47d99e6fa1d"