-
Notifications
You must be signed in to change notification settings - Fork 3.9k
/
firebase_crashlytics.podspec
49 lines (41 loc) 路 1.86 KB
/
firebase_crashlytics.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
require 'yaml'
pubspec = YAML.load_file(File.join('..', 'pubspec.yaml'))
library_version = pubspec['version'].gsub('+', '-')
# Add upload-symbols script to the Flutter target.
current_dir = Dir.pwd
calling_dir = File.dirname(__FILE__)
project_dir = calling_dir.slice(0..(calling_dir.index('/.symlinks')))
system("ruby #{current_dir}/crashlytics_add_upload_symbols -f -p #{project_dir} -n Runner.xcodeproj")
if defined?($FirebaseSDKVersion)
Pod::UI.puts "#{pubspec['name']}: Using user specified Firebase SDK version '#{$FirebaseSDKVersion}'"
firebase_sdk_version = $FirebaseSDKVersion
else
firebase_core_script = File.join(File.expand_path('..', File.expand_path('..', File.dirname(__FILE__))), 'firebase_core/ios/firebase_sdk_version.rb')
if File.exist?(firebase_core_script)
require firebase_core_script
firebase_sdk_version = firebase_sdk_version!
Pod::UI.puts "#{pubspec['name']}: Using Firebase SDK version '#{firebase_sdk_version}' defined in 'firebase_core'"
end
end
Pod::Spec.new do |s|
s.name = pubspec['name']
s.version = library_version
s.summary = pubspec['description']
s.description = pubspec['description']
s.homepage = pubspec['homepage']
s.license = { :file => '../LICENSE' }
s.authors = 'The Chromium Authors'
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.ios.deployment_target = '11.0'
s.dependency 'Flutter'
s.dependency 'firebase_core'
s.dependency 'Firebase/Crashlytics', firebase_sdk_version
s.static_framework = true
s.pod_target_xcconfig = {
'GCC_PREPROCESSOR_DEFINITIONS' => "LIBRARY_VERSION=\\@\\\"#{library_version}\\\" LIBRARY_NAME=\\@\\\"flutter-fire-cls\\\"",
'DEFINES_MODULE' => 'YES'
}
s.user_target_xcconfig = { 'DEBUG_INFORMATION_FORMAT' => 'dwarf-with-dsym' }
end