Frederick Carter
Frederick Carter

Reputation: 41

UIWebView won't use password saved in Mobile Safari

I created a simple iOS browser in Xcode, it does not save the password in the browser to the website it opens to, but the site keeps the password saved in safari. What settings can I add in Xcode to save the password in the browser,to keep it logged in as it does in Safari? The app is built to hide the web address so no one without the app can access the website. Thanks for any help.

Upvotes: 4

Views: 2312

Answers (1)

jszumski
jszumski

Reputation: 7416

The information entered into Mobile Safari is 100% segregated from a UIWebView in an app for security reasons. If this wasn't the case, you could easily make an app that loads an invisible web view for Gmail or Facebook and use javascript to read any autofilled username/password fields.

Your best bet is to implement your own saving functionality, as described in Is it possible for a UIWebView to save and autofill previously entered form values (e.g., username & password)?. As that answer states, be absolutely sure you store these saved values securely in the keychain!

Upvotes: 4

Related Questions