From 3f08a49e2846bff9f68cab030c119e02bfe6a5f6 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Thu, 22 Jul 2021 10:53:28 -1000 Subject: [PATCH] Add flipper performance plugin Use hermes use number format for iOS too undo changes undo some changes undo flipper stuff undo other changes undo report.js changes --- ios/ExpensifyCash.xcodeproj/project.pbxproj | 6 ++ ios/Podfile | 12 ++-- ios/Podfile.lock | 59 +++++++++++++------ .../{index.android.js => index.native.js} | 0 4 files changed, 54 insertions(+), 23 deletions(-) rename src/libs/numberFormat/{index.android.js => index.native.js} (100%) diff --git a/ios/ExpensifyCash.xcodeproj/project.pbxproj b/ios/ExpensifyCash.xcodeproj/project.pbxproj index eb03211ebd4..18e0eafb0d1 100644 --- a/ios/ExpensifyCash.xcodeproj/project.pbxproj +++ b/ios/ExpensifyCash.xcodeproj/project.pbxproj @@ -527,12 +527,14 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-ExpensifyCash/Pods-ExpensifyCash-frameworks.sh", + "${PODS_ROOT}/hermes-engine/destroot/Library/Frameworks/iphoneos/hermes.framework", "${PODS_XCFRAMEWORKS_BUILD_DIR}/Onfido/Onfido.framework/Onfido", "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL/OpenSSL.framework/OpenSSL", "${PODS_XCFRAMEWORKS_BUILD_DIR}/LinkKit/LinkKit.framework/LinkKit", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Onfido.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/LinkKit.framework", @@ -712,12 +714,14 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-ExpensifyCash-ExpensifyCashTests/Pods-ExpensifyCash-ExpensifyCashTests-frameworks.sh", + "${PODS_ROOT}/hermes-engine/destroot/Library/Frameworks/iphoneos/hermes.framework", "${PODS_XCFRAMEWORKS_BUILD_DIR}/Onfido/Onfido.framework/Onfido", "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL/OpenSSL.framework/OpenSSL", "${PODS_XCFRAMEWORKS_BUILD_DIR}/LinkKit/LinkKit.framework/LinkKit", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Onfido.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/LinkKit.framework", @@ -926,6 +930,7 @@ COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 i386"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -986,6 +991,7 @@ COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 i386"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; diff --git a/ios/Podfile b/ios/Podfile index 78bd8b4ce64..f0fff9d30d9 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -14,7 +14,10 @@ target 'ExpensifyCash' do pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse" config = use_native_modules! - use_react_native!(:path => config["reactNativePath"]) + use_react_native!( + :path => config["reactNativePath"], + :hermes_enabled => true + ) target 'ExpensifyCashTests' do inherit! :complete @@ -24,10 +27,11 @@ target 'ExpensifyCash' do # Enables Flipper. # # Note that if you have use_frameworks! enabled, Flipper will not work and - # you should disable these next few lines. - use_flipper!('Flipper' => '0.75.1', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1') + # you should disable the next line. + use_flipper!() + post_install do |installer| - flipper_post_install(installer) + react_native_post_install(installer) installer.pods_project.build_configurations.each do |config| config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 3f4e4773ee9..3be3a461ff5 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -177,6 +177,7 @@ PODS: - GoogleUtilities/Logger - GoogleUtilities/UserDefaults (7.5.0): - GoogleUtilities/Logger + - hermes-engine (0.7.2) - libevent (2.1.12) - nanopb (2.30908.0): - nanopb/decode (= 2.30908.0) @@ -194,7 +195,7 @@ PODS: - RNPermissions - Permission-LocationWhenInUse (3.0.1): - RNPermissions - - Plaid (2.1.2) + - Plaid (2.1.3) - PromisesObjC (2.0.0) - Protobuf (3.17.0) - RCT-Folly (2020.01.13.00): @@ -206,6 +207,11 @@ PODS: - boost-for-react-native - DoubleConversion - glog + - RCT-Folly/Futures (2020.01.13.00): + - boost-for-react-native + - DoubleConversion + - glog + - libevent - RCTRequired (0.64.1) - RCTTypeSafety (0.64.1): - FBLazyVector (= 0.64.1) @@ -263,6 +269,16 @@ PODS: - React-jsinspector (= 0.64.1) - React-perflogger (= 0.64.1) - Yoga + - React-Core/Hermes (0.64.1): + - glog + - hermes-engine + - RCT-Folly (= 2020.01.13.00) + - RCT-Folly/Futures + - React-cxxreact (= 0.64.1) + - React-jsi (= 0.64.1) + - React-jsiexecutor (= 0.64.1) + - React-perflogger (= 0.64.1) + - Yoga - React-Core/RCTActionSheetHeaders (0.64.1): - glog - RCT-Folly (= 2020.01.13.00) @@ -573,26 +589,28 @@ DEPENDENCIES: - EXHaptics (from `../node_modules/expo-haptics/ios`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) - - Flipper (= 0.75.1) + - Flipper (~> 0.75.1) - Flipper-DoubleConversion (= 1.1.7) - - Flipper-Folly (= 2.5.3) + - Flipper-Folly (~> 2.5.3) - Flipper-Glog (= 0.3.6) - Flipper-PeerTalk (~> 0.0.4) - - Flipper-RSocket (= 1.3.1) - - FlipperKit (= 0.75.1) - - FlipperKit/Core (= 0.75.1) - - FlipperKit/CppBridge (= 0.75.1) - - FlipperKit/FBCxxFollyDynamicConvert (= 0.75.1) - - FlipperKit/FBDefines (= 0.75.1) - - FlipperKit/FKPortForwarding (= 0.75.1) - - FlipperKit/FlipperKitHighlightOverlay (= 0.75.1) - - FlipperKit/FlipperKitLayoutPlugin (= 0.75.1) - - FlipperKit/FlipperKitLayoutTextSearchable (= 0.75.1) - - FlipperKit/FlipperKitNetworkPlugin (= 0.75.1) - - FlipperKit/FlipperKitReactPlugin (= 0.75.1) - - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.75.1) - - FlipperKit/SKIOSNetworkPlugin (= 0.75.1) + - Flipper-RSocket (~> 1.3) + - FlipperKit (~> 0.75.1) + - FlipperKit/Core (~> 0.75.1) + - FlipperKit/CppBridge (~> 0.75.1) + - FlipperKit/FBCxxFollyDynamicConvert (~> 0.75.1) + - FlipperKit/FBDefines (~> 0.75.1) + - FlipperKit/FKPortForwarding (~> 0.75.1) + - FlipperKit/FlipperKitHighlightOverlay (~> 0.75.1) + - FlipperKit/FlipperKitLayoutPlugin (~> 0.75.1) + - FlipperKit/FlipperKitLayoutTextSearchable (~> 0.75.1) + - FlipperKit/FlipperKitNetworkPlugin (~> 0.75.1) + - FlipperKit/FlipperKitReactPlugin (~> 0.75.1) + - FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.75.1) + - FlipperKit/SKIOSNetworkPlugin (~> 0.75.1) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) + - hermes-engine (~> 0.7.2) + - libevent (~> 2.1.12) - "onfido-react-native-sdk (from `../node_modules/@onfido/react-native-sdk`)" - Permission-LocationAccuracy (from `../node_modules/react-native-permissions/ios/LocationAccuracy`) - Permission-LocationAlways (from `../node_modules/react-native-permissions/ios/LocationAlways`) @@ -605,6 +623,7 @@ DEPENDENCIES: - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) - React-Core (from `../node_modules/react-native/`) - React-Core/DevSupport (from `../node_modules/react-native/`) + - React-Core/Hermes (from `../node_modules/react-native/`) - React-Core/RCTWebSocket (from `../node_modules/react-native/`) - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) @@ -687,6 +706,7 @@ SPEC REPOS: - GoogleAppMeasurement - GoogleDataTransport - GoogleUtilities + - hermes-engine - libevent - nanopb - Onfido @@ -868,6 +888,7 @@ SPEC CHECKSUMS: GoogleAppMeasurement: 6b6a08fd9c71f4dbc89e0e812acca81d797aa342 GoogleDataTransport: 85fd18ff3019bb85d3f2c551d04c481dedf71fc9 GoogleUtilities: eea970f4a389963963bffe8d8fabe43540678b9c + hermes-engine: 7d97ba46a1e29bacf3e3c61ecb2804a5ddd02d4f libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96 Onfido: 116a268e4cb8b767c15285e8071c2e8304673cdf @@ -876,7 +897,7 @@ SPEC CHECKSUMS: Permission-LocationAccuracy: e8adff9ede1b23b43b7054a4500113d515fc87a8 Permission-LocationAlways: 7f7f373d086af7a81b2f4f20d65d29266ca2043b Permission-LocationWhenInUse: 3ae82a9feb5da4e94e386dba17c7dd3531af9feb - Plaid: c02276ccc630a726a9ed790bf923d29839ff4017 + Plaid: f55c6acdc249245c6778a4045757eb4e839cca61 PromisesObjC: 68159ce6952d93e17b2dfe273b8c40907db5ba58 Protobuf: 7327d4444215b5f18e560a97f879ff5503c4581c RCT-Folly: ec7a233ccc97cc556cf7237f0db1ff65b986f27c @@ -943,6 +964,6 @@ SPEC CHECKSUMS: Yoga: a7de31c64fe738607e7a3803e3f591a4b1df7393 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 2b0558e25f01204512de38c2f656a63b5d86d19c +PODFILE CHECKSUM: 2092930e33e7aa4d68cdf783d6174465bd3ce380 COCOAPODS: 1.10.1 diff --git a/src/libs/numberFormat/index.android.js b/src/libs/numberFormat/index.native.js similarity index 100% rename from src/libs/numberFormat/index.android.js rename to src/libs/numberFormat/index.native.js