sentry-demos / ios

iOS Empower Plant
1 stars 4 forks source link

meta: extract and improve upload symbol script #38

Closed armcknight closed 1 year ago

armcknight commented 1 year ago

The reason I did this is originally because of the annoying modal popup when symbol upload failed async. But editing the script is not nice in the xcode gui, so i also moved it into a separate file.

Does two things:

  1. extract the logic from the script pane in the Xcode Run Script Build Phase to upload debug symbols into a separate file; this makes it easier to edit. E.g., the xcodeproj gui script editor doesn't even allow you to undo a change while you're editing (longstanding facepalm)
  2. make some small tweaks to the logic for uploading symbols: a. run sentry-cli synchronously. if it fails, it's not worth proceeding with the build because you'll be using the app and sending events that can't be symbolicated. this also avoid the annoying modal popup that appeared whenever it failed asynchronously: image b. instead of logging where the auth token isn't found, log where it is found and being used from; this made it a little more obvious to me where it was coming from