ios - iCloud upload progress and keys -


i'm trying push file icloud 1 of apps there no way track if file on icloud or not. after marking file ubiquitous have method periodically checks status of files via nsmetadataquery. when results use these keys status of file:

nsnumber *isuploaded = [file valueforattribute:nsmetadataubiquitousitemisuploadedkey]; nsnumber *isuploading = [file valueforattribute:nsmetadataubiquitousitemisuploadingkey]; nsnumber *uploadpercent = [file valueforattribute:nsmetadataubiquitousitempercentuploadedkey]; 

this seems work in other times isuploaded value 0 , isuploading value 0! uploadpercent value 0. when go 'settings' app of device , check files app files listed there i'm not sure why 'nsmetadataubiquitousitemisuploadedkey' key return 0?

any appreciated! thanks!

i'm trying same thing. per icloud guide, try nsurlubiquitousitemisuploadedkey instead of nsmetadataubiquitousitemisuploadedkey. let me know if works you. still haven't been able working. here's section guide:

determining transfer status of file or directory

items write icloud container directory transferred automatically icloud server possible. however, depending on network , type of device, file might not uploaded server or downloaded device immediately. in cases need know state of file, can use getresourcevalue:forkey:error: method of nsurl retrieve value 1 of following attributes:

  • nsurlisubiquitousitemkey—indicates whether or not item stored in icloud.

  • nsurlubiquitousitemisdownloadedkey—indicates whether current version of item downloaded , accessible.

  • nsurlubiquitousitemisdownloadingkey—indicates whether current version of item being downloaded , not yet available.

  • nsurlubiquitousitempercentdownloadedkey—for item being downloaded, indicates percentage of changes have been downloaded. can use value update progress bars.

  • nsurlubiquitousitemisuploadedkey—indicates locally made changes uploaded icloud server.

  • nsurlubiquitousitemisuploadingkey—indicates locally made changes being uploaded icloud server now.

  • nsurlubiquitousitempercentuploadedkey—for item being uploaded, indicates percentage of changes have been uploaded server.

  • although icloud server aggressively pulls changes app makes locally, ios devices typically not pull changes server until try access file. if try open file being downloaded, ios blocks thread issued open request until file downloaded , available use. thus, if concerned potential delays, check file’s current state needed , possibly update user interface reflect file not yet available or downloading.

    for more information attributes can request urls, see nsurl class reference.


    Comments

    Popular posts from this blog

    java - Play! framework 2.0: How to display multiple image? -

    gmail - Is there any documentation for read-only access to the Google Contacts API? -

    php - Controller/JToolBar not working in Joomla 2.5 -