[owncloud-devel] 3 Questions for mobile libs developers
ggdiez at owncloud.com
Tue Mar 4 14:55:45 MET 2014
Thank you for using ownCloud Mobile Libs, I try to answer your questions:
Q1. Yes, the OC iOS mobile lib doesn’t support upload resume. You should be upload again :(.
Q2. It is included on our roadmap to improve downloads and uploads on the sense that you are asking, taking into account background. However, it is still noy define a deadline for it.
Q3. To know that a file has changed you can check the “etag”. In the iOS mobile lib you can user the method “readFile” in order to compare an “OCFile” so you know if the file has changed. (OCFile -> etag)
El 04/03/2014, a las 13:31, Tim Carr <xaphod at gmail.com> escribió:
> 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:
> Photos & videos continue to upload without the user having to open the app
> 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
> Devel mailing list
> Devel at owncloud.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Devel