mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-19 09:41:15 +00:00
f5503e2c9b
Since UIGraphicsBeginImageContextWithOptions will be depracated in iOS 17 (developer.apple.com/documentation/uikit/1623912-uigraphicsbeginimagecontextwitho), I changed the implementation to not use it and use UIGraphicsImageRenderer instead. Also added Mask examples to be able to test it.
36 lines
1.3 KiB
Ruby
36 lines
1.3 KiB
Ruby
require 'json'
|
|
|
|
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
|
|
fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
|
|
|
|
Pod::Spec.new do |s|
|
|
s.name = 'RNSVG'
|
|
s.version = package['version']
|
|
s.summary = package['description']
|
|
s.license = package['license']
|
|
s.homepage = package['homepage']
|
|
s.authors = 'Horcrux Chen'
|
|
s.source = { :git => 'https://github.com/react-native-community/react-native-svg.git', :tag => "v#{s.version}" }
|
|
s.source_files = 'apple/**/*.{h,m,mm}'
|
|
s.ios.exclude_files = '**/*.macos.{h,m,mm}'
|
|
s.tvos.exclude_files = '**/*.macos.{h,m,mm}'
|
|
s.osx.exclude_files = '**/*.ios.{h,m,mm}'
|
|
s.requires_arc = true
|
|
|
|
if fabric_enabled
|
|
s.platforms = { :osx => "10.14", ios: '12.4', tvos: '11.0' }
|
|
install_modules_dependencies(s)
|
|
|
|
s.subspec "common" do |ss|
|
|
ss.source_files = "common/cpp/**/*.{cpp,h}"
|
|
ss.header_dir = "rnsvg"
|
|
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/common/cpp\"" }
|
|
end
|
|
else
|
|
s.platforms = { :osx => "10.14", :ios => "10.0", :tvos => "9.2" }
|
|
s.exclude_files = 'apple/Utils/RNSVGFabricConversions.h'
|
|
s.dependency 'React-Core'
|
|
end
|
|
end
|