The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus for iPhone
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Background sync? Thread Tools Search this Thread Display Modes
Yeah, I thought this would have worked as well. How is syncing different from a photo upload?
 
OK so can I clarify this:

At this point if you press the home button while OF is syncing, the sync is not completed?

In other words - I must wait for the sync wheel to stop spinning before I quit the app.

Have I got that right?

(iPhone 4, iOS 4.1)
 
Yes, if the dial is spinning, the whole operation has not completed, but a sync contains a fair amount of work after the network access is done, and it is my understanding that post-network activity can and does run in the background now. When you see the Updating with synced data progress message, I think the network activity is done.
 
Maybe you can check out awesome note and how it does background syncing. It syncs to Evernote and Google Docs in the background. So I believe it is completely possible.
 
The Evernote, Google Docs, and photo upload examples are all very similar - the app starts an upload while the app is in the foreground, then let the app go to the background and finish the task.

That works when all the information can be sent in one contiguous chunk, and is all going in one direction - up to the server.

OmniFocus breaks the information up into lots of smaller files, so you don't have to fetch as much information during any given sync. (You can just update the new bits of information.)

However, this also means that our sync requires two-way communication, and we don't know the complete list of files we by the time the app is sent to the background after you press the home button.

What this tweet from the lead programmer means is that OmniFocus is saying "hey, iPhone, can you please pull some information down from the web server", but the requests don't actually get sent.

Executive summary: different apps give the same name ("sync") to features that work very differently on the inside. :-)
 
I am NO programmer - that's for sure. So I'll state that first :)

And it makes sense that Evernote & other photo uploading services already know what they're uploading. But - to the best of my knowledge, 1Password for iPhone & iPad does the same thing that OmniFocus would need to do. It doesn't sync everything each time, as it only syncs what small files were updated since last time. And it does this all in the background when you quit the app as well. So I'm guessing that 1Password is doing two-way communication in the background, unless they have another architecture of syncing that's something that OmniFocus can't do?

Thanks! Would love true background syncing in iOS.
- Jesse
 
We're still exploring this: the API documentation seems to indicate that we should be able to make syncing work in the background, and we thought that what we'd already done (setting up a task completion block for our syncing) would in fact allow it to proceed in the background.

But when we tested our code and watched the server logs, we found that when OmniFocus moved to the background we would stop sending HTTP requests (despite our active task completion block)—so at the last minute I pulled the release note which said that our background-awareness added support for syncing after leaving the app since that didn't actually seem to be working.

At that time we didn't have time to look into it further (since we were busy trying to finish OmniFocus for iPad), but now that we have a bit more flexibility in our schedule we'll be looking at this again.

P.S. — Note that iOS only allows specific background operations; it doesn't have a notion of syncing in the background in general. We think we should be able to schedule a sync to happen right as you quit the app, but we won't be able to wake up OmniFocus every few hours to sync any changes that happened while you were out of the app.

Last edited by Ken Case; 2010-10-05 at 09:46 AM..
 
Ken,

Thanks so much for the reply!

That's exciting that you all will be able to look a little bit more into it to see if it's possible. I understand that iOS doesn't allow it to be constantly in-sync like Mail or Calendar is in the background, which is completely fine. I've just become spoiled by all the background tasks that are possible in other apps - and would love to be able to quit OmniFocus once it starts syncing & not have to wait for it, no matter what stage of the syncing process it's in.

Thanks & good luck!
- Jesse
 
Ken,

Has any progress been made on this? I'm wondering if anything has changed, since I know some apps, like Latitudie continue to update google latitude completely in the background... at regular intervals. So it seems OF should be able to do the same thing, no?
 
Quote:
Originally Posted by staze View Post
I know some apps, like Latitudie continue to update google latitude completely in the background... at regular intervals. So it seems OF should be able to do the same thing, no?
Unfortunately not. Location updates are one of the categories of things that Apple specifically added options to let apps to do stuff with while in the background. (Playing music/audio is another category of tasks that got special treatment.)

Unfortunately, there isn't an equivalent approved method for the kind of stuff that OmniFocus needs to do. The API calls that Latitude/Pandora/etc use for their background tasks don't work for the kind of network access that OmniFocus needs in order to sync.

Last edited by Brian; 2011-04-26 at 12:21 PM.. Reason: add a missing "don't" which changed the meaning of the post significantly. :-)
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
OmniPresence background sync? marcussommer@mac.com OmniPresence 0 2013-05-06 11:04 AM
Does it sync in background? lmsboy OmniFocus for iPhone 3 2013-02-07 10:07 PM
Pdf aS a background mattao OmniGraffle for iPad 1 2010-10-14 10:25 PM
Does Omni sync in background? JamesX OmniFocus for iPhone 2 2010-10-06 08:29 PM
Background sync kdmckenzie OmniFocus for iPhone 4 2010-04-13 10:31 AM


All times are GMT -8. The time now is 06:54 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.