194a1f676SEric Samelsonrequire 'json'
294a1f676SEric Samelson
394a1f676SEric Samelsonpackage = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
494a1f676SEric Samelson
594a1f676SEric SamelsonPod::Spec.new do |s|
694a1f676SEric Samelson  s.name           = 'EXStructuredHeaders'
794a1f676SEric Samelson  s.version        = package['version']
894a1f676SEric Samelson  s.summary        = package['description']
994a1f676SEric Samelson  s.description    = package['description']
1094a1f676SEric Samelson  s.license        = package['license']
1194a1f676SEric Samelson  s.author         = package['author']
1294a1f676SEric Samelson  s.homepage       = package['homepage']
1394a1f676SEric Samelson  s.platform       = :ios, '11.0'
1494a1f676SEric Samelson  s.source         = { git: 'https://github.com/expo/expo.git' }
1594a1f676SEric Samelson
1694a1f676SEric Samelson  s.dependency 'UMCore'
1794a1f676SEric Samelson
1894a1f676SEric Samelson  if !$ExpoUseSources&.include?(package['name']) && ENV['EXPO_USE_SOURCE'].to_i == 0 && File.exist?("#{s.name}.xcframework") && Gem::Version.new(Pod::VERSION) >= Gem::Version.new('1.10.0')
1994a1f676SEric Samelson    s.source_files = "#{s.name}/**/*.h"
2094a1f676SEric Samelson    s.vendored_frameworks = "#{s.name}.xcframework"
2194a1f676SEric Samelson  else
2294a1f676SEric Samelson    s.source_files = "#{s.name}/**/*.{h,m}"
2394a1f676SEric Samelson  end
2494a1f676SEric Samelson
2594a1f676SEric Samelson  s.test_spec 'Tests' do |test_spec|
26*318e29d7STomasz Sapeta    test_spec.source_files = 'Tests/*.{h,m,swift}'
2794a1f676SEric Samelson  end
2894a1f676SEric Samelsonend
29