tags:

views:

76

answers:

5

i have implemented UIWebView in my application but i default address is "192.168.1.1" but it is not open default it and i have tried with "http://www.google.com" it is working fine.

[iview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"192.168.1.1"]]];

it doesn't working and it is working with

[iview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com"]]];
+1  A: 

Put http:// in front of the ip address.

DyingCactus
+1  A: 

192.168.1.1 isn't a valid URL. Have you tried http://192.168.1.1?

Luke Redpath
+2  A: 

What do you want to open? Assuming you want to request something from a webserver running at 192.168.1.1...

The scheme part is missing. Check if [NSURL URLWithString:@"192.168.1.1"] returns nil. You need to pass a string that conforms to RFC2396

pmf
A: 

192.168.1.1 is an ip address, http://192.168.1.1 is a URL. Use the later.

jamone
A: 

i have tried with "http://192.168.1.1" even is not working..

kartik patel