iCloud Drive

RSS for tag

iCloud Drive safely stores any kind of file so it can be accessed in iCloud-enabled apps on iPhone, iPad, Mac, or PC.

iCloud Drive Documentation

Posts under iCloud Drive tag

59 Posts
Sort by:
Post not yet marked as solved
1 Replies
484 Views
In NSFileManager there is this method to move files to and from iCloud:- (BOOL)setUbiquitous:(BOOL)flag itemAtURL:(NSURL *)url destinationURL:(NSURL *)destinationURL error:(NSError **)errorOutAll the samples and information I'm able to find seem to be related to using NSDocument, which my app isn't using. I have a little view in my app that allows users to move an image out from the iCloud container and into a local directory. It seems that simply using NSFileManager moveItemAtURL:toURL:error: works fine both to move a file in and out of the iCloud container on OS X without wrapping everything in a file coordinator block. Is it still necessary to use a file coordinator to move files out of iCloud on the Mac. When I put a file in the iCloud container, the system automatically starts uploading it..even though I'm not using a file coordinator...and my related file presenter still is detecting a change.Both methods seem to be working the same, I'm just wondering if I should be using a coordinator because it's a good amount of code I can get rid of if it's not necessary.Thanks.
Post not yet marked as solved
4 Replies
2.6k Views
According to Apples Class Reference CKQuery, the operator "CONTAINS" is one of the suported operators. However, that doesn't seem to work. I have a recordtype called myRecord, and a record with filedname "name" type String. I try to fetch the record with two different predicates, one with "==" operator, and one with "CONTAINS" operator.func getRecords(){ let name = "John" let Predicate1 = NSPredicate(format: "name == %@",name) let Predicate2 = NSPredicate(format: "name CONTAINS %@",name) let sort = NSSortDescriptor(key: "Date", ascending: false) let query = CKQuery(recordType: "myRecord", predicate: Predicate1) //let query = CKQuery(recordType: "myRecord", predicate: Predicate2) query.sortDescriptors = [sort] let operation = CKQueryOperation(query: query) operation.desiredKeys = ["name", "Date"] operation.recordFetchedBlock = { (record) in print(record["name"]) operation.queryCompletionBlock = { [unowned self] (cursor, error) in dispatch_async(dispatch_get_main_queue()) { if error == nil { print ("sucess") } else { print("couldn't fetch record error:\(error?.localizedDescription)") } } } CKContainer.defaultContainer().publicCloudDatabase.addOperation(operation) }Using Predicate1, outout is: Optional(John) sucessUsing Predicate2, outout is: couldn't fetch record error:Optional("Field \'name\' has a value type of STRING and cannot be queried using filter type LIST_CONTAINS")Also using [c] to ignore casings gives a crash.How do I use the operator "CONTAINS" correctly, and how do I ignore letter casings?
Posted
by
Post not yet marked as solved
2 Replies
1.1k Views
Hello.I am starting working with theCloudKit Web ServicesI am reading the documentation here:https://developer.apple.com/library/content/documentation/DataManagement/Conceptual/CloutKitWebServicesReference/SettingUpWebServices/SettingUpWebServices.html#//apple_ref/doc/uid/TP40015240-CH24-SW1I am trying to receive Getting the Web Authentication TokenAfter successfully login I am getting this jsonObject appInfo:Object AdditionalSalt:"cec2731125ded8d34cbd3702e0c360b8b7b534fa04dbb2f0ea150b524b7739e5"AppDiscoverable:"false"AppId:"0"AppName:"iCloud.jovan.PhotoWebApp"ContainerEnvironment:"development"ContainerId:"iCloud.jovan.PhotoWebApp"DeveloperName:"UNKNOWN_DEVELOPER"LogoURL:""__proto__:ObjectckSession:"48__24__AZLhIol7ffB34oNYrGP54rWKY5MiVdO+2+85oIiWPuKoK/KJ7r9cNivNwYd03iX/aDW6KL4wuAOVJZ0dAShqhT9ZhoUuW9ZZNPPQ7tzTcBNJ/itQI/uulkBi/51Rpijv/5ZypUYD9yGP3dyXQgDVlGSK8tUPHigigN7nO91DGkM1kaT11lXFBBCHlvZr0DX4tp1cxZ9/P/Q=__eyJYLUFQUExFLVdFQkFVVEgtUENTLUNsb3Vka2l0IjoiUVhCd2JEb3hPZ0VpWXd2Q0QyYmdCVWZrblo1cmp3dnl3Wjg1cHF1dTdLaFZPMThnMEx1bDhLeWRhMHR5SkhyUkZwT0JycEVicXNXWGhqUk9XbTlyd2pkZzB6K3JvZktOIiwiWC1BUFBMRS1XRUJBVVRILVBDUy1TaGFyaW5nIjoiUVhCd2JEb3hPZ0ZyZzEyZGNZSGk4WWRKYU0yK1pFMFRKaytrdTBBMmNZTG8vaUJPRlV1cEtKT3ExS1YvYjlBaldCeklwQTR5N2FUbXNrMDhCWjRsYVRoeWRTaSt3eE9PIn0="isICDP:falsepcsDeleted:falsepermissions:Array[1] 0:Object ask:falsename:"discoverability"__proto__:Objectlength:1__proto__:Array[0]status:0But, as per documentation I should receive the ckWebAuthToken instead of ckSessionCould you please help me? Looks like documenttion is incorrect or i do something wrong...How to get the ckWebAuthToken or how to use this ckSession for requesting the web services?
Posted
by
Post marked as solved
3 Replies
1.8k Views
Hello,I am creating a new app that uses CKShare. I am able to create the CKShare and send it by email using UICloudSharingController.When the receiver of the invite tries to accept the share, there is an error message"Couldn't open "Title"You need a newer version of "App" to open this, but the required version couldn't be found in the App StoreMy app has not been published to app store yet. How do I resolve this error? I am using a development build with two apple id's to test ckshare.Thanks!
Posted
by
Post not yet marked as solved
5 Replies
2.8k Views
Hi all,I am having trouble sharing a record. I have successfully saved the record to my private database in a custom zone, and I have successfully created a share email to that record. I have accepted the share and I now see the record in the share database of the recipient under the same zoneID. In the DB, it shows also that the share has been accepted.When I click on the share link and bring up the app, I get this message in the console:2019-04-05 13:21:11.553916-0300 StoryWheel[41594:6905300] [LogFacilityCK] You cannot get the URL of a share until it's been saved to the server2019-04-05 13:21:11.559670-0300 StoryWheel[41594:6905300] -[UIApplication _handleNonLaunchSpecificActions:forScene:withTransitionContext:completion:]: Handling CloudKit Share Action with metadata: <CKShareMetadata: 0x6000017740a0; shareID=<CKRecordID: 0x60000261c9a0; recordName=Share-9F2CE009-3AC0-4658-AC0A-E4FE33664068, zoneID=storywheel:_1b1d6baf4f1340d8a7d80abf12a31551>, Owner=<CKUserIdentity: 0x60000027adc0; lookupInfo=<CKUserIdentityLookupInfo: 0x60000280d4a0; email=awilcox@***.ca>, cached=0, nameComponents=Andrew, userID=<CKRecordID: 0x60000261cfsx0; recordName=_1b1d6baf4f1340d8a7d80abf12a31551, zoneID=_defaultZone:__defaultOwner__>, contactIdentifiers={ items = ( );}>, participantStatus=Accepted, container=iCloud.ca.***.storywheel1:Sandbox, rootRecordID=<CKRecordID: 0x60000261ce80; recordName=D3D7F7BF-46B1-4CE0-8620-FE1919BD9A66, zoneID=storywheel:_1b1d6baf4f1340d8a7d80abf12a31551>, participantPermission=ReadWrite, shareURL=<null>, participantRole=PrivateUser>Not sure I understand the error message, as the record seems to be on the server. Anyone else seen this?Thanks,Andy
Posted
by
Post marked as solved
9 Replies
7.5k Views
Hello, I'am an Unity game developer. Iam using custom Binary files to save game progress data (encoded strings, int, bool etc.). Now before I build my project/game to Xcode and upload it to the Appstore, I want the user to be able to save their progress to the iCloud so they can play on multiple devices and restore/override their game data if needed. However I can't find online a step for step guide on how to achieve this. The data that I would need to store for 1 user would probably not be more then 100 int/bool/float etc. I want to know what "Cloud system" I should use in my situation, and how to synchronize my binary files to iCloud. Help would very much be appreciated!
Posted
by
Post marked as solved
8 Replies
2.9k Views
I’m slightly confused about how are CloudKit containers supposed to handle app transfers. I’m seeing some strange too-permissive security behavior, and I am not sure whether this is a feature or a bug 🙂Here’s the setup:I had an app with bundleID com.example.something, talking to a CloudKit container also called com.example.something, all under the same developer account A. All was well.I then transferred the app from developer account A to developer account B. The bundle ID or anything else about the app did not change, just the ownership. Must now also sign new builds of the app with credentials for account B, as expected. HOWEVER: the CK container also did not change at all, and remained under development account A.What I am seeing now: the app signed by developer account B can still access the CK container under developer account A. No bundle IDs or CK ID-s changed, so I can sort of understand this, but at the same time, it seems strange.There is no security risk to my data, as this app only uses "read" operation of the public database. I didn’t try any other operations or private databases.Is this a bug and could it stop working? Or is this a feature which will remain working? This tells me that under certain conditions, any app can read the CK container of any other app from any developer account, if they know the correct CK container ID to talk to. Is this expected? (Or maybe it only keeps working because they were previously under the same developer account, and the system knows to keep this connection? And if I were try to randomly read any other app’s container, it would fail?) Any docs or guidance from Apple?
Posted
by
Post not yet marked as solved
100 Replies
125k Views
This has been a bug for a while now on Mac OS. When you sync your desktop/documents folders with iCloud at random moments it gets stuck and never finish uploading. The folder says "waiting to upload" indefinitely. I notice it happens more often when you do a git commit on a folder that is synced with iCloud. Are there any work around for that?
Posted
by
Post not yet marked as solved
1 Replies
1.1k Views
I'm using fileImporter for a Mac app. If I open a file from iCloud Drive that isn't already downloaded, I need to start the download before I can read the contents of the file. I found that I can download the file by using NSFileCoordinator or FileManager.default.startDownloadingUbiquitousItem. These APIs will begin the download, but I have no updates on the progress or if the file has been downloaded. I've tried to use NSMetadataQuery with no luck. Is there a way, either with fileImporter in SwiftUI or an AppKit API that I can receive updates for when a remote file has been downloaded, or do I need to prompt the users to download the file themselves before importing into my app?
Posted
by
Post marked as solved
2 Replies
1k Views
Testing an iOS app using iCloud Drive on iOS16.1, iOS15.5 and iOS14.5 - these all work fine on Intel (Monterey or Ventura) but not on an M1 Mac running Monterey. The iOS16.1 simulator throws an exception with bird, which could have some bearing on it - but this isn't seen with the other simulators, and none of them sync iCloud Drive after leaving it running for over an hour (and manually triggering iCloud Sync). Has anyone else this problem? How about on Ventura on an M1?
Posted
by
Post not yet marked as solved
2 Replies
957 Views
When a file named a.txt is not downloaded locally, the iCloud Drive folder actually only contains a placeholder named .a.txt.icloud (that is still displayed as a.txt by the Finder) with a very small file size, something like 176 bytes. How can I get the original file size, like the Finder displays?
Posted
by
Post not yet marked as solved
5 Replies
1.1k Views
I want to troubleshoot entitlements to icloud drive. An app downloaded on the macOS app store has no entitlements related to icloud. Its entitlements look like this (removing the irrelevant ones): [Key] com.apple.developer.maps [Value] [Bool] true [Key] com.apple.security.app-sandbox [Value] [Bool] true [Key] com.apple.security.files.user-selected.read-write [Value] [Bool] true [Key] com.apple.security.network.client [Value] [Bool] true [Key] com.apple.security.network.server [Value] [Bool] true [Key] com.apple.security.personal-information.addressbook [Value] [Bool] true [Key] com.apple.security.personal-information.calendars [Value] [Bool] true [Key] com.apple.security.personal-information.location [Value] [Bool] true I have not manually given it access to the icloud drive. This app does not appear in the list of app appearing in Settings / iCloud Drive / options. And yet, this app is able to create its directory inside iCloud drive. My understanding is that it should not have access to iCloud drive without a specific entitlement. Is my understanding off, or is this is security bug?
Posted
by
Post not yet marked as solved
1 Replies
666 Views
Texts from important people like lawyers and doctors started coming in like this.. with an @ symbol in between each letter within the text message. I have had problems in the past being hacked, and I also have some problems with battery life and receiving phone calls, emails and texts. also my Apple Cash won’t work it says there is a problem with my social security number. I don’t think the image worked.. but I was trying to post a screenshot of this. It looks like this :” H@i D@a@n@ d@i@d@ y@o@u …” the entire text comes in this way from both iPhones and androids. can’t find anything online any help is greatly appreciated! thanks
Posted
by
Post not yet marked as solved
0 Replies
669 Views
I think it is about time iCloud Backup should be extended to enable Cellular Data be enabled for it's data Use. My Understanding has been those from Africa and other less highly technological places have had it difficult in backing up their phones on iCloud due to the exclusive request for Wi-Fi. At these places Cellular data is mostly the source of readily source for for all internet connectivity's. So I think there should be a conscious effort to allow iCloud Backups through Cellular Data.
Posted
by
Post not yet marked as solved
1 Replies
489 Views
Hi, For some reason, I have an AppleID account that data in the Reminders app appears to be corrupt. This AppleID is tied to a MacBook Pro, an iPhone and an iPad Pro - 2 of the 3 share the same data, but the third doesn't. And the 2 that share the same data, the options provided for the reminders seems to be an earlier version. I do remember an OS upgrade or so ago, the Reminders database was upgraded, so this appears to be maybe the upgrade failed. I'd be happy to delete all the Reminders data for this account and start over, but I'm not sure how to do that. Any advice? Thanks, Neil
Posted
by
Post not yet marked as solved
3 Replies
1.8k Views
I'm trying to use the Xcode 15.0 beta on macOS 13.4 (22F66) on a MacBook Pro 16" (2019) but whenever I try to start a new project, Xcode becomes unresponsive – seemingly indefinitely. In Activity Monitor I see "Open and Save Panel Service (Xcode) (Not Responding)": Even if I try to use Xcode 14.3.1 now I get the same problem. I've tried to resolve this by removing all Xcode-related files as well as the Xcode command line tools and reinstalling them but to no avail. I'd appreciate any and all help in how to fix this. EDIT: I have since found out that if I force-quit the bird process, Xcode will react again. But the bird process will start up and shoot to the top of the % CPU l column in Activity Monitor again almost instantly. It appears to be iCloud-related but I don't know what's causing it to take up so much CPU resources and make Xcode unresponsive, and how I can fix this.
Posted
by
Post not yet marked as solved
1 Replies
335 Views
When accessing my own files on iCloud.com, the txt files appear as garbled characters. It seems that UTF-8 encoding is not supported.
Posted
by
Post not yet marked as solved
2 Replies
882 Views
Hello! I would like my users to save short videos (under 30seconds 1080p) to the public database for all other users to download and view. Is this possible? Will I run into any storage pricing with Apple if I were to pursue this as my application backend? I am looking at other methods as well (user sharing from their private database) so I can implement video sharing. Is this feasible and worth pursuing?
Posted
by
Post not yet marked as solved
0 Replies
629 Views
I have my app including iCloud support in the App Store for many years now. When I run the app on iOS 17 Beta 2 I am experiencing a very bad performance because the main thread seems to be blocked most of the time. When I run the app using the Time Profiler in Instruments it also reports the hangs and the busy main thread. I looked into the profiler window to see methods with long runtime. The most prominent method was: [BRQuery itemCollectionGathererDidReceiveUpdates:deleteItemsWithIDs:] coming from "CloudDocs". That seems to be some iOS internal class. I do not really know where to look next and I want to know whether somebody of you also experienced a similar problem? Thanks, Dirk
Posted
by
Post not yet marked as solved
0 Replies
658 Views
Guys, can you suggest some keywords about the feature: upload file to iCloud Drive via REST API (POST method)? I did a lot of research in two days and I almost thought it impossible, so I come here to get help from you guys. My project required upload the file into each user's iCloud Drive/Google Drive. For now, I'm finished with Google Drive and it works well. I found CloudKit but seem it's not allowed to upload the file into each user drive like Google Drive The workflow of my feature: Step 1. Upload file to iCloud Drive via REST API Step 2. Get the public share link from the uploaded file in Step 1
Posted
by