'React Native Module: Remote pod gets installed but not its dependencies?
I have created React Native boilerplate app using:
npx react-native init MyApp --template react-native-template-typescript
After this I added a podSpec file to the root as shown below:
require "json"
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
Pod::Spec.new do |s|
s.name = package["title"]
s.version = package["version"]
s.summary = package["description"]
s.description = <<-DESC
react-native-test-module
DESC
s.homepage = package["homepage"]
# brief license entry:
# optional - use expanded license entry instead:
s.license = "MIT"
s.authors = { package["authors"] => package["contact"] }
s.platforms = { :ios => "9.0" }
s.source = { :git => "https://github.com/github_account/react-native-test-module.git", :tag => "#{s.version}" }
s.source_files = "ios/**/*.{h,c,cc,cpp,m,mm,swift}"
s.requires_arc = true
# ...
# s.dependency "..."
s.dependency "React"
end
And I am including this pod into another ios App by:
pod 'MyApp', :git => 'https://github.com/shivam-rallyhealth/rn-content-megazord', :tag => '0.0.19'
When I do pod install --repo-update for some reason, it installs all the files, but not the pod dependencies and so When I do a build, I get this error:
#import <React/RCTBridgeDelegate.h> 'React/RCTBridgeDelegate.h' file not found
How do I modify my podSpec such that all the pods also gets installed and not just the module files?
Please note that I am very well able to build the project that lies within ios directory of the React Native boilerplate. The problem comes when I try to outsource it to another existing app and then use it there.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
