tags:

views:

27

answers:

1

Hi, using sdk 3.1.2 on iphone

I am using the following code to activate the 3G connection but it doesn't seem to be working, anyone know what i need to do

NSURLConnection *conn = [[NSURLConnection alloc] initWithRequest: [NSURLRequest requestWithURL: [NSURL URLWithString:@"http://www.google.com"]] delegate:self]; [conn cancel];

+1  A: 

Why are you calling:

[conn cancel];

Shouldn't you do:

[conn start];

or something that actually tries to open the connection?

jamone
ah, yes thanks. i forgot it was asynchronous
tech74