Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloading the list of available documents in NSEventTrackingRunLoopMode #81

Open
BlixLT opened this issue Sep 9, 2013 · 2 comments
Open

Comments

@BlixLT
Copy link

BlixLT commented Sep 9, 2013

I need an option to download the list of available documents when app is in the NSEventTrackingRunLoopMode. I noticed that all NSURLConnections are being executed in NSDefaultRunLoopMode.

A solution that I found would be modifying [DBRequest initWithURLRequest:(NSURLRequest*)aRequest andInformTarget:(id)aTarget selector:(SEL)aSelector]
and replacing

    urlConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self];

with

    urlConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:NO];
    [urlConnection scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes];
    [urlConnection start];

Are there any known issues when this might cause problems?

@MrRooni
Copy link
Contributor

MrRooni commented Sep 10, 2013

I'm not familiar enough with NSURLConnection to know how this change affects it. My suggestion would be to make this change in your own fork. If you can put together a good use case of why this change is an improvement and explain exactly how it affects the framework then we might be able to pull it in via a pull request.

@BlixLT
Copy link
Author

BlixLT commented Sep 11, 2013

After submitting this issue, I realized that DBRequest is not a TICoreDataSync class, but Dropbox SDK. So I suppose I should contact them regarding it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants