You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Short description of the issue
Cocoapods (1.7.5) can't integrate Obj-C and Swift mixed native module: react-native-test-native-module as a static library in example which is generated by create-react-native-module --generate-example
Expected outcome pod install succeeds.
What actually happens
pod install fails and threw below error.
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod `react-native-test-native-module` depends upon `AFNetworking`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
What I have tried
Add use_modular_headers! to top of the Podfile.
It worked on pod install, but it didn't work on react-native run-ios and threw below error.
** BUILD FAILED **
The following build commands failed:
CompileC <PATH>/react-native-test-native-module/example/ios/build/example/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Folly.build/Objects-normal/x86_64/Unicode.o <PATH>/react-native-test-native-module/example/ios/Pods/Folly/folly/Unicode.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Add pod 'react-native-test-native-module', :path => '../../react-native-test-native-module.podspec' to the Podfile
It didn't work.
pod 'react-native-test-native-module', :path => '../../react-native-test-native-module.podspec', :modular_headers => true
It didn't work.
The text was updated successfully, but these errors were encountered:
It looks to me like you used the --use-cocoapods option, which only serves to add AFNetworking dependency to the podspec file and add some sample networking code to the generated module.
I would highly recommend that you try generating a new module without this option, try running the generated example, and commit the whole thing before you start any of your own updates.
Hi, thanks to developing the great tool!
I've been struggled with pod installation.
Please help me to solve this problem.
Thanks.
Environment
create-react-native-module: 0.10.2
CocoaPods: 1.7.5
Platform: (only) iOS
Xcode: 10.3
example's react: 16.8.6
example's react-native: 0.60.5
Repository
react-native-test-native-module
Short description of the issue
Cocoapods (1.7.5) can't integrate Obj-C and Swift mixed native module: react-native-test-native-module as a static library in example which is generated by
create-react-native-module --generate-example
Expected outcome
pod install
succeeds.What actually happens
pod install fails and threw below error.
What I have tried
use_modular_headers!
to top of the Podfile.It worked on
pod install
, but it didn't work onreact-native run-ios
and threw below error.pod 'react-native-test-native-module', :path => '../../react-native-test-native-module.podspec'
to the PodfileIt didn't work.
pod 'react-native-test-native-module', :path => '../../react-native-test-native-module.podspec', :modular_headers => true
It didn't work.
The text was updated successfully, but these errors were encountered: