Commit 68aab49
feat:- fix compilation issue with objcxx interop (#55117)
Summary:
So currently RN app is broken with following error if the `SWIFT_OBJC_INTEROP_MODE` is changed to `objcxx`.
<img width="567" height="112" alt="image" src="https://github.com/user-attachments/assets/7a8e8cf4-a8a3-42d3-a65f-9943cbf296f2" />
### Why do we need this interop ?
So currently any pod that uses `objcxx` as interop (For example Any library created with Nitro modules) cannot be imported into App directly .
<img width="548" height="59" alt="image" src="https://github.com/user-attachments/assets/b6d9fb7a-00df-4bf2-aa0c-c61fb3a6538f" />
We are using this in a nitro module where we override bundle url . And nitro-player for jellify app where we create a new scene for carplay . Currently we are using hacky stuffs like creating two pods to address this but the solution is messy.
### RCA for failing
<img width="633" height="155" alt="image" src="https://github.com/user-attachments/assets/7eb811cc-d1ba-410d-902c-4217bfc47b40" />
Currently glog imports some things inside namespace which is not allowed.
### Fix
This patches creates a module map that uses textual headers to prevent submodule creation. We can still keep using the old interop by default . Users who need to do this can change the interop themselves
bypass-github-export-checks
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[IOS][FIXED] - Fix glog namespace issue to allow using interop mode of objcxx
Pull Request resolved: #55117
Test Plan:
To test this I forked Nightly repo and ran against all the libraries and nothing seems to fail
With objcxx interop :- https://github.com/riteshshukla04/nightly-tests/actions/runs/20908210967
with Objc interop :- https://github.com/riteshshukla04/nightly-tests/actions/runs/20902452877
Reviewed By: cortinico
Differential Revision: D90503097
Pulled By: cipolleschi
fbshipit-source-id: c1b46e901ec1515998428e1f3ca46f9d48d17bd31 parent 0cda10b commit 68aab49
2 files changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
0 commit comments