1
1
Pod ::Spec . new do |s |
2
- Pod ::Installer ::UserProjectIntegrator ::TargetIntegrator . class_eval do
3
- unless method_defined? ( :integrate_with_instabug! )
4
- INSTABUG_PHASE_NAME = "Upload Instabug dSYM"
5
- INSTABUG_PHASE_SCRIPT = <<-SCRIPTEND
6
- # SKIP_SIMULATOR_BUILDS=1
7
- SCRIPT_SRC=$(find "$PROJECT_DIR" -name 'Instabug_dsym_upload.sh')
8
- if [ ! "${SCRIPT_SRC}" ]; then
9
- echo "Instabug: err: script not found. Make sure that you're including Instabug.bundle in your project directory"
10
- exit 1
11
- fi
12
- source "${SCRIPT_SRC}"
13
- SCRIPTEND
14
-
15
- def integrate_with_instabug!
16
- integrate_without_instabug!
17
- return if instabug_native_targets . empty?
18
- UI . section ( "Integrating with Instabug" ) do
19
- add_instabug_upload_script_phase
20
- user_project . save
21
- end
22
- end
23
-
24
- alias integrate_without_instabug! integrate!
25
- alias integrate! integrate_with_instabug!
26
-
27
- def add_instabug_upload_script_phase
28
- instabug_native_targets . each do |native_target |
29
- phase = native_target . shell_script_build_phases . select { |bp | bp . name == INSTABUG_PHASE_NAME } . first ||
30
- native_target . new_shell_script_build_phase ( INSTABUG_PHASE_NAME )
31
-
32
- phase . shell_path = "/bin/sh"
33
- phase . shell_script = INSTABUG_PHASE_SCRIPT
34
- phase . show_env_vars_in_log = '0'
35
- end
36
- end
37
-
38
- def instabug_native_targets
39
- @instabug_native_targets ||=(
40
- target_uuids = target . user_target_uuids
41
- native_targets = target_uuids . map do |uuid |
42
- native_target = user_project . objects_by_uuid [ uuid ]
43
- unless native_target
44
- raise Informative , "[Error] Unable to find the target with " \
45
- "the `#{ uuid } ` UUID for the `#{ target } ` integration library"
46
- end
47
- native_target
48
- end
49
-
50
- native_targets . reject do |native_target |
51
- native_target . shell_script_build_phases . any? do |bp |
52
- bp . name == INSTABUG_PHASE_NAME && bp . shell_script == INSTABUG_PHASE_SCRIPT
53
- end
54
- end
55
- )
56
- end
57
- end
58
- end
59
-
60
2
s . name = "Instabug"
61
- s . version = "3.4.1 "
3
+ s . version = "3.4.2 "
62
4
s . summary = "Bug reporting for mobile apps. Learn more at http://instabug.com"
63
5
s . homepage = "http://instabug.com"
64
6
s . license = {
@@ -81,12 +23,13 @@ Pod::Spec.new do |s|
81
23
}
82
24
s . author = { "Instabug" => "[email protected] " }
83
25
s . platform = :ios , '5.0'
84
- s . source = { :git => "https://github.com/Instabug/Instabug-iOS.git" , :tag => "3.4.1 " }
26
+ s . source = { :git => "https://github.com/Instabug/Instabug-iOS.git" , :tag => "3.4.2 " }
85
27
s . source_files = 'Instabug.framework/Versions/A/Headers/*.{h}'
86
- s . resources = 'Instabug.bundle'
87
- s . preserve_paths = 'Instabug.framework/*' , 'Instabug.bundle'
28
+ s . resources = 'Instabug.bundle' , 'add_instabug_build_script.rb'
29
+ s . preserve_paths = 'Instabug.framework/*' , 'Instabug.bundle' , 'add_instabug_build_script.rb'
88
30
s . frameworks = 'QuartzCore' , 'CoreGraphics' , 'CoreMotion' , 'CoreFoundation' , 'SystemConfiguration' , 'Foundation' , 'AVFoundation' , 'OpenGLES' , 'AudioToolbox' , 'GLKit' , 'CoreTelephony' , 'UIKit' , 'CoreLocation' , 'MessageUI' , 'MobileCoreServices' , 'Instabug'
89
31
s . libraries = 'c++'
90
32
s . xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '"$(PODS_ROOT)/Instabug/"' , 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++11' , 'CLANG_CXX_LIBRARY' => 'libc++' }
91
33
s . requires_arc = true
34
+ s . prepare_command = "ruby add_instabug_build_script.rb"
92
35
end
0 commit comments