iphone - startDownloadingUbiquitousItemAtURL local file path? -
where startdownloadingubiquitousitematurl:error
method save downloaded file in local?
same given url
?
yes , same url
the file in place before downloads icloud device placeholder of sorts.
you can check status of url key nsurlubiquitousitemisdownloadedkey
nsurl *foo = file://cloud/container/reference/tofile; nsnumber *isdownloadedvalue = null; bool success = [foo getresourcevalue:&isdownloadedvalue forkey: nsurlubiquitousitemisdownloadedkey error:null]; if (success && ![isdownloadedvalue boolvalue]) { [[nsfilemanager defaultmanager] startdownloadingubiquitousitematurl:foo error:null]; }
theres no error handling in snippet want in production code.
Comments
Post a Comment