Skip to content

Commit

Permalink
Fixes for RNPermissions.podspec (#786)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsjoberg authored Jul 11, 2023
1 parent 3e19398 commit 9ff2bf5
Showing 1 changed file with 16 additions and 36 deletions.
52 changes: 16 additions & 36 deletions RNPermissions.podspec
Original file line number Diff line number Diff line change
@@ -1,46 +1,26 @@
require 'json'
package = JSON.parse(File.read('./package.json'))
require "json"

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

Pod::Spec.new do |s|
s.name = "RNPermissions"
s.name = "RNPermissions"

s.version = package["version"]
s.license = package["license"]
s.summary = package["description"]
s.authors = package["author"]
s.homepage = package["homepage"]
s.version = package["version"]
s.license = package["license"]
s.summary = package["description"]
s.author = package["author"]
s.homepage = package["homepage"]

s.ios.deployment_target = "10.0"
s.tvos.deployment_target = "11.0"
s.requires_arc = true
s.requires_arc = true

s.source = { :git => package["repository"]["url"], :tag => s.version }
s.source_files = "ios/*.{h,m,mm}"
s.source = { :git => package["repository"]["url"], :tag => s.version }
s.source_files = "ios/*.{h,m,mm}"

if fabric_enabled
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'

s.pod_target_xcconfig = {
'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/boost" "$(PODS_ROOT)/boost-for-react-native" "$(PODS_ROOT)/RCT-Folly"',
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17',
}

s.platforms = { ios: '11.0', tvos: '11.0' }
s.compiler_flags = folly_compiler_flags + ' -DRCT_NEW_ARCH_ENABLED'

s.dependency "React"
s.dependency "React-RCTFabric" # This is for fabric component
s.dependency "React-Codegen"
s.dependency "RCT-Folly"
s.dependency "RCTRequired"
s.dependency "RCTTypeSafety"
s.dependency "ReactCommon/turbomodule/core"
if ENV['RCT_NEW_ARCH_ENABLED'] == "1" then
install_modules_dependencies(s)
s.platforms = { :ios => "12.4", :tvos => "12.4" }
else
s.platforms = { :ios => "9.0", :tvos => "9.0" }

s.dependency "React-Core"
s.dependency "React-Core"
s.platforms = { :ios => "10.0", :tvos => "11.0" }
end

end

0 comments on commit 9ff2bf5

Please sign in to comment.