我正在查看 yozio 代码,它们似乎使用设备名称和 IP 地址作为指纹进行跟踪。这是否可靠,因为 ip 地址可以更改,并且设备名称在多个设备上可能相同,例如“Bob 的 iPhone”。我的假设错了吗?
这是 Yozio 的实现
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
NSString *appKey = @"e78ffa70-0975-0130-2e03-12314000ac7c";
NSString *deviceName = [[[UIDevice currentDevice] name] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSString *url = [NSString stringWithFormat:@"http://yoz.io/e?app_key=%@&device_name=%@", appKey, deviceName];
[NSURLConnection connectionWithRequest:[NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]] delegate:nil];
// Your app code here...
}