Commit 462fae4
Use configuration type when adding ndebug flag to pods in release (facebook#48193)
Summary:
While I was [working on fixing the iOS debugger logic](facebook#48174) based on configuration name regex match, I wanted to know if other logic was also based on configuration names. I think I found and fixed the only other configuration name-based logic in the repo in this PR.
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[IOS] [CHANGED] - Use configuration type when adding ndebug flag to pods in release
Pull Request resolved: facebook#48193
Test Plan:
In a fresh react-native project, I added to the Podfile:
```ruby
installer.aggregate_targets.each do |aggregate_target|
aggregate_target.xcconfigs.each do |config_name, config_file|
is_release = aggregate_target.user_build_configurations[config_name] == :release
puts "aggregate_targets #{config_name} is_release: #{is_release}"
end
end
installer.target_installation_results.pod_target_installation_results.each do |pod_name, target_installation_result|
target_installation_result.native_target.build_configurations.each do |config|
is_release = config.type == :release
puts "target_installation_results #{config.name} is_release: #{is_release}"
end
end
```
to confirm my logic. It output the following:
```
aggregate_targets Release is_release: true
aggregate_targets Local is_release: false
...
target_installation_results Local is_release: false
target_installation_results Release is_release: true
...
```
I also updated the applicable tests I could find for this logic.
Reviewed By: cortinico
Differential Revision: D67025325
Pulled By: cipolleschi
fbshipit-source-id: 45d68ee86e3255d843275a72916883c8c4bbc13d1 parent 7d771de commit 462fae4
File tree
4 files changed
+26
-13
lines changed- packages/react-native/scripts/cocoapods
- __tests__
- test_utils
4 files changed
+26
-13
lines changedLines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
| 527 | + | |
527 | 528 | | |
528 | 529 | | |
529 | 530 | | |
530 | 531 | | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
531 | 535 | | |
532 | 536 | | |
533 | 537 | | |
534 | 538 | | |
535 | 539 | | |
536 | | - | |
| 540 | + | |
537 | 541 | | |
538 | 542 | | |
539 | 543 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
102 | | - | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| 107 | + | |
106 | 108 | | |
107 | 109 | | |
108 | 110 | | |
| |||
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
202 | | - | |
| 204 | + | |
203 | 205 | | |
204 | 206 | | |
205 | 207 | | |
| |||
Lines changed: 15 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1153 | 1153 | | |
1154 | 1154 | | |
1155 | 1155 | | |
1156 | | - | |
1157 | | - | |
1158 | | - | |
1159 | | - | |
1160 | | - | |
1161 | | - | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
1162 | 1163 | | |
1163 | 1164 | | |
1164 | 1165 | | |
1165 | 1166 | | |
1166 | 1167 | | |
1167 | 1168 | | |
1168 | | - | |
| 1169 | + | |
| 1170 | + | |
1169 | 1171 | | |
1170 | 1172 | | |
1171 | 1173 | | |
| |||
1178 | 1180 | | |
1179 | 1181 | | |
1180 | 1182 | | |
| 1183 | + | |
1181 | 1184 | | |
1182 | 1185 | | |
1183 | 1186 | | |
| |||
1234 | 1237 | | |
1235 | 1238 | | |
1236 | 1239 | | |
| 1240 | + | |
1237 | 1241 | | |
1238 | 1242 | | |
1239 | 1243 | | |
1240 | 1244 | | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
1241 | 1248 | | |
1242 | 1249 | | |
1243 | 1250 | | |
1244 | 1251 | | |
1245 | 1252 | | |
1246 | | - | |
| 1253 | + | |
1247 | 1254 | | |
1248 | 1255 | | |
1249 | 1256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
664 | 664 | | |
665 | 665 | | |
666 | 666 | | |
667 | | - | |
| 667 | + | |
668 | 668 | | |
669 | 669 | | |
670 | 670 | | |
| |||
678 | 678 | | |
679 | 679 | | |
680 | 680 | | |
681 | | - | |
| 681 | + | |
682 | 682 | | |
683 | 683 | | |
684 | 684 | | |
| |||
0 commit comments