-
-
Notifications
You must be signed in to change notification settings - Fork 34
/
SentryCapacitor.podspec
33 lines (29 loc) · 1.15 KB
/
SentryCapacitor.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
require 'json'
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
Pod::Spec.new do |s|
s.name = 'SentryCapacitor'
s.version = package['version']
s.summary = package['description']
s.license = package['license']
s.homepage = package['repository']['url']
s.author = package['author']
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
s.dependency 'Sentry/HybridSDK', '8.36.0'
s.dependency 'Capacitor'
if File.exist?('../../@capacitor/core/package.json') == false
# If Capacitor was not found (could happen when using Yarn PNP), fallback to the
# required minimum version of Capacitor 4.
miniOSVersion = '13.0'
else
capacitorPackage = JSON.parse(File.read(File.join(__dir__, '../../@capacitor/core/package.json')))
capacitorVersion = capacitorPackage['version']
if capacitorVersion.start_with?("2.") or capacitorVersion.start_with?("3.")
miniOSVersion = '12.0'
else
miniOSVersion = '13.0' # Required for Capacitor 4 and newer.
end
end
s.ios.deployment_target = miniOSVersion
s.swift_version = '5.1'
end