• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSURLConnection doesn't post
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURLConnection doesn't post


  • Subject: Re: NSURLConnection doesn't post
  • From: "Tom Harrington" <email@hidden>
  • Date: Thu, 10 Apr 2008 10:34:57 -0600

On Thu, Apr 10, 2008 at 6:27 AM, Micha Fuhrmann <email@hidden> wrote:
>  Now if I place a button on my interface and call test everything is fine,
> the post is submitted and the delegate method is called. Suffice I call the
> test method from another class and nothing gets posted (break points show me
> the sendLogs method is indeed called), the didReceiveData method is not
> called either. I've looked into adding the NSURLConnection into an array so
> it wouldn't be scraped, created a separate send class just for the post etc.
> to no avail, I really don't know what I'm doing wrong.

When you call -sendLogs from another class, does the run loop have the
chance to run, or does the code block, or busy-wait, or something else
that might prevent it from running?  You'll need a working run loop
for NSURLConnection to successfully post the data and call its
delegate methods.

Also, is it possible that when -sendLogs is called from another class,
it's also called from a separate thread?  NSURLConnection's delegate
methods are called on the same thread that initiated the connection,
and if you've started a different thread, you have to create your own
run loop.

--
Tom Harrington
email@hidden
AIM: atomicbird1
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSURLConnection doesn't post
      • From: Micha Fuhrmann <email@hidden>
References: 
 >NSURLConnection doesn't post (From: Micha Fuhrmann <email@hidden>)

  • Prev by Date: Re: looking for sample code to read UUID from a disk volume.
  • Next by Date: Re: [OFF] unicode characters
  • Previous by thread: Re: NSURLConnection doesn't post
  • Next by thread: Re: NSURLConnection doesn't post
  • Index(es):
    • Date
    • Thread