Latest 0.0.3
Homepage https://github.com/wordpress-mobile/NSObject-SafeExpectations
License MIT
Platforms ios 8.0, requires ARC
Authors ,

NSObject+SafeExpectations

No more crashes getting unexpected values from a NSDictionary.

Usage

There are a few new methods available for a NSDictionary: see the documentation

  • (NSString *)stringForKey:(id)key;
  • (NSNumber *)numberForKey:(id)key;
  • (NSArray *)arrayForKey:(id)key;
  • (NSDictionary *)dictionaryForKey:(id)key;
  • (id)objectForKeyPath:(NSString *)keyPath;
  • (NSString *)stringForKeyPath:(id)keyPath;
  • (NSNumber *)numberForKeyPath:(id)keyPath;
  • (NSArray *)arrayForKeyPath:(id)keyPath;
  • (NSDictionary *)dictionaryForKeyPath:(id)keyPath;

Wishlist

  • NSArray: stringAtIndex:, numberAtIndex:, arrayAtIndex:, dictionaryAtIndex:
  • Collections support for objectForKeyPath:

Latest podspec

{
    "name": "NSObject-SafeExpectations",
    "version": "0.0.3",
    "summary": "No more crashes getting unexpected values from a NSDictionary.",
    "homepage": "https://github.com/wordpress-mobile/NSObject-SafeExpectations",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Jorge Bernal": "[email protected]",
        "Aaron Douglas": "[email protected]"
    },
    "source": {
        "git": "https://github.com/wordpress-mobile/NSObject-SafeExpectations.git",
        "tag": "0.0.3"
    },
    "source_files": "Sources/*.{h,m}",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true
}

Pin It on Pinterest

Share This