Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library with swift files causes build to fail because of generated umbrella header file including codegen headers #690

Open
1 of 2 tasks
itsramiel opened this issue Nov 18, 2024 · 2 comments · May be fixed by #737
Open
1 of 2 tasks
Labels
bug Something isn't working

Comments

@itsramiel
Copy link

itsramiel commented Nov 18, 2024

Description

Hi,

I am trying to create a turbo module with Swift, however when I try to build the app the app fails because of a lot of C++ errors:

Build Error::1:9: note: in file included from :1: #import "react-native-reproducable-module-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/react_native_reproducable_module/react-native-reproducable-module-umbrella.h:13:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/react_native_reproducable_module/react-native-reproducable-module-umbrella.h:13: #import "ComponentDescriptors.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/node_modules/react-native/ReactCommon/react/renderer/components/rncore/ComponentDescriptors.h:13:10: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/node_modules/react-native/ReactCommon/react/renderer/components/rncore/ComponentDescriptors.h:13: #include ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/React-FabricComponents/react/renderer/components/rncore/ShadowNodes.h:13:10: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/React-FabricComponents/react/renderer/components/rncore/ShadowNodes.h:13: #include ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/React-FabricComponents/react/renderer/components/rncore/EventEmitters.h:12:10: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/React-FabricComponents/react/renderer/components/rncore/EventEmitters.h:12: #include ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/React-Fabric/react/renderer/components/view/ViewEventEmitter.h:10:10: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/React-Fabric/react/renderer/components/view/ViewEventEmitter.h:10: #include ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/React-Fabric/react/renderer/components/view/HostPlatformViewEventEmitter.h:10:10: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/React-Fabric/react/renderer/components/view/HostPlatformViewEventEmitter.h:10: #include ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/React-Fabric/react/renderer/components/view/BaseViewEventEmitter.h:10:10: error: 'memory' file not found #include ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124:10: note: while building module 'DoubleConversion' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124: #include // V8 JavaScript implementation ^ :1:9: note: in file included from :1: #import "DoubleConversion-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:13:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:13: #import "double-conversion/bignum-dtoa.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/bignum-dtoa.h:31:10: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/bignum-dtoa.h:31: #include "utils.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/utils.h:139:1: error: unknown type name 'namespace' namespace double_conversion { ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124:10: note: while building module 'DoubleConversion' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124: #include // V8 JavaScript implementation ^ :1:9: note: in file included from :1: #import "DoubleConversion-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:13:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:13: #import "double-conversion/bignum-dtoa.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/bignum-dtoa.h:31:10: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/bignum-dtoa.h:31: #include "utils.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/utils.h:139:28: error: expected ';' after top level declarator namespace double_conversion { ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124:10: note: while building module 'DoubleConversion' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124: #include // V8 JavaScript implementation ^ :1:9: note: in file included from :1: #import "DoubleConversion-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:13:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:13: #import "double-conversion/bignum-dtoa.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/bignum-dtoa.h:33:1: error: unknown type name 'namespace' namespace double_conversion { ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124:10: note: while building module 'DoubleConversion' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124: #include // V8 JavaScript implementation ^ :1:9: note: in file included from :1: #import "DoubleConversion-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:13:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:13: #import "double-conversion/bignum-dtoa.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/bignum-dtoa.h:33:28: error: expected ';' after top level declarator namespace double_conversion { ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124:10: note: while building module 'DoubleConversion' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124: #include // V8 JavaScript implementation ^ :1:9: note: in file included from :1: #import "DoubleConversion-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:14:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:14: #import "double-conversion/bignum.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/bignum.h:33:1: error: unknown type name 'namespace' namespace double_conversion { ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124:10: note: while building module 'DoubleConversion' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124: #include // V8 JavaScript implementation ^ :1:9: note: in file included from :1: #import "DoubleConversion-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:14:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:14: #import "double-conversion/bignum.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/bignum.h:33:28: error: expected ';' after top level declarator namespace double_conversion { ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124:10: note: while building module 'DoubleConversion' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124: #include // V8 JavaScript implementation ^ :1:9: note: in file included from :1: #import "DoubleConversion-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:15:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:15: #import "double-conversion/cached-powers.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/cached-powers.h:31:10: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/cached-powers.h:31: #include "diy-fp.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/diy-fp.h:33:1: error: unknown type name 'namespace' namespace double_conversion { ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124:10: note: while building module 'DoubleConversion' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124: #include // V8 JavaScript implementation ^ :1:9: note: in file included from :1: #import "DoubleConversion-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:15:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:15: #import "double-conversion/cached-powers.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/cached-powers.h:31:10: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/cached-powers.h:31: #include "diy-fp.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/diy-fp.h:33:28: error: expected ';' after top level declarator namespace double_conversion { ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124:10: note: while building module 'DoubleConversion' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124: #include // V8 JavaScript implementation ^ :1:9: note: in file included from :1: #import "DoubleConversion-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:15:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:15: #import "double-conversion/cached-powers.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/cached-powers.h:33:1: error: unknown type name 'namespace' namespace double_conversion { ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124:10: note: while building module 'DoubleConversion' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124: #include // V8 JavaScript implementation ^ :1:9: note: in file included from :1: #import "DoubleConversion-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:15:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:15: #import "double-conversion/cached-powers.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/cached-powers.h:33:28: error: expected ';' after top level declarator namespace double_conversion { ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124:10: note: while building module 'DoubleConversion' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124: #include // V8 JavaScript implementation ^ :1:9: note: in file included from :1: #import "DoubleConversion-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:17:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:17: #import "double-conversion/double-conversion.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/double-conversion.h:33:1: error: unknown type name 'namespace' namespace double_conversion { ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124:10: note: while building module 'DoubleConversion' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124: #include // V8 JavaScript implementation ^ :1:9: note: in file included from :1: #import "DoubleConversion-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:17:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:17: #import "double-conversion/double-conversion.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/double-conversion.h:33:28: error: expected ';' after top level declarator namespace double_conversion { ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124:10: note: while building module 'DoubleConversion' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124: #include // V8 JavaScript implementation ^ :1:9: note: in file included from :1: #import "DoubleConversion-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:18:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:18: #import "double-conversion/fast-dtoa.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/fast-dtoa.h:33:1: error: unknown type name 'namespace' namespace double_conversion { ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124:10: note: while building module 'DoubleConversion' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124: #include // V8 JavaScript implementation ^ :1:9: note: in file included from :1: #import "DoubleConversion-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:18:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:18: #import "double-conversion/fast-dtoa.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/fast-dtoa.h:33:28: error: expected ';' after top level declarator namespace double_conversion { ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124:10: note: while building module 'DoubleConversion' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124: #include // V8 JavaScript implementation ^ :1:9: note: in file included from :1: #import "DoubleConversion-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:19:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:19: #import "double-conversion/fixed-dtoa.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/fixed-dtoa.h:33:1: error: unknown type name 'namespace' namespace double_conversion { ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124:10: note: while building module 'DoubleConversion' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124: #include // V8 JavaScript implementation ^ :1:9: note: in file included from :1: #import "DoubleConversion-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:19:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:19: #import "double-conversion/fixed-dtoa.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/fixed-dtoa.h:33:28: error: expected ';' after top level declarator namespace double_conversion { ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124:10: note: while building module 'DoubleConversion' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124: #include // V8 JavaScript implementation ^ :1:9: note: in file included from :1: #import "DoubleConversion-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:20:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:20: #import "double-conversion/ieee.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/ieee.h:33:1: error: unknown type name 'namespace' namespace double_conversion { ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124:10: note: while building module 'DoubleConversion' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124: #include // V8 JavaScript implementation ^ :1:9: note: in file included from :1: #import "DoubleConversion-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:20:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:20: #import "double-conversion/ieee.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/ieee.h:33:28: error: expected ';' after top level declarator namespace double_conversion { ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124:10: note: while building module 'DoubleConversion' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCT-Folly/folly/Conv.h:124: #include // V8 JavaScript implementation ^ :1:9: note: in file included from :1: #import "DoubleConversion-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:21:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion-umbrella.h:21: #import "double-conversion/strtod.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/DoubleConversion/double-conversion/strtod.h:33:1: error: unknown type name 'namespace' namespace double_conversion { ^ :0: error: too many errors emitted, stopping now /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/React-debug/react/debug/react_native_assert.h:54:10: note: while building module 'glog' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/React-debug/react/debug/react_native_assert.h:54: #include ^ :1:9: note: in file included from :1: #import "glog-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/glog/glog-umbrella.h:13:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/glog/glog-umbrella.h:13: #import "glog/logging.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/glog/glog/logging.h:42:10: error: 'iosfwd' file not found #include ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/ios/generated/RNReproducableModuleSpec/RNReproducableModuleSpec.h:24:9: note: while building module 'RCTTypeSafety' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/ios/generated/RNReproducableModuleSpec/RNReproducableModuleSpec.h:24: #import ^ :1:9: note: in file included from :1: #import "RCTTypeSafety-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety-umbrella.h:13:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety-umbrella.h:13: #import "RCTTypeSafety/RCTConvertHelpers.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety/RCTConvertHelpers.h:8:9: error: 'optional' file not found #import ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/React-NativeModulesApple/ReactCommon/RCTTurboModule.h:16:9: note: while building module 'ReactCommon' imported from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/React-NativeModulesApple/ReactCommon/RCTTurboModule.h:16: #import ^ :1:9: note: in file included from :1: #import "ReactCommon-umbrella.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/ReactCommon/ReactCommon-umbrella.h:13:9: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/ReactCommon/ReactCommon-umbrella.h:13: #import "react/bridging/Array.h" ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/ReactCommon/react/bridging/Array.h:10:10: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/ReactCommon/react/bridging/Array.h:10: #include ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/ReactCommon/react/bridging/Base.h:10:10: note: in file included from /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/ReactCommon/react/bridging/Base.h:10: #include ^ /Users/itsramiel/Desktop/All/Typescript/ReactNative/react-native-reproducable-module/example/ios/Pods/Headers/Public/React-jsi/jsi/jsi.h:10:10: error: 'cassert' file not found #include ^ :0: error: could not build Objective-C module 'react_native_reproducable_module'
After some digging, it turns out it is because of the generated files from codegen.

