Skip to content

Commit

Permalink
v3.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mzsoliman committed Aug 7, 2014
1 parent 8352e7a commit 89fa24e
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 62 deletions.
67 changes: 5 additions & 62 deletions Instabug.podspec
Original file line number Diff line number Diff line change
@@ -1,64 +1,6 @@
Pod::Spec.new do |s|
Pod::Installer::UserProjectIntegrator::TargetIntegrator.class_eval do
unless method_defined?(:integrate_with_instabug!)
INSTABUG_PHASE_NAME = "Upload Instabug dSYM"
INSTABUG_PHASE_SCRIPT = <<-SCRIPTEND
# SKIP_SIMULATOR_BUILDS=1
SCRIPT_SRC=$(find "$PROJECT_DIR" -name 'Instabug_dsym_upload.sh')
if [ ! "${SCRIPT_SRC}" ]; then
echo "Instabug: err: script not found. Make sure that you're including Instabug.bundle in your project directory"
exit 1
fi
source "${SCRIPT_SRC}"
SCRIPTEND

def integrate_with_instabug!
integrate_without_instabug!
return if instabug_native_targets.empty?
UI.section("Integrating with Instabug") do
add_instabug_upload_script_phase
user_project.save
end
end

alias integrate_without_instabug! integrate!
alias integrate! integrate_with_instabug!

def add_instabug_upload_script_phase
instabug_native_targets.each do |native_target|
phase = native_target.shell_script_build_phases.select{ |bp| bp.name == INSTABUG_PHASE_NAME }.first ||
native_target.new_shell_script_build_phase(INSTABUG_PHASE_NAME)

phase.shell_path = "/bin/sh"
phase.shell_script = INSTABUG_PHASE_SCRIPT
phase.show_env_vars_in_log = '0'
end
end

def instabug_native_targets
@instabug_native_targets ||=(
target_uuids = target.user_target_uuids
native_targets = target_uuids.map do |uuid|
native_target = user_project.objects_by_uuid[uuid]
unless native_target
raise Informative, "[Error] Unable to find the target with " \
"the `#{uuid}` UUID for the `#{target}` integration library"
end
native_target
end

native_targets.reject do |native_target|
native_target.shell_script_build_phases.any? do |bp|
bp.name == INSTABUG_PHASE_NAME && bp.shell_script == INSTABUG_PHASE_SCRIPT
end
end
)
end
end
end

s.name = "Instabug"
s.version = "3.4.1"
s.version = "3.4.2"
s.summary = "Bug reporting for mobile apps. Learn more at http://instabug.com"
s.homepage = "http://instabug.com"
s.license = {
Expand All @@ -81,12 +23,13 @@ Pod::Spec.new do |s|
}
s.author = { "Instabug" => "contactus@instabug.com" }
s.platform = :ios, '5.0'
s.source = { :git => "https://github.com/Instabug/Instabug-iOS.git", :tag => "3.4.1" }
s.source = { :git => "https://github.com/Instabug/Instabug-iOS.git", :tag => "3.4.2" }
s.source_files = 'Instabug.framework/Versions/A/Headers/*.{h}'
s.resources = 'Instabug.bundle'
s.preserve_paths = 'Instabug.framework/*', 'Instabug.bundle'
s.resources = 'Instabug.bundle', 'add_instabug_build_script.rb'
s.preserve_paths = 'Instabug.framework/*', 'Instabug.bundle', 'add_instabug_build_script.rb'
s.frameworks = 'QuartzCore', 'CoreGraphics', 'CoreMotion', 'CoreFoundation', 'SystemConfiguration', 'Foundation', 'AVFoundation', 'OpenGLES', 'AudioToolbox', 'GLKit', 'CoreTelephony', 'UIKit', 'CoreLocation', 'MessageUI', 'MobileCoreServices', 'Instabug'
s.libraries = 'c++'
s.xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '"$(PODS_ROOT)/Instabug/"', 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++11', 'CLANG_CXX_LIBRARY' => 'libc++' }
s.requires_arc = true
s.prepare_command = "ruby add_instabug_build_script.rb"
end
22 changes: 22 additions & 0 deletions add_instabug_build_script.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
require 'xcodeproj'
require 'logger'
$LOG = Logger.new('./log_file.log', 'monthly')

INSTABUG_PHASE_NAME = "Upload Instabug dSYM"
INSTABUG_PHASE_SCRIPT = <<-SCRIPTEND
# SKIP_SIMULATOR_BUILDS=1
SCRIPT_SRC=$(find "$PROJECT_DIR" -name 'Instabug_dsym_upload.sh')
if [ ! "${SCRIPT_SRC}" ]; then
echo "Instabug: err: script not found. Make sure that you're including Instabug.bundle in your project directory"
exit 1
fi
source "${SCRIPT_SRC}"
SCRIPTEND

$LOG.debug("env: #{ENV["PWD"]}")
project_path = Dir.glob("#{ENV["PWD"]}/*.xcodeproj")
project = Xcodeproj::Project.open(project_path.first)
main_target = project.targets.first
phase = main_target.new_shell_script_build_phase(INSTABUG_PHASE_NAME)
phase.shell_script = INSTABUG_PHASE_SCRIPT
project.save()
18 changes: 18 additions & 0 deletions log_file.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Logfile created on 2014-08-06 22:12:42 +0300 by logger.rb/36483
D, [2014-08-06T22:12:42.629588 #83775] DEBUG -- : project_path: []
D, [2014-08-06T22:14:29.421162 #84526] DEBUG -- : project_path: [], env: /Users/Moataz/Instabug-iOS
D, [2014-08-06T22:21:52.320332 #87698] DEBUG -- : project_path: [], env: /Users/Moataz/Instabug-iOS
D, [2014-08-06T22:32:53.184109 #92418] DEBUG -- : project_path: [], env: /Users/Moataz/Instabug-iOS
D, [2014-08-06T22:33:43.418795 #92815] DEBUG -- : project_path: $(PODS_ROOT)
D, [2014-08-06T22:34:24.820212 #93142] DEBUG -- : project_path:
D, [2014-08-06T22:36:22.760319 #94029] DEBUG -- : project_dir:
D, [2014-08-06T22:36:22.760431 #94029] DEBUG -- : project_path:
D, [2014-08-06T22:36:58.252062 #94347] DEBUG -- : project_dir:
D, [2014-08-06T22:36:58.252177 #94347] DEBUG -- : project_path:
D, [2014-08-06T22:37:27.630643 #94545] DEBUG -- : project_dir:
D, [2014-08-06T22:37:27.630759 #94545] DEBUG -- : project_path:
D, [2014-08-06T22:38:53.436259 #95215] DEBUG -- : project_dir:
D, [2014-08-06T22:38:53.436369 #95215] DEBUG -- : project_path:
D, [2014-08-06T22:54:29.270806 #2087] DEBUG -- : project_path: , env: /Users/Moataz/Instabug-iOS
D, [2014-08-07T09:59:27.542086 #34951] DEBUG -- : project_path: , env: /Users/Moataz/Instabug-iOS
D, [2014-08-07T10:01:53.915348 #36154] DEBUG -- : project_path: , env: /Users/Moataz/Instabug-iOS

0 comments on commit 89fa24e

Please sign in to comment.