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.

Posts under iCloud Drive tag

200 Posts

Post

Replies

Boosts

Views

Activity

Sandboxed app has access to icloud drive without entitlements
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?
5
0
2.1k
Jun ’23
How to save game data to iCloud?
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!
9
0
9.9k
Jun ’23
iCloud Drive never syncs with Xcode 14.1 simulator on M1 Mac (OK on Intel)
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?
2
0
1.6k
Jun ’23
Reset corrupt Reminders across iCloud and App
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
1
1
1.1k
Jun ’23
Cellular Data for iCloud Backup
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.
0
0
1.1k
May ’23
CKQuery with NSPredicate fails when using “CONTAINS” operator
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?
4
0
3.3k
May ’23
How do CloudKit containers handle app transfers?
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?
8
0
4.3k
May ’23
Anyone know what this is? Texts with @ symbols
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
1
0
1k
May ’23
CKShare - You cannot get the URL of a share until it's been saved to the server
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@xxx.ca>, cached=0, nameComponents=Andrew, userID=<CKRecordID: 0x60000261cfsx0; recordName=_1b1d6baf4f1340d8a7d80abf12a31551, zoneID=_defaultZone:__defaultOwner__>, contactIdentifiers={ items = ( );}>, participantStatus=Accepted, container=iCloud.ca.xxx.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
5
0
3.5k
May ’23
iCloud on Simulator Questions
Hi My app uses .csv files that can also be loaded by spreadsheets like Numbers, it is not document based. I recently installed the SimpleiCloudDocument Apple sample code on the simulator (logging into my development iCloud account, which is also my personal iCloud account) and my iPhone and set up a new iCloud container based on the bundle id, etc. At first I did not have iCloud Drive enabled on the simulator so I had to restart the demo. After that, SimpleiCloudDocument works as advertised syncing docs on both devices. After working with SimpleiCloudDocument I noticed that all of my own app related .csv files disappeared, even those stored in the Numbers iCloud Drive directory. Other files in unrelated iCloud app folders also disappeared. They are not listed in the "recently deleted". Some files were restored to the directory shortly afterwards, but appeared to be empty. I saw a thread from 3 years ago mentioning problems with iCloud and the iPhone simulator. Has anyone else had more recent problems? Can one safely use the simulator with iCloud testing? Any insights appreciated. Thank you.
2
0
1.2k
Apr ’23
NSCloudKitMirroringExportRequest issues
I'm attempting to create a Swift/SwiftUI app that will run on iOS/iPadOS that uses CloudKit to syncronize data between devices. I have created the App in Xcode.In the Apps Signing & Capabilities tab, I have:- Ensured that the Bundle Identifier is valid- Added the iCloud capability - Created the Container and checked it - Validated that the Container was created in the CloudKit Dashbaord- Added the Backgrouind Modes capability - Checked the Remote notifications optionI have modified/validated AppDelegate.swift:- Validated that it is using NSPersistentCloudKitContainer- Added container.viewContext.automaticallyMergesChangesFromParent to true- Added container.viewContext.mergePolicy to NSMergeByPropertyObjectTrumpMergePolicyWhen I load the App, I get a series of errors reported related to CloudKit NSCloudKitMirroringExportRequest. These errors are shown below. I am able to create records, but can see they are only stored locally and do not get synced to the CloudKit Dashboard - interestingly enough, the schema has been created in CloudKit Dashboard - so I know some level of connection has been made.I appreciate any insight that someone can give me to resolve this and allow my data to sync properly.CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _scheduleAutomatedExportWithLabel:activity:completionHandler:]_block_invoke(2174): <NSCloudKitMirroringDelegate: 0x600003ef0c60> - Finished automatic export - ExportActivity - with result: <NSCloudKitMirroringResult: 0x60000096cc40> success: 0 madeChanges: 0 error: Error Domain=NSCocoaErrorDomain Code=134417 "Request '<NSCloudKitMirroringExportRequest: 0x6000007545a0> B79831CF-9C04-4BB0-90B7-974EB38D2A25' was cancelled because there is already a pending request of type 'NSCloudKitMirroringExportRequest'." UserInfo={NSLocalizedFailureReason=Request '<NSCloudKitMirroringExportRequest: 0x6000007545a0> B79831CF-9C04-4BB0-90B7-974EB38D2A25' was cancelled because there is already a pending request of type 'NSCloudKitMirroringExportRequest'.}CoreData: warning: CoreData+CloudKit: -[NSCloudKitMirroringDelegate finishedAutomatedRequestWithResult:](2119): Finished request '<NSCloudKitMirroringExportRequest: 0x6000007545a0> B79831CF-9C04-4BB0-90B7-974EB38D2A25' with result: <NSCloudKitMirroringResult: 0x60000096cc40> success: 0 madeChanges: 0 error: Error Domain=NSCocoaErrorDomain Code=134417 "Request '<NSCloudKitMirroringExportRequest: 0x6000007545a0> B79831CF-9C04-4BB0-90B7-974EB38D2A25' was cancelled because there is already a pending request of type 'NSCloudKitMirroringExportRequest'." UserInfo={NSLocalizedFailureReason=Request '<NSCloudKitMirroringExportRequest: 0x6000007545a0> B79831CF-9C04-4BB0-90B7-974EB38D2A25' was cancelled because there is already a pending request of type 'NSCloudKitMirroringExportRequest'.}CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _enqueueRequest:]_block_invoke(714): <NSCloudKitMirroringDelegate: 0x600003ef0c60>: enqueuing request: <NSCloudKitMirroringImportRequest: 0x6000007a7450> D59C4B33-4075-4A43-AEF0-88EDD466D644CoreData: warning: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _enqueueRequest:]_block_invoke_2(724): Failed to enqueue request: <NSCloudKitMirroringImportRequest: 0x6000007a7450> D59C4B33-4075-4A43-AEF0-88EDD466D644Error Domain=NSCocoaErrorDomain Code=134417 "Request '<NSCloudKitMirroringImportRequest: 0x6000007a7450> D59C4B33-4075-4A43-AEF0-88EDD466D644' was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'." UserInfo={NSLocalizedFailureReason=Request '<NSCloudKitMirroringImportRequest: 0x6000007a7450> D59C4B33-4075-4A43-AEF0-88EDD466D644' was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'.}CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _scheduleAutomatedImportWithLabel:activity:completionHandler:]_block_invoke(2150): <NSCloudKitMirroringDelegate: 0x600003ef0c60> - Finished automatic import - ImportActivity - with result: <NSCloudKitMirroringResult: 0x60000096f0c0> success: 0 madeChanges: 0 error: Error Domain=NSCocoaErrorDomain Code=134417 "Request '<NSCloudKitMirroringImportRequest: 0x6000007a7450> D59C4B33-4075-4A43-AEF0-88EDD466D644' was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'." UserInfo={NSLocalizedFailureReason=Request '<NSCloudKitMirroringImportRequest: 0x6000007a7450> D59C4B33-4075-4A43-AEF0-88EDD466D644' was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'.}CoreData: warning: CoreData+CloudKit: -[NSCloudKitMirroringDelegate finishedAutomatedRequestWithResult:](2119): Finished request '<NSCloudKitMirroringImportRequest: 0x6000007a7450> D59C4B33-4075-4A43-AEF0-88EDD466D644' with result: <NSCloudKitMirroringResult: 0x60000096f0c0> success: 0 madeChanges: 0 error: Error Domain=NSCocoaErrorDomain Code=134417 "Request '<NSCloudKitMirroringImportRequest: 0x6000007a7450> D59C4B33-4075-4A43-AEF0-88EDD466D644' was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'." UserInfo={NSLocalizedFailureReason=Request '<NSCloudKitMirroringImportRequest: 0x6000007a7450> D59C4B33-4075-4A43-AEF0-88EDD466D644' was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'.}
21
1
14k
Apr ’23
iCloud Drive Corrupting Xcode Projects
I've been experiencing an issue with MacOS 13.2 and 13.3 where Xcode projects located in iCloud Drive (i.e in the Documents folder) seem to become corrupted. When trying to open them, Xcode freezes and becomes unresponsive but these projects open fine when cloned to a local directory suggesting it has something to do with them being in iCloud Drive specifically. Has anyone else experience this issue? I've tried erasing and restoring my Mac as well as turning iCloud Drive on and off with no luck.
2
0
1.3k
Mar ’23
iCloud Drive app folder does not reappear
I am working on implementing iCloud Drive support in my app. Initially, I got the folder to appear but I had to do some bug fixes for the version currently in the App Store (thus removing iCloud Capabilities). Now I am trying to re-enable it but I cannot get the folder to re-appear. The container and files still exist when I am checking the directories on my Mac. I have tried increasing the build and bundle version, checked the entitlements file along with my info.plist file but nothing seems to work.
0
0
730
Mar ’23
iCloud drive toggle in the app
We are integrating to our app iCloud sync between user devices. We have noticed that the user needs to enable iCloud drive in order to access to the public database, as suggested in the official documentation: https://developer.apple.com/documentation/cloudkit/enabling_cloudkit_in_your_app The problem is that in our first testflight session we have noticed that not every user has that option enabled and basically is making our app unusable for these users. There is a way to let the user enable that option from our app or access to the public database without problems? This is pretty annoying to us, there is a workaround or a better solution than showing how to enable the iCloud drive from the user settings?
0
1
1.1k
Mar ’23
Initial delay with NSUbiquitousKeyValueStore
We are using iCloud key value storage(NSUbiquitousKeyValueStore) in our app to store some user data. I moved to a new device and logged into iCloud settings and if I immediately open our app and query for a value it returns nil. After considerable delay say 1 minute and if I query, then the proper stored value is returned. We called synchronize(), but it did not help. Is there any other way we can force sync and get a value immediately. Thanks Vinoth
1
1
1.5k
Mar ’23
Sandboxed app has access to icloud drive without entitlements
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?
Replies
5
Boosts
0
Views
2.1k
Activity
Jun ’23
How to save game data to iCloud?
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!
Replies
9
Boosts
0
Views
9.9k
Activity
Jun ’23
iCloud Drive never syncs with Xcode 14.1 simulator on M1 Mac (OK on Intel)
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?
Replies
2
Boosts
0
Views
1.6k
Activity
Jun ’23
Reset corrupt Reminders across iCloud and App
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
Replies
1
Boosts
1
Views
1.1k
Activity
Jun ’23
Cellular Data for iCloud Backup
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.
Replies
0
Boosts
0
Views
1.1k
Activity
May ’23
CKQuery with NSPredicate fails when using “CONTAINS” operator
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?
Replies
4
Boosts
0
Views
3.3k
Activity
May ’23
How do CloudKit containers handle app transfers?
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?
Replies
8
Boosts
0
Views
4.3k
Activity
May ’23
Anyone know what this is? Texts with @ symbols
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
Replies
1
Boosts
0
Views
1k
Activity
May ’23
CKShare - You cannot get the URL of a share until it's been saved to the server
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@xxx.ca>, cached=0, nameComponents=Andrew, userID=<CKRecordID: 0x60000261cfsx0; recordName=_1b1d6baf4f1340d8a7d80abf12a31551, zoneID=_defaultZone:__defaultOwner__>, contactIdentifiers={ items = ( );}>, participantStatus=Accepted, container=iCloud.ca.xxx.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
Replies
5
Boosts
0
Views
3.5k
Activity
May ’23
iCloud on Simulator Questions
Hi My app uses .csv files that can also be loaded by spreadsheets like Numbers, it is not document based. I recently installed the SimpleiCloudDocument Apple sample code on the simulator (logging into my development iCloud account, which is also my personal iCloud account) and my iPhone and set up a new iCloud container based on the bundle id, etc. At first I did not have iCloud Drive enabled on the simulator so I had to restart the demo. After that, SimpleiCloudDocument works as advertised syncing docs on both devices. After working with SimpleiCloudDocument I noticed that all of my own app related .csv files disappeared, even those stored in the Numbers iCloud Drive directory. Other files in unrelated iCloud app folders also disappeared. They are not listed in the "recently deleted". Some files were restored to the directory shortly afterwards, but appeared to be empty. I saw a thread from 3 years ago mentioning problems with iCloud and the iPhone simulator. Has anyone else had more recent problems? Can one safely use the simulator with iCloud testing? Any insights appreciated. Thank you.
Replies
2
Boosts
0
Views
1.2k
Activity
Apr ’23
NSCloudKitMirroringExportRequest issues
I'm attempting to create a Swift/SwiftUI app that will run on iOS/iPadOS that uses CloudKit to syncronize data between devices. I have created the App in Xcode.In the Apps Signing & Capabilities tab, I have:- Ensured that the Bundle Identifier is valid- Added the iCloud capability - Created the Container and checked it - Validated that the Container was created in the CloudKit Dashbaord- Added the Backgrouind Modes capability - Checked the Remote notifications optionI have modified/validated AppDelegate.swift:- Validated that it is using NSPersistentCloudKitContainer- Added container.viewContext.automaticallyMergesChangesFromParent to true- Added container.viewContext.mergePolicy to NSMergeByPropertyObjectTrumpMergePolicyWhen I load the App, I get a series of errors reported related to CloudKit NSCloudKitMirroringExportRequest. These errors are shown below. I am able to create records, but can see they are only stored locally and do not get synced to the CloudKit Dashboard - interestingly enough, the schema has been created in CloudKit Dashboard - so I know some level of connection has been made.I appreciate any insight that someone can give me to resolve this and allow my data to sync properly.CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _scheduleAutomatedExportWithLabel:activity:completionHandler:]_block_invoke(2174): <NSCloudKitMirroringDelegate: 0x600003ef0c60> - Finished automatic export - ExportActivity - with result: <NSCloudKitMirroringResult: 0x60000096cc40> success: 0 madeChanges: 0 error: Error Domain=NSCocoaErrorDomain Code=134417 "Request '<NSCloudKitMirroringExportRequest: 0x6000007545a0> B79831CF-9C04-4BB0-90B7-974EB38D2A25' was cancelled because there is already a pending request of type 'NSCloudKitMirroringExportRequest'." UserInfo={NSLocalizedFailureReason=Request '<NSCloudKitMirroringExportRequest: 0x6000007545a0> B79831CF-9C04-4BB0-90B7-974EB38D2A25' was cancelled because there is already a pending request of type 'NSCloudKitMirroringExportRequest'.}CoreData: warning: CoreData+CloudKit: -[NSCloudKitMirroringDelegate finishedAutomatedRequestWithResult:](2119): Finished request '<NSCloudKitMirroringExportRequest: 0x6000007545a0> B79831CF-9C04-4BB0-90B7-974EB38D2A25' with result: <NSCloudKitMirroringResult: 0x60000096cc40> success: 0 madeChanges: 0 error: Error Domain=NSCocoaErrorDomain Code=134417 "Request '<NSCloudKitMirroringExportRequest: 0x6000007545a0> B79831CF-9C04-4BB0-90B7-974EB38D2A25' was cancelled because there is already a pending request of type 'NSCloudKitMirroringExportRequest'." UserInfo={NSLocalizedFailureReason=Request '<NSCloudKitMirroringExportRequest: 0x6000007545a0> B79831CF-9C04-4BB0-90B7-974EB38D2A25' was cancelled because there is already a pending request of type 'NSCloudKitMirroringExportRequest'.}CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _enqueueRequest:]_block_invoke(714): <NSCloudKitMirroringDelegate: 0x600003ef0c60>: enqueuing request: <NSCloudKitMirroringImportRequest: 0x6000007a7450> D59C4B33-4075-4A43-AEF0-88EDD466D644CoreData: warning: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _enqueueRequest:]_block_invoke_2(724): Failed to enqueue request: <NSCloudKitMirroringImportRequest: 0x6000007a7450> D59C4B33-4075-4A43-AEF0-88EDD466D644Error Domain=NSCocoaErrorDomain Code=134417 "Request '<NSCloudKitMirroringImportRequest: 0x6000007a7450> D59C4B33-4075-4A43-AEF0-88EDD466D644' was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'." UserInfo={NSLocalizedFailureReason=Request '<NSCloudKitMirroringImportRequest: 0x6000007a7450> D59C4B33-4075-4A43-AEF0-88EDD466D644' was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'.}CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _scheduleAutomatedImportWithLabel:activity:completionHandler:]_block_invoke(2150): <NSCloudKitMirroringDelegate: 0x600003ef0c60> - Finished automatic import - ImportActivity - with result: <NSCloudKitMirroringResult: 0x60000096f0c0> success: 0 madeChanges: 0 error: Error Domain=NSCocoaErrorDomain Code=134417 "Request '<NSCloudKitMirroringImportRequest: 0x6000007a7450> D59C4B33-4075-4A43-AEF0-88EDD466D644' was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'." UserInfo={NSLocalizedFailureReason=Request '<NSCloudKitMirroringImportRequest: 0x6000007a7450> D59C4B33-4075-4A43-AEF0-88EDD466D644' was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'.}CoreData: warning: CoreData+CloudKit: -[NSCloudKitMirroringDelegate finishedAutomatedRequestWithResult:](2119): Finished request '<NSCloudKitMirroringImportRequest: 0x6000007a7450> D59C4B33-4075-4A43-AEF0-88EDD466D644' with result: <NSCloudKitMirroringResult: 0x60000096f0c0> success: 0 madeChanges: 0 error: Error Domain=NSCocoaErrorDomain Code=134417 "Request '<NSCloudKitMirroringImportRequest: 0x6000007a7450> D59C4B33-4075-4A43-AEF0-88EDD466D644' was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'." UserInfo={NSLocalizedFailureReason=Request '<NSCloudKitMirroringImportRequest: 0x6000007a7450> D59C4B33-4075-4A43-AEF0-88EDD466D644' was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'.}
Replies
21
Boosts
1
Views
14k
Activity
Apr ’23
iCloud Drive Corrupting Xcode Projects
I've been experiencing an issue with MacOS 13.2 and 13.3 where Xcode projects located in iCloud Drive (i.e in the Documents folder) seem to become corrupted. When trying to open them, Xcode freezes and becomes unresponsive but these projects open fine when cloned to a local directory suggesting it has something to do with them being in iCloud Drive specifically. Has anyone else experience this issue? I've tried erasing and restoring my Mac as well as turning iCloud Drive on and off with no luck.
Replies
2
Boosts
0
Views
1.3k
Activity
Mar ’23
iCloud Drive app folder does not reappear
I am working on implementing iCloud Drive support in my app. Initially, I got the folder to appear but I had to do some bug fixes for the version currently in the App Store (thus removing iCloud Capabilities). Now I am trying to re-enable it but I cannot get the folder to re-appear. The container and files still exist when I am checking the directories on my Mac. I have tried increasing the build and bundle version, checked the entitlements file along with my info.plist file but nothing seems to work.
Replies
0
Boosts
0
Views
730
Activity
Mar ’23
iCloud drive toggle in the app
We are integrating to our app iCloud sync between user devices. We have noticed that the user needs to enable iCloud drive in order to access to the public database, as suggested in the official documentation: https://developer.apple.com/documentation/cloudkit/enabling_cloudkit_in_your_app The problem is that in our first testflight session we have noticed that not every user has that option enabled and basically is making our app unusable for these users. There is a way to let the user enable that option from our app or access to the public database without problems? This is pretty annoying to us, there is a workaround or a better solution than showing how to enable the iCloud drive from the user settings?
Replies
0
Boosts
1
Views
1.1k
Activity
Mar ’23
Initial delay with NSUbiquitousKeyValueStore
We are using iCloud key value storage(NSUbiquitousKeyValueStore) in our app to store some user data. I moved to a new device and logged into iCloud settings and if I immediately open our app and query for a value it returns nil. After considerable delay say 1 minute and if I query, then the proper stored value is returned. We called synchronize(), but it did not help. Is there any other way we can force sync and get a value immediately. Thanks Vinoth
Replies
1
Boosts
1
Views
1.5k
Activity
Mar ’23