I have created an App that gets data from Web Services on an InTRAnet web site. In order for my App to see these sites I have to turn on the VPN that is setup for our company intranet. So when I turn on the VPN it asked for authentication. That has to be turned on before my App launches because I know of no way to access the VPN via code (Is there anything in the SDK for working with the VPN?)
The problem is that once my my App launches it needs to authenticate against the intranet web site (authentication can't be turned off for security reasons).
So in this scenario:
So as you can see this is quite a pain (having to enter network credentials twice).
Anybody have any ideas on how I could get around this?
BTW - I'm using ASIHTTPRequest in my code.
There isn't any way around it. You can't roll your own in-app VPN provider. The best you can do is to check if the user is currently connected via VPN and if not, provide some feedback that indicates they need to turn on VPN and how to do it. Until it is turned on, disable all app functionality.
As of iOS5 the process becomes a bit better though. Now you can redirect the user directly to the settings page via URL scheme. To get to the network settings, you would use this scheme:
[NSURL URLWithString:@"prefs:root=General&path=Network"]];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With