1require 'json' 2 3package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) 4 5Pod::Spec.new do |s| 6 s.name = 'ExpoGL' 7 s.version = package['version'] 8 s.summary = package['description'] 9 s.description = package['description'] 10 s.license = package['license'] 11 s.author = package['author'] 12 s.homepage = package['homepage'] 13 s.platform = :ios, '13.0' 14 s.source = { git: 'https://github.com/expo/expo-gl.git' } 15 s.static_framework = true 16 17 s.dependency 'ExpoModulesCore' 18 s.dependency 'ReactCommon/turbomodule/core' 19 20 s.compiler_flags = '-x objective-c++ -std=c++1z' 21 s.pod_target_xcconfig = { 22 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GLES_SILENCE_DEPRECATION=1' 23 } 24 25 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 s.source_files = "ios/**/*.h" 27 s.vendored_frameworks = "#{s.name}.xcframework" 28 else 29 s.source_files = "ios/**/*.{h,m,mm,swift}", "common/**/*.{h,cpp,def}" 30 end 31 32 s.public_header_files = ['ios/**/*.h', 'common/EXGLNativeApi.h'] 33end 34