CloudKit

RSS for tag

Store structured app and user data in iCloud containers that can be shared by all users of your app using CloudKit.

CloudKit Documentation

Posts under CloudKit tag

324 Posts
Sort by:
Post not yet marked as solved
1 Replies
2.1k Views
I've just create a project in Xcode 9 beta 6 and add this code:let privateDB = CKContainer.default().privateCloudDatabase let greatID = CKRecordID(recordName: "GreatPlace") let place = CKRecord(recordType: "Place", recordID: greatID) privateDB.save(place) { (record, error) in if error != nil { let er = (error as! CKError).errorUserInfo print("Error: \n") print("CKErrorDescription: \(er["CKErrorDescription"]!)\n") print("ContainerID: \(er["ContainerID"]!)\n") print("NSDebugDescription: \(er["NSDebugDescription"]!)\n") print("NSUnderlyingError: \(er["NSUnderlyingError"]!)\n") print("NSLocalizedDescription: \(er["NSLocalizedDescription"]!)\n") print("ServerErrorDescription: \(er["ServerErrorDescription"]!)\n") } if record != nil { print("record: \(record!)") } }and add icloud capabilities with Use default containers and when I run the code I receive this erros message:Error: CKErrorDescription: Error saving record <CKRecordID: 0x7fd8e9684560; recordName=GreatPlace, zoneID=_defaultZone:__defaultOwner__> to server: Invalid bundle ID for container ContainerID: iCloud.com.gazapps.MyCloudKit NSDebugDescription: CKInternalErrorDomain: 2007 NSUnderlyingError: <CKError 0x60400005d0d0: "Permission Failure" (2007); server message = "Invalid bundle ID for container"; uuid = 73EDDA3F-25B1-4B22-8E8E-4F6B27B9AB06; container ID = "iCloud.com.gazapps.MyCloudKit"> NSLocalizedDescription: Error saving record <CKRecordID: 0x7fd8e9684560; recordName=GreatPlace, zoneID=_defaultZone:__defaultOwner__> to server: Invalid bundle ID for container ServerErrorDescription: Invalid bundle ID for containerWhat I am doing wrong ?
Posted
by
Post not yet marked as solved
0 Replies
560 Views
Hi,I have implemented retry functionality to my app's CloudKit error handling as presented in WWDC 2016 CloudKit Best Practises video at 39:10.Now I was wondering how could this be tested with CloudKit dev container. More specifically, how to re-create CKErrors - serviceUnavailable - requestRateLimited - zoneBusyFailed to find any documentation or previous discussion about this topic.-J
Posted
by
Post not yet marked as solved
2 Replies
1.1k Views
Hi, I'm working on an app that heavily relies in cloudkit. I regularly check on the status of my records through CloudKit Dashboard, but today I stumbled into this:While being logged in to my developer account (as we can tell by the fact that Dasboard can display my name in the upper right corner), it thinks I an not logged in, only allowing me into my public database. Also, when I try to fetch data from iCloud, my app logs the following error:<CKError 0x115b34340: "Service Unavailable" (6/2022); "Request failed with http status code 503"; Retry after 600.0 seconds>Has anyone experienced this before, and/or would anyone know a solution for this?
Posted
by
Post not yet marked as solved
9 Replies
4.3k Views
Hello:My app's entire production public database was cleared. All user data is gone. I do not see how that could have happened. But it looks to have happened this morning at around 5 AM GMT.Has anyone experienced this before?
Posted
by
Post marked as solved
3 Replies
1.5k Views
Hi, So I have been recently work on some research for a Health Care application where HIPPA compliance is a requirement. I had done research into FireBase and that seemed good, but as of May 2018 it is not HIPPA compliant. I was looking around and Apple CloudKit seems like a good option, however I could not find any information from Apple's developer pages about CloudKit on whether it was HIPPA compliant or not?
Posted
by
Post not yet marked as solved
1 Replies
339 Views
Hi everyone,hope someone can help me out on this.I've developed an app that uses cloudKit to store some data in icloud. I am also asking for the UserDiscoverability Permission via 'CKContainer.default().requestApplicationPermission(.userDiscoverability)'. The app is already deployed via the AppStore and uses the CloudKit iCloud production Environment. Now my problem is that when I'm uninstalling the app it's still listed in the device icloud Section 'Look me up' (Settings -> Apple ID -> iCloud). I thought that after uninstalling the it's getting unlisted from this list. Remarks: Even deleting BackupData for the app doesn't change anything.Kind regardsChris
Posted
by
Post marked as solved
8 Replies
4.3k 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 not yet marked as solved
8 Replies
3.2k Views
My app was working fine with Cloud Kit on the simulator but after I distributed it and sent it to the App Store it stopped working. When the users download the app they can not even log in. It is like the entities created on the Cloud Kit dashboard do not even exist. I think this is a problem with compatibility with iOS 13, does anyone know how to solve it?
Posted
by
Post not yet marked as solved
3 Replies
1.2k Views
I posted this in the user forums but got no response as I suspect it's too low-level for the discussions there. I think this is a relevant developer issue, even though I am only interested in this from a user perpsective. Perhaps someone can confirm my reasoning (and the resulting potential for errors/bugs when syncing between Mac and Windows iCloud Drive)...----After some investigation of log files for iCloud for Windows (Drive specifically) (latest version - 10.7.0.7 / 2.0.74.23) , I think I've discovered a major reason why there are so many syncing issues with iCloud for Windows.My theory is:1) iCloud for Windows is built on top of the OneDrive technology. https://www.howtogeek.com/fyi/daily-news-roundup-icloud-for-windows-powered-by-onedrive-tech/2) OneDrive technology limits the file path length to 216 characters (or thereabouts). You can verify this yourself by trying to create a folder path depth over 216 characters in length using OneDrive. See this article for some more information: http://www.purgeie.com/shareprep/maxlength.htm3) Mac OSX filing system and iCloud (for Mac), don't have the same folder path restriction (well as far as I can see it's somewhere around 1024 characters - https://stackoverflow.com/questions/7140575/mac-os-x-lion-what-is-the-max-path-length).4) So files that are successfully uploaded to iCloud from a Mac, will fail to download on to Windows 10 if they exceed the OneDrive folder path length of ~250.Checking the log files of iCloud for Windows I get errors such asERROR BRC::LocalContainer::CreateNewFilePlaceholder Error creating unique file path for itemIDERROR BRC::LocalContainer::ApplyChangesForLiveFile Failed to create placeholder forWARN BRC::LocalContainer::UpdateUnappliedRankRetryWithEtag com.apple.CloudDocs:__defaultOwner__: Will retry applying itemERROR BRC::LocalContainer::ApplyChangesSchedule Apply failed for itemThe filename, directory name, or volume label syntax is incorrect.5) This then causes iCloud for Windows to constantly retry creating placeholders and downloading, and constantly failing....WARN BRC::LocalContainer::UpdateUnappliedRankRetryWithEtag com.apple.CloudDocs:__defaultOwner__: Will retry applying item in 30 seconds (retryCount = 0)ERROR CKD::MMCS::GetErrorWithMMCSError Error Domain=com.apple.mmcs Code=16 "Last 4 requests failed with a network error. Retry after 16 seconds" UserInfo= {NSLocalizedDescription=Last 4 requests failed with a network error. Retry after 16 seconds,----------------------I don't see anyway easy way around this issue as the two OS are fundamentally incompatible in terms of filing system limits (note Windows 10 can have a larger limit using registry, but it appears OneDrive has the lower limit, which is the bottleneck).So the only way I can see is to reorganise all folders/files that are synced to iCloud to be under the ~250 character limit. And there is no easy way to check this while working normally in iCloud (on Mac side) - so you could unintentionally create a folder path depth that exceeds the OneDrive limit. It will work on the Mac side, but when using Windows it will fail.I haven't thoroughly tested this theory, but after waiting days for my iCloud for Windows to sync, I decided to dig a little deeper and found the above information (and log files).I have quite a deep structure to my filing, but I doubt I'm a complete edge case (!). Perhaps someone out there can verify these limits and symptoms. The log files for iCloud for Windows can be found atC:\Users\USERNAME\AppData\Local\Packages\AppleInc.iCloud_HASHCODE\LocalCache\Local\Logs
Posted
by
Post not yet marked as solved
12 Replies
2.5k Views
Hello,I watch the WWDC video regarding keep iPhone and independent watch app (watchos 6) in sync. So I have made a simple cloudkit subscription on the Apple Watch on a record (watch os 6). 1) On the iPhone I modify the record, but when the iPhone is unlocked the notification is never send from cloudkit to the Apple Watch.If I modify the record directly on the cloudkit dashboard and2a) the iPhone is locked, then the silent notification is sent to the watch.2b) the iPhone is unlocked, then it is show directly on the iPhone. For user visible notification this behavior make sense, but in case of silent notification it doesn´t, because there is no way if you change settings on the iPhone App (iPhone unlocked), that you get a push to the watch (via the cloudkit subscription). Does anybody have the same problem or any way to get this working with cloudkit?
Posted
by
Post not yet marked as solved
6 Replies
1.5k Views
Hi all,The strangest thing has happened to us. Have been using a countainer for some time now.We have been using the webinterface of the Dashboard to enter data in out database (easier than thru the up).All of a sudden and without doing any changes to the code, we can access the container thru the Web.The app continues to work great, reading existing entries and making new ones.It seems that there is something on the front end of the database. Have tried both Safari and Google Chrome, but nothing changes.This just happened to us - anybody else with the same problem?Thanks!
Posted
by
Post not yet marked as solved
19 Replies
5k Views
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'.}
Posted
by
Post not yet marked as solved
6 Replies
1.1k Views
Our app supports iCloud CloudKit sharing and provides URLs of CKShare records to users (e.g. via UICloudSharingController). Clicking on the URL in the Apple Mail or Messages app in macOS or iOS works fine. Pasting the link into Safari on iOS also works fine.But including the link in a web page or pasting it into Safari or Chrome on macOS or Edge on Windows 10 (we have a fall-back web site for non-Apple users) results in a fatal "iCloud has stopped responding" error page displayed in the browser.The app is a "universal" app and is available in both the Mac App Store and iOS App Store. All the CloudKit features otherwise work fine on both platforms.Does anyone have an idea what we might do to solve this? Do we have something misconfigured somewhere?I've also submitted a DTS Technical Support Inquiry #735184444 and Feedback #FB7697827.For example:https://www.icloud.com/share/0bjtbTTaM5b7bG1ff6dnKFbmg#Wizard_StoriesResults in:"iCloud has stopped responding."DetailsAPP NAMEcloudos2CLIENT TIMEMon May 11 2020 14:04:46 GMT-0700 (PDT) (1589231086615)USER AGENTMozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15HOSTNAMEwww.icloud.comBUILD INFO2007Hotfix35__2007Hotfix35__en-usSESSION IDe8317bf4-9fc6-4678-b3e9-e190619fdfa8ENVIRONMENT INFOPRODREPORTED ERROR TITLEShareRecord: Unable to find applicationIdentifier for containerId = iCloud.com.xxxxx.xxxxx and fileExtension = undefinedREPORTED ERROR TYPEUNHANDLED_EXCEPTIONERROR CONTEXTundefinedLINE NUMBER11STACKr@https://www.icloud.com/system/cloudos2/2007Hotfix35/en-us/main.js:11:88103a@https://www.icloud.com/system/cloudos2/2007Hotfix35/en-us/main.js:11:88150_getApplicationIdentifier@https://www.icloud.com/system/cloudos2/2007Hotfix35/en-us/main.js:11:405433_extractCloudKitResponse@https://www.icloud.com/system/cloudos2/2007Hotfix35/en-us/main.js:11:403382init@https://www.icloud.com/system/cloudos2/2007Hotfix35/en-us/main.js:11:402391create@https://www.icloud.com/system/cloudos2/2007Hotfix35/en-us/main.js:11:237251https://www.icloud.com/system/cloudos2/2007Hotfix35/en-us/main.js:11:408011r@https://www.icloud.com/system/cloudos2/2007Hotfix35/en-us/main.js:11:439698i@https://www.icloud.com/system/cloudos2/2007Hotfix35/en-us/main.js:11:180696promiseReactionJob@[native code]
Posted
by
Post not yet marked as solved
4 Replies
634 Views
Normally iCloud documents can be opened when off-line. However, with ios 13, if you have an active SMB server connection in the Files App, and then the network is disabled, calls to UIDocument initWithFileURL: block indefinitely while attempting to lookup file attributes.Note calls to [UIDocument openWithCompletionHandler:], [NSURL getResourceValue:forKey:error:] and ExternalProviderPrepareValues.Backtrace:Thread 1 name: Dispatch queue: UIDocument File Access Thread 1: 0 libsystem_kernel.dylib 0x00000001b493a784 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x00000001b4939ba8 mach_msg + 76 2 libdispatch.dylib 0x00000001b482bf10 _dispatch_mach_send_and_wait_for_reply + 552 3 libdispatch.dylib 0x00000001b482c304 dispatch_mach_send_with_result_and_wait_for_reply + 56 4 libxpc.dylib 0x00000001b476b96c xpc_connection_send_message_with_reply_sync + 240 5 Foundation 0x00000001b507a398 __NSXPCCONNECTION_IS_WAITING_FOR_A_SYNCHRONOUS_REPLY__ + 16 6 Foundation 0x00000001b4e40834 -[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:] + 2668 7 Foundation 0x00000001b4e6faa8 -[NSXPCConnection _sendSelector:withProxy:arg1:arg2:arg3:] + 148 8 Foundation 0x00000001b50814a4 _NSXPCDistantObjectSimpleMessageSend3 + 48 9 FileProvider 0x00000001c93b6ba4 -[FPDaemonConnection valuesForAttributes:forItemAtURL:error:] + 428 10 FileProviderOverride 0x000000010e5b9f14 0x10e5b8000 + 7956 11 CoreFoundation 0x00000001b4b7cf14 __invoking___ + 148 12 CoreFoundation 0x00000001b4a46098 -[NSInvocation invoke] + 400 13 CoreFoundation 0x00000001b4a46cc0 -[NSInvocation invokeWithTarget:] + 80 14 FileProvider 0x00000001c9374db8 -[FPFrameworkOverridesIterator callNextOverrides] + 468 15 FileProvider 0x00000001c9374f58 -[FPFrameworkOverridesIterator forwardInvocation:] + 96 16 CoreFoundation 0x00000001b4b7a7d8 ___forwarding___ + 680 17 CoreFoundation 0x00000001b4b7cd60 _CF_forwarding_prep_0 + 96 18 FileProvider 0x00000001c9394cc0 FPCFCopyAttributeValuesForItem + 300 19 CoreServicesInternal 0x00000001b5ebba98 CopyFromFileProvider+ 154264 (__CFURL const*, void const*, void const**, __CFError**) + 88 20 CoreServicesInternal 0x00000001b5ebbe40 ExternalProviderPrepareValues+ 155200 (__CFURL const*, __FileCache*, __CFString const* const*, void const**, long, void const*, __CFError**) + 376 21 CoreServicesInternal 0x00000001b5ea8cc0 prepareValuesForBitmap+ 76992 (__CFURL const*, __FileCache*, _FilePropertyBitmap*, __CFError**) + 376 22 CoreServicesInternal 0x00000001b5ea69d4 _FSURLCopyResourcePropertyForKeyInternal+ 68052 (__CFURL const*, __CFString const*, void*, void*, __CFError**, unsigned char) + 220 23 CoreFoundation 0x00000001b4b40768 CFURLCopyResourcePropertyForKey + 140 24 CoreFoundation 0x00000001b4a4d190 -[NSURL getResourceValue:forKey:error:] + 120 25 Foundation 0x00000001b4ec43a0 +[NSFileVersion unresolvedConflictVersionsOfItemAtURL:] + 124 26 UIKitCore 0x00000001b86fcc90 -[UIDocument _setOpen:] + 144 27 UIKitCore 0x00000001b86fbb8c __40-[UIDocument openWithCompletionHandler:]_block_invoke + 676 28 libdispatch.dylib 0x00000001b4814ec4 _dispatch_call_block_and_release + 32 29 libdispatch.dylib 0x00000001b481633c _dispatch_client_callout + 20 30 libdispatch.dylib 0x00000001b481c85c _dispatch_lane_serial_drain + 568 31 libdispatch.dylib 0x00000001b481d290 _dispatch_lane_invoke + 400 32 libdispatch.dylib 0x00000001b4826928 _dispatch_workloop_worker_thread + 584 33 libsystem_pthread.dylib 0x00000001b487d714 _pthread_wqthread + 276 34 libsystem_pthread.dylib 0x00000001b48839c8 start_wqthread + 8Note the app doesn't use a Document Browser: UISupportsDocumentBrowser = FALSE. LSSupportsOpeningDocumentsInPlace = FALSE Using a single NSUbiquitousContainer with NSUbiquitousContainerIsDocumentScopePublic = FALSE
Posted
by
Post not yet marked as solved
6 Replies
1.9k Views
I'm working on an app that is using CoreData with Cloud Kit. I'm able to successfully perform CRUD operations on Entities in the app and I can see the data propagate up to iCloud. I also have an ObservableObject pattern set up so I see changes reflected in the UI when changes happen from other devices to the same data on all devices.The problem is the use case of someone deleting the application, then re-installing it later. When I test this in Xcode, I can see the app (on first launch) start to sync data back to the app (via console messages from iCloud). But when I run a query and look at the NSFetchResults, I get a count = 0 on the entitiy records I'm looking for (even though they still persist in iCloud post app deletion).I've tried everything from looking at NSPersistentHistoryChangeRequest in the AppDelegate hoping I would see activity, subscribing to the NSPersistentStoreRemoteChange notification in the content view, etc. While I do see transactions coming in via this method on initial app launch after a re-install (first run in Xcode), my local store still doesn't seem to reflect the new data when I query via the managedObjectContext.What is the best practice to handle something like this? I've tried pulling apart the code sample from Apple from the WWDC 2019 sessions (Posts app), but as it's not in SwiftUI, some of the design patterns are different.At this point I'm hoping for some better sessions on this at WWDC 2020 with SwiftUI but hoping someone may have dealt with this before and has a good solution.
Posted
by
Post marked as solved
5 Replies
3.7k Views
I am trying to bring CloudKit syncing to a new SwiftUI app using the new App protocol and have not found a way to listen for remote notifications. Is this possible with the new updates to SwiftUI this year or is this currently an AppDelegate thing only?
Posted
by
Post not yet marked as solved
9 Replies
3.1k Views
Any insights on how to incorporate CloudKit (or CoreData) in the WidgetKit extension? Where in the WidgetKit api do I make the asynchronous call to load the data to be available for the TimelineProvider?
Posted
by
Post not yet marked as solved
1 Replies
517 Views
In development I've switched to NSPersistentCloudKitContainer and have begun the terrifying process of trying to test as many scenarios as possible to make sure nobody loses any data. During some testing I saw an error like this: <CKError 0x28033a310: "Partial Failure" (2/1011); "Failed to modify some records"; uuid = B6015357-50E0-40B3-949F-1557F59A23DB; container ID = "iCloud.com.xxxx.yyyyyy"; partial errors: { F023EFDF-B9DE-4C17-872B-01C34C0DF129:(com.apple.coredata.cloudkit.zone:defaultOwner) = &lt;CKError 0x280266fa0: "Invalid Arguments" (12/2006); server message = "Cannot create or modify field 'CDsomeField' in record 'CDsomeRecord' in production schema"; uuid = B6015357-50E0-40B3-949F-1557F59A23DB&gt; ... 399 "Batch Request Failed" CKError's omited ... }> I was able to fix this, but it was only affecting some scenarios and if this had happened to a real user they (and I) would never have known about the problem, and their data would not have synced to CloudKit. If the store fails to load you get an error, but if it loads but doesn't sync you don't. So my question is: is there a way to receive these kind of errors in code? I have looked for notifications and delegate methods and I can't find any.
Posted
by
Post not yet marked as solved
8 Replies
1.5k Views
Hi, I am developing an app with CoreData + CloudKit and wanted my Widget to fetch data from CloudKit to display. Everything is working on iOS / watchOS, but on WidgetKit the result from my fetch is always empty. I already configured the CloudKit capability on the Widget extension, then I am creating a new NSPersistentCloudKitContainer the and on public func timeline(with context: Context, completion: @escaping (Timeline&lt;Entry&gt;) -> ()) { I am trying to let cardsFetch = NSFetchRequest&lt;Card&gt;(entityName: "Card") do { let cards = try persistentContainer.viewContext.fetch(cardsFetch) the result is always 0 and the same fetch on iOS returns the data. Is this supposed to work?
Posted
by
Post marked as solved
5 Replies
868 Views
Hi, i am developing an application that leverages iCloud and everything works fine in my testing except lately, maybe a week or two ago, on the Simultor i find myself having to re-authenticate (Apple ID Verification) in iCloud on the virtual device almost daily ... not sure why. Is this the expected behavior ? has anything changed lately ? even if i leave xcode (v11.5) and the simulator (v11.5 (921.9.1)) open, i am prompted to re-sign in with my Apple ID on the simulator tks Sami
Posted
by