Commit 7c12d62
authored
fix(crnl): certain versions of XCode can't resolve codegen headers (#810)
### Summary
- Some people are having XCode build issues with new-architecture
enabled libraries, fabric and turbo modules.
- The issues are related to XCode not being able to resolve `#import`
directives following this pattern `generated/x/y.h`
- This PR changes the template so these headers are imported from the
generated LLVM module using the module include paths such as:
`<ModuleName/header.h>`
- Also made all the headers private. Otherwise the modules fail when
user tries to add a Swift file. This is because cocoapods automatically
generates an umbrella header based on all the available headers and the
swift compilation step treats all headers in the umbrella header as
objective-c headers. This in turn results in an error since some headers
need objective-cpp features and cpp stdlib headers.
### Test plan
1. Create a turbo module and a fabric view separately
2. Make sure you're able to build the library on XCode 16.0, 16.1, and
16.21 parent 0702ac9 commit 7c12d62
File tree
3 files changed
+6
-6
lines changed- packages/create-react-native-library/templates
- native-common
- objc-library/ios
- objc-view-new/ios
3 files changed
+6
-6
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
0 commit comments