Repository navigation
Expand file tree
/
Copy pathreact-native-blob-util.podspec
More file actions
54 lines (47 loc) · 2.35 KB
/
Copy pathreact-native-blob-util.podspec
File metadata and controls
54 lines (47 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
require "json"
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
Pod::Spec.new do |s|
s.name = package['name']
s.version = package['version']
s.summary = package['description']
s.requires_arc = true
s.license = 'MIT'
s.homepage = 'n/a'
s.source = { :git => "https://github.com/RonRadtke/react-native-blob-util", :tag => s.version.to_s }
s.author = 'RonRadtke'
s.source_files = 'ios/**/*.{h,m,mm,swift}'
# Only headers that do not import React may be public: the umbrella this
# generates is what Swift imports as the underlying module, and a React
# header inside it is not modular from Swift's point of view.
#
# ios/ReactNativeBlobUtilObjC/ is exactly that set - the React-free leaf the
# Swift core and the adapter both build against. Package.swift compiles it as
# its own target for the same reason, and tests/unit/packageSwift.test.js
# keeps a React import from creeping in.
s.public_header_files = 'ios/ReactNativeBlobUtilObjC/*.h'
s.resource_bundles = {
'ReactNativeBlobUtilPrivacyInfo' => ['ios/PrivacyInfo.xcprivacy'],
}
# min_ios_version_supported is defined by React Native's Podfile helper, so it
# only exists when the spec is evaluated through an app's Podfile. Evaluating
# it any other way - `pod ipc spec`, `pod spec lint` - would raise NoMethodError
# and take the published podspec with it, hence the literal fallback.
s.platforms = { :ios => defined?(min_ios_version_supported) ? min_ios_version_supported : "15.1" }
s.swift_version = '5.0'
s.framework = 'Photos'
# install_modules_dependencies is a React Native Podfile helper, so like
# min_ios_version_supported above it only exists when an app's Podfile has
# required react_native_pods.rb. Calling it unguarded makes the published
# podspec unparseable outside that context. The guard is about evaluation
# context only - there is no longer an old-architecture branch here.
if respond_to?(:install_modules_dependencies, true)
install_modules_dependencies(s)
else
s.dependency 'React-Core'
end
# Merge rather than assign: install_modules_dependencies sets this too, and
# replacing it drops the header and flag configuration it just wrote.
s.pod_target_xcconfig = (s.attributes_hash['pod_target_xcconfig'] || {}).merge({
'DEFINES_MODULE' => 'YES',
})
end