1require 'json' 2 3package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json'))) 4 5Pod::Spec.new do |s| 6 s.name = 'EXManifests' 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.swift_version = '5.4' 15 s.source = { git: 'https://github.com/expo/expo.git' } 16 s.static_framework = true 17 18 s.dependency 'ExpoModulesCore' 19 20 # Swift/Objective-C compatibility 21 s.pod_target_xcconfig = { 22 'GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS' => 'YES', 23 'GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS' => 'YES', 24 'DEFINES_MODULE' => 'YES', 25 'SWIFT_COMPILATION_MODE' => 'wholemodule' 26 } 27 28 s.script_phase = { 29 :name => 'Copy Swift Header', 30 :script => 'COMPATIBILITY_HEADER_PATH="${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h"; ditto "${COMPATIBILITY_HEADER_PATH}" "${PODS_ROOT}/Headers/Public/${PRODUCT_MODULE_NAME}/${PRODUCT_MODULE_NAME}-Swift.h"', 31 :execution_position => :after_compile 32 } 33 34 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') 35 s.source_files = "#{s.name}/**/*.h" 36 s.vendored_frameworks = "#{s.name}.xcframework" 37 else 38 s.source_files = "#{s.name}/**/*.{h,m,swift}" 39 end 40 41 s.exclude_files = 'Tests/' 42 s.test_spec 'Tests' do |test_spec| 43 test_spec.dependency 'ExpoModulesTestCore' 44 test_spec.source_files = 'Tests/*.{h,m,swift}' 45 end 46end 47