-
Notifications
You must be signed in to change notification settings - Fork 72
Expand file tree
/
Copy pathrive-react-native.podspec
More file actions
37 lines (27 loc) · 1.16 KB
/
rive-react-native.podspec
File metadata and controls
37 lines (27 loc) · 1.16 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
require "json"
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
# Resolve Rive iOS SDK version
podfile_properties_path = File.join(__dir__, "ios", "Podfile.properties.json")
if File.exist?(podfile_properties_path)
podfile_properties = JSON.parse(File.read(podfile_properties_path))
rive_ios_version = podfile_properties["RiveRuntimeIOSVersion"]
end
rive_ios_version ||= package["runtimeVersions"]["ios"]
if rive_ios_version.nil?
raise "Could not determine Rive iOS SDK version. Please add 'runtimeVersions.ios' to package.json"
end
Pod::UI.puts "rive-react-native: Using Rive iOS SDK #{rive_ios_version}"
Pod::Spec.new do |s|
s.name = "rive-react-native"
s.version = package["version"]
s.summary = package["description"]
s.homepage = package["homepage"]
s.license = package["license"]
s.authors = package["author"]
s.platforms = { :ios => "14.0" }
s.source = { :git => "https://github.com/rive-app/rive-react-native.git", :tag => "#{s.version}" }
s.source_files = "ios/**/*.{h,m,mm,swift}"
s.swift_version = "5.0"
s.dependency "React-Core"
s.dependency "RiveRuntime", rive_ios_version
end