Latest 1.2.8
Homepage https://github.com/SyncDB/NSEntityDescription-SYNCPrimaryKey
License MIT
Platforms ios 8.0, osx 10.9, watchos 2.0, tvos 9.0, requires ARC
Dependencies NSString-HYPNetworking
Frameworks CoreData
Authors

CI Status
Version
License
Platform

Usage

By default NSEntityDescription-SYNCPrimaryKey gives id for remote primary key and id for the local primary key.

You can mark any attribute as primary key by adding hyper.isPrimaryKey and the value YES or true. You can also map it to any remote JSON attribute by adding hyper.remoteKey and the value the primary key in your JSON or remote entity such as contract_id.

NSEntityDescription-SYNCPrimaryKey will first look for a custom local primary key, then it will look for id and finally for remoteID, if after this no primary key is found, it will crash and burn.

Custom primary key

Interface

- (NSAttributeDescription *)sync_primaryKeyAttribute;

- (NSString *)sync_localPrimaryKey;

- (NSString *)sync_remotePrimaryKey;

Installation

NSEntityDescription-SYNCPrimaryKey is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'NSEntityDescription-SYNCPrimaryKey'

Author

SyncDB, [email protected]

License

NSEntityDescription-SYNCPrimaryKey is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "NSEntityDescription-SYNCPrimaryKey",
    "summary": "Support for primary keys in Core Data",
    "version": "1.2.8",
    "homepage": "https://github.com/SyncDB/NSEntityDescription-SYNCPrimaryKey",
    "license": "MIT",
    "authors": {
        "SyncDB": "[email protected]"
    },
    "source": {
        "git": "https://github.com/SyncDB/NSEntityDescription-SYNCPrimaryKey.git",
        "tag": "1.2.8"
    },
    "social_media_url": "https://twitter.com/Sync_DB",
    "platforms": {
        "ios": "8.0",
        "osx": "10.9",
        "watchos": "2.0",
        "tvos": "9.0"
    },
    "requires_arc": true,
    "source_files": "Source/**/*",
    "frameworks": "CoreData",
    "dependencies": {
        "NSString-HYPNetworking": [
            "~> 1.0.6"
        ]
    }
}

Pin It on Pinterest

Share This