Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6873725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:06:19+00:00 2026-05-27T04:06:19+00:00

I am relatively new to Objective-C but getting there. I am building a small

  • 0

I am relatively new to Objective-C but getting there. I am building a small app that accesses a database via NSURLRequests. Upon loading the view, within viewDidLoad, I execute a request to get some data….

NSString *content = [@"http:/localhost/detailAPI.php?token=" stringByAppendingString:token];
content = [content stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding];
NSLog(content);
taskData = [[NSMutableData data] retain];
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:content]];
[[NSURLConnection alloc] initWithRequest:request delegate:self];    

Within connection didReceiveData, I can process the response and put the information on the screen, release taskData. Part of the view is a textfield where the user can add a comment. I then send the comment to the server for insertion into the database using a similar structure.

NSString *updateURL = @"http://localhost/updateAPI.php?update=task&token=";
updateURL =[updateURL stringByAppendingString:token];
updateURL =[updateURL stringByAppendingString:@"&taskname='"];
updateURL =[updateURL stringByAppendingString:taskName.text];
updateURL =[updateURL stringByAppendingString:@"'&comment='"];
updateURL =[updateURL stringByAppendingString:TaskComments.text];
updateURL =[updateURL stringByAppendingString:@"'"];
taskData = [[NSMutableData data] retain];
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:updateURL]];
[[NSURLConnection alloc] initWithRequest:request delegate:self];

The first thing that my PHP scripts do is get the data and create an ‘activity’ record. In the first request, I can see the activity record, the data is returned and all is good with the world. With the second request, I see nothing. The app does nothing. I can cancel out and return the main display. I can return to this view and the new comment is not there.

I have tried releasing the connection at the end of the didReceiveData processing, no change. I have tried force starting the connection in the second query with startImmediately set to YES. I have spent about 3 hours on Google and AppleDev and am no wiser. I know this is going to be a simple solution, however I just cannot see it.

Thanks in advance
Chris

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T04:06:19+00:00Added an answer on May 27, 2026 at 4:06 am

    In testing this out to find a previous bug, I had commented out the connection release in connectionDidFinishingLoading.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

relatively new to iphone dev, but i was interested in the app Path. its
I am relatively new to Objective C/iOS development so I realize that this may
I'm relatively new to the world of Objective-C and have a class that I've
I am relatively new to Objective C/iPhone Development. I am developing a simple app
I'm relatively new to Objective-C and really don't know much about it yet, so
Note: I'm relatively new to Objective-C and am coming from Java and PHP. Could
I'm relatively new to Objective-C + Quartz and am running into what is probably
Being relatively new to programming--think Programming in Objective-C by Kochan, Chapter 15--I'm wondering if
I am relatively new to vagrant but certainly liking it so far. One of
I'm a relatively new MVC user, and am having difficulty getting paging to work

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.