The gen files are being generated at ios/generated and the source files for the podspec is: s.source_files = "ios/**/*.{h,m,mm,cpp,swift}" which includes the generated folder.

As a result the umbrella header file will contains imports to all header files in the gen files:

#import "ComponentDescriptors.h"
#import "EventEmitters.h"
#import "Props.h"
#import "RCTComponentViewHelpers.h"
#import "RNReproducableModuleSpec.h"
#import "ShadowNodes.h"
#import "States.h"
#import "RNReproducableModuleSpecJSI.h"

which cause a build error

Proposed Solution:

I believe this can be solved by setting: s.exclude_files = "ios/generated/**/*.{h,m,mm,cpp}" s.private_header_files = "ios/generated/**/*.h" in the podspec

Packages

  • create-react-native-library
  • react-native-builder-bob

Selected options

✔ What type of library do you want to develop? › Turbo module with backward compat
✔ Which languages do you want to use? › Kotlin & Objective-C

Link to repro

https://github.com/itsramiel/ReactNativeLibrarySwift

Environment

System:
  OS: macOS 15.1
  CPU: (14) arm64 Apple M3 Max
  Memory: 1.77 GB / 36.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.11.1
    path: ~/.nvm/versions/node/v20.11.1/bin/node
  Yarn:
    version: 3.6.1
    path: ~/.nvm/versions/node/v20.11.1/bin/yarn
  npm:
    version: 10.2.4
    path: ~/.nvm/versions/node/v20.11.1/bin/npm
  Watchman:
    version: 2024.10.28.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /Users/itsramiel/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.1
      - iOS 18.1
      - macOS 15.1
      - tvOS 18.1
      - visionOS 2.1
      - watchOS 11.1
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.18034.62.2412.12266719
  Xcode:
    version: 16.1/16B40
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 3.0.0
    path: /Users/itsramiel/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.2
    wanted: 0.76.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true
@itsramiel itsramiel added the bug Something isn't working label Nov 18, 2024
@itsramiel itsramiel changed the title Library with swift files causes build to fail because if generated umbrella header file Library with swift files causes build to fail because of generated umbrella header file Nov 18, 2024
@itsramiel itsramiel changed the title Library with swift files causes build to fail because of generated umbrella header file Library with swift files causes build to fail because of generated umbrella header file including codegen headers Nov 18, 2024
@hajmajeboss
Copy link

I had the same issue, but it was caused by [#LIBRARY_NAME]View.h exposed in umbrella headers, meaning s.private_header_files = "ios/**/*.h" setting in the podspec was the right solution.

@satya164
Copy link
Member

Thanks for the investigation. Can you send a PR with this change?

@atlj atlj linked a pull request Dec 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants