1*855c84ecSAlan Hughesrequire 'json'
2*855c84ecSAlan Hughes
3*855c84ecSAlan Hughespackage = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
4*855c84ecSAlan Hughes
5*855c84ecSAlan HughesPod::Spec.new do |s|
6*855c84ecSAlan Hughes  s.name           = 'ExpoDocumentPicker'
7*855c84ecSAlan Hughes  s.version        = package['version']
8*855c84ecSAlan Hughes  s.summary        = package['description']
9*855c84ecSAlan Hughes  s.description    = package['description']
10*855c84ecSAlan Hughes  s.license        = package['license']
11*855c84ecSAlan Hughes  s.author         = package['author']
12*855c84ecSAlan Hughes  s.homepage       = package['homepage']
13*855c84ecSAlan Hughes  s.platform       = :ios, '13.0'
14*855c84ecSAlan Hughes  s.swift_version  = '5.4'
15*855c84ecSAlan Hughes  s.source         = { git: 'https://github.com/expo/expo.git' }
16*855c84ecSAlan Hughes  s.static_framework = true
17*855c84ecSAlan Hughes
18*855c84ecSAlan Hughes  s.dependency 'ExpoModulesCore'
19*855c84ecSAlan Hughes
20*855c84ecSAlan Hughes  # Swift/Objective-C compatibility
21*855c84ecSAlan Hughes  s.pod_target_xcconfig = {
22*855c84ecSAlan Hughes    'DEFINES_MODULE' => 'YES',
23*855c84ecSAlan Hughes    'SWIFT_COMPILATION_MODE' => 'wholemodule'
24*855c84ecSAlan Hughes  }
25*855c84ecSAlan Hughes
26*855c84ecSAlan Hughes  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')
27*855c84ecSAlan Hughes    s.source_files = "**/*.h"
28*855c84ecSAlan Hughes    s.vendored_frameworks = "#{s.name}.xcframework"
29*855c84ecSAlan Hughes  else
30*855c84ecSAlan Hughes    s.source_files = "**/*.{h,m,swift}"
31*855c84ecSAlan Hughes  end
32*855c84ecSAlan Hughesend
33