i got the username and password using javascript, but the code wont work for all sites. gmail uses a different id's than face books, and many sites probably do also, so how can make the code work for any site logging in?
heres how it gets the username/password now:
if (navigationType == UIWebViewNavigationTypeFormSubmitted) {
//works for gmail
NSString *username = [WebView stringByEvaluatingJavaScriptFromString:@"document.getElementsByName('Email')[0].value"];
NSString *password = [WebView stringByEvaluatingJavaScriptFromString:@"document.getElementsByName('Passwd')[0].value"];
//works for facebook?
//NSString *username = [WebView stringByEvaluatingJavaScriptFromString:@"document.getElementsByName('email')[0].value"];
//NSString *password = [WebView stringByEvaluatingJavaScriptFromString:@"document.getElementsByName('pass')[0].value"];
NSLog(@"username is %@\npassword is %@",username,password);
}
so i just want to know how to get the username and password for any site the user logs into so i can make it save, and then auto-fill when they go back and it is logged out so its an easy login.