On 2 Sep 2014, at 9:50am, Jan Slodicka <j...@resco.net> wrote:

> Simon Slavin-3 wrote
>> If possible, you should try to do your synchronisation when your app is
>> frontmost only.  However, I understand that this may not be appropriate
>> for your app.
> 
> Exactly, under normal circumstances the synchronization of our app is the
> topmost priority, hence we have to continue.

You may have done this already but I suspect that you need to read the section 
called 'Implementing Long-Running Background Tasks' from

<https://developer.apple.com/library/ios/documentation/iphone/conceptual/iphoneosprogrammingguide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html#//apple_ref/doc/uid/TP40007072-CH4-SW24>

carefully if you expect to do File IO and network traffic in the background.  
What you describe seems to be closest to 'Background fetch'.

iOS expects your application to call 
'beginBackgroundTaskWithName:expirationHandler:' when appropriate and to 
provide the expiration handler.  This allows you to have a task such as 
synchronisation executed irrelevant to whether the app is frontmost or not.  
You can then use 'backgroundTimeRemaining' to find out whether iOS is going to 
force-quit your app.  That way your background activities won't be terminated 
without warning.

Unfortunately I have no experience of implementing something like this but this 
page

<http://www.devfright.com/ios-7-background-app-refresh-tutorial/>

looks interesting.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to