Skip to content

Commit

Permalink
RealmSwift 4.4.0!
Browse files Browse the repository at this point in the history
  • Loading branch information
arturdev committed Mar 27, 2020
1 parent f3b8331 commit 824ca5d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<p align="center">
<a href="https://developer.apple.com/swift/">
<img src="https://img.shields.io/badge/Swift-5.0-orange.svg?style=flat" alt="Swift 5.0">
<img src="https://img.shields.io/badge/Swift-5.1-orange.svg?style=flat" alt="Swift 5.1">
</a>
<a href="https://travis-ci.com/arturdev/Unrealm">
<img src="https://travis-ci.com/arturdev/Unrealm.svg?branch=master" alt="Build Status">
Expand All @@ -21,8 +21,8 @@
<a href="https://cocoapods.org/pods/Unrealm">
<img src="https://img.shields.io/cocoapods/p/Unrealm.svg?style=flat" alt="Platform">
</a>
<a href="https://github.com/realm/realm-cocoa/releases/tag/v4.3.2">
<img src="https://img.shields.io/badge/RealmCocoa-v4.3.2-green?style=flat" alt="Platform">
<a href="https://github.com/realm/realm-cocoa/releases/tag/v4.4.0">
<img src="https://img.shields.io/badge/RealmCocoa-v4.4.0-green?style=flat" alt="Platform">
</a>
</p>

Expand All @@ -48,10 +48,12 @@ Unrealm supports the following types:
- [x] Swift Enums
- [x] Swift Arrays
- [x] Swift Dictionaries
- [x] Swift Optionals (String, Data, Date)
- [x] Nested Classes/Structs
- [x] Swift Optionals (String, Data, Date)
- [x] Swift Optionals of primitives (Int, Float, Double, Bool)
- [ ] Swift Arrays of enums [Issue #13](https://github.com/arturdev/Unrealm/issues/13#issuecomment-541522533)
- [x] Swift Optionals of Realmables
- [x] Swift Optionals of Arrays
- [x] Swift Arrays of enums


## Example Project
Expand All @@ -61,7 +63,7 @@ See also <a href="https://github.com/arturdev/Unrealm/blob/master/Example/Tests/
## Usage
All you have to do is
1. Conform your Classes/Structs to `Realmable` protocol instead of inheriting from `Object`. Conform your Enums to `RealmableEnum` protocol.
2. Register your Classes/Structs in AppDelegate's `didFinishLaunchingWithOptions`.
2. Register your Classes/Structs and Enums in AppDelegate's `didFinishLaunchingWithOptions`.
```Swift
Realm.registerRealmables(ToDoItem.self)
```
Expand All @@ -76,6 +78,7 @@ Thats it! Now you can store your Struct or Class object into Realm as usualy you
- Getting rid of Realm crashes like "Realm accessed from incorrect thread"
- Getting rid of boilerplate code such as `@objc dynamic var`. Use just `var` or `let`
- Getting rid of boilerplate code such as `RealmOptional<Int>`. Use just `Int?`
- Works perfect with Swift's Codable and optional types!

#### Cons 🍟
- Losing "Live Objects" feature. Which means when you modify an object got from Realm the other ones will not be updated automatically. So after modifying an object you should manually update it in realm.
Expand Down
12 changes: 5 additions & 7 deletions Unrealm.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Pod::Spec.new do |s|
s.name = 'Unrealm'
s.swift_version = '5.1'
s.version = '1.0.6'
s.version = '1.2.0'
s.summary = 'Unrealm is an extension on RealmCocoa, which enables Swift native types to be saved in Realm.'
s.description = <<-DESC
Unrealm enables you to easily store Swift native Classes, Structs and Enums into Realm.
Expand All @@ -19,23 +19,21 @@ Getting rid of redundant inheriting from Object class
Getting rid of Realm crashes like "Object has been deleted or invalidated"
Getting rid of Realm crashes like "Realm accessed from incorrect thread"
Getting rid of boilerplate code such @objc dynamic var. Use just var or let
Works perfect with Codables and Optionals!
DESC

s.homepage = 'https://github.com/arturdev/Unrealm'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.screenshots = 'https://raw.githubusercontent.com/arturdev/Unrealm/assets/preview.png'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'arturdev' => '[email protected]' }
s.source = { :git => 'https://github.com/arturdev/Unrealm.git', :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.social_media_url = 'https://www.linkedin.com/in/arturdev/'

s.ios.deployment_target = '9.0'
s.osx.deployment_target = '10.12'

s.source_files = 'Unrealm/Classes/**/*.{h,m,swift}'


# s.public_header_files = 'Pod/Classes/**/*.h'

s.dependency 'RealmSwift', '4.3.2'
s.dependency 'RealmSwift', '4.4.0'
s.dependency 'RuntimeNew', '2.1.5'
end

0 comments on commit 824ca5d

Please sign in to comment.