i want enter password in webpage load in uiwebview. password string, , want enter password , hit button in page, automatically when view loads.
any help?
if you're using uiwebview, assume you're loading web service webview. why not build login system web service? use http basic auth.
if you're managing passwords within cocoa app, implement uialertview uitextfield asking password. when user presses login can validate password , load web service in uiwebview.
if you're managing passwords in database on website you'd build html/js/php/mysql login form , load in uiwebview first.
update
i'd go first option , display own login form using cocoa controls uialertview 2 uitextfields. can save username , password using keychain services , submit them every time users launches app or web session expires.
if want try method i'd suggest having @ asihttprequest framework. in particular asiformdatarequest let's send form correct fields.
- (void)login { asiformdatarequest *request = [asiformdatarequest requestwithurl:url]; // change these values ones in nsuserdefaults , keychain [request setpostvalue:@"joe" forkey:@"username"]; [request setpostvalue:@"secret" forkey:@"password"]; [request setdelegate:self]; [request startasynchronous]; } - (void)requestfinished:(asihttprequest *)request { // use when fetching text data nsstring *responsestring = [request responsestring]; // use when fetching binary data. nsdata *responsedata = [request responsedata]; } - (void)requestfailed:(asihttprequest *)request { nserror *error = [request error]; }
Comments
Post a Comment