aryaxt / OCMapper

Objective-C library to easily map NSDictionary to model objects, works perfectly with Alamofire. ObjectMapper works similar to GSON
MIT License
347 stars 45 forks source link

processDictionaryFromObject doesn't work in unit test target #23

Open aryaxt opened 9 years ago

aryaxt commented 9 years ago

Because the current bundle is not the main bundle, but it's the unit test bundle. Try using runtime api instead

- (id)processDictionaryFromObject:(NSObject *)object {

if ([NSBundle mainBundle] != [NSBundle bundleForClass:object.class] && [object class] != [NSArray class])
    {
        return object;
    }
bestimmaa commented 8 years ago

Woah, ran into the same issue with the recent cocoapods version, how can this be?

bestimmaa commented 8 years ago

Okay, the code is not merged, nevermind... will test the approach proposed in #34