Skip to content

Commit 9298e72

Browse files
authored
Merge pull request #59544 from software-mansion-labs/enable-hermes-dev-tools
[No QA] Update Podfile to enable Hermes devtools
2 parents cd227b6 + 0f92ea3 commit 9298e72

File tree

3 files changed

+20
-10
lines changed

3 files changed

+20
-10
lines changed

ios/NewExpensify.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,7 @@
621621
"${BUILT_PRODUCTS_DIR}/MapboxMaps/MapboxMaps.framework",
622622
"${BUILT_PRODUCTS_DIR}/Turf/Turf.framework",
623623
"${PODS_XCFRAMEWORKS_BUILD_DIR}/FullStory/FullStory.framework/FullStory",
624+
"${PODS_XCFRAMEWORKS_BUILD_DIR}/JitsiWebRTC/WebRTC.framework/WebRTC",
624625
"${PODS_XCFRAMEWORKS_BUILD_DIR}/MapboxCommon/MapboxCommon.framework/MapboxCommon",
625626
"${PODS_XCFRAMEWORKS_BUILD_DIR}/MapboxCoreMaps/MapboxCoreMaps.framework/MapboxCoreMaps",
626627
"${PODS_XCFRAMEWORKS_BUILD_DIR}/MapboxMobileEvents/MapboxMobileEvents.framework/MapboxMobileEvents",
@@ -633,6 +634,7 @@
633634
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxMaps.framework",
634635
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Turf.framework",
635636
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FullStory.framework",
637+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WebRTC.framework",
636638
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxCommon.framework",
637639
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxCoreMaps.framework",
638640
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxMobileEvents.framework",

ios/Podfile

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,12 @@ def __apply_Xcode_14_3_RC_post_install_workaround(installer)
4949
end
5050
end
5151

52-
def __modify_react_native_settings_for_debug_build(installer)
53-
installer.pods_project.targets.each do |target|
54-
if target.name.include?('React')
55-
target.build_configurations.each do |config|
56-
if config.name.downcase.include?("debug")
57-
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= '$(inherited) DEBUG=1'
58-
end
59-
end
52+
# Pods does not derive :debug type from NewExpensify's debug configurations so we need to set it manually before react-native-post-install.
53+
# Based on this value react-native-post-install will set the correct GCC_PREPROCESSOR_DEFINITIONS e.g. ENABLE_HERMES_DEBUGGER
54+
def __set_debug_type_for_debug_configurations(installer)
55+
installer.pods_project.build_configurations.each do |config|
56+
if config.name.downcase.include?("debug")
57+
installer.pods_project.add_build_configuration(config.name, :debug)
6058
end
6159
end
6260
end
@@ -105,6 +103,7 @@ target 'NewExpensify' do
105103
# Configure Mapbox after installation
106104
$RNMapboxMaps.post_install(installer)
107105

106+
__set_debug_type_for_debug_configurations(installer)
108107
# https://github.com/facebook/react-native/blob/main/scripts/react_native_pods.rb#L197-L202
109108
react_native_post_install(
110109
installer,
@@ -113,7 +112,6 @@ target 'NewExpensify' do
113112
# :ccache_enabled => true
114113
)
115114
__apply_Xcode_14_3_RC_post_install_workaround(installer)
116-
__modify_react_native_settings_for_debug_build(installer)
117115

118116
installer.pods_project.targets.each do |target|
119117
if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"

ios/Podfile.lock

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ PODS:
259259
- hermes-engine (0.77.1):
260260
- hermes-engine/Pre-built (= 0.77.1)
261261
- hermes-engine/Pre-built (0.77.1)
262+
- JitsiWebRTC (124.0.2)
262263
- libavif/core (0.11.1)
263264
- libavif/libdav1d (0.11.1):
264265
- libavif/core
@@ -2041,6 +2042,9 @@ PODS:
20412042
- ReactCommon/turbomodule/bridging
20422043
- ReactCommon/turbomodule/core
20432044
- Yoga
2045+
- react-native-webrtc (124.0.5):
2046+
- JitsiWebRTC (~> 124.0.0)
2047+
- React-Core
20442048
- react-native-webview (13.13.1):
20452049
- DoubleConversion
20462050
- glog
@@ -2945,6 +2949,7 @@ DEPENDENCIES:
29452949
- react-native-release-profiler (from `../node_modules/react-native-release-profiler`)
29462950
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
29472951
- react-native-view-shot (from `../node_modules/react-native-view-shot`)
2952+
- react-native-webrtc (from `../node_modules/react-native-webrtc`)
29482953
- react-native-webview (from `../node_modules/react-native-webview`)
29492954
- React-nativeconfig (from `../node_modules/react-native/ReactCommon`)
29502955
- React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
@@ -3024,6 +3029,7 @@ SPEC REPOS:
30243029
- GTMAppAuth
30253030
- GTMSessionFetcher
30263031
- GzipSwift
3032+
- JitsiWebRTC
30273033
- libavif
30283034
- libdav1d
30293035
- libwebp
@@ -3192,6 +3198,8 @@ EXTERNAL SOURCES:
31923198
:path: "../node_modules/react-native-safe-area-context"
31933199
react-native-view-shot:
31943200
:path: "../node_modules/react-native-view-shot"
3201+
react-native-webrtc:
3202+
:path: "../node_modules/react-native-webrtc"
31953203
react-native-webview:
31963204
:path: "../node_modules/react-native-webview"
31973205
React-nativeconfig:
@@ -3348,6 +3356,7 @@ SPEC CHECKSUMS:
33483356
GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6
33493357
GzipSwift: 893f3e48e597a1a4f62fafcb6514220fcf8287fa
33503358
hermes-engine: ccc24d29d650ea725d582a9a53d57cd417fbdb53
3359+
JitsiWebRTC: b47805ab5668be38e7ee60e2258f49badfe8e1d0
33513360
libavif: 84bbb62fb232c3018d6f1bab79beea87e35de7b7
33523361
libdav1d: 23581a4d8ec811ff171ed5e2e05cd27bad64c39f
33533362
libwebp: 1786c9f4ff8a279e4dac1e8f385004d5fc253009
@@ -3415,6 +3424,7 @@ SPEC CHECKSUMS:
34153424
react-native-release-profiler: dffea1dd7929bf5cf7da5ad4697dea7d9a062377
34163425
react-native-safe-area-context: b3edb1da341e5e61f865763d9e0b6d3d34706464
34173426
react-native-view-shot: bb169342812ded991a4a0387e7d0b17cb515e62a
3427+
react-native-webrtc: 0f1c94069ff1eb9d8fb1618c2dc71f73542c8cfa
34183428
react-native-webview: b375842af66a9f0ab979378bdc8b26eeb5d8e3ee
34193429
React-nativeconfig: cb207ebba7cafce30657c7ad9f1587a8f32e4564
34203430
React-NativeModulesApple: 82a8bee52df9f5b378195a500f22be3a6ef0f890
@@ -3478,6 +3488,6 @@ SPEC CHECKSUMS:
34783488
VisionCamera: c95a8ad535f527562be1fb05fb2fd324578e769c
34793489
Yoga: 1fd059161b449018342943b095a6d4e69bcaa719
34803490

3481-
PODFILE CHECKSUM: e1af24debf4226877e7b4ae9da7137bd4361db9d
3491+
PODFILE CHECKSUM: 7c82525cf111fba4b673ad07e55f2994ea241a32
34823492

34833493
COCOAPODS: 1.15.2

0 commit comments

Comments
 (0)