wkwebview 用WKUserScript添加cookie,cookie的source里必须带上 path
NSString* cookieStr = [NSString stringWithFormat:@"%@=%@", name, value];
NSString* source = [NSString stringWithFormat:@"document.cookie = '%@;path=/';", cookieStr];
wkwebview 用WKUserScript添加cookie,cookie的source里必须带上 path
NSString* cookieStr = [NSString stringWithFormat:@"%@=%@", name, value];
NSString* source = [NSString stringWithFormat:@"document.cookie = '%@;path=/';", cookieStr];