Post not yet marked as solved
Cloudkit allows us to create a schema in development by saving records. This is great, and comes in handy if you want to restart your cloudkit development environment. Unfortunately AFAICT if you want the recordID to be indexable (so that you can do things like find all records of a type using the TRUEPREDICATE) you have to set this by hand in cloud kit dashboard. Is there a way to do this programmatically that I'm missing? How about a way to make this the default? I worry that I'll clean out my schema (in order to clean up before deployment) and fail to set the recordID indexable in the dashboard. I'll launch the app and it significant cloudKit functionality will be "broken" because of it.
Post not yet marked as solved
My app backup the data to iCloud or sync with user device through the user iCloud account using NSPersistentCloudKitContainer privateDataBase. The main problem is, when user install the app I need to know if user has data in iCloud or not according this information, I let user to setup account or fetch the existing account, since it takes too long to fetch with local CoreData, I am trying to find a way to fetch directly from iCloud through CloudKit, since I am new in CloudKit, I don't know how to fetch data from CloudKit any help appreciate.
Post not yet marked as solved
My Enviroinment:xcode 8.2.1Swift 3.0MacOS 10.12.3Maybe I misunderstand how iCloud Drive is designed to work. My iPhone app will create files and store them in the app's ubiquitous file folder so they should appear in the icloud drive on the mac or PC. However the files are not visible with the mac finder even though the files do exist in the mac filesystem. More on this later.Here is my code to create the file:let containerURL = FileManager.default.url(forUbiquityContainerIdentifier: nil)
let documentDirectoryURL = containerURL!.appendingPathComponent("Documents")
let documentURL = documentDirectoryURL.appendingPathComponent("myFile.txt")
let text = String("test message")
text.write(to: documentURL, atomically:true, encoding:String.Encoding.utf8)You can see I am using the app's default ubiquity container URL and appending the folder "Documents" and appending a filename. The app runs without any errors and I can confirm the file is created and viewable from the iCloud Drive app on the phone. In fact the iCloud Drive app on the iPhone will show me the correct folder name as I defined it with NSUbiquitousContainerName. I can also view this file on the Mac in a couple ways:1) Using the terminal program on the Mac I can see the file is created and updated correctly at this path: /Users/mjc/Library/Mobile Documents/iCloud~com~mchartier~motoproto1/Documents/myFile.txt2) Using the Mac Finder I can see the file when I click on "All My Files".However I do not see the file or the app's ubiquitous folder when I click on "iCloud Drive" on the Finder. Nor do I see anything on icloud.com or on my PC running iCloud software.Here is another weird behavior: Open the Finder and click on "all my files" and I see my file. Right click on the file and select "show in containing folder" and now I see my file appear with the full path to the file as you would expect. So far so good. Now when I click on "iCloud Drive" I see a new folder appear called "TextEdit" which was never there before. Now when I click on TextEdit I can see my file appear and I can open and view file contents. However, I still do not see anything on icloud.comI have iCloud enabled in my xcode project capabilities and I have my entitlements setup correctly as far as I can tell. I am using the default ubiquity container. I increased my build number each time I changed info.plist to make sure the settings will take affect. Here are relevant lines from info.plist :<key>NSUbiquitousContainers</key><dict><key>iCloud.com.mchartier.motoproto1</key><dict><key>NSUbiquitousContainerIsDocumentScopePublic</key><true/><key>NSUbiquitousContainerName</key><string>MotoProto1</string><key>NSUbiquitousContainerSupportedFolderLevels</key><string>None</string></dict></dict>So to summarize: My ubiquitous folder is not ubiquitous at all. The files created on the iPhone can only be viewed correctly by using the iCloud drive app on the phone itself. The files are clearly sent into the iCloud because they show up on the Mac filesystem but my app's ubiquity folder will not show up in the iCloud Drive folder in the Finder.
Post not yet marked as solved
For demo iCloud, build many containers in CloudKit Dashboard. Now i want to delete some old containers but i can't. I need help thanks.
Post not yet marked as solved
Is the CloudKit sharing support announced at WWDC16 actually supported in iOS 10? The documentation for CKShare, UICloudSharingController and friends is still (as of Sept 10, 2016) sparse to nonexistent.I haven't been able to find any overview of it other than the WWDC presentation, which lacks important details and doesn't quite match the API interfaces any more. The sample code released on Sept 7 says "Add a new Sharing tab with CloudKit Sharing examples (Big new feature for WWDC)." but I can't find anything in the code about it. Even a Google search for "ckshare" or "uicloudsharingcontroller" turn up nothing interesting. And I've tried to get it working on my own, but I've only been able to get a few simple cases to sort of work. I see that the iOS 10 Notes app works pretty well, so maybe it's working for some cases.Am I missing something? Has anyone else had any luck with it?
Post not yet marked as solved
Is it possible to use iCloud to backup files that are currently stored locally so that those files appear on other devices? And can this be done automatically with the user having to take explicit action to do periodic backups? I have an existing app in which the user can create local files. If I add iCloud support I do not want the users to have to move all their files to iCloud Drive first. I do not want to disrupt the current usage more than necessary.
Post not yet marked as solved
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.
Post not yet marked as solved
CloudKit vs Firebase vs other 3rd parties.... pros and cons. I'm looking for a very detailed explanation of what to use and why. Please help me to understand what is the best. Maybe some are better in certain scenarios than others. I'm really looking for a detailed description to knock my socks off. Please dont respond with "becasue it's native." I need to why native specifically can be better. I'm a newer developer and looking for unbiased answer with strict facts backing up their answer. I would love to have an egineer or someone with massive network experience respond. Thanks in advance for the direction.Sincerely,Someone who is genuinely impressed by the mentorship & help of the community
Post not yet marked as solved
Is using CoreData + CloudKit to store text notes and iCloud Document to store note image attachments as image files a good design approach?
Currently, I have almost finished implementing the app to store text notes as Core Data and note image attachments as image files.
I like to provide iCloud storage support to the app.
I come across a few app examples
https://www.raywenderlich.com/13219461-getting-started-with-core-data-and-cloudkit
https://developer.apple.com/documentation/coredata/synchronizing_a_local_store_to_the_cloud
Both examples are using CoreData + CloudKit to store the image as SQLite blob binary data which CoreData will perform such task automatically)
I'm aware that when storing the binary image into CoreData, CoreData is smart enough to choose either to store it as a binary blob in SQLite, or an external file.
However, I am a little skeptical about such an approach
We are using Kingfisher for smooth image loading in the collection view. If the image data are not in a regular flat-file, how can we integrate CoreData's blob data with Kingfisher?
Storing images in CoreData seems like a black box. If something goes wrong in between, it is hard to debug where and how goes wrong.
We like to provide alternative cloud storage (using cloud S3 storage to store SQLite files and multiple images) for the app. So, saving the image as flat files will make such an effort easier.
Some related discussion on storing the image in DB vs flat files - https://stackoverflow.com/questions/3748/storing-images-in-db-yea-or-nay
I would prefer
Only use CoreData + CloudKit to store the text note and file path.
The image file will store in both the app folder and the iCloud document folder (so that it syncs seamlessly to iCloud). If the required images are not in the app folder (App uninstall, then re-install), the app will try to copy the image file from the iCloud document
I was wondering, anyone of you has tried such a design in your app? Do you find it is a good approach based on your experience?
Thanks.
Post not yet marked as solved
Hi I am trying to publish parts ore my hole iCloud on a Website. I am looking for days to finde a way to do that. I am hosting the Website from a Mac mini with macOS X Server. The easiest way I see is with CloudKit. Has anyone an idea?
In the end something like https://www.icloud.com would be exactly what I want. But how? XD
Ps: i am open for everything. Can be done over app (Xcode) can be done with server stuff what i have no idea about... Everything
Post not yet marked as solved
We have a macOS app, SheetPlanner, that supports sharing a document with other people for collaboration, via iCloud Drive.
When someone shares a document in Apple Pages, e.g. via email, and someone else clicks the link to open the document, the panel offers to open the document "in Pages", and opens the document directly in the app:
But when we do the same with a SheetPlanner document, it is missing the "in SheetPlanner" part, and instead displays the document in the Finder:
What are we missing? How can we get the iCloud sharing mechanism to offer to open in the app?
Here's a video that demonstrates this:
https://dropbox.com/s/bh9ipmn3h9ucpfc/Pages%20V%20SheetPlanner%20Sharing%20Behaviour.mov?dl=0
Post not yet marked as solved
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?
I am trying to build a web site that will offer some picture enhancement services. So far I have authentication working. There's a lot of documentation regarding finding records but as expected there is not much in my App's container. I need to access the user's private data in ICloud Photos. I suspect there's a container name for that but cannot find it anywhere. Is what I want to do possible or is it a closed system?If it's closed I'll have to put the user through the inconvenience of uploading pictures to my site so we can enhance them. If we can access their photos it'll be a much better experience for them.Our guess at this time is that there needs to be some permissions granted by the user during signon and we need to specify a different container name in the request uri, but it's only a guess.We rummaged around Cloudkit Dashboard to see if there is some way to ask for permissions that we missed but so far no joy.You can tell that we are new to CloudKit . Any help you can provide will be greatly appreciated.
Post not yet marked as solved
http://kzmcherry77@gmail.com
Support
linkText
Post not yet marked as solved
How can I have a clear trazability from my cloud files some time afterwards since some documentas are embedded in drive some in OneDrive and some in icloud each with their particular synergies and legal bonds and trazability pathways i imagine?How can O unify all my profile data generation since lets say 2010 or can I go backwards when some were beta?Thank you very much for the time
Post not yet marked as solved
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?
Post not yet marked as solved
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]
Post not yet marked as solved
I am trying to restore some deleted files from my iCloud. Most are restoring and able to download. But the download is currently stuck and not progressing. If I stop the download, will I lose the ability to try and restore the files again? Or can I just stop the download and try again? I really do not want to lose these files in digital space!! I am terrified to stop the download. Has anyone had this issue?
Post not yet marked as solved
I've tried to load icloud image using phasset with options
requestOptions.isSynchronous = false requestOptions.isNetworkAccessAllowed = true
I get CloudPhotoLibraryErrorDomain Code=1005 error I don't understand where I make mistake, I have used SDWebImagePhotosPlugin methods as well as Photos methods like requestImageDataAndOrientation and requestImageData, still I get the image as nil and the above error
this is my code:
imageManager.requestImageDataAndOrientation(for: deviceImage, options: phImageRequestOptions()) { data,deliveryMode, orentation, _ in
if data != nil {
completion(data)
} else {
SDImageLoadersManager.shared.loaders = [SDWebImageDownloader.shared, SDImagePhotosLoader.shared]
SDWebImageManager.defaultImageLoader = SDImageLoadersManager.shared
let photosURL = NSURL.sd_URL(with: deviceImage)
SDImagePhotosLoader.shared.requestImage(with: photosURL as URL?, options: [.highPriority,.retryFailed,.refreshCached], context: [.customManager: self.manager], progress: nil) { image, data,error, success in
if image != nil {
completion(image?.pngData())
} else {
completion(nil)
}
}
}
Post not yet marked as solved
Hi,
I can't work on my numbers files. I can't work on my numbers file from my icloud account. I get the following massage:
FetchDocument
Server reply error when fetching document: Unexpected server error when fetching document
== Environment ==
URL: https://www.icloud.com/numbers/docws:1980539564:com.apple.CloudDocs:3022DE84-2AA2-40A5-9397-8C5530D0A0DB#%D7%A9%D7%A2%D7%95%D7%AA_%D7%9E%D7%98%D7%95%D7%A4%D7%9C%D7%99%D7%9D_2022
UA String: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36
Date: Tue, 08 Mar 2022 09:54:02 GMT
Build environment: production
Asset URL: https://p102-iwres.icloud.com:443/asset/
Res URL: https://p102-iwres.icloud.com:443/iwmb/
MBWS URL: https://p102-iwmb4.icloud.com:443/iwmb/
SCMP URL: https://p102-iwmb4.icloud.com:443/scmp/
iCloud environment: PROD
DS_ID: 1980539564
== Inspectee ==
== OT ==
== Mailbox ==
Mailbox Session: 6E8B9E94-9775-4324-9EB4-13D285E8A9CB
Incoming: Normal; Outgoing: Suspended
Command Deque (rsvp | sendPending): [ | ]
20220308 11:53:52.635 [11:53:52.635+2 GSN.AbstractMailboxController] Network-related configs:
20220308 11:53:52.635 [11:53:52.635+2 GSN.AbstractMailboxController] - network.connectionIdleTimeout = 20000
20220308 11:53:52.635 [11:53:52.635+2 GSN.AbstractMailboxController] - network.connectionRetryInterval = 1000
20220308 11:53:52.635 [11:53:52.635+2 GSN.AbstractMailboxController] - network.connectionRetryMaxBackoff = 4
20220308 11:53:52.635 [11:53:52.635+2 GSN.AbstractMailboxController] - network.reInitDelay = 1000
20220308 11:53:52.635 [11:53:52.635+2 GSN.AbstractMailboxController] - network.reInitMaxBackoff = 3
20220308 11:53:52.635 [11:53:52.635+2 GSN.AbstractMailboxController] - network.reInitLimit = 10
20220308 11:53:52.635 [11:53:52.635+2 GSN.AbstractMailboxController] - network.persistentDisconnectionTimeout = 20000
20220308 11:53:52.635 [11:53:52.635+2 GSN.AbstractMailboxController] - network.commandResponseTimeout = 300000
20220308 11:53:52.635 [11:53:52.635+2 GSN.AbstractMailboxController] - network.offlineWarningTimeout = 10000
20220308 11:53:52.635 [11:53:52.635+2 GSN.AbstractMailboxController] Mailbox initiated.
20220308 11:53:52.636 [11:53:52.636+2 GSN.FetchControllerPasswordConsumer] setPasswordReady: false
20220308 11:53:52.636 [11:53:52.636+2 GSN.MailboxControllerPasswordConsumer] setPasswordReady: false
20220308 11:53:52.636 [11:53:52.636+2 GSN.AbstractPasswordController] Entered state: GSN.VerifyPasswordForFetch:76
20220308 11:53:52.636 [11:53:52.636+2 GSN.AbstractPasswordController] setPasswordReady: true
20220308 11:53:52.636 [11:53:52.636+2 GSN.FetchControllerPasswordConsumer] setPasswordReady: true
== Network ==
== Playback ==
== Replay Script ==