You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this update, NSURLSessionConfiguration+DBURLProtocol.m: [originalProtocols insertObject:DBNetworkURLProtocolClass atIndex:0]
NSURLSessionConfiguration's swizzing happens in +(void)load, which is when app starts, even before appDelegate.didFinishLaunchingWithOptions.
DBNetworkURLProtocolClass is initialised in + (void)initialize, which will be triggered by DBDebgToolkit.setup().
So, without executing DBDebgToolkit.setup(), DBNetworkURLProtocolClass will not be initialed, and it will be crashed.
We can use load to initialise DBNetworkURLProtocolClass, or ask user to run DBDebgToolkit.setup() before any network calls that involved NSURLSessionConfiguration.
The text was updated successfully, but these errors were encountered:
@qkzhu Forgot to apply fix for this was because i thught that this repo is dead actually and already forked it on our internal one. Here is patch that fix that issue:
version
0.7.0
crash if any network request triggered beforeDBDebugToolkit.setup()
:The cause is from the update for issue #50.
In this update,
NSURLSessionConfiguration+DBURLProtocol.m
:[originalProtocols insertObject:DBNetworkURLProtocolClass atIndex:0]
NSURLSessionConfiguration
's swizzing happens in+(void)load
, which is when app starts, even beforeappDelegate.didFinishLaunchingWithOptions
.DBNetworkURLProtocolClass
is initialised in+ (void)initialize
, which will be triggered byDBDebgToolkit.setup()
.So, without executing
DBDebgToolkit.setup()
,DBNetworkURLProtocolClass
will not be initialed, and it will be crashed.We can use
load
to initialiseDBNetworkURLProtocolClass
, or ask user to runDBDebgToolkit.setup()
before any network calls that involvedNSURLSessionConfiguration
.The text was updated successfully, but these errors were encountered: