bugsnag / cocoapods-bugsnag

A CocoaPods plugin to integrate bugsnag into your project workspace
https://docs.bugsnag.com/platforms/ios/symbolication-guide/
MIT License
7 stars 3 forks source link

Build fails without BUGSNAG_API_KEY #23

Closed mplorentz closed 2 years ago

mplorentz commented 2 years ago

Describe the bug

cocoapods-bugsnag doesn't play nicely in any situation where the secret BUGSNAG_API_KEY isn't set. There are many situations where the builder of the app doesn't have/need to upload dSYMs to Bugsnag: continuous integration servers and contributors trying to build an open source project for development are the two major ones that come to mind.

I would like a way to tell cocoapods-bugsnag that it doesn't need to upload dSYMs for a given build. In fact I really only want the build phase to run on Archive builds. One way to accomplish this would be to add an environment like BUGSNAG_SKIP_UPLOAD_DSYMS similar to what was suggested here. Another potential solution would be to check to see if the build is a release build and abort the script if it isn't.

Steps to reproduce

  1. Install cocoapods-bugsnag in a repository where your secret BUGSNAG_API_KEY isn't committed to git.
  2. Try to build your Xcode project on a continuous integration server that doesn't know your secret BUGSNAG_API_KEY.
  3. The build will fail because BUGSNAG_API_KEY isn't set.

Environment

luke-belton commented 2 years ago

Hi @mplorentz - thanks for the suggestion. We're going to investigate this and will let you know of any updates.

nickdowell commented 2 years ago

Hi @mplorentz we added support for skipping dSYM upload in v2.2.2

Uploading can now be skipped by setting DISABLE_COCOAPODS_BUGSNAG=YES via Xcode's Build Settings, xcconfig or xcodebuild.