Swift and CoreData / Data Storage

前端 未结 6 1802
野趣味
野趣味 2020-12-24 15:30

I\'m just learning Objective-C / Cocoa Touch and Core Data. So, what are the new possibilities to implement data storage in iOS App Projects that are written in pure Swift?

6条回答
  •  一生所求
    2020-12-24 16:28

    Here is another approach to adding CoreData to your Swift app. This approach hides the CoreData implementation details from the rest of the app. In the app, you use queries/updates like these:

    Query("Order").sort("date").fetch()
    

    or:

    let newClient = Query("Client").create() as? Client
    

    See Gist: https://gist.github.com/gk11/438c3f2883c5d7c0b0d8

提交回复
热议问题