cocoapods-fix-react-native 2018.04.07.18 → 2018.04.09.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03e0c9b0aac77389ed9725c425a67ec959338546d7a366d4be1c123fd2ca4053
4
- data.tar.gz: 7542e845466310c68f68ec6c7050f996166fef11ca62f7b9294914905b029997
3
+ metadata.gz: 971f132700107c45ee995fb388a90dc930b9aefed393e9d4832ce637413f1fbb
4
+ data.tar.gz: de90322cb501e6514e139eb72c597a955a0598830a2e5884b293d0f170173df5
5
5
  SHA512:
6
- metadata.gz: bedec818bd31a6252bbf67620d883ad43e5f599442e4d261b494938e183b29442d04dc2ceb03397e46398df335dd65384b1c374325505e2136eebe0bde4651db
7
- data.tar.gz: ac4fc6413c966d9e51d34998b17cb58ac0075e13b7faf43f60b5e281356909da0c156c6985412e6547ea93013fae000119b964f451c1b3ce39a43f88448f0ce1
6
+ metadata.gz: a5b2e4ca8b83391c359f547a17394ed33280ece7f00c6ac93c2049fc7849b2208063609b2a3cce7341f40d17278ed8ca6defa3e87c74eb21dd09c8be40de5256
7
+ data.tar.gz: 2182495ea7c961a2e84f5ba7248dad72829cb8d73cb91b3715c5b8d49bee70e1ccc60c1d261165f6aa6d27073c02e1039021d1b3d1e58406e3715576e75283ab
@@ -7,7 +7,7 @@
7
7
  dev_pods_react = !File.directory?('Pods/React/React')
8
8
 
9
9
  # Detect CocoaPods + Frameworks
10
- # $has_frameworks = File.exists?'Pods/Target Support Files/React/React-umbrella.h'
10
+ $has_frameworks = File.exists?'Pods/Target Support Files/React/React-umbrella.h'
11
11
 
12
12
  # Check for whether
13
13
  same_repo_node_modules = File.directory?('node_modules/react-native')
@@ -76,8 +76,38 @@ def fix_unused_yoga_headers
76
76
  end
77
77
  end
78
78
 
79
+ # Detect source file dependency in the generated Pods.xcodeproj workspace sub-project
80
+ def has_pods_project_source_file(source_filename)
81
+ pods_project = 'Pods/Pods.xcodeproj/project.pbxproj'
82
+ File.open(pods_project).grep(/#{source_filename}/).any?
83
+ end
84
+
85
+ # Detect dependent source file required for building when the given source file is present
86
+ def meets_pods_project_source_dependency(source_filename, dependent_source_filename)
87
+ has_pods_project_source_file(source_filename) ? has_pods_project_source_file(dependent_source_filename) : true
88
+ end
89
+
90
+ def detect_missing_subspec_dependency(subspec_name, source_filename, dependent_source_filename)
91
+ unless meets_pods_project_source_dependency(source_filename, dependent_source_filename)
92
+ puts "[!] #{subspec_name} subspec may be required given your current dependencies"
93
+ end
94
+ end
95
+
96
+ def detect_missing_subspecs
97
+ return unless $has_frameworks
98
+
99
+ # For CocoaPods + Frameworks, RCTNetwork and CxxBridge subspecs are necessary for DevSupport.
100
+ # When the React pod is generated it must include all the required source, and see umbrella deps.
101
+ detect_missing_subspec_dependency('RCTNetwork', 'RCTBlobManager.mm', 'RCTNetworking.mm')
102
+ detect_missing_subspec_dependency('CxxBridge', 'RCTJavaScriptLoader.mm', 'RCTCxxBridge.mm')
103
+
104
+ # RCTText itself shouldn't require DevSupport, but it depends on Core -> RCTDevSettings -> RCTPackagerClient
105
+ detect_missing_subspec_dependency('DevSupport', 'RCTDevSettings.mm', 'RCTPackagerClient.m')
106
+ end
107
+
79
108
  fix_unused_yoga_headers
80
109
  fix_cplusplus_header_compiler_error
110
+ detect_missing_subspecs
81
111
 
82
112
  # https://github.com/facebook/react-native/pull/14664
83
113
  animation_view_file = 'Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-fix-react-native
3
3
  version: !ruby/object:Gem::Version
4
- version: 2018.04.07.18
4
+ version: 2018.04.09.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orta Therox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-07 00:00:00.000000000 Z
11
+ date: 2018-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler