Skip to content

Commit

Permalink
Fix undefined config in podspec (#5390)
Browse files Browse the repository at this point in the history
## Summary

This PR fixes error:
```bash
[!] Invalid `Podfile` file: 
[!] Invalid `RNReanimated.podspec` file: undefined local variable or method `config' for Pod:Module
Did you mean?  concerning.

 #  from /Users/runner/work/react-native-reanimated/react-native-reanimated/Example/node_modules/react-native-reanimated/RNReanimated.podspec:90
 #  -------------------------------------------
 #    gcc_debug_definitions =  "$(inherited)"
 >    if config[:react_native_minor_version] >= 73 || !is_release
 #      gcc_debug_definitions << " HERMES_ENABLE_DEBUGGER=1"
 #  -------------------------------------------
.

 #  from /Users/runner/work/react-native-reanimated/react-native-reanimated/Example/ios/Podfile:31
 #  -------------------------------------------
 #  target 'ReanimatedExample' do
 >    config = use_native_modules!
 #  
 #  -------------------------------------------
 ```

Related to PRs: #5383 and #5334

It is because we renamed `config` to global variable `$config`

## Test plan

Build Example app

---------

Co-authored-by: Tomek Zawadzki <tomasz.zawadzki@swmansion.com>
  • Loading branch information
2 people authored and Aleksandra Cynk committed Dec 12, 2023
1 parent eb84611 commit 462c4ad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ SPEC CHECKSUMS:
RNCMaskedView: f7c74478c83c4fdfc5cf4df51f80c0dd5cf125c6
RNCPicker: 529d564911e93598cc399b56cc0769ce3675f8c8
RNGestureHandler: bb86e378287f7713baf3ca205423eb8109790022
RNReanimated: d6138334fbdf0b4ba9a740db9b8caa06c20f38ed
RNReanimated: 518aef663d1661d60e50610fe05ebec14b404739
RNScreens: 85d3880b52d34db7b8eeebe2f1a0e807c05e69fa
RNSVG: d00c8f91c3cbf6d476451313a18f04d220d4f396
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Expand Down
2 changes: 1 addition & 1 deletion FabricExample/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1491,7 +1491,7 @@ SPEC CHECKSUMS:
RNCMaskedView: f7c74478c83c4fdfc5cf4df51f80c0dd5cf125c6
RNCPicker: 529d564911e93598cc399b56cc0769ce3675f8c8
RNGestureHandler: 039162c42c65de1228c58eb48be90c279bfde3f1
RNReanimated: 4b82c89a58f66169352b947403f45b2142e7595b
RNReanimated: 52790dde3755dc90bfecdb4df6653e83bbeac30d
RNScreens: cba72a26a6c967765a8388fe85f78e7771012ca1
RNSVG: df9aaada196f6a61c8e30dc55d41e6c108a954e7
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Expand Down
4 changes: 2 additions & 2 deletions RNReanimated.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ Pod::Spec.new do |s|
"Common/cpp/hidden_headers/**"
]

gcc_debug_definitions = "$(inherited)"
if config[:react_native_minor_version] >= 73 || !is_release
gcc_debug_definitions = "$(inherited)"
if $config[:react_native_minor_version] >= 73 || !is_release
gcc_debug_definitions << " HERMES_ENABLE_DEBUGGER=1"
end

Expand Down

0 comments on commit 462c4ad

Please sign in to comment.