1bf3e8710SEric Samelsonrequire 'json'
2bf3e8710SEric Samelson
3bf3e8710SEric Samelsonpackage = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
4bf3e8710SEric Samelson
5bf3e8710SEric SamelsonPod::Spec.new do |s|
6bf3e8710SEric Samelson  s.name           = 'EXUpdates'
7bf3e8710SEric Samelson  s.version        = package['version']
8bf3e8710SEric Samelson  s.summary        = package['description']
9bf3e8710SEric Samelson  s.description    = package['description']
10bf3e8710SEric Samelson  s.license        = package['license']
11bf3e8710SEric Samelson  s.author         = package['author']
12bf3e8710SEric Samelson  s.homepage       = package['homepage']
13089a3d82STomasz Sapeta  s.platform       = :ios, '11.0'
14bf3e8710SEric Samelson  s.source         = { git: 'https://github.com/expo/expo.git' }
15bf3e8710SEric Samelson
16*efd75decSTomasz Sapeta  s.dependency 'ExpoModulesCore'
1725be6b63SBartłomiej Bukowski  s.dependency 'React-Core'
18e28d843fSEric Samelson  s.dependency 'EXStructuredHeaders'
19e7b57cd1SEric Samelson  s.dependency 'EXUpdatesInterface'
20ed7bf842SEric Samelson
21f2c4d7a7SWill Schurman  s.pod_target_xcconfig = {
22e3cc425dSWill Schurman    'GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS' => 'YES',
23e3cc425dSWill Schurman    'GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS' => 'YES'
24f2c4d7a7SWill Schurman  }
25f2c4d7a7SWill Schurman
2652a1f6d0STomasz Sapeta  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')
276e1dd0e8STomasz Sapeta    s.source_files = "#{s.name}/**/*.h"
286e1dd0e8STomasz Sapeta    s.vendored_frameworks = "#{s.name}.xcframework"
296e1dd0e8STomasz Sapeta  else
306e1dd0e8STomasz Sapeta    s.source_files = "#{s.name}/**/*.{h,m}"
316e1dd0e8STomasz Sapeta  end
326e1dd0e8STomasz Sapeta
33ed7bf842SEric Samelson  s.test_spec 'Tests' do |test_spec|
34318e29d7STomasz Sapeta    test_spec.source_files = 'Tests/*.{h,m,swift}'
35ed7bf842SEric Samelson  end
36bf3e8710SEric Samelsonend
37