bugsnag / bugsnag-cocoa-performance

Monitor the start-up, screen loading and network requests of your iOS app and see the results in your BugSnag dashboard.
https://docs.bugsnag.com/performance/integration-guides/ios
MIT License
11 stars 8 forks source link

Verify network callback pointer #281

Closed kstenerud closed 1 week ago

kstenerud commented 1 week ago

Goal

If the user manually sets the network callback to nil, it could crash the app.

I've also added more logging to help diagnose a networking issue on a customer site.

Design

Don't set a default implementation, and always check the callback pointer no matter what.

Testing

New e2e test

github-actions[bot] commented 1 week ago

BugsnagPerformance.framework binary size increased by 1,704 bytes from 459,640 to 461,344

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.9%   +1000  +0.9%   +1000    String Table
  +0.7%    +640  +0.7%    +640    Symbol Table
  +2.7%    +328  +2.7%    +328    __DATA,__objc_const
  +0.3%    +304  +0.3%    +304    __TEXT,__text
  +1.0%    +110  +1.0%    +110    __TEXT,__objc_methname
  +3.6%    +103  +3.6%    +103    __TEXT,__objc_methtype
  +6.2%     +80  +6.2%     +80    __DATA,__objc_data
   +17%     +32   +17%     +32    Export Info
  +0.3%     +32  +0.3%     +32    __TEXT,__objc_stubs
  +6.6%     +30  +6.6%     +30    __TEXT,__objc_classname
  +2.9%     +24  +2.9%     +24    Rebase Info
  +0.2%     +24  +0.2%     +24    [3 Others]
  +0.7%     +24  +0.7%     +24    [__DATA_CONST]
  +0.3%     +16  +0.3%     +16    __TEXT,__unwind_info
  +0.2%      +8  +0.2%      +8    Binding Info
  +3.4%      +8  +3.4%      +8    __DATA,__objc_ivar
  +0.3%      +8  +0.3%      +8    __DATA,__objc_selrefs
  -0.6%     -32  -0.6%     -32    __DATA_CONST,__const
  -3.0%    -432  -3.0%    -432    [__DATA]
  -1.8%    -603  -1.8%    -603    [__TEXT]
  [ = ]       0 -11.0% -1.66Ki    [__LINKEDIT]
  +0.4% +1.66Ki  [ = ]       0    TOTAL

Generated by :no_entry_sign: Danger