In this CloudKit tutorial, you'll learn how to add and query data in iCloud from your app, as well as how to manage that data using the CloudKit dashboard.
FYI, it seems you have 2 instances of html encoding errors in your code blocks. Seems like the forums automatically parse the html encoding, so you should see them in BOLD below.
I think maybe the introduction should be amended to exclude āfor iOS-only applicationsā. Albeit not within the scope of this specific tutorial, CloudKit can be used for web and server applications. Of course, the CloudKit guidelines do in some ways require an iOS client to be available in order to use the services on other platforms.
But the current wording might discourage some from considering CloudKit as a backend option for their data-driven apps, which makes me sad because Iāve loved using CloudKit for creative and on-the-fly solutions that would otherwise have taken me hours to build.
I have 6 errorsā¦
Expected declaration
unresolved identifier āEstablishment typeā
unresolved identifier public db
unresolved identifier "Note type
unresolved identifier "private db
/Users/timvogt/Downloads/BabiFud-Cloudkit-Starter/BabiFud/Establishment.swift:76:11: Value of type āModelā has no member āfetchNoteā
Sofar almost non of the tutorials went without errors dos successful build yet after week of testingā¦;-(
Thanks for the awesome tutorial, which is the very one for my first CloudKit App.
And I got some questions after looking through each line of codes:
In MapViewController
// This works for the US hemisphere.
let upperLeft = CLLocationCoordinate2DMake(region.center.latitude - region.span.latitudeDelta,
region.center.longitude + region.span.longitudeDelta)
Should Delta be Delta/2 for upperLeft?
Use AccountStatus to check whether user has logged into iCloud before write data to it?
I have two errors in the sample code unchanged. I am using Xcode 8 and targeting Swift 3. First: Inheritance from non-protocol type āDarwinBooleanā occurs in Establishment.swift, NotesCell.swift, NotesTableViewController.swift and DetailViewController.swift. Second: Cannot convert value of type ā((CKRecord)?, NSError) ā ()ā to expected argument type '((CKRecord)?, NSError?)->() in NotesTableViewController.swift . There are also two warnings: 'global(priority:) was deprecated; ābackgroundā was deprecated in iOS8.0. Use qos attributes instead. Both from DetailViewController.swift
I have question about record types, can I create and delete record types through program in production environment, I am aware that I can do it in development environment but I am not sure about production.
This is now updated for Swift 3 so all those issues are resolved now. Also, the text is also corrected so thereās no longer and HTML characters being rendered. Thanks!
When I try to run the app, Get this message āCould not determine iCloud Statusā. i am logged into iCloud in Settings on both my iPhone and the simulator. Where can I place a breakpoint so I can see what error code is being returned?
Thanks
Iām not getting the map to zoom to location and show the establishments. Was that meant to be implemented. Otherwise everything is working as expected. Thanks.
If nothing happens when you run the app, or you get a message in the logger like āunable to verify SuchAndSuch existsā , then chances are you have the very top left container selected ( The White Tile Icon at the top of the leftmost black panel ) is your default developer container.
You may have set the record types and records under this. Click it and it becomes a drop Down Menu ( even though it has a downward caret v , Apple still makes UI an exercise of puzzle solving ).
The container that XCode created should be in a list that drops down.
And No, definitely NO, you canāt delete or rename any mess of redundant containers created.
Not at this time of writing, though it is flagged.
Can anyone please provide the best practice on how to manage offline caching when using CloudKit.
In the last part of the article, it says:
āProvide caching and synchronization so the app remains responsive offline and keeps the content up to date when it reconnects to a network.ā