mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-05-26 05:54:57 +08:00
Migrate initialization of default error mapping from RKObjectManager to RKObjectMappingProvider
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
#import "RKManagedObjectStore.h"
|
||||
#import "RKManagedObjectLoader.h"
|
||||
#import "Support.h"
|
||||
#import "RKErrorMessage.h"
|
||||
|
||||
NSString* const RKObjectManagerDidBecomeOfflineNotification = @"RKDidEnterOfflineModeNotification";
|
||||
NSString* const RKObjectManagerDidBecomeOnlineNotification = @"RKDidEnterOnlineModeNotification";
|
||||
@@ -80,12 +79,6 @@ static dispatch_queue_t defaultMappingQueue = nil;
|
||||
self.serializationMIMEType = RKMIMETypeFormURLEncoded;
|
||||
self.mappingQueue = [RKObjectManager defaultMappingQueue];
|
||||
|
||||
// Setup default error message mappings
|
||||
RKObjectMapping *errorMapping = [RKObjectMapping mappingForClass:[RKErrorMessage class]];
|
||||
errorMapping.rootKeyPath = @"errors";
|
||||
[errorMapping mapKeyPath:@"" toAttribute:@"errorMessage"];
|
||||
_mappingProvider.errorMapping = errorMapping;
|
||||
|
||||
[self addObserver:self
|
||||
forKeyPath:@"client.reachabilityObserver"
|
||||
options:NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew | NSKeyValueObservingOptionInitial
|
||||
|
||||
Reference in New Issue
Block a user