You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.3 KiB
39 lines
1.3 KiB
require 'json'
|
|
|
|
package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
|
|
|
|
Pod::Spec.new do |s|
|
|
s.name = 'EXConstants'
|
|
s.version = package['version']
|
|
s.summary = package['description']
|
|
s.description = package['description']
|
|
s.license = package['license']
|
|
s.author = package['author']
|
|
s.homepage = package['homepage']
|
|
s.platform = :ios, '13.0'
|
|
s.source = { git: 'https://github.com/expo/expo.git' }
|
|
s.static_framework = true
|
|
|
|
s.dependency 'ExpoModulesCore'
|
|
|
|
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')
|
|
s.source_files = "#{s.name}/**/*.h"
|
|
s.vendored_frameworks = "#{s.name}.xcframework"
|
|
else
|
|
s.source_files = "#{s.name}/**/*.{h,m}"
|
|
end
|
|
|
|
s.script_phase = {
|
|
:name => 'Generate app.config for prebuilt Constants.manifest',
|
|
:script => 'bash -l -c "$PODS_TARGET_SRCROOT/../scripts/get-app-config-ios.sh"',
|
|
:execution_position => :before_compile
|
|
}
|
|
|
|
# Generate EXConstants.bundle without existing resources
|
|
# `get-app-config-ios.sh` will generate app.config in EXConstants.bundle
|
|
s.resource_bundles = {
|
|
'EXConstants' => []
|
|
}
|
|
|
|
end
|