Latest 0.3
Homepage https://github.com/jakenberg/ObjectMapper-Realm
License MIT
Platforms ios 8.0, osx 10.9, requires ARC
Dependencies ObjectMapper, RealmSwift
Authors

Version
License
Platform

Installation

ObjectMapper+Realm is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "ObjectMapper+Realm"

Usage

To use ListTransform just add it to the mapping of your RealmObject:

import ObjectMapper
import RealmSwift
import ObjectMapper_Realm

class User: Object, Mappable {
  dynamic var username: NSString?
  dynamic var friends: List<User>?

  required convenience init?(_ map: Map) {
    self.init()
  }

  override class func primaryKey() -> String? {
    return "username"
  }

  func mapping(map: Map) {
    username              <- map["username"]
    friends               <- (map["friends"], ListTransform<User>())
  }
}

Have fun! 🎬

Author

Jake Peterson

License

ObjectMapper+Realm is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "ObjectMapper+Realm",
    "version": "0.3",
    "summary": "A Realm extension that serializes arbitrary JSON into Realm's List class",
    "homepage": "https://github.com/jakenberg/ObjectMapper-Realm",
    "license": "MIT",
    "authors": {
        "Jake Peterson": "[email protected]"
    },
    "source": {
        "git": "https://github.com/jakenberg/ObjectMapper-Realm.git",
        "tag": "0.3"
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.9"
    },
    "requires_arc": "true",
    "dependencies": {
        "ObjectMapper": [],
        "RealmSwift": []
    },
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "3.0"
    },
    "source_files": "ObjectMapper+Realm/*.swift",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This