Created
January 27, 2016 08:37
-
-
Save anonymous/0f9ac3b6e85529e368fd to your computer and use it in GitHub Desktop.
How to access Restkit value?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I want to Access the mappingResult Values in a new method in a same class.I don’t Know How to access the mappingResult value. | |
-(void)requestConnectionData{ | |
NSString *requestPath = @"user_history/consumer/data.json"; | |
[[RKObjectManager sharedManager] | |
getObjectsAtPath:requestPath | |
parameters:nil | |
success: ^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) { | |
NSLog(@"result arrray us: %@",mappingResult); | |
//articles have been saved in core data by now | |
[DataAccessHandler getRegionData]; | |
[DataAccessHandler getSectionData]; | |
} | |
failure: ^(RKObjectRequestOperation *operation, NSError *error) { | |
RKLogError(@"Load failed with error: %@", error); | |
} | |
]; | |
} | |
Output: | |
result arrray us: <RKMappingResult: 0x79b53b60, results={ | |
"<null>" = "<EY_Connections: 0x79b5cc10> (entity: EY_Connections; id: 0x7874c420 <x-coredata://1A06A321-7C62-461B-8DB1-BCC8C0736694/EY_Connections/p1> ; data: {\n connectionAddress = \"P.NO:708A,FB3,6TH MAIN ROAD,RAM NAGAR,SOUTH, MADIPAKKAM,CH-91.\";\n connectionCircle = \"400-South\";\n connectionDistribution = \"243-RAMNAGAR SOUTH\";\n connectionLoad = \"4.56 KW\";\n connectionMeterNumber = 4144049;\n connectionName = \"S.PRASANNA VENKATESH\";\n connectionNumber = 435;\n connectionPhase = 3;\n connectionRegion = 9;\n connectionSection = \"245-Madipakkam\";\n connectionServiceNumber = 9;\n connectionStatus = LIVE;\n usageData = \"<relationship fault: 0x79b5b0e0 'usageData'>\";\n})"; | |
}> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment