mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-23 04:20:21 +08:00
Removed saveObjectStore method on RKObjectManager, step toward separating Core Data from the base object mapping. RKObjectLoader now ensures that the object store is persisted appropriately before object loaders are sent
This commit is contained in:
@@ -98,13 +98,11 @@ static DBUser* currentUser = nil;
|
||||
- (void)loginWithUsername:(NSString*)username andPassword:(NSString*)password delegate:(NSObject<DBUserAuthenticationDelegate>*)delegate {
|
||||
_delegate = delegate;
|
||||
|
||||
// TODO: Cleanup. Save the object store so that background threads can update this object
|
||||
[[RKObjectManager sharedManager] saveObjectStore];
|
||||
|
||||
RKObjectLoader* objectLoader = [[RKObjectManager sharedManager] objectLoaderWithResourcePath:@"/login" delegate:self];
|
||||
objectLoader.method = RKRequestMethodPOST;
|
||||
objectLoader.params = [NSDictionary dictionaryWithKeysAndObjects:@"user[username]", username, @"user[password]", password, nil];
|
||||
objectLoader.targetObject = self;
|
||||
objectLoader.params = [NSDictionary dictionaryWithKeysAndObjects:@"user[username]", username, @"user[password]", password, nil];
|
||||
objectLoader.targetObject = self;
|
||||
objectLoader.managedObjectStore = [RKObjectManager sharedManager].objectStore;
|
||||
[objectLoader send];
|
||||
}
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
1D6058910D05DD3D006BFB54 /* DiscussionBoard.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DiscussionBoard.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1D6058910D05DD3D006BFB54 /* DiscussionBoard-Development.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "DiscussionBoard-Development.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
25359D4212E3E0A4008BF33D /* libThree20.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libThree20.a; sourceTree = "<group>"; };
|
||||
25359D4312E3E0A4008BF33D /* libThree20Core.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libThree20Core.a; sourceTree = "<group>"; };
|
||||
@@ -537,7 +537,7 @@
|
||||
19C28FACFE9D520D11CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1D6058910D05DD3D006BFB54 /* DiscussionBoard.app */,
|
||||
1D6058910D05DD3D006BFB54 /* DiscussionBoard-Development.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -1108,7 +1108,7 @@
|
||||
);
|
||||
name = DiscussionBoard;
|
||||
productName = DiscussionBoard;
|
||||
productReference = 1D6058910D05DD3D006BFB54 /* DiscussionBoard.app */;
|
||||
productReference = 1D6058910D05DD3D006BFB54 /* DiscussionBoard-Development.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
Reference in New Issue
Block a user