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