aut

AutoDescribe

Prints human-readable information about an instance

Showing:

Popularity

Downloads/wk

0

GitHub Stars

120

Maintenance

Last Commit

7yrs ago

Contributors

5

Package

Dependencies

0

License

MIT

Categories

Readme

AutoDescribe

Prints human-readable information about an instance.

The problem

You pretty print objects using NSLog(@"firstName: %@ lastName:%@ age: %@", ...). It takes forever to write NSLog. Classes evolves and the properties changes. NSLog's are rarely in sync with the properties.

Solution

AutoDescribe is like PHP's var_dump and print_r. All properties are pretty printed.

Sample code

#import <AutoDescribe/NSObject+AutoDescribe.h>

// A class with some properties
@interface TestPerson : NSObject
@property (nonatomic, strong) NSString *firstName;
@property (nonatomic, strong) NSString *lastName;
@property (nonatomic, strong) NSNumber *age;
@end

@implementation TestPerson
// empty
@end

// Create instance of class and invoke autoDescribe
TestPerson *person = [TestPerson new];
person.firstName = @"John";
person.lastName = @"Doe";
person.age = [NSNumber numberWithFloat:33.33];
NSLog(@"%@", [person autoDescribe]);

Output from sample code

firstName=John
lastName=Doe
age=33.3

Podfile

If your want the latest version, then add this to your Podfile

pod 'AutoDescribe', :git => 'https://github.com/neoneye/autodescribe.git'

Contact

Simon Strandgaard

License

This code is distributed under the terms and conditions of the MIT license.

Change-log

Version 1.0.0 @ 06.04.2013

  • Full cocoapods support.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100