Realm

Realm在Debug模式下会上传数据到 

https://data.mongodb-api.com/app/realmsdkmetrics-zmhtm/endpoint/metric_webhook/metric?data

void RLMSendAnalytics() {
    if (getenv("REALM_DISABLE_ANALYTICS") || !RLMIsDebuggerAttached() || RLMIsRunningInPlayground()) {
        return;
    }
    NSArray *urlStrings = @[@"https://data.mongodb-api.com/app/realmsdkmetrics-zmhtm/endpoint/metric_webhook/metric?data=%@"];
    NSData *payload = [NSJSONSerialization dataWithJSONObject:RLMAnalyticsPayload() options:0 error:nil];

    for (NSString *urlString in urlStrings) {
        NSString *formatted = [NSString stringWithFormat:urlString, [payload base64EncodedStringWithOptions:0]];
        // No error handling or anything because logging errors annoyed people for no
        // real benefit, and it's not clear what else we could do
        [[NSURLSession.sharedSession dataTaskWithURL:[NSURL URLWithString:formatted]] resume];
    }
}

 可以配置环境变量将这个骚操作关闭掉

 

posted @ 2023-02-24 11:30  雨筱逸悠  阅读(60)  评论(0编辑  收藏  举报