cocoapods-bugsnag 2.1.0 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b6be2d67d8a7328337375f824d428008832765847d254e443c524ac9eacc0e6
4
- data.tar.gz: d94c59ef08d73b5cc15c0b679bb7c40226c2c3ac8e2d1740a17d2fbe56d483ba
3
+ metadata.gz: 9e5d8c650540e96f7ad51cbae072b074762bdfb8d1bb2552dad68763fec1d0e3
4
+ data.tar.gz: 4c8c98a9e980e8c1b7fdf86a9119134ea84052ce7375d0ab25c276c32e84734c
5
5
  SHA512:
6
- metadata.gz: 8e1cdcba0c5564af91b44a6ef46afef0eb4a49618d7eee82cf9e3641ced0ae82043ecac4ad0f68f07d461b9fce8442f22e32bdfa8be89800f3b255b63e0349eb
7
- data.tar.gz: 2888cc1f3cecce524327ca998791e996d3919c77dbe9dc6b052183776b0f00dfe3c961747e918ebc198f093b7b53f7c319edfb21161539f88e42e87876bc607e
6
+ metadata.gz: 5ee6032be77a768e5fc2230005a2a84c26fbb26e61d025f805b1491b63dca26a6b47e41bb560e1e0305ae407b6d215043aa7e2af2cd3ddece1cbf63086696270
7
+ data.tar.gz: 0040e50681ec86f21aad3fac88bb661701de9696afe426ca491e0807a646bbea306381eadfac377443f7a742145233cbed3dc043e589b31c77062853f7dc710b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.2.2 (17 May 2022)
4
+
5
+ ### Enhancements
6
+
7
+ * Uploading can now be skipped by setting `DISABLE_COCOAPODS_BUGSNAG=YES` via Xcode's Build Settings, `xcconfig` or `xcodebuild`.
8
+ | [#25](https://github.com/bugsnag/cocoapods-bugsnag/pull/25)
9
+
10
+ ## 2.2.1 (20 Nov 2020)
11
+
12
+ ### Bug fixes
13
+
14
+ * The Xcode build phase now specifies its dependencies for improved reliability with Xcode's new build system.
15
+ | [#20](https://github.com/bugsnag/cocoapods-bugsnag/pull/20)
16
+
17
+ ## 2.2.0 (30 Sept 2020)
18
+
19
+ ### Enhancements
20
+
21
+ * This plugin now finds `Info.plist` using Xcode environment variables, rather than a `glob` operation for robustness.
22
+ | [#15](https://github.com/bugsnag/cocoapods-bugsnag/pull/15)
23
+
24
+ * This plugin will now only add itself to your Xcode project if it is explicitly added as a plugin in your `Podfile`. Previously it would install if `Bugsnag` was detected in your `Podfile`.
25
+ | [#16](https://github.com/bugsnag/cocoapods-bugsnag/pull/16)
26
+
3
27
  ## 2.1.0 (14 Aug 2020)
4
28
 
5
29
  ### Enhancements
data/README.md CHANGED
@@ -24,20 +24,36 @@ install, run:
24
24
 
25
25
  ## Usage
26
26
 
27
- To add the build phase to your project, add pod Bugsnag to your Podfile and run:
27
+ To add the build phase to your project, add `pod 'Bugsnag'`, and `plugin 'cocoapods-bugsnag'` to your `Podfile`:
28
+
29
+ ```ruby
30
+ pod 'Bugsnag'
31
+ plugin 'cocoapods-bugsnag'
32
+ ```
33
+
34
+ Then, install with:
28
35
 
29
36
  ```bash
30
37
  pod install
31
38
  ```
32
39
 
40
+ Once added, uploading your dSYM files to Bugsnag will occur automatically.
41
+
33
42
  By default, your Bugsnag API key will either be read from the `BUGSNAG_API_KEY`
34
43
  environment variable or from the `:bugsnag:apiKey` (or `BugsnagAPIKey`) value in your
35
44
  `Info.plist`. Alternatively edit the script in the new "Upload Bugsnag dSYM" build
36
45
  phase in Xcode.
37
46
 
47
+ Uploading can be disabled by setting `DISABLE_COCOAPODS_BUGSNAG=YES` in Xcode's
48
+ Build Settings or an `xcconfig` file, or as an argument to `xcodebuild`.
49
+
38
50
  ## Support
39
51
 
40
52
  * [Symbolication guide](https://docs.bugsnag.com/platforms/ios/symbolication-guide/)
41
53
  * [Search open and closed issues](https://github.com/bugsnag/cocoapods-bugsnag/issues?utf8=✓&q=is%3Aissue)
42
54
  for similar problems
43
55
  * [Open an issue](https://github.com/bugsnag/cocoapods-bugsnag/issues/new)
56
+
57
+ ## License
58
+
59
+ This module is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "cocoapods-bugsnag"
3
- spec.version = "2.1.0"
3
+ spec.version = "2.2.2"
4
4
  spec.homepage = "https://bugsnag.com"
5
5
  spec.description = "Configures the dSYM upload phase of your project when integrated with bugsnag."
6
6
  spec.summary = "To get meaningful stacktraces from your crashes, the Bugsnag service needs your dSYM file for your build. This plugin adds an upload phase to your project where needed."
@@ -2,7 +2,17 @@ module Pod
2
2
  class Installer::UserProjectIntegrator::TargetIntegrator
3
3
 
4
4
  BUGSNAG_PHASE_NAME = "Upload Bugsnag dSYM"
5
+ BUGSNAG_PHASE_INPUT_PATHS = [
6
+ "${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}",
7
+ "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}"]
8
+ BUGSNAG_PHASE_SHELL_PATH = "/usr/bin/env ruby"
5
9
  BUGSNAG_PHASE_SCRIPT = <<'RUBY'
10
+ # Set DISABLE_COCOAPODS_BUGSNAG=YES via Xcode's Build Settings, xcconfig or xcodebuild to skip upload
11
+ if ENV['DISABLE_COCOAPODS_BUGSNAG'] == 'YES'
12
+ p 'Skipping dSYM upload'
13
+ return
14
+ end
15
+
6
16
  api_key = nil # Insert your key here to use it directly from this script
7
17
 
8
18
  # Attempt to get the API key from an environment variable
@@ -11,7 +21,7 @@ unless api_key
11
21
 
12
22
  # If not present, attempt to lookup the value from the Info.plist
13
23
  unless api_key
14
- info_plist_path = Dir.glob("./{ios/,}*/Info.plist").reject {|path| path =~ /build|test/i }.first
24
+ info_plist_path = "#{ENV["BUILT_PRODUCTS_DIR"]}/#{ENV["INFOPLIST_PATH"]}"
15
25
  plist_buddy_response = `/usr/libexec/PlistBuddy -c "print :bugsnag:apiKey" "#{info_plist_path}"`
16
26
  plist_buddy_response = `/usr/libexec/PlistBuddy -c "print :BugsnagAPIKey" "#{info_plist_path}"` if !$?.success?
17
27
  api_key = plist_buddy_response if $?.success?
@@ -40,7 +50,7 @@ RUBY
40
50
  alias_method :integrate_without_bugsnag!, :integrate!
41
51
  def integrate!
42
52
  integrate_without_bugsnag!
43
- return unless has_bugsnag_dependency?
53
+ return unless should_add_build_phase?
44
54
  return if bugsnag_native_targets.empty?
45
55
  UI.section("Integrating with Bugsnag") do
46
56
  add_bugsnag_upload_script_phase
@@ -56,23 +66,26 @@ RUBY
56
66
  bp.name == BUGSNAG_PHASE_NAME
57
67
  end.first || native_target.new_shell_script_build_phase(BUGSNAG_PHASE_NAME)
58
68
 
59
- phase.shell_path = "/usr/bin/env ruby"
69
+ phase.input_paths = BUGSNAG_PHASE_INPUT_PATHS
70
+ phase.shell_path = BUGSNAG_PHASE_SHELL_PATH
60
71
  phase.shell_script = BUGSNAG_PHASE_SCRIPT
61
72
  phase.show_env_vars_in_log = '0'
62
73
  end
63
74
  end
64
75
 
65
- def has_bugsnag_dependency?
66
- target.target_definition.dependencies.detect do |dep|
76
+ def should_add_build_phase?
77
+ has_bugsnag_dep = target.target_definition.dependencies.any? do |dep|
67
78
  dep.name.include?('Bugsnag')
68
- end != nil
79
+ end
80
+ uses_bugsnag_plugin = target.target_definition.podfile.plugins.key?('cocoapods-bugsnag')
81
+ return has_bugsnag_dep && uses_bugsnag_plugin
69
82
  end
70
83
 
71
84
  def bugsnag_native_targets
72
85
  @bugsnag_native_targets ||=(
73
86
  native_targets.reject do |native_target|
74
87
  native_target.shell_script_build_phases.any? do |bp|
75
- bp.name == BUGSNAG_PHASE_NAME && bp.shell_script == BUGSNAG_PHASE_SCRIPT
88
+ bp.name == BUGSNAG_PHASE_NAME && bp.input_paths == BUGSNAG_PHASE_INPUT_PATHS && bp.shell_path == BUGSNAG_PHASE_SHELL_PATH && bp.shell_script == BUGSNAG_PHASE_SCRIPT
76
89
  end
77
90
  end
78
91
  )
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-bugsnag
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delisa Mason
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-14 00:00:00.000000000 Z
11
+ date: 2022-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  requirements: []
90
- rubygems_version: 3.1.4
90
+ rubygems_version: 3.0.3.1
91
91
  signing_key:
92
92
  specification_version: 4
93
93
  summary: To get meaningful stacktraces from your crashes, the Bugsnag service needs