Closed GoogleCodeExporter closed 9 years ago
Any tool can use NSRunLoop's -currentRunLoop and -runUntilDate to make the async
callbacks work. No user interface is necessary.
All of the GDataObject data classes can be used independently of the
GDataService
classes as well.
waitForTicket: doesn't poll for events; it polls for completion of the ticket.
Events happen asynchronously.
Original comment by gregrobbins
on 13 Jan 2008 at 5:22
So, please don't deprecate waitForTicket: in future releases, as it is useful.
I however think that it would be better if the GData API could provide
synchronous methods (using NSURLConnection's convenience class method,
sendSynchronousRequest:returningResponse:error:, to load a
URL request synchronously, for example)
This would also make GData/ObjC more inline with the API provided by other
languages (I haven't checked all,
but Python and Java are in this case it seems).
I think it's much easier (and cleaner) to type something like
CalendarFeed resultFeed = service.getFeed(feedUrl, CalendarFeed.class);
or
feed = self.cal_client.GetAllCalendarsFeed()
than what is currently required by GData/ObjC what async download isn't
needed/wanted.
Original comment by brun...@gmail.com
on 13 Jan 2008 at 7:08
I wrote a synchronous wrapper using NSRunLoop. Some convenience methods aren't
necessary, but they would be nice.
Original comment by lem...@gmail.com
on 31 Jan 2010 at 2:03
Hi Lem, Could you provide your code for the sync wrapper?
Original comment by smith....@gmail.com
on 8 Jul 2011 at 3:43
The library does include waitForTicket: and waitForCompletionWithTimeout:
methods for use by unit tests and UI-less tools, so there's no need for a
wrapper.
Synchronous http fetches are sufficient reason for apps to be rejected from
Apple's app stores.
Original comment by grobb...@google.com
on 8 Jul 2011 at 8:33
Original issue reported on code.google.com by
brun...@gmail.com
on 13 Jan 2008 at 4:21