Skip to content

Commit 9ff2bf5

Browse files
authored
Fixes for RNPermissions.podspec (#786)
1 parent 3e19398 commit 9ff2bf5

File tree

1 file changed

+16
-36
lines changed

1 file changed

+16
-36
lines changed

RNPermissions.podspec

Lines changed: 16 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,26 @@
1-
require 'json'
2-
package = JSON.parse(File.read('./package.json'))
1+
require "json"
32

4-
fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
3+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
54

65
Pod::Spec.new do |s|
7-
s.name = "RNPermissions"
6+
s.name = "RNPermissions"
87

9-
s.version = package["version"]
10-
s.license = package["license"]
11-
s.summary = package["description"]
12-
s.authors = package["author"]
13-
s.homepage = package["homepage"]
8+
s.version = package["version"]
9+
s.license = package["license"]
10+
s.summary = package["description"]
11+
s.author = package["author"]
12+
s.homepage = package["homepage"]
1413

15-
s.ios.deployment_target = "10.0"
16-
s.tvos.deployment_target = "11.0"
17-
s.requires_arc = true
14+
s.requires_arc = true
1815

19-
s.source = { :git => package["repository"]["url"], :tag => s.version }
20-
s.source_files = "ios/*.{h,m,mm}"
16+
s.source = { :git => package["repository"]["url"], :tag => s.version }
17+
s.source_files = "ios/*.{h,m,mm}"
2118

22-
if fabric_enabled
23-
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
24-
25-
s.pod_target_xcconfig = {
26-
'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/boost" "$(PODS_ROOT)/boost-for-react-native" "$(PODS_ROOT)/RCT-Folly"',
27-
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17',
28-
}
29-
30-
s.platforms = { ios: '11.0', tvos: '11.0' }
31-
s.compiler_flags = folly_compiler_flags + ' -DRCT_NEW_ARCH_ENABLED'
32-
33-
s.dependency "React"
34-
s.dependency "React-RCTFabric" # This is for fabric component
35-
s.dependency "React-Codegen"
36-
s.dependency "RCT-Folly"
37-
s.dependency "RCTRequired"
38-
s.dependency "RCTTypeSafety"
39-
s.dependency "ReactCommon/turbomodule/core"
19+
if ENV['RCT_NEW_ARCH_ENABLED'] == "1" then
20+
install_modules_dependencies(s)
21+
s.platforms = { :ios => "12.4", :tvos => "12.4" }
4022
else
41-
s.platforms = { :ios => "9.0", :tvos => "9.0" }
42-
43-
s.dependency "React-Core"
23+
s.dependency "React-Core"
24+
s.platforms = { :ios => "10.0", :tvos => "11.0" }
4425
end
45-
4626
end

0 commit comments

Comments
 (0)