Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-21-2010, 12:15 PM   #1 (permalink)
WSD
Registered Member
 
Join Date: Jul 2009
Location: Canada
Posts: 38
WSD is on a distinguished road
Default Did anyone encounter a NSURLConnection problem with SDK 4.1

Hi to my fellow SDK developers !
I've just installed XCode Version 3.2.4, in an attempt to upgrade an existing SDK 3 application. After importing my project, editing the project settings and taking care of the infamous "depricated methos" issue, I've tried to run the application but, alas, it crashes after an attempt to get data from a server, using NSURLConnection.
The application works really well on the version 3.1.3. No problem sending and receiving information and I haven't changed ANY of the the code (apart from the dericated methods mentioned above).
here is the code:
Code:
NSMutableURLRequest *request = nil;
request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:strData] cachePolicy:NSURLRequestUseProtocolCachePolicy
                                               timeoutInterval:60.0];

NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
	if (connection) {
		// Create the NSMutableData that will hold
		// the received data
		self.responseData=[[NSMutableData data] retain];
	} 
	else {
		NSLog(@"Connection Failure!");
		self.responseData = nil; 
	}	 
	[request release];
When I copy/paste the strData to the Browser, I get all the information I need. That is, there is nothing wrong on the server side. But I never get any data via my application, i.e. the NSURLConnection delegate methods never get called (not even didFailWithError:) and the application crashes.
Any suggestions? Did anybody encounter this bizarre problem?
WSD is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 348
9 members and 339 guests
condor304, Desert Diva, dre, hain, mottdog, oceanlablight, palme2elie, schmallegory
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,658
Threads: 94,118
Posts: 402,895
Top Poster: BrianSlick (7,990)
Welcome to our newest member, palme2elie
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:11 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0