So there are two things that I found (and should have posted here)
that were needed to solve my problem.

1. The sample application uses a global GDataServiceGoogleDocs service
instance:

- (GDataServiceGoogleDocs *)docsService {

  static GDataServiceGoogleDocs* service = nil;

  if (!service) {
    service = [[GDataServiceGoogleDocs alloc] init];

    [service setUserAgent:@"Google-SampleDocsApp-1.0"];
    [service setShouldCacheDatedData:YES];
    [service setServiceShouldFollowNextLinks:YES];
  }

This makes it shared across all connections to Google and the service
holds the authentication information = account.

2. I also had to tell NSURL to not use Cookies before downloading my
file by adding the line:

        [request setHTTPShouldHandleCookies:NO];

right after:

        NSMutableURLRequest *request = [mService requestForURL:url ETag:nil
httpMethod:nil];
.
I hope this helps solve your problem.....

Cheers,

On Jan 7, 1:41 am, iTucci <[email protected]> wrote:
> Hello,
> I am a Cocoa developer and new to Google Docs Data API.
>
> I am trying to use some API but now having the same problem with the
> DocsSample sample project.
>
> The first account used to login always works for both upload and
> download
> a file, but the second account always fails to download, just like
> David
> wrote. (Upload doesn't fail).
>
> It seems like the first login account information is stored somewhere
> and
> used even when I filled the second account information *alone* in the
> fields of
> the DocsSample application.
>
> But I can't find where the first login information is stored although
> I have been
> checking all possible variables with the debugger.
>
> Is it possible to clear the old login information and to use multiple
> account
> with the sample application?
>
> Thank you
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Docs Data APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to