|
1 | 1 | <p align="center"> |
2 | 2 | < img src= "Documents/header.png" srcset= "Documents/header.png 1x Documents/[email protected] 2x" />< br/> |
3 | | -<a href="https://swift.org"><img src="https://img.shields.io/badge/Swift-3-orange.svg" /></a> |
| 3 | +<a href="https://swift.org"><img src="https://img.shields.io/badge/Swift-5-orange.svg" /></a> |
4 | 4 | <a href="https://github.com/Carthage/Carthage"><img src="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat" /></a> |
5 | 5 | <a href="https://cocoapods.org"><img src="https://img.shields.io/cocoapods/v/CoreValue.svg" /></a> |
6 | 6 | <img src="https://img.shields.io/cocoapods/p/CoreValue.svg" /> |
|
15 | 15 | - iOS and Mac OS X support |
16 | 16 | - Use with `structs` |
17 | 17 | - Works fine with `let` and `var` based properties |
18 | | -- Swift 3.0 |
19 | | -- (for Swift 2.3, use the [swift2.3" branch](https://github.com/terhechte/CoreValue/tree/swift2.3)) |
20 | | -- (for Swift 2.2 use [Version 0.2](https://github.com/terhechte/CoreValue/releases/tag/v0.2.0)) |
| 18 | +- Swift 5.0 |
21 | 19 |
|
22 | 20 | ## Rationale |
23 | 21 |
|
24 | 22 | Swift introduced versatile value types into the iOS and Cocoa development domains. They're lightweight, fast, safe, enforce immutability and much more. However, as soon as the need for CoreData in a project manifests itself, we have to go back to reference types and `@objc`. |
25 | 23 |
|
26 | 24 | CoreValue is a lightweight wrapper framework around Core Data. It takes care of `boxing` value types into Core Data objects and `unboxing` Core Data objects into value types. It also contains simple abstractions for easy querying, updating, saving, and deleting. |
27 | 25 |
|
28 | | -If you're porting your app to Swift 3, please see the Swift 3 section at the bottom. |
29 | | - |
30 | 26 | ## Usage |
31 | 27 |
|
32 | 28 | The following struct supports boxing, unboxing, and keeping object state: |
@@ -374,14 +370,6 @@ All CoreData Datatypes are supported, with the following **exceptions**: |
374 | 370 |
|
375 | 371 | Fetched properties are not supported yet. |
376 | 372 |
|
377 | | -## Swift 3.0 Conversion |
378 | | - |
379 | | -The Swift 3.0 conversion changed a few things within the framework. In order to make it easier, here's a list of things to do: |
380 | | - |
381 | | -1. Replace `<*>` operators with `<^>` |
382 | | -2. Replace `func fromObject(object)` with `func fromObject(_ object)` |
383 | | -3. Replace `return curry(self.init)...` with `return try curry(self.init)...` |
384 | | - |
385 | 373 | ## Installation (iOS and macOS) |
386 | 374 |
|
387 | 375 | ### [CocoaPods] |
@@ -439,6 +427,9 @@ Benedikt Terhechte |
439 | 427 |
|
440 | 428 | ## Changelog |
441 | 429 |
|
| 430 | +### Version 0.4.0 |
| 431 | +- Swift 5 Support thanks to [DaGerry](https://github.com/DaGerry) |
| 432 | + |
442 | 433 | ### Version 0.3.0 |
443 | 434 | - Swift 3 Support |
444 | 435 | - Added CVManagedUniqueStruct thanks to [tkohout](https://github.com/tkohout) |
|
0 commit comments