1eafa96e0SStanisław Chmielarequire 'json' 2eafa96e0SStanisław Chmiela 3eafa96e0SStanisław Chmielapackage = JSON.parse(File.read(File.join(__dir__, '..', 'package.json'))) 4eafa96e0SStanisław Chmiela 5eafa96e0SStanisław ChmielaPod::Spec.new do |s| 6eafa96e0SStanisław Chmiela s.name = 'EXConstants' 7eafa96e0SStanisław Chmiela s.version = package['version'] 8eafa96e0SStanisław Chmiela s.summary = package['description'] 9eafa96e0SStanisław Chmiela s.description = package['description'] 10eafa96e0SStanisław Chmiela s.license = package['license'] 11eafa96e0SStanisław Chmiela s.author = package['author'] 12eafa96e0SStanisław Chmiela s.homepage = package['homepage'] 13*ef901781SDouglas Lowder s.platforms = { :ios => '13.0', :tvos => '13.0'} 146668b09dSAlan Hughes s.swift_version = '5.4' 15eafa96e0SStanisław Chmiela s.source = { git: 'https://github.com/expo/expo.git' } 169886c0aaSKudo Chien s.static_framework = true 17eafa96e0SStanisław Chmiela 1865d041d7STomasz Sapeta s.dependency 'ExpoModulesCore' 196e1dd0e8STomasz Sapeta 206668b09dSAlan Hughes # Swift/Objective-C compatibility 216668b09dSAlan Hughes s.pod_target_xcconfig = { 226668b09dSAlan Hughes 'DEFINES_MODULE' => 'YES', 236668b09dSAlan Hughes 'SWIFT_COMPILATION_MODE' => 'wholemodule' 246668b09dSAlan Hughes } 256668b09dSAlan Hughes 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') 276668b09dSAlan Hughes s.source_files = "**/*.h" 286e1dd0e8STomasz Sapeta s.vendored_frameworks = "#{s.name}.xcframework" 296e1dd0e8STomasz Sapeta else 306668b09dSAlan Hughes s.source_files = "**/*.{h,m,swift}" 31eafa96e0SStanisław Chmiela end 3279ca9839SKudo Chien 3379ca9839SKudo Chien s.script_phase = { 3479ca9839SKudo Chien :name => 'Generate app.config for prebuilt Constants.manifest', 357c591bbbSKudo Chien :script => 'bash -l -c "$PODS_TARGET_SRCROOT/../scripts/get-app-config-ios.sh"', 3679ca9839SKudo Chien :execution_position => :before_compile 3779ca9839SKudo Chien } 3879ca9839SKudo Chien 3979ca9839SKudo Chien # Generate EXConstants.bundle without existing resources 4079ca9839SKudo Chien # `get-app-config-ios.sh` will generate app.config in EXConstants.bundle 4179ca9839SKudo Chien s.resource_bundles = { 4279ca9839SKudo Chien 'EXConstants' => [] 4379ca9839SKudo Chien } 4479ca9839SKudo Chien 456e1dd0e8STomasz Sapetaend 46