-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathRNRive.podspec
More file actions
53 lines (39 loc) · 1.75 KB
/
RNRive.podspec
File metadata and controls
53 lines (39 loc) · 1.75 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
require "json"
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
rive_ios_version = nil
if ENV['RIVE_RUNTIME_IOS_VERSION']
rive_ios_version = ENV['RIVE_RUNTIME_IOS_VERSION']
end
if !rive_ios_version && defined?($RiveRuntimeIOSVersion)
rive_ios_version = $RiveRuntimeIOSVersion
end
if !rive_ios_version && defined?(Pod::Config) && Pod::Config.respond_to?(:instance)
podfile_properties_path = File.join(Pod::Config.instance.installation_root, 'Podfile.properties.json')
if File.exist?(podfile_properties_path)
podfile_properties = JSON.parse(File.read(podfile_properties_path)) rescue {}
rive_ios_version = podfile_properties['RiveRuntimeIOSVersion'] if podfile_properties['RiveRuntimeIOSVersion']
end
end
if !rive_ios_version && package['runtimeVersions'] && package['runtimeVersions']['ios']
rive_ios_version = package['runtimeVersions']['ios']
end
if !rive_ios_version
raise "Internal Error: Failed to determine Rive iOS SDK version. Please ensure package.json contains 'runtimeVersions.ios'"
end
Pod::UI.puts "@rive-app/react-native: Rive iOS SDK #{rive_ios_version}"
Pod::Spec.new do |s|
s.name = "RNRive"
s.version = package["version"]
s.summary = package["description"]
s.homepage = package["homepage"]
s.license = package["license"]
s.authors = package["author"]
s.platforms = { :ios => min_ios_version_supported }
s.source = { :git => "https://github.com/rive-app/rive-nitro-react-native.git", :tag => "#{s.version}" }
s.source_files = "ios/**/*.{h,m,mm,swift}"
s.public_header_files = ['ios/RCTSwiftLog.h']
load 'nitrogen/generated/ios/RNRive+autolinking.rb'
add_nitrogen_files(s)
s.dependency "RiveRuntime", rive_ios_version
install_modules_dependencies(s)
end