Skip to content

Commit

Permalink
Create a CSSLayout subspec that preserves the header directories
Browse files Browse the repository at this point in the history
Summary:
RN imports CSSLayout files like so: `#import <CSSLayout/CSSLayout.h>`, so we need to tell CocoaPods to preserve the directory structure for CSSLayout files. This is done with the header_mappings_dir, but we want it to apply just to CSSLayout's files, hence the subspec.
Closes #9015

Differential Revision: D3621727

fbshipit-source-id: fb3603a0820ca3d6502813204ff215cf160b1955
  • Loading branch information
ide authored and Facebook Github Bot committed Jul 26, 2016
1 parent 481e1c7 commit ee89ffc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion React.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ Pod::Spec.new do |s|
s.preserve_paths = "cli.js", "Libraries/**/*.js", "lint", "linter.js", "node_modules", "package.json", "packager", "PATENTS", "react-native-cli"

s.subspec 'Core' do |ss|
ss.dependency 'React/CSSLayout'
ss.source_files = "React/**/*.{c,h,m,mm,S}"
ss.exclude_files = "**/__tests__/*", "IntegrationTests/*"
ss.exclude_files = "**/__tests__/*", "IntegrationTests/*", "React/CSSLayout/*"
ss.frameworks = "JavaScriptCore"
ss.libraries = "stdc++"
ss.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++14" }
Expand All @@ -42,6 +43,11 @@ Pod::Spec.new do |s|
ss.preserve_paths = "Libraries/ART/**/*.js"
end

s.subspec 'CSSLayout' do |ss|
ss.source_files = "React/CSSLayout/**/*.{c,h}"
ss.header_mappings_dir = "React"
end

s.subspec 'RCTActionSheet' do |ss|
ss.dependency 'React/Core'
ss.source_files = "Libraries/ActionSheetIOS/*.{h,m}"
Expand Down

0 comments on commit ee89ffc

Please sign in to comment.