-
Notifications
You must be signed in to change notification settings - Fork 0
/
vietmap-react-native-navigation.podspec
54 lines (45 loc) · 2.07 KB
/
vietmap-react-native-navigation.podspec
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")))
# TargetsToChangeToDynamic = ['MapboxMobileEvents']
TargetsToChangeToDynamic = []
$RNMBNAV = Object.new
def $RNMBNAV.post_install(installer)
installer.pod_targets.each do |pod|
if TargetsToChangeToDynamic.include?(pod.name)
if pod.send(:build_type) != Pod::BuildType.dynamic_framework
pod.instance_variable_set(:@build_type,Pod::BuildType.dynamic_framework)
puts "* Changed #{pod.name} to `#{pod.send(:build_type)}`"
fail "Unable to change build_type" unless mobile_events_target.send(:build_type) == Pod::BuildType.dynamic_framework
end
end
end
end
def $RNMBNAV.pre_install(installer)
installer.aggregate_targets.each do |target|
target.pod_targets.select { |p| TargetsToChangeToDynamic.include?(p.name) }.each do |mobile_events_target|
mobile_events_target.instance_variable_set(:@build_type,Pod::BuildType.dynamic_framework)
puts "* Changed #{mobile_events_target.name} to #{mobile_events_target.send(:build_type)}"
fail "Unable to change build_type" unless mobile_events_target.send(:build_type) == Pod::BuildType.dynamic_framework
end
end
end
Pod::Spec.new do |s|
s.name = "vietmap-react-native-navigation"
s.version = package["version"]
s.summary = package["description"]
s.description = <<-DESC
VietMap turn-by-turn routing for React Native.
DESC
s.homepage = "https://github.com/vietmap-company/vietmap-react-native-navigation"
s.license = { :type => "BSD-3-Clause", :file => "LICENSE" }
s.authors = { "VietMap" => "[email protected]" }
s.platforms = { :ios => "12.4" }
s.source = { :git => "https://github.com/vietmap-company/vietmap-react-native-navigation.git", :tag => "#{s.version}" }
s.source_files = "ios/**/*.{h,m,swift}"
s.requires_arc = true
s.dependency "React-Core"
s.dependency 'VietMapNavigation', '2.1.7'
s.dependency 'VietMapCoreNavigation', '2.1.5'
s.platform = :ios, '12.0'
s.swift_version = '5.0'
end