-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: block firebase logging, app-measurement, sentry
- Loading branch information
1 parent
1e2fb32
commit 6f94918
Showing
3 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,32 @@ | ||
#import <Foundation/Foundation.h> | ||
NSURLRequest *blocked = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://0.0.0.0/"]]; | ||
|
||
// main discord endpoints | ||
%hook RCTHTTPRequestHandler | ||
- (id)sendRequest:(NSURLRequest *)request withDelegate:(id)delegate { | ||
if ([request.URL.absoluteString containsString:@"/api/v9/science"] || [request.URL.absoluteString containsString:@"/api/v9/metrics"]) { return %orig(blocked, delegate); } | ||
return %orig(request, delegate); | ||
} | ||
%end | ||
|
||
// firebase logging | ||
%hook NSURLSession | ||
- (id)dataTaskWithRequest:(NSURLRequest *)request completionHandler:(id)handler { | ||
if ([request.URL.absoluteString containsString:@"sentry.io"]) { return %orig(blocked, handler); } | ||
return %orig(request, handler); | ||
- (id)uploadTaskWithRequest:(NSURLRequest *)request fromData:(id)data completionHandler:(id)handler { | ||
if ([request.URL.absoluteString containsString:@"firebaselogging"]) { return %orig(blocked, data, handler); } | ||
return %orig(request, data, handler); | ||
} | ||
%end | ||
|
||
// sentry | ||
%hook SentrySDK | ||
+ (BOOL)isEnabled { return NO; } | ||
%end | ||
|
||
%hook SentryOptions | ||
- (BOOL)enabled { return NO; } | ||
%end | ||
|
||
// app-measurement | ||
%hook APMMeasurement | ||
- (BOOL)isEnabled { return NO; } | ||
%end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters