I am new to iPhone development, so I'm sorry if this is a stupid question. I am developing an application whose purpose will be to route all iPhone activity through my company's proxy.
Is there a way to programmatically set system-wide proxy settings in the iPhone (which will also take effect on the 3G connection)?
I know there is a way to manually set proxy settings for each wifi connection. Detecting new networks and setting the proxy on them would be acceptable. However, I need to also be able to set the proxy on the 3G connection.
Also, bonus: Is there a way to programmatically change the "Restrictions" settings?
If anyone has any tips or can point me in the right direction, I would appreciate it. Thanks.
EDIT: Please understand that this is for a legitimate purpose. Apple has to approve app store additions, so it's not like I'm trying to spread a virus. Please, constructive answers only.
If you're configuring iPhones in a commercial environment, you should look at the Enterprise Deployment Guide. Specifically, you should look at using the iPhone Configuration Utility to create a *.mobileconfig configuration file that can be distributed to all the phones in your network. The *.mobileconfig plist supports changing the following proxy configuration settings on the phone:
PropNetProxiesHTTPEnable (Integer, 1 = Proxy enabled)
PropNetProxiesHTTPProxy (String, Proxy server address)
PropNetProxiesHTTPPort (Integer, Proxy port number)
HTTPProxyUsername (String, optional username)
HTTPProxyPassword (String, optional password)
PropNetProxiesProxyAutoConfigEnable (Integer, 1 = Auto proxy enabled)
PropNetProxiesProxyAutoConfigURLString (String, URL that points to a PAC file where the configuration information is stored)
The iPhone Configuration Utility does not currently support adding or editing those settings, so you may need to get your hands dirty with the Property List Editor application. Also, it looks like the latest version of the Enterprise Deployment Guide does not include the settings I've included above, but you should be able to find it in the previous version of the document.
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