|
1 |
| -require 'json' |
2 |
| -package = JSON.parse(File.read('./package.json')) |
| 1 | +require "json" |
3 | 2 |
|
4 |
| -fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1' |
| 3 | +package = JSON.parse(File.read(File.join(__dir__, "package.json"))) |
5 | 4 |
|
6 | 5 | Pod::Spec.new do |s|
|
7 |
| - s.name = "RNPermissions" |
| 6 | + s.name = "RNPermissions" |
8 | 7 |
|
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"] |
14 | 13 |
|
15 |
| - s.ios.deployment_target = "10.0" |
16 |
| - s.tvos.deployment_target = "11.0" |
17 |
| - s.requires_arc = true |
| 14 | + s.requires_arc = true |
18 | 15 |
|
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}" |
21 | 18 |
|
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" } |
40 | 22 | 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" } |
44 | 25 | end
|
45 |
| - |
46 | 26 | end
|
0 commit comments