Skip to content

Commit

Permalink
fix release build error
Browse files Browse the repository at this point in the history
  • Loading branch information
Kudo committed Feb 18, 2023
1 parent 37ff5cf commit 7391f1a
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React

#if DEBUG

/**
This class intercepts all default `URLSession` requests and send CDP events to the connecting metro-inspector-proxy
*/
Expand Down Expand Up @@ -159,3 +161,26 @@ extension RCTInspectorPackagerConnection {
}
}
}

#else

@objc
public class EXDevLauncherNetworkLogger: NSObject {
@objc
public static let shared = EXDevLauncherNetworkLogger()

override private init() {}

@objc
public func enable() {
// no-op when running on release build where RCTInspector classes not exported
}

func emitNetworkWillBeSent(request: URLRequest, requestId: String) {
}

func emitNetworkResponse(request: URLRequest, requestId: String, response: HTTPURLResponse) {
}
}

#endif

0 comments on commit 7391f1a

Please sign in to comment.