1*0b761b65SWojciech Dróżdżrequire 'json' 2*0b761b65SWojciech Dróżdż 3*0b761b65SWojciech Dróżdżpackage = JSON.parse(File.read(File.join(__dir__, '..', 'package.json'))) 4*0b761b65SWojciech Dróżdż 5*0b761b65SWojciech DróżdżPod::Spec.new do |s| 6*0b761b65SWojciech Dróżdż s.name = 'ExpoScreenOrientation' 7*0b761b65SWojciech Dróżdż s.version = package['version'] 8*0b761b65SWojciech Dróżdż s.summary = package['description'] 9*0b761b65SWojciech Dróżdż s.description = package['description'] 10*0b761b65SWojciech Dróżdż s.license = package['license'] 11*0b761b65SWojciech Dróżdż s.author = package['author'] 12*0b761b65SWojciech Dróżdż s.homepage = package['homepage'] 13*0b761b65SWojciech Dróżdż s.platform = :ios, '13.0' 14*0b761b65SWojciech Dróżdż s.swift_version = '5.4' 15*0b761b65SWojciech Dróżdż s.source = { git: 'https://github.com/expo/expo.git' } 16*0b761b65SWojciech Dróżdż s.static_framework = true 17*0b761b65SWojciech Dróżdż 18*0b761b65SWojciech Dróżdż s.dependency 'ExpoModulesCore' 19*0b761b65SWojciech Dróżdż s.dependency 'React-Core' 20*0b761b65SWojciech Dróżdż 21*0b761b65SWojciech Dróżdż unless defined?(install_modules_dependencies) 22*0b761b65SWojciech Dróżdż # `install_modules_dependencies` is defined from react_native_pods.rb. 23*0b761b65SWojciech Dróżdż # when running with `pod ipc spec`, this method is not defined and we have to require manually. 24*0b761b65SWojciech Dróżdż require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods") 25*0b761b65SWojciech Dróżdż end 26*0b761b65SWojciech Dróżdż install_modules_dependencies(s) 27*0b761b65SWojciech Dróżdż 28*0b761b65SWojciech Dróżdż # Swift/Objective-C compatibility 29*0b761b65SWojciech Dróżdż s.pod_target_xcconfig = { 30*0b761b65SWojciech Dróżdż 'DEFINES_MODULE' => 'YES' 31*0b761b65SWojciech Dróżdż } 32*0b761b65SWojciech Dróżdż 33*0b761b65SWojciech Dróżdż 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') 34*0b761b65SWojciech Dróżdż s.source_files = "#{s.name}/**/*.h" 35*0b761b65SWojciech Dróżdż s.vendored_frameworks = "#{s.name}.xcframework" 36*0b761b65SWojciech Dróżdż else 37*0b761b65SWojciech Dróżdż s.source_files = "**/*.{h,m,swift}" 38*0b761b65SWojciech Dróżdż end 39*0b761b65SWojciech Dróżdżend 40