[owncloud-devel] 3 Questions for mobile libs developers

Tim Carr xaphod at gmail.com
Tue Mar 4 13:31:27 MET 2014

Hi OC development team,

Hope this email finds you well. I spent some time looking through the
OwnCloud Mobile Libs source, thank you for these. I am trying to figure out
how feasible it would be to support the following two requirements for an
owncloud-based iOS app that is focused on Photos & videos only:

   1. Photos & videos continue to upload without the user having to open
   the app
   2. Photos & videos download without the user having to open the app

For #1, there are basically two ways in iOS to do this:

A. major location change detection + background tasks (bgtasks) to upload

Pro: iOS6 compatible

Con: Bgtasks can be killed anytime by the OS (iOS6 max runtime for bgtask
is 10min; for iOS7, "less"), device must have a cellular-radio to support
major location change (so wifi-only iPads would not work)

Question for you (Q1): From what I can see in the OC mobile libs, if an
upload task (OCHTTPRequestOperation) is killed in the middle of uploading,
then it is NOT resumed later. There is no resume support in OC mobile libs.
Is this correct?

B. NSURLSession-based background uploading

Pro: no timelimit - OC libs would not need to support resuming uploads

Con: iOS7 only

Question for you (Q2): The OC mobile libs are unfortunately based on
AFNetworking 1.x, which doesn't support NSURLSession at all. Do you plan to
update to AFNetworking 2.x (which supports NSURLSession), or start using
NSURLSession natively, sometime in the coming 3-6 months?

For #2, the best way appears to be silent push-notifications to the iOS
device to tell it to wake up and download a file.

Question for you (Q3): What mechanism(s) does OC support on server-side, to
generate a notification that a file has changed and needs to be downloaded?
Ie if we build a push-notification-server (PNS) component that generates
silent PNS when a file has changed, how does this component become aware
that the file has changed?

I'm open to collaborative development here...

Many thanks for your help

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.owncloud.org/pipermail/devel/attachments/20140304/ac85e853/attachment-0001.html>

More information about the Devel mailing list