Search code examples
ioshttppostnsmutableurlrequest

iOS app login to website


I'm trying to make an app that saves pages from a particular website (https://www.airservicesaustralia.com/naips/Account/LogOn) and I'm trying to get the app to login for the user given details they save in the app. I want to try and get it to post the login data in the background. I've been trying to use a NSMutableURLRequest but having no luck... Any suggestions on how to login to this website in the background?

Thanks!


Solution

  • You should use a browser with some development mode (like Chrome or Safari with developer mode enabled) and read the variables that are part of the POST or GET request that happens when you login (in this case, the request that happens when you press Submit).

    Use the same variables in your own request.