restkit-0.20

Property 'managedObjectStore' not found on object of type 'RKObjectManager'

别等时光非礼了梦想. 提交于 2019-12-21 03:11:38
问题 I've been attempting to work with version 0.20.3 of the Restkit library. Recently an error has occurred that I cannot figure out how to solve. It is the following: Property 'managedObjectStore' not found on object of type 'RKObjectManager *' It happens at the line containing objectManager.managedObjectStore = managedObjectStore; A small block of my code is listed below to help with identification. I used CocoaPods to install all the necessary libraries and everything seems to link properly.

Simple JSON login post on Restkit 0.20

一曲冷凌霜 提交于 2019-12-20 17:32:03
问题 Im following the steps of this old answer. The main issue is that RKObjectLoaderDelegate was removed and im cannot find any alternative that works for me. Im trying to connect to a server with mail/password sending a post request to a json. Also, i will be using json to get data from the database after i test this works correct. Someone can help me with this? Im using RESTkit //Autentificacion NSURL* url = [[NSURL alloc]initWithString:@"http://myurl.com/tokens.json"]; RKObjectManager*

RESTKit - post a large array of objects to server

时间秒杀一切 提交于 2019-12-20 07:25:15
问题 How can I post an array of objects to my server with RESTKit? I have a custom object called Contact which have some properties like name , phone etc. I would like to send an array of these Contact objects to the server. The method I know for this is postObject:path:parameters:success:failure , but what object I put here? If I put Contact - how will it know it is an array? and if I put NSArray , how will it know it is a Contact ? My Contact object header file is: @interface Contact : NSObject

Core data relationship lost after fetching more objects into the entities

ぐ巨炮叔叔 提交于 2019-12-20 01:09:22
问题 I have a core data model that looks like this. Inside a tableview I load up all my appointments. On a UILabel inside my custom cell I set the appointments location name as follows. NSString *info = appointment.location.label_vrij; At first everything works Oké, but when I load more appointments into my database . All the info strings goes NULL . After some debugging I noticed that also appointment.location returns NULL . This is how my NSFetchRequest looks like RKManagedObjectStore *store = [

RestKit 0.20.1 How to map parent id

China☆狼群 提交于 2019-12-19 10:56:11
问题 Given this XML payload: <payload> <year yearNum="2013"> <month monthNum="6" desc="This month was an enlightening month"/> <month monthNum="5" desc="This month was a questioning month"/> <month monthNum="4" desc="This month was a good month"/> <month monthNum="3" desc="This month was a crazy month"/> <month monthNum="2" desc="This month was a dry month"/> <month monthNum="1" desc="This month was a slow month"/> </year> <year yearNum="2012"> <month monthNum="12" desc="This month was a cold

RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class

一笑奈何 提交于 2019-12-18 18:47:17
问题 I ran into a new problem that I can't seem to find a way around... Here is my RestKit code, following the Twitter Core Data example: // // RESTKIT // // restkit object manager NSString *baseURL = @"http://test1.website.com"; RKObjectManager *objectManager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:baseURL]]; // enable activity indicator [AFNetworkActivityIndicatorManager sharedManager].enabled = YES; // managed object model NSURL *modelURL = [[NSBundle mainBundle]

Restkit request not sending parameters

本秂侑毒 提交于 2019-12-17 20:41:05
问题 My implementation is not sending parameters. Here is the RequestDescriptor: RKObjectMapping *userMapping = [RKObjectMapping requestMapping]; [userMapping addAttributeMappingsFromArray:@[@"nombres", @"telefono", @"direccion", @"email", @"identificacion", @"tipo_id", @"recibir_sms_ordenes", @"recibir_correos_ordenes"]]; RKRequestDescriptor *descriptor = [RKRequestDescriptor requestDescriptorWithMapping:userMapping objectClass:[RKUser class] rootKeyPath:@"me" method:RKRequestMethodAny]; [

Restkit mapping for array with no keypath

隐身守侯 提交于 2019-12-17 17:04:04
问题 How can I create an object mapping for a JSON response like this, which is just an array of integers: [ 565195, 565309, 565261, 565515, 565292, 565281, 566346, 566347, 575241, 597230, 597231, 597227, 597228, 597229, 597232, 575248 ] 回答1: You need to perform a nil keypath mapping. Check the 'Mapping Values without Key Paths' section here. 来源: https://stackoverflow.com/questions/18004327/restkit-mapping-for-array-with-no-keypath

Error: “The sandbox is not in sync with the Podfile.lock…” after installing RestKit with cocoapods

半世苍凉 提交于 2019-12-17 04:39:24
问题 I've encounter an strange issue after installing RestKit with cocoapods. after resolving RestKit dependency for my project with cocoapods and trying to build it, I face this error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. I tried running pod install , but no change. Here are some shots: PODS: - AFNetworking (1.3.3) - RestKit (0.20.3): - RestKit/Core - RestKit/Core (0.20.3): - RestKit/CoreData - RestKit/Network - RestKit

Can't get RKPathMatcher *pathMatcher to match for deleting orphans objects

£可爱£侵袭症+ 提交于 2019-12-13 18:07:40
问题 I have the following mappings: RKResponseDescriptor *productionParametersPerEquipment = [RKResponseDescriptor responseDescriptorWithMapping:productionParameterMapping pathPattern:@"/api/rest/productionparameters/?equipment=:equipment_id" keyPath:@"objects" statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)]; and then I have: [objectManager addFetchRequestBlock:^NSFetchRequest *(NSURL *URL) { RKPathMatcher *pathMatcher = [RKPathMatcher pathMatcherWithPattern:@"/api/rest