diff --git a/.gitignore b/.gitignore index 23b32ca5..03254d57 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ build/* !default.mode2v3 *.perspectivev3 !default.perspectivev3 -*.xcworkspace !default.xcworkspace xcuserdata profile @@ -16,5 +15,4 @@ profile DerivedData *.orig .idea -.DS_Store - +.DS_Store \ No newline at end of file diff --git a/Podfile b/Podfile new file mode 100644 index 00000000..2cfc40ab --- /dev/null +++ b/Podfile @@ -0,0 +1,2 @@ +platform :ios, '5.0' +pod 'RestKit', :git => 'https://github.com/RestKit/RestKit.git', :branch => 'development' \ No newline at end of file diff --git a/Podfile.lock b/Podfile.lock new file mode 100644 index 00000000..63abecf7 --- /dev/null +++ b/Podfile.lock @@ -0,0 +1,38 @@ + +SPEC CHECKSUMS: + AFNetworking: 758a1cb1ab5a0d22795ba1c44abb9cad395bc126 + RestKit/Support: 99ffc129fb9eb0c7472ed6230b2c2df81ddb0eff + RestKit/ObjectMapping: 99ffc129fb9eb0c7472ed6230b2c2df81ddb0eff + SOCKit: 179515c1a621dd5652a60e9be02ea4adcd25bc9b + RestKit/CoreData: 99ffc129fb9eb0c7472ed6230b2c2df81ddb0eff + RestKit/Core: 99ffc129fb9eb0c7472ed6230b2c2df81ddb0eff + RestKit/Network: 99ffc129fb9eb0c7472ed6230b2c2df81ddb0eff + RestKit: 99ffc129fb9eb0c7472ed6230b2c2df81ddb0eff + +COCOAPODS: 0.15.2 + +DEPENDENCIES: +- RestKit (from `https://github.com/RestKit/RestKit.git', branch `development') + +EXTERNAL SOURCES: + RestKit: + :git: https://github.com/RestKit/RestKit.git + :branch: development + +PODS: +- AFNetworking (1.0) +- RestKit (0.20.0dev): + - RestKit/Core (= 0.20.0dev) +- RestKit/Core (0.20.0dev): + - RestKit/CoreData + - RestKit/Network + - RestKit/ObjectMapping +- RestKit/CoreData (0.20.0dev) +- RestKit/Network (0.20.0dev): + - AFNetworking (= 1.0) + - RestKit/ObjectMapping + - RestKit/Support + - SOCKit +- RestKit/ObjectMapping (0.20.0dev) +- RestKit/Support (0.20.0dev) +- SOCKit (1.1) diff --git a/Pods/AFNetworking/AFNetworking.podspec b/Pods/AFNetworking/AFNetworking.podspec new file mode 100644 index 00000000..5ebb028c --- /dev/null +++ b/Pods/AFNetworking/AFNetworking.podspec @@ -0,0 +1,28 @@ +Pod::Spec.new do |s| + s.name = 'AFNetworking' + s.version = '1.0' + s.license = 'MIT' + s.summary = 'A delightful iOS and OS X networking framework.' + s.homepage = 'https://github.com/AFNetworking/AFNetworking' + s.authors = { 'Mattt Thompson' => 'm@mattt.me', 'Scott Raymond' => 'sco@gowalla.com' } + s.source = { :git => 'https://github.com/AFNetworking/AFNetworking.git', :tag => '1.0' } + s.source_files = 'AFNetworking' + s.requires_arc = true + + s.ios.deployment_target = '5.0' + s.ios.frameworks = 'MobileCoreServices', 'SystemConfiguration' + + s.osx.deployment_target = '10.7' + s.osx.frameworks = 'CoreServices', 'SystemConfiguration' + + s.prefix_header_contents = <<-EOS +#import +#if __IPHONE_OS_VERSION_MIN_REQUIRED + #import + #import +#else + #import + #import +#endif +EOS +end diff --git a/candpiosapp/Externals/AFNetworking/AFNetworking/AFHTTPClient.h b/Pods/AFNetworking/AFNetworking/AFHTTPClient.h old mode 100644 new mode 100755 similarity index 88% rename from candpiosapp/Externals/AFNetworking/AFNetworking/AFHTTPClient.h rename to Pods/AFNetworking/AFNetworking/AFHTTPClient.h index 0ab2de7b..4bf96627 --- a/candpiosapp/Externals/AFNetworking/AFNetworking/AFHTTPClient.h +++ b/Pods/AFNetworking/AFNetworking/AFHTTPClient.h @@ -22,8 +22,6 @@ #import -@class AFHTTPRequestOperation; - /** `AFHTTPClient` captures the common patterns of communicating with an web application over HTTP. It encapsulates information like base URL, authorization credentials, and HTTP headers, and uses them to construct and manage the execution of HTTP request operations. @@ -80,6 +78,12 @@ typedef enum { AFNetworkReachabilityStatusReachableViaWWAN = 1, AFNetworkReachabilityStatusReachableViaWiFi = 2, } AFNetworkReachabilityStatus; +#else +#warning "SystemConfiguration framework not found in project, or not included in precompiled header. Network reachability functionality will not be available." +#endif + +#ifndef __UTTYPE__ +#warning "CoreServices framework not found in project, or not included in precompiled header. Automatic MIME type detection when uploading files in multipart requests will not be available." #endif typedef enum { @@ -88,6 +92,7 @@ typedef enum { AFPropertyListParameterEncoding, } AFHTTPClientParameterEncoding; +@class AFHTTPRequestOperation; @protocol AFMultipartFormData; @interface AFHTTPClient : NSObject @@ -108,8 +113,6 @@ typedef enum { /** The `AFHTTPClientParameterEncoding` value corresponding to how parameters are encoded into a request body. This is `AFFormURLParameterEncoding` by default. - - @warning JSON encoding will automatically use JSONKit, SBJSON, YAJL, or NextiveJSON, if provided. Otherwise, the built-in `NSJSONSerialization` class is used, if available (iOS 5.0 and Mac OS 10.7). If the build target does not either support `NSJSONSerialization` or include a third-party JSON library, a runtime exception will be thrown when attempting to encode parameters as JSON. */ @property (nonatomic, assign) AFHTTPClientParameterEncoding parameterEncoding; @@ -134,7 +137,7 @@ typedef enum { /** Creates and initializes an `AFHTTPClient` object with the specified base URL. - @param url The base URL for the HTTP client. This argument must not be nil. + @param url The base URL for the HTTP client. This argument must not be `nil`. @return The newly-initialized HTTP client */ @@ -143,10 +146,10 @@ typedef enum { /** Initializes an `AFHTTPClient` object with the specified base URL. - @param url The base URL for the HTTP client. This argument must not be nil. + @param url The base URL for the HTTP client. This argument must not be `nil`. @discussion This is the designated initializer. - + @return The newly-initialized HTTP client */ - (id)initWithBaseURL:(NSURL *)url; @@ -236,10 +239,10 @@ typedef enum { /** Creates an `NSMutableURLRequest` object with the specified HTTP method and path. - If the HTTP method is `GET`, the parameters will be used to construct a url-encoded query string that is appended to the request's URL. Otherwise, the parameters will be encoded according to the value of the `parameterEncoding` property, and set as the request body. + If the HTTP method is `GET`, `HEAD`, or `DELETE`, the parameters will be used to construct a url-encoded query string that is appended to the request's URL. Otherwise, the parameters will be encoded according to the value of the `parameterEncoding` property, and set as the request body. - @param method The HTTP method for the request, such as `GET`, `POST`, `PUT`, or `DELETE`. - @param path The path to be appended to the HTTP client's base URL and used as the request URL. + @param method The HTTP method for the request, such as `GET`, `POST`, `PUT`, or `DELETE`. This parameter must not be `nil`. + @param path The path to be appended to the HTTP client's base URL and used as the request URL. If `nil`, no path will be appended to the base URL. @param parameters The parameters to be either set as a query string for `GET` requests, or the request HTTP body. @return An `NSMutableURLRequest` object @@ -251,15 +254,13 @@ typedef enum { /** Creates an `NSMutableURLRequest` object with the specified HTTP method and path, and constructs a `multipart/form-data` HTTP body, using the specified parameters and multipart form data block. See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2 - @param method The HTTP method for the request. Must be either `POST`, `PUT`, or `DELETE`. + @param method The HTTP method for the request. This parameter must not be `GET` or `HEAD`, or `nil`. @param path The path to be appended to the HTTP client's base URL and used as the request URL. @param parameters The parameters to be encoded and set in the request HTTP body. @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol. This can be used to upload files, encode HTTP body as JSON or XML, or specify multiple values for the same parameter, as one might for array values. - @discussion The multipart form data is constructed synchronously in the specified block, so in cases where large amounts of data are being added to the request, you should consider performing this method in the background. Likewise, the form data is constructed in-memory, so it may be advantageous to instead write parts of the form data to a file and stream the request body using the `HTTPBodyStream` property of `NSURLRequest`. - - @warning An exception will be raised if the specified method is not `POST`, `PUT` or `DELETE`. - + @discussion Multipart form requests are automatically streamed, reading files directly from disk along with in-memory data in a single HTTP body. The resulting `NSMutableURLRequest` object has an `HTTPBodyStream` property, so refrain from setting `HTTPBodyStream` or `HTTPBody` on this request object, as it will clear out the multipart form body stream. + @return An `NSMutableURLRequest` object */ - (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method @@ -276,11 +277,11 @@ typedef enum { In order to determine what kind of operation is created, each registered subclass conforming to the `AFHTTPClient` protocol is consulted (in reverse order of when they were specified) to see if it can handle the specific request. The first class to return `YES` when sent a `canProcessRequest:` message is used to generate an operation using `HTTPRequestOperationWithRequest:success:failure:`. - @param request The request object to be loaded asynchronously during execution of the operation. + @param urlRequest The request object to be loaded asynchronously during execution of the operation. @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created request operation and the object created from the response data of request. @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred. */ -- (AFHTTPRequestOperation *)HTTPRequestOperationWithRequest:(NSURLRequest *)request +- (AFHTTPRequestOperation *)HTTPRequestOperationWithRequest:(NSURLRequest *)urlRequest success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; @@ -299,7 +300,9 @@ typedef enum { Cancels all operations in the HTTP client's operation queue whose URLs match the specified HTTP method and path. @param method The HTTP method to match for the cancelled requests, such as `GET`, `POST`, `PUT`, or `DELETE`. If `nil`, all request operations with URLs matching the path will be cancelled. - @param path The path to match for the cancelled requests. + @param path The path appended to the HTTP client base URL to match against the cancelled requests. If `nil`, no path will be appended to the base URL. + + @discussion This method only cancels `AFHTTPRequestOperations` whose request URL matches the HTTP client base URL with the path appended. For complete control over the lifecycle of enqueued operations, you can access the `operationQueue` property directly, which allows you to, for instance, cancel operations filtered by a predicate, or simply use `-cancelAllRequests`. Note that the operation queue may include non-HTTP operations, so be sure to check the type before attempting to directly introspect an operation's `request` property. */ - (void)cancelAllHTTPOperationsWithMethod:(NSString *)method path:(NSString *)path; @@ -310,13 +313,13 @@ typedef enum { /** Creates and enqueues an `AFHTTPRequestOperation` to the HTTP client's operation queue for each specified request object into a batch. When each request operation finishes, the specified progress block is executed, until all of the request operations have finished, at which point the completion block also executes. - @param requests The `NSURLRequest` objects used to create and enqueue operations. + @param urlRequests The `NSURLRequest` objects used to create and enqueue operations. @param progressBlock A block object to be executed upon the completion of each request operation in the batch. This block has no return value and takes two arguments: the number of operations that have already finished execution, and the total number of operations. @param completionBlock A block object to be executed upon the completion of all of the request operations in the batch. This block has no return value and takes a single argument: the batched request operations. @discussion Operations are created by passing the specified `NSURLRequest` objects in `requests`, using `-HTTPRequestOperationWithRequest:success:failure:`, with `nil` for both the `success` and `failure` parameters. */ -- (void)enqueueBatchOfHTTPRequestOperationsWithRequests:(NSArray *)requests +- (void)enqueueBatchOfHTTPRequestOperationsWithRequests:(NSArray *)urlRequests progressBlock:(void (^)(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations))progressBlock completionBlock:(void (^)(NSArray *operations))completionBlock; @@ -502,35 +505,35 @@ extern NSString * const AFNetworkingReachabilityNotificationStatusItem; #pragma mark - -/** - The `AFMultipartFormData` protocol defines the methods supported by the parameter in the block argument of `-multipartFormRequestWithMethod:path:parameters:constructingBodyWithBlock:`. - */ -@protocol AFMultipartFormData +extern NSUInteger const kAFUploadStream3GSuggestedPacketSize; +extern NSTimeInterval const kAFUploadStream3GSuggestedDelay; /** - Appends HTTP headers, followed by the encoded data and the multipart form boundary. - - @param headers The HTTP headers to be appended to the form data. - @param body The data to be encoded and appended to the form data. + The `AFMultipartFormData` protocol defines the methods supported by the parameter in the block argument of `AFHTTPClient -multipartFormRequestWithMethod:path:parameters:constructingBodyWithBlock:`. */ -- (void)appendPartWithHeaders:(NSDictionary *)headers - body:(NSData *)body; +@protocol AFMultipartFormData /** - Appends the HTTP headers `Content-Disposition: form-data; name=#{name}"`, followed by the encoded data and the multipart form boundary. + Appends the HTTP header `Content-Disposition: file; filename=#{generated filename}; name=#{name}"` and `Content-Type: #{generated mimeType}`, followed by the encoded file data and the multipart form boundary. - @param data The data to be encoded and appended to the form data. + @param fileURL The URL corresponding to the file whose content will be appended to the form. This parameter must not be `nil`. @param name The name to be associated with the specified data. This parameter must not be `nil`. + @param error If an error occurs, upon return contains an `NSError` object that describes the problem. + + @return `YES` if the file data was successfully appended, otherwise `NO`. + + @discussion The filename and MIME type for this data in the form will be automatically generated, using `NSURLResponse` `-suggestedFilename` and `-MIMEType`, respectively. */ -- (void)appendPartWithFormData:(NSData *)data - name:(NSString *)name; +- (BOOL)appendPartWithFileURL:(NSURL *)fileURL + name:(NSString *)name + error:(NSError * __autoreleasing *)error; /** Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary. @param data The data to be encoded and appended to the form data. @param name The name to be associated with the specified data. This parameter must not be `nil`. - @param fileName The filename to be associated with the specified data. This parameter must not be `nil`. + @param filename The filename to be associated with the specified data. This parameter must not be `nil`. @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`. */ - (void)appendPartWithFileData:(NSData *)data @@ -539,32 +542,33 @@ extern NSString * const AFNetworkingReachabilityNotificationStatusItem; mimeType:(NSString *)mimeType; /** - Appends the HTTP header `Content-Disposition: file; filename=#{generated filename}; name=#{name}"` and `Content-Type: #{generated mimeType}`, followed by the encoded file data and the multipart form boundary. + Appends the HTTP headers `Content-Disposition: form-data; name=#{name}"`, followed by the encoded data and the multipart form boundary. - @param fileURL The URL corresponding to the file whose content will be appended to the form. + @param data The data to be encoded and appended to the form data. @param name The name to be associated with the specified data. This parameter must not be `nil`. - @param error If an error occurs, upon return contains an `NSError` object that describes the problem. - - @return `YES` if the file data was successfully appended, otherwise `NO`. - - @discussion The filename and MIME type for this data in the form will be automatically generated, using `NSURLResponse` `-suggestedFilename` and `-MIMEType`, respectively. */ -- (BOOL)appendPartWithFileURL:(NSURL *)fileURL - name:(NSString *)name - error:(NSError **)error; + +- (void)appendPartWithFormData:(NSData *)data + name:(NSString *)name; /** - Appends encoded data to the form data. + Appends HTTP headers, followed by the encoded data and the multipart form boundary. - @param data The data to be encoded and appended to the form data. + @param headers The HTTP headers to be appended to the form data. + @param body The data to be encoded and appended to the form data. */ -- (void)appendData:(NSData *)data; +- (void)appendPartWithHeaders:(NSDictionary *)headers + body:(NSData *)body; /** - Appends a string to the form data. + Throttles request bandwidth by limiting the packet size and adding a delay for each chunk read from the upload stream. + + @param numberOfBytes Maximum packet size, in number of bytes. The default packet size for an input stream is 32kb. + @param delay Duration of delay each time a packet is read. By default, no delay is set. - @param string The string to be encoded and appended to the form data. + @discussion When uploading over a 3G or EDGE connection, requests may fail with "request body stream exhausted". Setting a maximum packet size and delay according to the recommended values (`kAFUploadStream3GSuggestedPacketSize` and `kAFUploadStream3GSuggestedDelay`) lowers the risk of the input stream exceeding its allocated bandwidth. Unfortunately, as of iOS 6, there is no definite way to distinguish between a 3G, EDGE, or LTE connection. As such, it is not recommended that you throttle bandwidth based solely on network reachability. Instead, you should consider checking for the "request body stream exhausted" in a failure block, and then retrying the request with throttled bandwidth. */ -- (void)appendString:(NSString *)string; +- (void)throttleBandwidthWithPacketSize:(NSUInteger)numberOfBytes + delay:(NSTimeInterval)delay; @end diff --git a/candpiosapp/Externals/AFNetworking/AFNetworking/AFHTTPClient.m b/Pods/AFNetworking/AFNetworking/AFHTTPClient.m old mode 100644 new mode 100755 similarity index 66% rename from candpiosapp/Externals/AFNetworking/AFNetworking/AFHTTPClient.m rename to Pods/AFNetworking/AFNetworking/AFHTTPClient.m index 6d47148a..4852223b --- a/candpiosapp/Externals/AFNetworking/AFNetworking/AFHTTPClient.m +++ b/Pods/AFNetworking/AFNetworking/AFHTTPClient.m @@ -27,12 +27,7 @@ #import -#if __IPHONE_OS_VERSION_MIN_REQUIRED -#import -#endif - #ifdef _SYSTEMCONFIGURATION_H -#import #import #import #import @@ -40,23 +35,10 @@ #import #endif -// Workaround for management of dispatch_retain() / dispatch_release() by ARC with iOS 6 / Mac OS X 10.8 -#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (!defined(__IPHONE_6_0) || __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_6_0)) || \ - (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && (!defined(__MAC_10_8) || __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_8)) -#define AF_DISPATCH_RETAIN_RELEASE 1 +#if __IPHONE_OS_VERSION_MIN_REQUIRED +#import #endif -@interface AFMultipartFormData : NSObject - -- (id)initWithURLRequest:(NSMutableURLRequest *)request - stringEncoding:(NSStringEncoding)encoding; - -- (NSMutableURLRequest *)requestByFinalizingMultipartFormData; - -@end - -#pragma mark - - #ifdef _SYSTEMCONFIGURATION_H NSString * const AFNetworkingReachabilityDidChangeNotification = @"com.alamofire.networking.reachability.change"; NSString * const AFNetworkingReachabilityNotificationStatusItem = @"AFNetworkingReachabilityNotificationStatusItem"; @@ -99,21 +81,21 @@ - (NSMutableURLRequest *)requestByFinalizingMultipartFormData; } static NSString * AFPercentEscapedQueryStringPairMemberFromStringWithEncoding(NSString *string, NSStringEncoding encoding) { - // Escape characters that are legal in URIs, but have unintentional semantic significance when used in a query string parameter - static NSString * const kAFLegalCharactersToBeEscaped = @":/.?&=;+!@$()~"; + static NSString * const kAFCharactersToBeEscaped = @":/.?&=;+!@#$()~"; + static NSString * const kAFCharactersToLeaveUnescaped = @"[]"; - return (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)string, NULL, (__bridge CFStringRef)kAFLegalCharactersToBeEscaped, CFStringConvertNSStringEncodingToEncoding(encoding)); + return (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)string, (__bridge CFStringRef)kAFCharactersToLeaveUnescaped, (__bridge CFStringRef)kAFCharactersToBeEscaped, CFStringConvertNSStringEncodingToEncoding(encoding)); } #pragma mark - @interface AFQueryStringPair : NSObject -@property (readwrite, nonatomic, retain) id field; -@property (readwrite, nonatomic, retain) id value; +@property (readwrite, nonatomic, strong) id field; +@property (readwrite, nonatomic, strong) id value; - (id)initWithField:(id)field value:(id)value; -- (NSString *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding; +- (NSString *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding; @end @implementation AFQueryStringPair @@ -133,7 +115,11 @@ - (id)initWithField:(id)field value:(id)value { } - (NSString *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding { - return [NSString stringWithFormat:@"%@=%@", AFPercentEscapedQueryStringPairMemberFromStringWithEncoding(self.field, stringEncoding), AFPercentEscapedQueryStringPairMemberFromStringWithEncoding([self.value description], stringEncoding)]; + if (!self.value || [self.value isEqual:[NSNull null]]) { + return AFPercentEscapedQueryStringPairMemberFromStringWithEncoding(self.field, stringEncoding); + } else { + return [NSString stringWithFormat:@"%@=%@", AFPercentEscapedQueryStringPairMemberFromStringWithEncoding(self.field, stringEncoding), AFPercentEscapedQueryStringPairMemberFromStringWithEncoding([self.value description], stringEncoding)]; + } } @end @@ -197,6 +183,15 @@ - (NSString *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding return propertyListString; } +@interface AFStreamingMultipartFormData : NSObject +- (id)initWithURLRequest:(NSMutableURLRequest *)urlRequest + stringEncoding:(NSStringEncoding)encoding; + +- (NSMutableURLRequest *)requestByFinalizingMultipartFormData; +@end + +#pragma mark - + @interface AFHTTPClient () @property (readwrite, nonatomic) NSURL *baseURL; @property (readwrite, nonatomic) NSMutableArray *registeredHTTPOperationClassNames; @@ -232,6 +227,8 @@ + (AFHTTPClient *)clientWithBaseURL:(NSURL *)url { } - (id)initWithBaseURL:(NSURL *)url { + NSParameterAssert(url); + self = [super init]; if (!self) { return nil; @@ -423,14 +420,16 @@ - (NSMutableURLRequest *)requestWithMethod:(NSString *)method path:(NSString *)path parameters:(NSDictionary *)parameters { + NSParameterAssert(method); + + if (!path) { + path = @""; + } + NSURL *url = [NSURL URLWithString:path relativeToURL:self.baseURL]; NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url]; [request setHTTPMethod:method]; [request setAllHTTPHeaderFields:self.defaultHeaders]; - - if ([method isEqualToString:@"GET"] || [method isEqualToString:@"HEAD"]) { - [request setHTTPShouldUsePipelining:YES]; - } if (parameters) { if ([method isEqualToString:@"GET"] || [method isEqualToString:@"HEAD"] || [method isEqualToString:@"DELETE"]) { @@ -461,16 +460,22 @@ - (NSMutableURLRequest *)requestWithMethod:(NSString *)method - (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method path:(NSString *)path parameters:(NSDictionary *)parameters - constructingBodyWithBlock:(void (^)(id formData))block + constructingBodyWithBlock:(void (^)(id formData))block { + NSParameterAssert(method); + NSParameterAssert(![method isEqualToString:@"GET"] && ![method isEqualToString:@"HEAD"]); + NSMutableURLRequest *request = [self requestWithMethod:method path:path parameters:nil]; - __block AFMultipartFormData *formData = [[AFMultipartFormData alloc] initWithURLRequest:request stringEncoding:self.stringEncoding]; + + __block AFStreamingMultipartFormData *formData = [[AFStreamingMultipartFormData alloc] initWithURLRequest:request stringEncoding:self.stringEncoding]; if (parameters) { for (AFQueryStringPair *pair in AFQueryStringPairsFromDictionary(parameters)) { NSData *data = nil; if ([pair.value isKindOfClass:[NSData class]]) { data = pair.value; + } else if ([pair.value isEqual:[NSNull null]]) { + data = [NSData data]; } else { data = [[pair.value description] dataUsingEncoding:self.stringEncoding]; } @@ -517,24 +522,31 @@ - (void)enqueueHTTPRequestOperation:(AFHTTPRequestOperation *)operation { [self.operationQueue addOperation:operation]; } -- (void)cancelAllHTTPOperationsWithMethod:(NSString *)method path:(NSString *)path { +- (void)cancelAllHTTPOperationsWithMethod:(NSString *)method + path:(NSString *)path +{ + NSString *URLStringToMatched = [[[self requestWithMethod:(method ?: @"GET") path:path parameters:nil] URL] absoluteString]; + for (NSOperation *operation in [self.operationQueue operations]) { if (![operation isKindOfClass:[AFHTTPRequestOperation class]]) { continue; } - if ((!method || [method isEqualToString:[[(AFHTTPRequestOperation *)operation request] HTTPMethod]]) && [path isEqualToString:[[[(AFHTTPRequestOperation *)operation request] URL] path]]) { + BOOL hasMatchingMethod = !method || [method isEqualToString:[[(AFHTTPRequestOperation *)operation request] HTTPMethod]]; + BOOL hasMatchingURL = [[[[(AFHTTPRequestOperation *)operation request] URL] absoluteString] isEqualToString:URLStringToMatched]; + + if (hasMatchingMethod && hasMatchingURL) { [operation cancel]; } } } -- (void)enqueueBatchOfHTTPRequestOperationsWithRequests:(NSArray *)requests +- (void)enqueueBatchOfHTTPRequestOperationsWithRequests:(NSArray *)urlRequests progressBlock:(void (^)(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations))progressBlock completionBlock:(void (^)(NSArray *operations))completionBlock { NSMutableArray *mutableOperations = [NSMutableArray array]; - for (NSURLRequest *request in requests) { + for (NSURLRequest *request in urlRequests) { AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request success:nil failure:nil]; [mutableOperations addObject:operation]; } @@ -553,7 +565,7 @@ - (void)enqueueBatchOfHTTPRequestOperations:(NSArray *)operations completionBlock(operations); } }); -#if AF_DISPATCH_RETAIN_RELEASE +#if !OS_OBJECT_USE_OBJC dispatch_release(dispatchGroup); #endif }]; @@ -687,27 +699,12 @@ - (id)copyWithZone:(NSZone *)zone { #pragma mark - -static NSString * const kAFMultipartTemporaryFileDirectoryName = @"com.alamofire.uploads"; - -static NSString * AFMultipartTemporaryFileDirectoryPath() { - static NSString *multipartTemporaryFilePath = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - multipartTemporaryFilePath = [[NSTemporaryDirectory() stringByAppendingPathComponent:kAFMultipartTemporaryFileDirectoryName] copy]; - - NSError *error = nil; - if(![[NSFileManager defaultManager] createDirectoryAtPath:multipartTemporaryFilePath withIntermediateDirectories:YES attributes:nil error:&error]) { - NSLog(@"Failed to create multipart temporary file directory at %@", multipartTemporaryFilePath); - } - }); - - return multipartTemporaryFilePath; -} - static NSString * const kAFMultipartFormBoundary = @"Boundary+0xAbCdEfGbOuNdArY"; static NSString * const kAFMultipartFormCRLF = @"\r\n"; +static NSInteger const kAFStreamToStreamBufferSize = 1024*1024; //1 meg default + static inline NSString * AFMultipartFormInitialBoundary() { return [NSString stringWithFormat:@"--%@%@", kAFMultipartFormBoundary, kAFMultipartFormCRLF]; } @@ -720,20 +717,58 @@ - (id)copyWithZone:(NSZone *)zone { return [NSString stringWithFormat:@"%@--%@--%@", kAFMultipartFormCRLF, kAFMultipartFormBoundary, kAFMultipartFormCRLF]; } -@interface AFMultipartFormData () -@property (readwrite, nonatomic) NSMutableURLRequest *request; +static inline NSString * AFContentTypeForPathExtension(NSString *extension) { +#ifdef __UTTYPE__ + NSString *UTI = (__bridge_transfer NSString *)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)extension, NULL); + return (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)UTI, kUTTagClassMIMEType); +#else + return @"application/octet-stream"; +#endif +} + +NSUInteger const kAFUploadStream3GSuggestedPacketSize = 1024 * 16; +NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2; + +@interface AFHTTPBodyPart : NSObject +@property (nonatomic, assign) NSStringEncoding stringEncoding; +@property (nonatomic, strong) NSDictionary *headers; +@property (nonatomic, strong) NSInputStream *inputStream; +@property (nonatomic, assign) unsigned long long bodyContentLength; + +@property (nonatomic, assign) BOOL hasInitialBoundary; +@property (nonatomic, assign) BOOL hasFinalBoundary; + +@property (readonly, getter = hasBytesAvailable) BOOL bytesAvailable; +@property (readonly) unsigned long long contentLength; + +- (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)length; +@end + +@interface AFMultipartBodyStream : NSInputStream +@property (nonatomic, assign) NSUInteger numberOfBytesInPacket; +@property (nonatomic, assign) NSTimeInterval delay; +@property (readonly) unsigned long long contentLength; +@property (readonly, getter = isEmpty) BOOL empty; + +- (id)initWithStringEncoding:(NSStringEncoding)encoding; +- (void)setInitialAndFinalBoundaries; +- (void)appendHTTPBodyPart:(AFHTTPBodyPart *)bodyPart; +@end + +#pragma mark - + +@interface AFStreamingMultipartFormData () +@property (readwrite, nonatomic, copy) NSMutableURLRequest *request; +@property (readwrite, nonatomic, strong) AFMultipartBodyStream *bodyStream; @property (readwrite, nonatomic, assign) NSStringEncoding stringEncoding; -@property (readwrite, nonatomic, strong) NSOutputStream *outputStream; -@property (readwrite, nonatomic, copy) NSString *temporaryFilePath; @end -@implementation AFMultipartFormData +@implementation AFStreamingMultipartFormData @synthesize request = _request; +@synthesize bodyStream = _bodyStream; @synthesize stringEncoding = _stringEncoding; -@synthesize outputStream = _outputStream; -@synthesize temporaryFilePath = _temporaryFilePath; -- (id)initWithURLRequest:(NSMutableURLRequest *)request +- (id)initWithURLRequest:(NSMutableURLRequest *)urlRequest stringEncoding:(NSStringEncoding)encoding { self = [super init]; @@ -741,133 +776,423 @@ - (id)initWithURLRequest:(NSMutableURLRequest *)request return nil; } - self.request = request; + self.request = urlRequest; self.stringEncoding = encoding; - - self.temporaryFilePath = [AFMultipartTemporaryFileDirectoryPath() stringByAppendingPathComponent:[[NSProcessInfo processInfo] globallyUniqueString]]; - self.outputStream = [NSOutputStream outputStreamToFileAtPath:self.temporaryFilePath append:NO]; - - NSRunLoop *runLoop = [NSRunLoop currentRunLoop]; - [self.outputStream scheduleInRunLoop:runLoop forMode:NSRunLoopCommonModes]; - [self.outputStream open]; + self.bodyStream = [[AFMultipartBodyStream alloc] initWithStringEncoding:encoding]; return self; } -- (void)dealloc { +- (BOOL)appendPartWithFileURL:(NSURL *)fileURL + name:(NSString *)name + error:(NSError * __autoreleasing *)error +{ + NSParameterAssert(fileURL); + NSParameterAssert(name); - if (_outputStream) { - [_outputStream close]; + if (![fileURL isFileURL]) { + NSDictionary *userInfo = [NSDictionary dictionaryWithObject:NSLocalizedString(@"Expected URL to be a file URL", nil) forKey:NSLocalizedFailureReasonErrorKey]; + if (error != NULL) { + *error = [[NSError alloc] initWithDomain:AFNetworkingErrorDomain code:NSURLErrorBadURL userInfo:userInfo]; + } + + return NO; + } else if ([fileURL checkResourceIsReachableAndReturnError:error] == NO) { + NSDictionary *userInfo = [NSDictionary dictionaryWithObject:NSLocalizedString(@"File URL not reachable.", nil) forKey:NSLocalizedFailureReasonErrorKey]; + if (error != NULL) { + *error = [[NSError alloc] initWithDomain:AFNetworkingErrorDomain code:NSURLErrorBadURL userInfo:userInfo]; + } + + return NO; } + NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary]; + [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, [[fileURL URLByDeletingPathExtension] lastPathComponent]] forKey:@"Content-Disposition"]; + [mutableHeaders setValue:AFContentTypeForPathExtension([fileURL pathExtension]) forKey:@"Content-Type"]; + + AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init]; + bodyPart.stringEncoding = self.stringEncoding; + bodyPart.headers = mutableHeaders; + bodyPart.inputStream = [NSInputStream inputStreamWithURL:fileURL]; + + NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:[fileURL path] error:nil]; + bodyPart.bodyContentLength = [[fileAttributes objectForKey:NSFileSize] unsignedLongLongValue]; + + [self.bodyStream appendHTTPBodyPart:bodyPart]; + + return YES; +} + +- (void)appendPartWithFileData:(NSData *)data + name:(NSString *)name + fileName:(NSString *)fileName + mimeType:(NSString *)mimeType +{ + NSParameterAssert(name); + NSParameterAssert(fileName); + NSParameterAssert(mimeType); + + NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary]; + [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"]; + [mutableHeaders setValue:mimeType forKey:@"Content-Type"]; + + [self appendPartWithHeaders:mutableHeaders body:data]; +} + +- (void)appendPartWithFormData:(NSData *)data + name:(NSString *)name +{ + NSParameterAssert(name); + + NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary]; + [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"", name] forKey:@"Content-Disposition"]; + + [self appendPartWithHeaders:mutableHeaders body:data]; +} + +- (void)appendPartWithHeaders:(NSDictionary *)headers + body:(NSData *)body +{ + AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init]; + bodyPart.stringEncoding = self.stringEncoding; + bodyPart.headers = headers; + bodyPart.bodyContentLength = [body length]; + bodyPart.inputStream = [NSInputStream inputStreamWithData:body]; + + [self.bodyStream appendHTTPBodyPart:bodyPart]; +} + +- (void)throttleBandwidthWithPacketSize:(NSUInteger)numberOfBytes + delay:(NSTimeInterval)delay +{ + self.bodyStream.numberOfBytesInPacket = numberOfBytes; + self.bodyStream.delay = delay; } - (NSMutableURLRequest *)requestByFinalizingMultipartFormData { - // Close the stream and return the original request if no data has been written - if ([[self.outputStream propertyForKey:NSStreamFileCurrentOffsetKey] integerValue] == 0) { - [self.outputStream close]; - + if ([self.bodyStream isEmpty]) { return self.request; } - [self appendData:[AFMultipartFormFinalBoundary() dataUsingEncoding:self.stringEncoding]]; + // Reset the initial and final boundaries to ensure correct Content-Length + [self.bodyStream setInitialAndFinalBoundaries]; [self.request setValue:[NSString stringWithFormat:@"multipart/form-data; boundary=%@", kAFMultipartFormBoundary] forHTTPHeaderField:@"Content-Type"]; - [self.request setValue:[[self.outputStream propertyForKey:NSStreamFileCurrentOffsetKey] stringValue] forHTTPHeaderField:@"Content-Length"]; - [self.request setHTTPBodyStream:[NSInputStream inputStreamWithFileAtPath:self.temporaryFilePath]]; - - [self.outputStream close]; + [self.request setValue:[NSString stringWithFormat:@"%llu", [self.bodyStream contentLength]] forHTTPHeaderField:@"Content-Length"]; + [self.request setHTTPBodyStream:self.bodyStream]; return self.request; } -#pragma mark - AFMultipartFormData +@end -- (void)appendBoundary { - if ([[self.outputStream propertyForKey:NSStreamFileCurrentOffsetKey] integerValue] == 0) { - [self appendString:AFMultipartFormInitialBoundary()]; - } else { - [self appendString:AFMultipartFormEncapsulationBoundary()]; +#pragma mark - + +@interface AFMultipartBodyStream () +@property (nonatomic, assign) NSStreamStatus streamStatus; +@property (nonatomic, strong) NSError *streamError; + +@property (nonatomic, assign) NSStringEncoding stringEncoding; +@property (nonatomic, strong) NSMutableArray *HTTPBodyParts; +@property (nonatomic, strong) NSEnumerator *HTTPBodyPartEnumerator; +@property (nonatomic, strong) AFHTTPBodyPart *currentHTTPBodyPart; +@end + +@implementation AFMultipartBodyStream +@synthesize streamStatus = _streamStatus; +@synthesize streamError = _streamError; +@synthesize stringEncoding = _stringEncoding; +@synthesize HTTPBodyParts = _HTTPBodyParts; +@synthesize HTTPBodyPartEnumerator = _HTTPBodyPartEnumerator; +@synthesize currentHTTPBodyPart = _currentHTTPBodyPart; +@synthesize numberOfBytesInPacket = _numberOfBytesInPacket; +@synthesize delay = _delay; + +- (id)initWithStringEncoding:(NSStringEncoding)encoding { + self = [super init]; + if (!self) { + return nil; } + + self.stringEncoding = encoding; + self.HTTPBodyParts = [NSMutableArray array]; + self.numberOfBytesInPacket = NSIntegerMax; + + return self; } -- (void)appendPartWithHeaders:(NSDictionary *)headers - body:(NSData *)body -{ - [self appendBoundary]; +- (void)setInitialAndFinalBoundaries { + if ([self.HTTPBodyParts count] > 0) { + for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) { + bodyPart.hasInitialBoundary = NO; + bodyPart.hasFinalBoundary = NO; + } + + [[self.HTTPBodyParts objectAtIndex:0] setHasInitialBoundary:YES]; + [[self.HTTPBodyParts lastObject] setHasFinalBoundary:YES]; + } +} + +- (void)appendHTTPBodyPart:(AFHTTPBodyPart *)bodyPart { + [self.HTTPBodyParts addObject:bodyPart]; +} + +- (BOOL)isEmpty { + return [self.HTTPBodyParts count] == 0; +} + +#pragma mark - NSInputStream + +- (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)length { + if ([self streamStatus] == NSStreamStatusClosed) { + return 0; + } - for (NSString *field in [headers allKeys]) { - [self appendString:[NSString stringWithFormat:@"%@: %@%@", field, [headers valueForKey:field], kAFMultipartFormCRLF]]; + NSInteger bytesRead = 0; + + while ((NSUInteger)bytesRead < MIN(length, self.numberOfBytesInPacket)) { + if (!self.currentHTTPBodyPart || ![self.currentHTTPBodyPart hasBytesAvailable]) { + if (!(self.currentHTTPBodyPart = [self.HTTPBodyPartEnumerator nextObject])) { + break; + } + } else { + bytesRead += [self.currentHTTPBodyPart read:&buffer[bytesRead] maxLength:length - bytesRead]; + if (self.delay > 0.0f) { + [NSThread sleepForTimeInterval:self.delay]; + } + } + } + + return bytesRead; +} + +- (BOOL)getBuffer:(uint8_t **)buffer length:(NSUInteger *)len { + return NO; +} + +- (BOOL)hasBytesAvailable { + return [self streamStatus] == NSStreamStatusOpen; +} + +#pragma mark - NSStream + +- (void)open { + if (self.streamStatus == NSStreamStatusOpen) { + return; } - [self appendString:kAFMultipartFormCRLF]; - [self appendData:body]; + self.streamStatus = NSStreamStatusOpen; + + [self setInitialAndFinalBoundaries]; + self.HTTPBodyPartEnumerator = [self.HTTPBodyParts objectEnumerator]; } -- (void)appendPartWithFormData:(NSData *)data - name:(NSString *)name -{ - NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary]; - [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"", name] forKey:@"Content-Disposition"]; +- (void)close { + self.streamStatus = NSStreamStatusClosed; +} + +- (id)propertyForKey:(NSString *)key { + return nil; +} + +- (BOOL)setProperty:(id)property forKey:(NSString *)key { + return NO; +} + +- (void)scheduleInRunLoop:(NSRunLoop *)aRunLoop + forMode:(NSString *)mode +{} + +- (void)removeFromRunLoop:(NSRunLoop *)aRunLoop + forMode:(NSString *)mode +{} + +- (unsigned long long)contentLength { + unsigned long long length = 0; + for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) { + length += [bodyPart contentLength]; + } - [self appendPartWithHeaders:mutableHeaders body:data]; + return length; } -- (void)appendPartWithFileData:(NSData *)data - name:(NSString *)name - fileName:(NSString *)fileName - mimeType:(NSString *)mimeType -{ - NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary]; - [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"]; - [mutableHeaders setValue:mimeType forKey:@"Content-Type"]; +#pragma mark - Undocumented CFReadStream Bridged Methods + +- (void)_scheduleInCFRunLoop:(CFRunLoopRef)aRunLoop + forMode:(CFStringRef)aMode +{} + +- (void)_unscheduleFromCFRunLoop:(CFRunLoopRef)aRunLoop + forMode:(CFStringRef)aMode +{} + +- (BOOL)_setCFClientFlags:(CFOptionFlags)inFlags + callback:(CFReadStreamClientCallBack)inCallback + context:(CFStreamClientContext *)inContext { + return NO; +} + +@end + +#pragma mark - + +typedef enum { + AFEncapsulationBoundaryPhase = 1, + AFHeaderPhase = 2, + AFBodyPhase = 3, + AFFinalBoundaryPhase = 4, +} AFHTTPBodyPartReadPhase; + +@interface AFHTTPBodyPart () { + AFHTTPBodyPartReadPhase _phase; + unsigned long long _phaseReadOffset; +} + +- (BOOL)transitionToNextPhase; +@end + +@implementation AFHTTPBodyPart +@synthesize stringEncoding = _stringEncoding; +@synthesize headers = _headers; +@synthesize bodyContentLength = _bodyContentLength; +@synthesize inputStream = _inputStream; +@synthesize hasInitialBoundary = _hasInitialBoundary; +@synthesize hasFinalBoundary = _hasFinalBoundary; + +- (id)init { + self = [super init]; + if (!self) { + return nil; + } - [self appendPartWithHeaders:mutableHeaders body:data]; + [self transitionToNextPhase]; + + return self; } -- (BOOL)appendPartWithFileURL:(NSURL *)fileURL - name:(NSString *)name - error:(NSError **)error -{ - if (![fileURL isFileURL]) { - NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; - [userInfo setValue:fileURL forKey:NSURLErrorFailingURLErrorKey]; - [userInfo setValue:NSLocalizedString(@"Expected URL to be a file URL", nil) forKey:NSLocalizedFailureReasonErrorKey]; - if (error != NULL) { - *error = [[NSError alloc] initWithDomain:NSURLErrorDomain code:NSURLErrorBadURL userInfo:userInfo]; - } - - return NO; +- (void)dealloc { + if (_inputStream) { + [_inputStream close]; + _inputStream = nil; + } +} + +- (NSString *)stringForHeaders { + NSMutableString *headerString = [NSMutableString string]; + for (NSString *field in [self.headers allKeys]) { + [headerString appendString:[NSString stringWithFormat:@"%@: %@%@", field, [self.headers valueForKey:field], kAFMultipartFormCRLF]]; + } + [headerString appendString:kAFMultipartFormCRLF]; + + return [NSString stringWithString:headerString]; +} + +- (unsigned long long)contentLength { + unsigned long long length = 0; + + NSData *encapsulationBoundaryData = [([self hasInitialBoundary] ? AFMultipartFormInitialBoundary() : AFMultipartFormEncapsulationBoundary()) dataUsingEncoding:self.stringEncoding]; + length += [encapsulationBoundaryData length]; + + NSData *headersData = [[self stringForHeaders] dataUsingEncoding:self.stringEncoding]; + length += [headersData length]; + + length += _bodyContentLength; + + NSData *closingBoundaryData = ([self hasFinalBoundary] ? [AFMultipartFormFinalBoundary() dataUsingEncoding:self.stringEncoding] : [NSData data]); + length += [closingBoundaryData length]; + + return length; +} + +- (BOOL)hasBytesAvailable { + switch (self.inputStream.streamStatus) { + case NSStreamStatusNotOpen: + case NSStreamStatusOpening: + case NSStreamStatusOpen: + case NSStreamStatusReading: + case NSStreamStatusWriting: + return YES; + case NSStreamStatusAtEnd: + case NSStreamStatusClosed: + case NSStreamStatusError: + return NO; } +} + +- (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)length { + NSInteger bytesRead = 0; - NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:fileURL]; - [request setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData]; + if (_phase == AFEncapsulationBoundaryPhase) { + NSData *encapsulationBoundaryData = [([self hasInitialBoundary] ? AFMultipartFormInitialBoundary() : AFMultipartFormEncapsulationBoundary()) dataUsingEncoding:self.stringEncoding]; + bytesRead += [self readData:encapsulationBoundaryData intoBuffer:&buffer[bytesRead] maxLength:(length - bytesRead)]; + } - NSURLResponse *response = nil; - NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:error]; + if (_phase == AFHeaderPhase) { + NSData *headersData = [[self stringForHeaders] dataUsingEncoding:self.stringEncoding]; + bytesRead += [self readData:headersData intoBuffer:&buffer[bytesRead] maxLength:(length - bytesRead)]; + } - if (data && response) { - [self appendPartWithFileData:data name:name fileName:[response suggestedFilename] mimeType:[response MIMEType]]; + if (_phase == AFBodyPhase) { + if ([self.inputStream hasBytesAvailable]) { + bytesRead += [self.inputStream read:&buffer[bytesRead] maxLength:(length - bytesRead)]; + } - return YES; - } else { - return NO; + if (![self.inputStream hasBytesAvailable]) { + [self transitionToNextPhase]; + } + } + + if (_phase == AFFinalBoundaryPhase) { + NSData *closingBoundaryData = ([self hasFinalBoundary] ? [AFMultipartFormFinalBoundary() dataUsingEncoding:self.stringEncoding] : [NSData data]); + bytesRead += [self readData:closingBoundaryData intoBuffer:&buffer[bytesRead] maxLength:(length - bytesRead)]; } + + return bytesRead; } -- (void)appendString:(NSString *)string { - [self appendData:[string dataUsingEncoding:self.stringEncoding]]; +- (NSInteger)readData:(NSData *)data + intoBuffer:(uint8_t *)buffer + maxLength:(NSUInteger)length +{ + NSRange range = NSMakeRange(_phaseReadOffset, MIN([data length], length)); + [data getBytes:buffer range:range]; + + _phaseReadOffset += range.length; + + if (range.length >= [data length]) { + [self transitionToNextPhase]; + } + + return range.length; } -- (void)appendData:(NSData *)data { - if ([data length] == 0) { - return; +- (BOOL)transitionToNextPhase { + if (![[NSThread currentThread] isMainThread]) { + [self performSelectorOnMainThread:@selector(transitionToNextPhase) withObject:nil waitUntilDone:YES]; + return YES; } - if ([self.outputStream hasSpaceAvailable]) { - const uint8_t *dataBuffer = (uint8_t *) [data bytes]; - [self.outputStream write:&dataBuffer[0] maxLength:[data length]]; + switch (_phase) { + case AFEncapsulationBoundaryPhase: + _phase = AFHeaderPhase; + break; + case AFHeaderPhase: + [self.inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes]; + [self.inputStream open]; + _phase = AFBodyPhase; + break; + case AFBodyPhase: + [self.inputStream close]; + _phase = AFFinalBoundaryPhase; + break; + default: + _phase = AFEncapsulationBoundaryPhase; + break; } + + _phaseReadOffset = 0; + + return YES; } @end diff --git a/candpiosapp/Externals/AFNetworking/AFNetworking/AFHTTPRequestOperation.h b/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h similarity index 100% rename from candpiosapp/Externals/AFNetworking/AFNetworking/AFHTTPRequestOperation.h rename to Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h diff --git a/candpiosapp/Externals/AFNetworking/AFNetworking/AFHTTPRequestOperation.m b/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m similarity index 89% rename from candpiosapp/Externals/AFNetworking/AFNetworking/AFHTTPRequestOperation.m rename to Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m index 95d0aa90..3e31962d 100644 --- a/candpiosapp/Externals/AFNetworking/AFNetworking/AFHTTPRequestOperation.m +++ b/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m @@ -30,47 +30,28 @@ #define AF_CAST_TO_BLOCK __bridge void * #endif -// Workaround for management of dispatch_retain() / dispatch_release() by ARC with iOS 6 / Mac OS X 10.8 -#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (!defined(__IPHONE_6_0) || __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_6_0)) || \ - (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && (!defined(__MAC_10_8) || __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_8)) -#define AF_DISPATCH_RETAIN_RELEASE 1 -#endif - NSSet * AFContentTypesFromHTTPHeader(NSString *string) { - static NSCharacterSet *_skippedCharacterSet = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - _skippedCharacterSet = [NSCharacterSet characterSetWithCharactersInString:@" ,"]; - }); - if (!string) { return nil; } - - NSScanner *scanner = [NSScanner scannerWithString:string]; - scanner.charactersToBeSkipped = _skippedCharacterSet; - - NSMutableSet *mutableContentTypes = [NSMutableSet set]; - while (![scanner isAtEnd]) { - NSString *contentType = nil; - if ([scanner scanUpToString:@";" intoString:&contentType]) { - [scanner scanUpToString:@"," intoString:nil]; - } else { - [scanner scanUpToCharactersFromSet:_skippedCharacterSet intoString:&contentType]; + + NSArray *mediaRanges = [string componentsSeparatedByString:@","]; + NSMutableSet *mutableContentTypes = [NSMutableSet setWithCapacity:mediaRanges.count]; + + [mediaRanges enumerateObjectsUsingBlock:^(NSString *mediaRange, NSUInteger idx, BOOL *stop) { + NSRange parametersRange = [mediaRange rangeOfString:@";"]; + if (parametersRange.location != NSNotFound) { + mediaRange = [mediaRange substringToIndex:parametersRange.location]; } - if (contentType) { - [mutableContentTypes addObject:contentType]; + mediaRange = [mediaRange stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; + + if (mediaRange.length > 0) { + [mutableContentTypes addObject:mediaRange]; } - } - - return [NSSet setWithSet:mutableContentTypes]; -} + }]; -static void AFSwizzleClassMethodWithClassAndSelectorUsingBlock(Class klass, SEL selector, id block) { - Method originalMethod = class_getClassMethod(klass, selector); - IMP implementation = imp_implementationWithBlock((AF_CAST_TO_BLOCK)block); - class_replaceMethod(objc_getMetaClass([NSStringFromClass(klass) UTF8String]), selector, implementation, method_getTypeEncoding(originalMethod)); + return [NSSet setWithSet:mutableContentTypes]; } static NSString * AFStringFromIndexSet(NSIndexSet *indexSet) { @@ -103,6 +84,12 @@ static void AFSwizzleClassMethodWithClassAndSelectorUsingBlock(Class klass, SEL return string; } +static void AFSwizzleClassMethodWithClassAndSelectorUsingBlock(Class klass, SEL selector, id block) { + Method originalMethod = class_getClassMethod(klass, selector); + IMP implementation = imp_implementationWithBlock((AF_CAST_TO_BLOCK)block); + class_replaceMethod(objc_getMetaClass([NSStringFromClass(klass) UTF8String]), selector, implementation, method_getTypeEncoding(originalMethod)); +} + #pragma mark - @interface AFHTTPRequestOperation () @@ -124,14 +111,14 @@ @implementation AFHTTPRequestOperation - (void)dealloc { if (_successCallbackQueue) { -#if AF_DISPATCH_RETAIN_RELEASE +#if !OS_OBJECT_USE_OBJC dispatch_release(_successCallbackQueue); #endif _successCallbackQueue = NULL; } if (_failureCallbackQueue) { -#if AF_DISPATCH_RETAIN_RELEASE +#if !OS_OBJECT_USE_OBJC dispatch_release(_failureCallbackQueue); #endif _failureCallbackQueue = NULL; @@ -214,14 +201,14 @@ - (BOOL)hasAcceptableContentType { - (void)setSuccessCallbackQueue:(dispatch_queue_t)successCallbackQueue { if (successCallbackQueue != _successCallbackQueue) { if (_successCallbackQueue) { -#if AF_DISPATCH_RETAIN_RELEASE +#if !OS_OBJECT_USE_OBJC dispatch_release(_successCallbackQueue); #endif _successCallbackQueue = NULL; } if (successCallbackQueue) { -#if AF_DISPATCH_RETAIN_RELEASE +#if !OS_OBJECT_USE_OBJC dispatch_retain(successCallbackQueue); #endif _successCallbackQueue = successCallbackQueue; @@ -232,14 +219,14 @@ - (void)setSuccessCallbackQueue:(dispatch_queue_t)successCallbackQueue { - (void)setFailureCallbackQueue:(dispatch_queue_t)failureCallbackQueue { if (failureCallbackQueue != _failureCallbackQueue) { if (_failureCallbackQueue) { -#if AF_DISPATCH_RETAIN_RELEASE +#if !OS_OBJECT_USE_OBJC dispatch_release(_failureCallbackQueue); #endif _failureCallbackQueue = NULL; } if (failureCallbackQueue) { -#if AF_DISPATCH_RETAIN_RELEASE +#if !OS_OBJECT_USE_OBJC dispatch_retain(failureCallbackQueue); #endif _failureCallbackQueue = failureCallbackQueue; @@ -250,10 +237,10 @@ - (void)setFailureCallbackQueue:(dispatch_queue_t)failureCallbackQueue { - (void)setCompletionBlockWithSuccess:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure { - // completion block is manually nilled out in AFURLConnectionOperation to break the retain cycle. + // completionBlock is manually nilled out in AFURLConnectionOperation to break the retain cycle. #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-retain-cycles" - self.completionBlock = ^ { + self.completionBlock = ^{ if ([self isCancelled]) { return; } diff --git a/candpiosapp/Externals/AFNetworking/AFNetworking/AFImageRequestOperation.h b/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.h similarity index 97% rename from candpiosapp/Externals/AFNetworking/AFNetworking/AFImageRequestOperation.h rename to Pods/AFNetworking/AFNetworking/AFImageRequestOperation.h index 6c29fe6e..d028a84d 100644 --- a/candpiosapp/Externals/AFNetworking/AFNetworking/AFImageRequestOperation.h +++ b/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.h @@ -55,9 +55,9 @@ An image constructed from the response data. If an error occurs during the request, `nil` will be returned, and the `error` property will be set to the error. */ #if __IPHONE_OS_VERSION_MIN_REQUIRED -@property (readonly, nonatomic) UIImage *responseImage; +@property (readonly, nonatomic, strong) UIImage *responseImage; #elif __MAC_OS_X_VERSION_MIN_REQUIRED -@property (readonly, nonatomic, retain) NSImage *responseImage; +@property (readonly, nonatomic, strong) NSImage *responseImage; #endif #if __IPHONE_OS_VERSION_MIN_REQUIRED diff --git a/candpiosapp/Externals/AFNetworking/AFNetworking/AFImageRequestOperation.m b/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.m similarity index 98% rename from candpiosapp/Externals/AFNetworking/AFNetworking/AFImageRequestOperation.m rename to Pods/AFNetworking/AFNetworking/AFImageRequestOperation.m index cac1307f..f4f724a6 100644 --- a/candpiosapp/Externals/AFNetworking/AFNetworking/AFImageRequestOperation.m +++ b/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.m @@ -33,9 +33,9 @@ static dispatch_queue_t image_request_operation_processing_queue() { @interface AFImageRequestOperation () #if __IPHONE_OS_VERSION_MIN_REQUIRED -@property (readwrite, nonatomic) UIImage *responseImage; +@property (readwrite, nonatomic, strong) UIImage *responseImage; #elif __MAC_OS_X_VERSION_MIN_REQUIRED -@property (readwrite, nonatomic, retain) NSImage *responseImage; +@property (readwrite, nonatomic, strong) NSImage *responseImage; #endif @end diff --git a/candpiosapp/Externals/AFNetworking/AFNetworking/AFJSONRequestOperation.h b/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.h similarity index 98% rename from candpiosapp/Externals/AFNetworking/AFNetworking/AFJSONRequestOperation.h rename to Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.h index ed82e6a9..f5ead5b7 100644 --- a/candpiosapp/Externals/AFNetworking/AFNetworking/AFJSONRequestOperation.h +++ b/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.h @@ -44,7 +44,7 @@ /** A JSON object constructed from the response data. If an error occurs while parsing, `nil` will be returned, and the `error` property will be set to the error. */ -@property (readonly, nonatomic) id responseJSON; +@property (readonly, nonatomic, strong) id responseJSON; ///---------------------------------- /// @name Creating Request Operations diff --git a/candpiosapp/Externals/AFNetworking/AFNetworking/AFJSONRequestOperation.m b/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.m similarity index 97% rename from candpiosapp/Externals/AFNetworking/AFNetworking/AFJSONRequestOperation.m rename to Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.m index f5c438e0..7fa9669a 100644 --- a/candpiosapp/Externals/AFNetworking/AFNetworking/AFJSONRequestOperation.m +++ b/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.m @@ -32,8 +32,8 @@ static dispatch_queue_t json_request_operation_processing_queue() { } @interface AFJSONRequestOperation () -@property (readwrite, nonatomic) id responseJSON; -@property (readwrite, nonatomic) NSError *JSONError; +@property (readwrite, nonatomic, strong) id responseJSON; +@property (readwrite, nonatomic, strong) NSError *JSONError; @end @implementation AFJSONRequestOperation diff --git a/candpiosapp/Externals/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.h b/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.h similarity index 77% rename from candpiosapp/Externals/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.h rename to Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.h index 929c48a8..2b4d54c5 100644 --- a/candpiosapp/Externals/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.h +++ b/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.h @@ -30,7 +30,14 @@ /** `AFNetworkActivityIndicatorManager` manages the state of the network activity indicator in the status bar. When enabled, it will listen for notifications indicating that a network request operation has started or finished, and start or stop animating the indicator accordingly. The number of active requests is incremented and decremented much like a stack or a semaphore, and the activity indicator will animate so long as that number is greater than zero. - @discussion By setting `isNetworkActivityIndicatorVisible` to `YES` for `sharedManager`, the network activity indicator will show and hide automatically as requests start and finish. You should not ever need to call `incrementActivityCount` or `decrementActivityCount` yourself. + You should enable the shared instance of `AFNetworkActivityIndicatorManager` when your application finishes launching. In `AppDelegate application:didFinishLaunchingWithOptions:` you can do so with the following code: + + [[AFNetworkActivityIndicatorManager sharedManager] setEnabled:YES]; + + By setting `isNetworkActivityIndicatorVisible` to `YES` for `sharedManager`, the network activity indicator will show and hide automatically as requests start and finish. You should not ever need to call `incrementActivityCount` or `decrementActivityCount` yourself. + + See the Apple Human Interface Guidelines section about the Network Activity Indicator for more information: + http://developer.apple.com/library/iOS/#documentation/UserExperience/Conceptual/MobileHIG/UIElementGuidelines/UIElementGuidelines.html#//apple_ref/doc/uid/TP40006556-CH13-SW44 */ @interface AFNetworkActivityIndicatorManager : NSObject diff --git a/candpiosapp/Externals/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.m b/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.m similarity index 97% rename from candpiosapp/Externals/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.m rename to Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.m index 56727734..a67cfec8 100644 --- a/candpiosapp/Externals/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.m +++ b/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.m @@ -29,7 +29,7 @@ @interface AFNetworkActivityIndicatorManager () @property (readwrite, assign) NSInteger activityCount; -@property (readwrite, nonatomic, retain) NSTimer *activityIndicatorVisibilityTimer; +@property (readwrite, nonatomic, strong) NSTimer *activityIndicatorVisibilityTimer; @property (readonly, getter = isNetworkActivityIndicatorVisible) BOOL networkActivityIndicatorVisible; - (void)updateNetworkActivityIndicatorVisibility; @@ -120,7 +120,7 @@ - (void)incrementActivityCount { - (void)decrementActivityCount { [self willChangeValueForKey:@"activityCount"]; @synchronized(self) { - _activityCount--; + _activityCount = MAX(_activityCount - 1, 0); } [self didChangeValueForKey:@"activityCount"]; [self updateNetworkActivityIndicatorVisibilityDelayed]; diff --git a/candpiosapp/Externals/AFNetworking/AFNetworking/AFNetworking.h b/Pods/AFNetworking/AFNetworking/AFNetworking.h similarity index 100% rename from candpiosapp/Externals/AFNetworking/AFNetworking/AFNetworking.h rename to Pods/AFNetworking/AFNetworking/AFNetworking.h diff --git a/candpiosapp/Externals/AFNetworking/AFNetworking/AFPropertyListRequestOperation.h b/Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.h similarity index 100% rename from candpiosapp/Externals/AFNetworking/AFNetworking/AFPropertyListRequestOperation.h rename to Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.h diff --git a/candpiosapp/Externals/AFNetworking/AFNetworking/AFPropertyListRequestOperation.m b/Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.m similarity index 100% rename from candpiosapp/Externals/AFNetworking/AFNetworking/AFPropertyListRequestOperation.m rename to Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.m diff --git a/candpiosapp/Externals/AFNetworking/AFNetworking/AFURLConnectionOperation.h b/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h similarity index 95% rename from candpiosapp/Externals/AFNetworking/AFNetworking/AFURLConnectionOperation.h rename to Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h index ed367e03..3a391b0a 100644 --- a/candpiosapp/Externals/AFNetworking/AFNetworking/AFURLConnectionOperation.h +++ b/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h @@ -22,8 +22,10 @@ #import +#import + /** - `AFURLConnectionOperation` is an `NSOperation` that implements NSURLConnection delegate methods. + `AFURLConnectionOperation` is a subclass of `NSOperation` that implements `NSURLConnection` delegate methods. ## Subclassing Notes @@ -48,11 +50,11 @@ ## Class Constructors - Class constructors, or methods that return an unowned (zero retain count) instance, are the preferred way for subclasses to encapsulate any particular logic for handling the setup or parsing of response data. For instance, `AFJSONRequestOperation` provides `JSONRequestOperationWithRequest:success:failure:`, which takes block arguments, whose parameter on for a successful request is the JSON object initialized from the `response data`. + Class constructors, or methods that return an unowned instance, are the preferred way for subclasses to encapsulate any particular logic for handling the setup or parsing of response data. For instance, `AFJSONRequestOperation` provides `JSONRequestOperationWithRequest:success:failure:`, which takes block arguments, whose parameter on for a successful request is the JSON object initialized from the `response data`. ## Callbacks and Completion Blocks - The built-in `completionBlock` provided by `NSOperation` allows for custom behavior to be executed after the request finishes. It is a common pattern for class constructors in subclasses to take callback block parameters, and execute them conditionally in the body of its `completionBlock`. Make sure to handle cancelled operations appropriately when setting a `completionBlock` (e.g. returning early before parsing response data). See the implementation of any of the `AFHTTPRequestOperation` subclasses for an example of this. + The built-in `completionBlock` provided by `NSOperation` allows for custom behavior to be executed after the request finishes. It is a common pattern for class constructors in subclasses to take callback block parameters, and execute them conditionally in the body of its `completionBlock`. Make sure to handle cancelled operations appropriately when setting a `completionBlock` (i.e. returning early before parsing response data). See the implementation of any of the `AFHTTPRequestOperation` subclasses for an example of this. Subclasses are strongly discouraged from overriding `setCompletionBlock:`, as `AFURLConnectionOperation`'s implementation includes a workaround to mitigate retain cycles, and what Apple rather ominously refers to as ["The Deallocation Problem"](http://developer.apple.com/library/ios/#technotes/tn2109/). @@ -69,7 +71,7 @@ - `-copy` and `-copyWithZone:` return a new operation with the `NSURLRequest` of the original. So rather than an exact copy of the operation at that particular instant, the copying mechanism returns a completely new instance, which can be useful for retrying operations. - A copy of an operation will not include the `outputStream` of the original. - - Operation copies do not include `completionBlock`. `completionBlock` often strongly captures a reference to `self`, which, perhaps surprisingly, would otherwise point to the _original_ operation when copied. + - Operation copies do not include `completionBlock`. `completionBlock` often strongly captures a reference to `self`, which would otherwise have the unintuitive side-effect of pointing to the _original_ operation when copied. */ @interface AFURLConnectionOperation : NSOperation diff --git a/candpiosapp/Externals/AFNetworking/AFNetworking/AFURLConnectionOperation.m b/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m similarity index 98% rename from candpiosapp/Externals/AFNetworking/AFNetworking/AFURLConnectionOperation.m rename to Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m index 49a67309..9f502f57 100644 --- a/candpiosapp/Externals/AFNetworking/AFNetworking/AFURLConnectionOperation.m +++ b/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m @@ -25,6 +25,11 @@ #import #endif +#if !__has_feature(objc_arc) +#error AFNetworking must be built with ARC. +// You can turn on ARC for only AFNetworking files by adding -fobjc-arc to the build phase for each of its files. +#endif + typedef enum { AFOperationPausedState = -1, AFOperationReadyState = 1, @@ -145,7 +150,7 @@ @implementation AFURLConnectionOperation @synthesize redirectResponse = _redirectResponse; @synthesize lock = _lock; -+ (void)networkRequestThreadEntryPoint:(id)__unused object { ++ (void) __attribute__((noreturn)) networkRequestThreadEntryPoint:(id)__unused object { do { @autoreleasepool { [[NSRunLoop currentRunLoop] run]; diff --git a/candpiosapp/Externals/AFNetworking/AFNetworking/AFXMLRequestOperation.h b/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.h similarity index 95% rename from candpiosapp/Externals/AFNetworking/AFNetworking/AFXMLRequestOperation.h rename to Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.h index 10a0f892..f8d5e048 100644 --- a/candpiosapp/Externals/AFNetworking/AFNetworking/AFXMLRequestOperation.h +++ b/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.h @@ -48,13 +48,13 @@ /** An `NSXMLParser` object constructed from the response data. */ -@property (readonly, nonatomic) NSXMLParser *responseXMLParser; +@property (readonly, nonatomic, strong) NSXMLParser *responseXMLParser; -#if __MAC_OS_X_VERSION_MIN_REQUIRED +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED /** An `NSXMLDocument` object constructed from the response data. If an error occurs while parsing, `nil` will be returned, and the `error` property will be set to the error. */ -@property (readonly, nonatomic, retain) NSXMLDocument *responseXMLDocument; +@property (readonly, nonatomic, strong) NSXMLDocument *responseXMLDocument; #endif /** @@ -71,7 +71,7 @@ failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLParser *XMLParse))failure; -#if __MAC_OS_X_VERSION_MIN_REQUIRED +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED /** Creates and returns an `AFXMLRequestOperation` object and sets the specified success and failure callbacks. diff --git a/candpiosapp/Externals/AFNetworking/AFNetworking/AFXMLRequestOperation.m b/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.m similarity index 94% rename from candpiosapp/Externals/AFNetworking/AFNetworking/AFXMLRequestOperation.m rename to Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.m index bdc935c3..d8de09af 100644 --- a/candpiosapp/Externals/AFNetworking/AFNetworking/AFXMLRequestOperation.m +++ b/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.m @@ -34,16 +34,16 @@ static dispatch_queue_t xml_request_operation_processing_queue() { } @interface AFXMLRequestOperation () -@property (readwrite, nonatomic) NSXMLParser *responseXMLParser; -#if __MAC_OS_X_VERSION_MIN_REQUIRED -@property (readwrite, nonatomic, retain) NSXMLDocument *responseXMLDocument; +@property (readwrite, nonatomic, strong) NSXMLParser *responseXMLParser; +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED +@property (readwrite, nonatomic, strong) NSXMLDocument *responseXMLDocument; #endif -@property (readwrite, nonatomic) NSError *XMLError; +@property (readwrite, nonatomic, strong) NSError *XMLError; @end @implementation AFXMLRequestOperation @synthesize responseXMLParser = _responseXMLParser; -#if __MAC_OS_X_VERSION_MIN_REQUIRED +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED @synthesize responseXMLDocument = _responseXMLDocument; #endif @synthesize XMLError = _XMLError; @@ -66,7 +66,7 @@ + (AFXMLRequestOperation *)XMLParserRequestOperationWithRequest:(NSURLRequest *) return requestOperation; } -#if __MAC_OS_X_VERSION_MIN_REQUIRED +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED + (AFXMLRequestOperation *)XMLDocumentRequestOperationWithRequest:(NSURLRequest *)urlRequest success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLDocument *document))success failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLDocument *document))failure @@ -97,7 +97,7 @@ - (NSXMLParser *)responseXMLParser { return _responseXMLParser; } -#if __MAC_OS_X_VERSION_MIN_REQUIRED +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED - (NSXMLDocument *)responseXMLDocument { if (!_responseXMLDocument && [self.responseData length] > 0 && [self isFinished]) { NSError *error = nil; diff --git a/candpiosapp/Externals/AFNetworking/AFNetworking/UIImageView+AFNetworking.h b/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.h similarity index 93% rename from candpiosapp/Externals/AFNetworking/AFNetworking/UIImageView+AFNetworking.h rename to Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.h index 1c8bfb81..c44a0cbe 100644 --- a/candpiosapp/Externals/AFNetworking/AFNetworking/UIImageView+AFNetworking.h +++ b/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.h @@ -36,7 +36,7 @@ /** Creates and enqueues an image request operation, which asynchronously downloads the image from the specified URL, and sets it the request is finished. Any previous image request for the receiver will be cancelled. If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. - @discussion By default, URL requests have a cache policy of `NSURLCacheStorageAllowed` and a timeout interval of 30 seconds, and are set to use HTTP pipelining, and not handle cookies. To configure URL requests differently, use `setImageWithURLRequest:placeholderImage:success:failure:` + @discussion By default, URL requests have a cache policy of `NSURLCacheStorageAllowed` and a timeout interval of 30 seconds, and are set not handle cookies. To configure URL requests differently, use `setImageWithURLRequest:placeholderImage:success:failure:` @param url The URL used for the image request. */ @@ -48,7 +48,7 @@ @param url The URL used for the image request. @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the image view will not change its image until the image request finishes. - @discussion By default, URL requests have a cache policy of `NSURLCacheStorageAllowed` and a timeout interval of 30 seconds, and are set to use HTTP pipelining, and not handle cookies. To configure URL requests differently, use `setImageWithURLRequest:placeholderImage:success:failure:` + @discussion By default, URL requests have a cache policy of `NSURLCacheStorageAllowed` and a timeout interval of 30 seconds, and are set not handle cookies. To configure URL requests differently, use `setImageWithURLRequest:placeholderImage:success:failure:` */ - (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholderImage; diff --git a/candpiosapp/Externals/AFNetworking/AFNetworking/UIImageView+AFNetworking.m b/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.m similarity index 98% rename from candpiosapp/Externals/AFNetworking/AFNetworking/UIImageView+AFNetworking.m rename to Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.m index 334c7005..30f60a93 100644 --- a/candpiosapp/Externals/AFNetworking/AFNetworking/UIImageView+AFNetworking.m +++ b/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.m @@ -37,7 +37,7 @@ - (void)cacheImage:(UIImage *)image static char kAFImageRequestOperationObjectKey; @interface UIImageView (_AFNetworking) -@property (readwrite, nonatomic, retain, setter = af_setImageRequestOperation:) AFImageRequestOperation *af_imageRequestOperation; +@property (readwrite, nonatomic, strong, setter = af_setImageRequestOperation:) AFImageRequestOperation *af_imageRequestOperation; @end @implementation UIImageView (_AFNetworking) @@ -89,7 +89,6 @@ - (void)setImageWithURL:(NSURL *)url { NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; [request setHTTPShouldHandleCookies:NO]; - [request setHTTPShouldUsePipelining:YES]; [request addValue:@"image/*" forHTTPHeaderField:@"Accept"]; [self setImageWithURLRequest:request placeholderImage:placeholderImage success:nil failure:nil]; diff --git a/candpiosapp/Externals/AFNetworking/LICENSE b/Pods/AFNetworking/LICENSE similarity index 100% rename from candpiosapp/Externals/AFNetworking/LICENSE rename to Pods/AFNetworking/LICENSE diff --git a/candpiosapp/Externals/AFNetworking/README.md b/Pods/AFNetworking/README.md similarity index 84% rename from candpiosapp/Externals/AFNetworking/README.md rename to Pods/AFNetworking/README.md index ed5fe681..8df84631 100644 --- a/candpiosapp/Externals/AFNetworking/README.md +++ b/Pods/AFNetworking/README.md @@ -3,10 +3,10 @@ AFNetworking is a delightful networking library for iOS and Mac OS X. It's built on top of [NSURLConnection](http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSURLConnection_Class/Reference/Reference.html), [NSOperation](http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSOperation_class/Reference/Reference.html), and other familiar Foundation technologies. It has a modular architecture with well-designed, feature-rich APIs that are a joy to use. For example, here's how easy it is to get JSON from a URL: ``` objective-c -NSURL *url = [NSURL URLWithString:@"http://api.twitter.com/1/statuses/public_timeline.json"]; +NSURL *url = [NSURL URLWithString:@"https://alpha-api.app.net/stream/0/posts/stream/global"]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) { - NSLog(@"Public Timeline: %@", JSON); + NSLog(@"App.net Global Stream: %@", JSON); } failure:nil]; [operation start]; ``` @@ -106,10 +106,9 @@ UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0 ### API Client Request ``` objective-c -// AFGowallaAPIClient is a subclass of AFHTTPClient, which defines the base URL and default HTTP headers for NSURLRequests it creates -[[AFGowallaAPIClient sharedClient] getPath:@"/spots/9223" parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) { - NSLog(@"Name: %@", [responseObject valueForKeyPath:@"name"]); - NSLog(@"Address: %@", [responseObject valueForKeyPath:@"address.street_address"]); +// AFAppDotNetAPIClient is a subclass of AFHTTPClient, which defines the base URL and default HTTP headers for NSURLRequests it creates +[[AFAppDotNetAPIClient sharedClient] getPath:@"stream/0/posts/stream/global" parameters:nil success:^(AFHTTPRequestOperation *operation, id JSON) { + NSLog(@"App.net Global Stream: %@", JSON); } failure:nil]; ``` @@ -143,7 +142,17 @@ operation.outputStream = [NSOutputStream outputStreamToMemory]; ## Requirements -AFNetworking requires either [iOS 5.0](http://developer.apple.com/library/ios/#releasenotes/General/WhatsNewIniPhoneOS/Articles/iPhoneOS4.html) and above, or [Mac OS 10.7](http://developer.apple.com/library/mac/#releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_6.html#//apple_ref/doc/uid/TP40008898-SW7) ([64-bit with modern Cocoa runtime](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtVersionsPlatforms.html)) and above. +AFNetworking 1.0 and higher requires either [iOS 5.0](http://developer.apple.com/library/ios/#releasenotes/General/WhatsNewIniPhoneOS/Articles/iPhoneOS4.html) and above, or [Mac OS 10.7](http://developer.apple.com/library/mac/#releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_6.html#//apple_ref/doc/uid/TP40008898-SW7) ([64-bit with modern Cocoa runtime](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtVersionsPlatforms.html)) and above. + +For compatibility with iOS 4.3, use the latest 0.10.x release. + +### ARC + +AFNetworking uses ARC as of its 1.0 release. + +If you are using AFNetworking 1.0 in your non-arc project, you will need to set a `-fobjc-arc` compiler flag on all of the AFNetworking source files. Conversely, if you are adding a pre-1.0 version of AFNetworking, you will need to set a `-fno-objc-arc` compiler flag. + +To set a compiler flag in Xcode, go to your active target and select the "Build Phases" tab. Now select all AFNetworking source files, press Enter, insert `-fobjc-arc` or `-fno-objc-arc` and then "Done" to enable or disable ARC for AFNetworking. ## Credits diff --git a/Pods/BuildHeaders/AFNetworking/AFHTTPClient.h b/Pods/BuildHeaders/AFNetworking/AFHTTPClient.h new file mode 120000 index 00000000..a88168d7 --- /dev/null +++ b/Pods/BuildHeaders/AFNetworking/AFHTTPClient.h @@ -0,0 +1 @@ +../../AFNetworking/AFNetworking/AFHTTPClient.h \ No newline at end of file diff --git a/Pods/BuildHeaders/AFNetworking/AFHTTPRequestOperation.h b/Pods/BuildHeaders/AFNetworking/AFHTTPRequestOperation.h new file mode 120000 index 00000000..d51daed2 --- /dev/null +++ b/Pods/BuildHeaders/AFNetworking/AFHTTPRequestOperation.h @@ -0,0 +1 @@ +../../AFNetworking/AFNetworking/AFHTTPRequestOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/AFNetworking/AFImageRequestOperation.h b/Pods/BuildHeaders/AFNetworking/AFImageRequestOperation.h new file mode 120000 index 00000000..f7c5e913 --- /dev/null +++ b/Pods/BuildHeaders/AFNetworking/AFImageRequestOperation.h @@ -0,0 +1 @@ +../../AFNetworking/AFNetworking/AFImageRequestOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/AFNetworking/AFJSONRequestOperation.h b/Pods/BuildHeaders/AFNetworking/AFJSONRequestOperation.h new file mode 120000 index 00000000..4dd96227 --- /dev/null +++ b/Pods/BuildHeaders/AFNetworking/AFJSONRequestOperation.h @@ -0,0 +1 @@ +../../AFNetworking/AFNetworking/AFJSONRequestOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/AFNetworking/AFNetworkActivityIndicatorManager.h b/Pods/BuildHeaders/AFNetworking/AFNetworkActivityIndicatorManager.h new file mode 120000 index 00000000..a09102c7 --- /dev/null +++ b/Pods/BuildHeaders/AFNetworking/AFNetworkActivityIndicatorManager.h @@ -0,0 +1 @@ +../../AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.h \ No newline at end of file diff --git a/Pods/BuildHeaders/AFNetworking/AFNetworking.h b/Pods/BuildHeaders/AFNetworking/AFNetworking.h new file mode 120000 index 00000000..83dd518f --- /dev/null +++ b/Pods/BuildHeaders/AFNetworking/AFNetworking.h @@ -0,0 +1 @@ +../../AFNetworking/AFNetworking/AFNetworking.h \ No newline at end of file diff --git a/Pods/BuildHeaders/AFNetworking/AFPropertyListRequestOperation.h b/Pods/BuildHeaders/AFNetworking/AFPropertyListRequestOperation.h new file mode 120000 index 00000000..fb82b5c5 --- /dev/null +++ b/Pods/BuildHeaders/AFNetworking/AFPropertyListRequestOperation.h @@ -0,0 +1 @@ +../../AFNetworking/AFNetworking/AFPropertyListRequestOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/AFNetworking/AFURLConnectionOperation.h b/Pods/BuildHeaders/AFNetworking/AFURLConnectionOperation.h new file mode 120000 index 00000000..360459d4 --- /dev/null +++ b/Pods/BuildHeaders/AFNetworking/AFURLConnectionOperation.h @@ -0,0 +1 @@ +../../AFNetworking/AFNetworking/AFURLConnectionOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/AFNetworking/AFXMLRequestOperation.h b/Pods/BuildHeaders/AFNetworking/AFXMLRequestOperation.h new file mode 120000 index 00000000..c5c354bb --- /dev/null +++ b/Pods/BuildHeaders/AFNetworking/AFXMLRequestOperation.h @@ -0,0 +1 @@ +../../AFNetworking/AFNetworking/AFXMLRequestOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/AFNetworking/UIImageView+AFNetworking.h b/Pods/BuildHeaders/AFNetworking/UIImageView+AFNetworking.h new file mode 120000 index 00000000..7c7e6c38 --- /dev/null +++ b/Pods/BuildHeaders/AFNetworking/UIImageView+AFNetworking.h @@ -0,0 +1 @@ +../../AFNetworking/AFNetworking/UIImageView+AFNetworking.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/CoreData.h b/Pods/BuildHeaders/RestKit/RestKit/CoreData.h new file mode 120000 index 00000000..938f8874 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/CoreData.h @@ -0,0 +1 @@ +../../../RestKit/Code/CoreData.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/CoreData/NSEntityDescription+RKAdditions.h b/Pods/BuildHeaders/RestKit/RestKit/CoreData/NSEntityDescription+RKAdditions.h new file mode 120000 index 00000000..7c67378e --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/CoreData/NSEntityDescription+RKAdditions.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/NSEntityDescription+RKAdditions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/CoreData/NSManagedObject+RKAdditions.h b/Pods/BuildHeaders/RestKit/RestKit/CoreData/NSManagedObject+RKAdditions.h new file mode 120000 index 00000000..bd245ecd --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/CoreData/NSManagedObject+RKAdditions.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/NSManagedObject+RKAdditions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/CoreData/NSManagedObjectContext+RKAdditions.h b/Pods/BuildHeaders/RestKit/RestKit/CoreData/NSManagedObjectContext+RKAdditions.h new file mode 120000 index 00000000..5129d8f1 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/CoreData/NSManagedObjectContext+RKAdditions.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/NSManagedObjectContext+RKAdditions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKEntityByAttributeCache.h b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKEntityByAttributeCache.h new file mode 120000 index 00000000..aabbe426 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKEntityByAttributeCache.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKEntityByAttributeCache.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKEntityCache.h b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKEntityCache.h new file mode 120000 index 00000000..5e6d65dc --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKEntityCache.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKEntityCache.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKEntityMapping.h b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKEntityMapping.h new file mode 120000 index 00000000..bf7a7646 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKEntityMapping.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKEntityMapping.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKFetchRequestManagedObjectCache.h b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKFetchRequestManagedObjectCache.h new file mode 120000 index 00000000..b71783dc --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKFetchRequestManagedObjectCache.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKFetchRequestManagedObjectCache.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKInMemoryManagedObjectCache.h b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKInMemoryManagedObjectCache.h new file mode 120000 index 00000000..e133edd1 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKInMemoryManagedObjectCache.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKInMemoryManagedObjectCache.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKManagedObjectCaching.h b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKManagedObjectCaching.h new file mode 120000 index 00000000..4850ebe2 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKManagedObjectCaching.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKManagedObjectCaching.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKManagedObjectImporter.h b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKManagedObjectImporter.h new file mode 120000 index 00000000..895a95b3 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKManagedObjectImporter.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKManagedObjectImporter.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKManagedObjectMappingOperationDataSource.h b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKManagedObjectMappingOperationDataSource.h new file mode 120000 index 00000000..63c21c8e --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKManagedObjectMappingOperationDataSource.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKManagedObjectMappingOperationDataSource.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKManagedObjectStore.h b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKManagedObjectStore.h new file mode 120000 index 00000000..c2abf477 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKManagedObjectStore.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKManagedObjectStore.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKManagedObjectThreadSafeInvocation.h b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKManagedObjectThreadSafeInvocation.h new file mode 120000 index 00000000..7bb19966 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKManagedObjectThreadSafeInvocation.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKManagedObjectThreadSafeInvocation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKPropertyInspector+CoreData.h b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKPropertyInspector+CoreData.h new file mode 120000 index 00000000..9c57f2d2 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKPropertyInspector+CoreData.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKPropertyInspector+CoreData.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKRelationshipConnectionOperation.h b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKRelationshipConnectionOperation.h new file mode 120000 index 00000000..80e3ca79 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/CoreData/RKRelationshipConnectionOperation.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKRelationshipConnectionOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/LCLNSLog_RK.h b/Pods/BuildHeaders/RestKit/RestKit/LCLNSLog_RK.h new file mode 120000 index 00000000..1c211adb --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/LCLNSLog_RK.h @@ -0,0 +1 @@ +../../../RestKit/Vendor/LibComponentLogging/NSLog/LCLNSLog_RK.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Network.h b/Pods/BuildHeaders/RestKit/RestKit/Network.h new file mode 120000 index 00000000..5210a78f --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Network.h @@ -0,0 +1 @@ +../../../RestKit/Code/Network.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Network/RKHTTPRequestOperation.h b/Pods/BuildHeaders/RestKit/RestKit/Network/RKHTTPRequestOperation.h new file mode 120000 index 00000000..2b63c3c4 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Network/RKHTTPRequestOperation.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKHTTPRequestOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Network/RKManagedObjectRequestOperation.h b/Pods/BuildHeaders/RestKit/RestKit/Network/RKManagedObjectRequestOperation.h new file mode 120000 index 00000000..c5f56776 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Network/RKManagedObjectRequestOperation.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKManagedObjectRequestOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Network/RKObjectManager.h b/Pods/BuildHeaders/RestKit/RestKit/Network/RKObjectManager.h new file mode 120000 index 00000000..f67267ff --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Network/RKObjectManager.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKObjectManager.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Network/RKObjectPaginator.h b/Pods/BuildHeaders/RestKit/RestKit/Network/RKObjectPaginator.h new file mode 120000 index 00000000..a7c82e2e --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Network/RKObjectPaginator.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKObjectPaginator.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Network/RKObjectParameterization.h b/Pods/BuildHeaders/RestKit/RestKit/Network/RKObjectParameterization.h new file mode 120000 index 00000000..73e232c7 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Network/RKObjectParameterization.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKObjectParameterization.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Network/RKObjectRequestOperation.h b/Pods/BuildHeaders/RestKit/RestKit/Network/RKObjectRequestOperation.h new file mode 120000 index 00000000..e4dbe06a --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Network/RKObjectRequestOperation.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKObjectRequestOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Network/RKRequestDescriptor.h b/Pods/BuildHeaders/RestKit/RestKit/Network/RKRequestDescriptor.h new file mode 120000 index 00000000..7f8e8b3b --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Network/RKRequestDescriptor.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKRequestDescriptor.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Network/RKRequestOperationSubclass.h b/Pods/BuildHeaders/RestKit/RestKit/Network/RKRequestOperationSubclass.h new file mode 120000 index 00000000..6a68b63c --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Network/RKRequestOperationSubclass.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKRequestOperationSubclass.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Network/RKResponseDescriptor.h b/Pods/BuildHeaders/RestKit/RestKit/Network/RKResponseDescriptor.h new file mode 120000 index 00000000..4981d9a3 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Network/RKResponseDescriptor.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKResponseDescriptor.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Network/RKResponseMapperOperation.h b/Pods/BuildHeaders/RestKit/RestKit/Network/RKResponseMapperOperation.h new file mode 120000 index 00000000..a2e15860 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Network/RKResponseMapperOperation.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKResponseMapperOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Network/RKRoute.h b/Pods/BuildHeaders/RestKit/RestKit/Network/RKRoute.h new file mode 120000 index 00000000..39eb2cba --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Network/RKRoute.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKRoute.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Network/RKRouteSet.h b/Pods/BuildHeaders/RestKit/RestKit/Network/RKRouteSet.h new file mode 120000 index 00000000..a702bdc1 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Network/RKRouteSet.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKRouteSet.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Network/RKRouter.h b/Pods/BuildHeaders/RestKit/RestKit/Network/RKRouter.h new file mode 120000 index 00000000..7187f17f --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Network/RKRouter.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKRouter.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping.h b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping.h new file mode 120000 index 00000000..9ca1b531 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping.h @@ -0,0 +1 @@ +../../../RestKit/Code/ObjectMapping.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKAttributeMapping.h b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKAttributeMapping.h new file mode 120000 index 00000000..b196d357 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKAttributeMapping.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKAttributeMapping.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKConnectionMapping.h b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKConnectionMapping.h new file mode 120000 index 00000000..62ef74d8 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKConnectionMapping.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKConnectionMapping.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKDynamicMapping.h b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKDynamicMapping.h new file mode 120000 index 00000000..67a1cafb --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKDynamicMapping.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKDynamicMapping.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKDynamicMappingMatcher.h b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKDynamicMappingMatcher.h new file mode 120000 index 00000000..ec2323bc --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKDynamicMappingMatcher.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKDynamicMappingMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKErrorMessage.h b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKErrorMessage.h new file mode 120000 index 00000000..6d6996d2 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKErrorMessage.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKErrorMessage.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKHTTPUtilities.h b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKHTTPUtilities.h new file mode 120000 index 00000000..318d5c22 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKHTTPUtilities.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKHTTPUtilities.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKMapperOperation.h b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKMapperOperation.h new file mode 120000 index 00000000..59e87e27 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKMapperOperation.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKMapperOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKMapperOperation_Private.h b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKMapperOperation_Private.h new file mode 120000 index 00000000..bd329762 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKMapperOperation_Private.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKMapperOperation_Private.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKMapping.h b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKMapping.h new file mode 120000 index 00000000..6aaec37f --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKMapping.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKMapping.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKMappingErrors.h b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKMappingErrors.h new file mode 120000 index 00000000..68e39259 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKMappingErrors.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKMappingErrors.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKMappingOperation.h b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKMappingOperation.h new file mode 120000 index 00000000..6b4d1bf4 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKMappingOperation.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKMappingOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKMappingOperationDataSource.h b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKMappingOperationDataSource.h new file mode 120000 index 00000000..d463834d --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKMappingOperationDataSource.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKMappingOperationDataSource.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKMappingResult.h b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKMappingResult.h new file mode 120000 index 00000000..03618d23 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKMappingResult.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKMappingResult.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKObjectMapping.h b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKObjectMapping.h new file mode 120000 index 00000000..d38ebca8 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKObjectMapping.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKObjectMapping.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKObjectMappingOperationDataSource.h b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKObjectMappingOperationDataSource.h new file mode 120000 index 00000000..cdac0494 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKObjectMappingOperationDataSource.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKObjectMappingOperationDataSource.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKObjectUtilities.h b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKObjectUtilities.h new file mode 120000 index 00000000..1ee01f31 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKObjectUtilities.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKObjectUtilities.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKPropertyInspector.h b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKPropertyInspector.h new file mode 120000 index 00000000..a3e2a9db --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKPropertyInspector.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKPropertyInspector.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKPropertyMapping.h b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKPropertyMapping.h new file mode 120000 index 00000000..db4bc5ce --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKPropertyMapping.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKPropertyMapping.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKRelationshipMapping.h b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKRelationshipMapping.h new file mode 120000 index 00000000..32b98479 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/ObjectMapping/RKRelationshipMapping.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKRelationshipMapping.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/RestKit.h b/Pods/BuildHeaders/RestKit/RestKit/RestKit.h new file mode 120000 index 00000000..49e183cd --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/RestKit.h @@ -0,0 +1 @@ +../../../RestKit/Code/RestKit.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Search.h b/Pods/BuildHeaders/RestKit/RestKit/Search.h new file mode 120000 index 00000000..d1fcf90c --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Search.h @@ -0,0 +1 @@ +../../../RestKit/Code/Search.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Support.h b/Pods/BuildHeaders/RestKit/RestKit/Support.h new file mode 120000 index 00000000..06fa6db7 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Support.h @@ -0,0 +1 @@ +../../../RestKit/Code/Support.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Support/RKDictionaryUtilities.h b/Pods/BuildHeaders/RestKit/RestKit/Support/RKDictionaryUtilities.h new file mode 120000 index 00000000..f4e01759 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Support/RKDictionaryUtilities.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKDictionaryUtilities.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Support/RKDotNetDateFormatter.h b/Pods/BuildHeaders/RestKit/RestKit/Support/RKDotNetDateFormatter.h new file mode 120000 index 00000000..44ee0287 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Support/RKDotNetDateFormatter.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKDotNetDateFormatter.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Support/RKErrors.h b/Pods/BuildHeaders/RestKit/RestKit/Support/RKErrors.h new file mode 120000 index 00000000..73192162 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Support/RKErrors.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKErrors.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Support/RKISO8601DateFormatter.h b/Pods/BuildHeaders/RestKit/RestKit/Support/RKISO8601DateFormatter.h new file mode 120000 index 00000000..e92d2882 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Support/RKISO8601DateFormatter.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKISO8601DateFormatter.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Support/RKLog.h b/Pods/BuildHeaders/RestKit/RestKit/Support/RKLog.h new file mode 120000 index 00000000..6a428cb4 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Support/RKLog.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKLog.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Support/RKMIMETypeSerialization.h b/Pods/BuildHeaders/RestKit/RestKit/Support/RKMIMETypeSerialization.h new file mode 120000 index 00000000..b77b8b3d --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Support/RKMIMETypeSerialization.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKMIMETypeSerialization.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Support/RKMIMETypes.h b/Pods/BuildHeaders/RestKit/RestKit/Support/RKMIMETypes.h new file mode 120000 index 00000000..71b36c87 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Support/RKMIMETypes.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKMIMETypes.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Support/RKMacros.h b/Pods/BuildHeaders/RestKit/RestKit/Support/RKMacros.h new file mode 120000 index 00000000..f1d842d5 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Support/RKMacros.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKMacros.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Support/RKNSJSONSerialization.h b/Pods/BuildHeaders/RestKit/RestKit/Support/RKNSJSONSerialization.h new file mode 120000 index 00000000..537580dc --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Support/RKNSJSONSerialization.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKNSJSONSerialization.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Support/RKPathMatcher.h b/Pods/BuildHeaders/RestKit/RestKit/Support/RKPathMatcher.h new file mode 120000 index 00000000..1cdb145a --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Support/RKPathMatcher.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKPathMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Support/RKPathUtilities.h b/Pods/BuildHeaders/RestKit/RestKit/Support/RKPathUtilities.h new file mode 120000 index 00000000..2ef3a20c --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Support/RKPathUtilities.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKPathUtilities.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Support/RKSerialization.h b/Pods/BuildHeaders/RestKit/RestKit/Support/RKSerialization.h new file mode 120000 index 00000000..b66ce920 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Support/RKSerialization.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKSerialization.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Support/RKURLEncodedSerialization.h b/Pods/BuildHeaders/RestKit/RestKit/Support/RKURLEncodedSerialization.h new file mode 120000 index 00000000..ea62327e --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Support/RKURLEncodedSerialization.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKURLEncodedSerialization.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Support/lcl_config_components_RK.h b/Pods/BuildHeaders/RestKit/RestKit/Support/lcl_config_components_RK.h new file mode 120000 index 00000000..7902c5b1 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Support/lcl_config_components_RK.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/lcl_config_components_RK.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Support/lcl_config_extensions_RK.h b/Pods/BuildHeaders/RestKit/RestKit/Support/lcl_config_extensions_RK.h new file mode 120000 index 00000000..eff8ca5b --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Support/lcl_config_extensions_RK.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/lcl_config_extensions_RK.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Support/lcl_config_logger_RK.h b/Pods/BuildHeaders/RestKit/RestKit/Support/lcl_config_logger_RK.h new file mode 120000 index 00000000..39088b84 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Support/lcl_config_logger_RK.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/lcl_config_logger_RK.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/Testing.h b/Pods/BuildHeaders/RestKit/RestKit/Testing.h new file mode 120000 index 00000000..1404cdc1 --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/Testing.h @@ -0,0 +1 @@ +../../../RestKit/Code/Testing.h \ No newline at end of file diff --git a/Pods/BuildHeaders/RestKit/RestKit/lcl_RK.h b/Pods/BuildHeaders/RestKit/RestKit/lcl_RK.h new file mode 120000 index 00000000..dc1aeffe --- /dev/null +++ b/Pods/BuildHeaders/RestKit/RestKit/lcl_RK.h @@ -0,0 +1 @@ +../../../RestKit/Vendor/LibComponentLogging/Core/lcl_RK.h \ No newline at end of file diff --git a/Pods/BuildHeaders/SOCKit/SOCKit.h b/Pods/BuildHeaders/SOCKit/SOCKit.h new file mode 120000 index 00000000..8d9eb282 --- /dev/null +++ b/Pods/BuildHeaders/SOCKit/SOCKit.h @@ -0,0 +1 @@ +../../SOCKit/SOCKit.h \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset-installed.txt b/Pods/Documentation/RestKit/docset-installed.txt new file mode 100644 index 00000000..4fd21158 --- /dev/null +++ b/Pods/Documentation/RestKit/docset-installed.txt @@ -0,0 +1,4 @@ +Documentation set was installed to Xcode! + +Path: /Users/birarda/Library/Developer/Shared/Documentation/DocSets/org.cocoapods.RestKit-0.20.0dev.docset +Time: 2012-10-24 23:34:24 +0000 \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Info.plist b/Pods/Documentation/RestKit/docset/Contents/Info.plist new file mode 100644 index 00000000..c1e3fa75 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Info.plist @@ -0,0 +1,35 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleIdentifier + org.cocoapods.RestKit-0.20.0dev + CFBundleName + RestKit 0.20.0dev Documentation + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + + + DocSetDescription + RestKit is a framework for consuming and modeling RESTful web resources on iOS and OS X. + + DocSetFeedName + RestKit 0.20.0dev Documentation + + DocSetMinimumXcodeVersion + 3.0 + + DashDocSetFamily + appledoc + DocSetPublisherIdentifier + org.cocoapods.documentation + DocSetPublisherName + Blake Watters + NSHumanReadableCopyright + Blake Watters + + diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Categories/AFHTTPClient+.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Categories/AFHTTPClient+.html new file mode 100644 index 00000000..0e8a50b2 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Categories/AFHTTPClient+.html @@ -0,0 +1,265 @@ + + + + + AFHTTPClient() Category Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + +
Declared inRKHTTPRequestOperation.h
+ + + + + + +
+ +

Tasks

+ + + + + + + +
+ + + + + +
+ +

Properties

+ +
+ +

defaultHeaders

+ + + +
@property (readonly, nonatomic) NSDictionary *defaultHeaders
+ + +
+ +
+ + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Categories/NSBundle+RKAdditions.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Categories/NSBundle+RKAdditions.html new file mode 100644 index 00000000..c0817c40 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Categories/NSBundle+RKAdditions.html @@ -0,0 +1,551 @@ + + + + + NSBundle(RKAdditions) Category Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + +
Declared inNSBundle+RKAdditions.h
+ + + + +
+ +

Overview

+

Provides convenience methods for accessing data in resources within an NSBundle.

+
+ + + + + +
+ +

Tasks

+ + + + + + + +
+ + + + + + + + + +
+ +

Instance Methods

+ +
+ +

MIMETypeForResource:withExtension:

+ + + +
+

Returns the MIME Type for the resource identified by the specified name and file extension.

+
+ + + +
- (NSString *)MIMETypeForResource:(NSString *)name withExtension:(NSString *)extension
+ + + +
+

Parameters

+ +
+
name
+

The name of the resource file.

+
+ +
+
extension
+

If extension is an empty string or nil, the extension is assumed not to exist and the file is the first file encountered that exactly matches name.

+
+ +
+ + + +
+

Return Value

+

The MIME Type for the resource file or nil if the file could not be located.

+
+ + + + + +
+

Discussion

+

Returns the MIME Type for the resource identified by the specified name and file extension.

+
+ + + + + + + +
+

Declared In

+ NSBundle+RKAdditions.h
+
+ + +
+ +
+ +

dataWithContentsOfResource:withExtension:

+ + + +
+

Creates and returns a data object by reading every byte from the resource identified by the specified name and file extension.

+
+ + + +
- (NSData *)dataWithContentsOfResource:(NSString *)name withExtension:(NSString *)extension
+ + + +
+

Parameters

+ +
+
name
+

The name of the resource file.

+
+ +
+
extension
+

If extension is an empty string or nil, the extension is assumed not to exist and the file is the first file encountered that exactly matches name.

+
+ +
+ + + +
+

Return Value

+

A data object by reading every byte from the resource file.

+
+ + + + + +
+

Discussion

+

Creates and returns a data object by reading every byte from the resource identified by the specified name and file extension.

+
+ + + + + + + +
+

Declared In

+ NSBundle+RKAdditions.h
+
+ + +
+ +
+ +

parsedObjectWithContentsOfResource:withExtension:

+ + + +
+

Creates and returns an object representation of the data from the resource identified by the specified name and file extension by reading the +data as a string and parsing it using a parser appropriate for the MIME Type of the file.

+
+ + + +
- (id)parsedObjectWithContentsOfResource:(NSString *)name withExtension:(NSString *)extension
+ + + +
+

Parameters

+ +
+
name
+

The name of the resource file.

+
+ +
+
extension
+

If extension is an empty string or nil, the extension is assumed not to exist and the file is the first file encountered that exactly matches name.

+
+ +
+ + + +
+

Return Value

+

A new image object for the specified file, or nil if the method could not initialize the image from the specified file.

+
+ + + + + +
+

Discussion

+

Creates and returns an object representation of the data from the resource identified by the specified name and file extension by reading the +data as a string and parsing it using a parser appropriate for the MIME Type of the file.

+
+ + + + + + + +
+

Declared In

+ NSBundle+RKAdditions.h
+
+ + +
+ +
+ +

stringWithContentsOfResource:withExtension:encoding:

+ + + +
+

Creates and returns a string object by reading data from the resource identified by the specified name and file extension using a given encoding.

+
+ + + +
- (NSString *)stringWithContentsOfResource:(NSString *)name withExtension:(NSString *)extension encoding:(NSStringEncoding)encoding
+ + + +
+

Parameters

+ +
+
name
+

The name of the resource file.

+
+ +
+
extension
+

If extension is an empty string or nil, the extension is assumed not to exist and the file is the first file encountered that exactly matches name.

+
+ +
+
encoding
+

The encoding of the resource file.

+
+ +
+ + + +
+

Return Value

+

A string created by reading data from the resource file using the encoding.

+
+ + + + + +
+

Discussion

+

Creates and returns a string object by reading data from the resource identified by the specified name and file extension using a given encoding.

+
+ + + + + + + +
+

Declared In

+ NSBundle+RKAdditions.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Categories/NSEntityDescription+RKAdditions.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Categories/NSEntityDescription+RKAdditions.html new file mode 100644 index 00000000..e1d577d3 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Categories/NSEntityDescription+RKAdditions.html @@ -0,0 +1,660 @@ + + + + + NSEntityDescription(RKAdditions) Category Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + +
Declared inNSEntityDescription+RKAdditions.h
+ + + + +
+ +

Overview

+

Provides extensions to NSEntityDescription for various common tasks.

+
+ + + + + +
+ +

Tasks

+ + + + + +
    +
  • + +   primaryKeyAttributeName +

    The name of the attribute that acts as the primary key for the receiver.

    +
    + property + +
  • + +   primaryKeyAttribute +

    The attribute description object for the attribute designated as the primary key for the receiver.

    +
    + property + +
  • + +   primaryKeyAttributeClass +

    The class representing the value of the attribute designated as the primary key for the receiver.

    +
    + property + +
  • + + – predicateForPrimaryKeyAttribute +

    Returns a cached predicate specifying that the primary key attribute is equal to the $PRIMARY_KEY_VALUE +substitution variable.

    +
    + + +
  • + + – predicateForPrimaryKeyAttributeWithValue: +

    Returns a predicate specifying that the value of the primary key attribute is equal to a given +value. This predicate is constructed by evaluating the cached predicate returned by the +predicateForPrimaryKeyAttribute with a dictionary of substitution variables specifying that +$PRIMARY_KEY_VALUE is equal to the given value.

    +
    + + +
  • + + – coerceValueForPrimaryKey: +

    Coerces the given value into the class representing the primary key. Currently support NSString +and NSNumber coercsions.

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

primaryKeyAttribute

+ + + +
+

The attribute description object for the attribute designated as the primary key for the receiver.

+
+ + + +
@property (nonatomic, readonly) NSAttributeDescription *primaryKeyAttribute
+ + + + + + + + + +
+

Discussion

+

The attribute description object for the attribute designated as the primary key for the receiver.

+
+ + + + + + + +
+

Declared In

+ NSEntityDescription+RKAdditions.h
+
+ + +
+ +
+ +

primaryKeyAttributeClass

+ + + +
+

The class representing the value of the attribute designated as the primary key for the receiver.

+
+ + + +
@property (nonatomic, readonly) Class primaryKeyAttributeClass
+ + + + + + + + + +
+

Discussion

+

The class representing the value of the attribute designated as the primary key for the receiver.

+
+ + + + + + + +
+

Declared In

+ NSEntityDescription+RKAdditions.h
+
+ + +
+ +
+ +

primaryKeyAttributeName

+ + + +
+

The name of the attribute that acts as the primary key for the receiver.

+
+ + + +
@property (nonatomic, retain) NSString *primaryKeyAttributeName
+ + + + + + + + + +
+

Discussion

+

The name of the attribute that acts as the primary key for the receiver.

+ +

The primary key attribute can be configured in two ways:

+ +
1. From within the Xcode Core Data editing view by
+
+ +

adding the desired attribute’s name as the value for the +key primaryKeyAttribute to the user info dictionary.

+ +
1. Programmatically, by retrieving the NSEntityDescription instance and
+
+ +

setting the property’s value.

+ +

Configuring the primary key attribute programmatically is a convenience interface +for directly manipulating the user info dictionary of the receiver. As such, the entity +must exist within a mutable managed object model. By default, models are returned in +an immutable state and must be sent the mutableCopy message to retrieve an mutable copy. Managed +object models are rendered immutable once used to create a persistent store coordinator, therefore +the developer must configure primary key attributes programmatically before creating a PSC during +Core Data initialization.

+
+ + + + + + + +
+

Declared In

+ NSEntityDescription+RKAdditions.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

coerceValueForPrimaryKey:

+ + + +
+

Coerces the given value into the class representing the primary key. Currently support NSString +and NSNumber coercsions.

+
+ + + +
- (id)coerceValueForPrimaryKey:(id)primaryKeyValue
+ + + +
+

Parameters

+ +
+
primaryKeyValue
+

The value of the primary that is to be coerced.

+
+ +
+ + + + + +
+

Availability

+

0.10.1

+
+ + + +
+

Discussion

+

Coerces the given value into the class representing the primary key. Currently support NSString +and NSNumber coercsions.

Bug: NOTE This API is temporary and will be deprecated and replaced.

+
+ + + + + + + +
+

Declared In

+ NSEntityDescription+RKAdditions.h
+
+ + +
+ +
+ +

predicateForPrimaryKeyAttribute

+ + + +
+

Returns a cached predicate specifying that the primary key attribute is equal to the $PRIMARY_KEY_VALUE +substitution variable.

+
+ + + +
- (NSPredicate *)predicateForPrimaryKeyAttribute
+ + + + + +
+

Return Value

+

A cached predicate specifying the value of the primary key attribute is equal to the $PRIMARY_KEY_VALUE +substitution variable.

+
+ + + + + +
+

Discussion

+

Returns a cached predicate specifying that the primary key attribute is equal to the $PRIMARY_KEY_VALUE +substitution variable.

+ +

This predicate is cached to avoid parsing overhead during object mapping operations +and must be evaluated using [NSPredicate predicateWithSubstitutionVariables:]

+
+ + + + + + + +
+

Declared In

+ NSEntityDescription+RKAdditions.h
+
+ + +
+ +
+ +

predicateForPrimaryKeyAttributeWithValue:

+ + + +
+

Returns a predicate specifying that the value of the primary key attribute is equal to a given +value. This predicate is constructed by evaluating the cached predicate returned by the +predicateForPrimaryKeyAttribute with a dictionary of substitution variables specifying that +$PRIMARY_KEY_VALUE is equal to the given value.

+
+ + + +
- (NSPredicate *)predicateForPrimaryKeyAttributeWithValue:(id)value
+ + + +
+

Parameters

+ +
+
value
+

The primary key value with which to create the predicate.

+
+ +
+ + + +
+

Return Value

+

A predicate speciying that the value of the primary key attribute is equal to a given value.

+
+ + + + + +
+

Discussion

+

Returns a predicate specifying that the value of the primary key attribute is equal to a given +value. This predicate is constructed by evaluating the cached predicate returned by the +predicateForPrimaryKeyAttribute with a dictionary of substitution variables specifying that +$PRIMARY_KEY_VALUE is equal to the given value.

+ +

NOTE: This method considers the type of the receiver’s primary key attribute when constructing +the predicate. It will coerce the given value into either an NSString or an NSNumber as +appropriate. This behavior is a convenience to avoid annoying issues related to Core Data’s +handling of predicates for NSString and NSNumber types that were not appropriately casted.

+
+ + + + + + + +
+

Declared In

+ NSEntityDescription+RKAdditions.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Categories/NSManagedObject+RKAdditions.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Categories/NSManagedObject+RKAdditions.html new file mode 100644 index 00000000..6878dda6 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Categories/NSManagedObject+RKAdditions.html @@ -0,0 +1,372 @@ + + + + + NSManagedObject(RKAdditions) Category Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + +
Declared inNSManagedObject+RKAdditions.h
+ + + + +
+ +

Overview

+

Provides extensions to NSManagedObject for various common tasks.

+
+ + + + + +
+ +

Tasks

+ + + + +

Inspecting Managed Object State

+
    +
  • + + – hasBeenDeleted +

    Determines if the receiver has been deleted from the persistent store +and removed from the object graph.

    +
    + + +
  • + + – isNew +

    Returns YES when an object has not been saved to the managed object context yet

    +
    + + +
  • +
+ +
+ + + + + + + + + +
+ +

Instance Methods

+ +
+ +

hasBeenDeleted

+ + + +
+

Determines if the receiver has been deleted from the persistent store +and removed from the object graph.

+
+ + + +
- (BOOL)hasBeenDeleted
+ + + + + +
+

Return Value

+

YES if the object has been deleted from the persistent store, else NO.

+
+ + + + + +
+

Discussion

+

Determines if the receiver has been deleted from the persistent store +and removed from the object graph.

+ +

Unlike isDeleted, will return YES after a save event or if the managed object was deleted +in another managed object context that was then merged to the persistent store.

+
+ + + + + + + +
+

Declared In

+ NSManagedObject+RKAdditions.h
+
+ + +
+ +
+ +

isNew

+ + + +
+

Returns YES when an object has not been saved to the managed object context yet

+
+ + + +
- (BOOL)isNew
+ + + + + + + + + +
+

Discussion

+

Returns YES when an object has not been saved to the managed object context yet

+
+ + + + + + + +
+

Declared In

+ NSManagedObject+RKAdditions.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Categories/NSManagedObjectContext+RKAdditions.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Categories/NSManagedObjectContext+RKAdditions.html new file mode 100644 index 00000000..5df060e7 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Categories/NSManagedObjectContext+RKAdditions.html @@ -0,0 +1,655 @@ + + + + + NSManagedObjectContext(RKAdditions) Category Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + +
Declared inNSManagedObjectContext+RKAdditions.h
+ + + + +
+ +

Overview

+

Provides extensions to NSManagedObjectContext for various common tasks.

+
+ + + + + +
+ +

Tasks

+ + + +

Inserting a Managed Object

+ + + + + +

Counting Managed Objects

+ + + + + +

Fetching Managed Objects by Primary Key

+ + + + + +

Saving the Context to the Persistent Store

+ +
    +
  • + + – saveToPersistentStore: +

    Saves the receiver and then traverses up the parent context chain until a parent managed object context with a nil parent is found. If the final ancestor context does not have a reference to the persistent store coordinator, then a warning is generated and the method returns NO.

    +
    + + +
  • +
+ +
+ + + + + + + + + +
+ +

Instance Methods

+ +
+ +

countForEntityForName:predicate:error:

+ + + +
+

Convenience method for performing a count of the number of instances of an entity with the given name.

+
+ + + +
- (NSUInteger)countForEntityForName:(NSString *)entityName predicate:(NSPredicate *)predicate error:(NSError **)error
+ + + +
+

Parameters

+ +
+
entityName
+

The name of an entity.

+
+ +
+
predicate
+

A predicate to limit the search. May be nil.

+
+ +
+
error
+

If there is a problem executing the fetch, upon return contains an instance of NSError that describes the problem.

+
+ +
+ + + +
+

Return Value

+

The number of objects a fetch request for the given entity name with the given predicate would have returned if it had been passed to executeFetchRequest:error:, or NSNotFound if an error occurs.

+
+ + + + + +
+

Discussion

+

Convenience method for performing a count of the number of instances of an entity with the given name.

+ +

This method is functionally equivalent to the following code example.

+ +
NSError *error;
+NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:entityName];
+fetchRequest.predicate = predicate;
+NSUInteger count = [managedObjectContext countForFetchRequest:fetchRequest error:&error];
+
+
+ + + + + + + +
+

Declared In

+ NSManagedObjectContext+RKAdditions.h
+
+ + +
+ +
+ +

fetchObjectForEntity:withValueForPrimaryKeyAttribute:

+ + + +
+

Fetches a single managed object for the given entity with the given value for the primary key attribute in the receiver.

+
+ + + +
- (id)fetchObjectForEntity:(NSEntityDescription *)entity withValueForPrimaryKeyAttribute:(id)primaryKeyValue
+ + + +
+

Parameters

+ +
+
entity
+

The entity of the managed object to be retrieved by primary key.

+
+ +
+
primaryKeyValue
+

The value for the entity’s primary key attribute.

+
+ +
+ + + +
+

Return Value

+

The managed object with the primary key attribute equal to the given value or nil if none was found.

+
+ + + + + +
+

Discussion

+

Fetches a single managed object for the given entity with the given value for the primary key attribute in the receiver.

+
+ + + + + + + +
+

Declared In

+ NSManagedObjectContext+RKAdditions.h
+
+ + +
+ +
+ +

fetchObjectForEntityForName:withValueForPrimaryKeyAttribute:

+ + + +
+

Fetches a single managed object for the entity for the given name with the given value for the primary key attribute in the receiver.

+
+ + + +
- (id)fetchObjectForEntityForName:(NSString *)entityName withValueForPrimaryKeyAttribute:(id)primaryKeyValue
+ + + +
+

Parameters

+ +
+
entityName
+

The name of the entity of the managed object to be retrieved by primary key.

+
+ +
+
primaryKeyValue
+

The value for the receiving entity’s primary key attribute.

+
+ +
+ + + +
+

Return Value

+

The managed object with the primary key attribute equal to the given value or nil if none was found.

+
+ + + + + +
+

Discussion

+

Fetches a single managed object for the entity for the given name with the given value for the primary key attribute in the receiver.

+
+ + + + + + + +
+

Declared In

+ NSManagedObjectContext+RKAdditions.h
+
+ + +
+ +
+ +

insertNewObjectForEntityForName:

+ + + +
+

Inserts a new managed object for the entity for the given name.

+
+ + + +
- (id)insertNewObjectForEntityForName:(NSString *)entityName
+ + + +
+

Parameters

+ +
+
entityName
+

The name of an entity.

+
+ +
+ + + +
+

Return Value

+

A new, autoreleased, fully configured instance of the class for the entity named entityName. The instance has its entity description set and is inserted into the receiver.

+
+ + + + + +
+

Discussion

+

Inserts a new managed object for the entity for the given name.

+ +

This method is functionally equivalent to the follow code example.

+ +
[NSEntityDescription insertNewObjectForEntityForName:entityName inManagedObjectContext:self];
+
+
+ + + + + + + +
+

Declared In

+ NSManagedObjectContext+RKAdditions.h
+
+ + +
+ +
+ +

saveToPersistentStore:

+ + + +
+

Saves the receiver and then traverses up the parent context chain until a parent managed object context with a nil parent is found. If the final ancestor context does not have a reference to the persistent store coordinator, then a warning is generated and the method returns NO.

+
+ + + +
- (BOOL)saveToPersistentStore:(NSError **)error
+ + + +
+

Parameters

+ +
+
error
+

If there is a problem saving the receiver or any of its ancestor contexts, upon return contains an pointer to an instance of NSError that describes the problem.

+
+ +
+ + + +
+

Return Value

+

YES if the save to the persistent store was successful, else NO.

+
+ + + + + +
+

Discussion

+

Saves the receiver and then traverses up the parent context chain until a parent managed object context with a nil parent is found. If the final ancestor context does not have a reference to the persistent store coordinator, then a warning is generated and the method returns NO.

+
+ + + + + + + +
+

Declared In

+ NSManagedObjectContext+RKAdditions.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKAttributeMapping.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKAttributeMapping.html new file mode 100644 index 00000000..a42d0ac2 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKAttributeMapping.html @@ -0,0 +1,355 @@ + + + + + RKAttributeMapping Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromRKPropertyMapping : NSObject
Declared inRKAttributeMapping.h
+ + + + +
+ +

Overview

+

Instances of RKAttributeMapping define a transformation of data between an attribute value on source object and an attribute value on a destination object within an object mapping.

+
+ + + + + +
+ +

Tasks

+ + + + + +
    +
  • + + + attributeMappingFromKeyPath:toKeyPath: +

    Creates and returns a new attribute mapping specifying that data is to be read from a given key path on a source object +and set to a given key path on a destination object.

    +
    + + +
  • +
+ +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

attributeMappingFromKeyPath:toKeyPath:

+ + + +
+

Creates and returns a new attribute mapping specifying that data is to be read from a given key path on a source object +and set to a given key path on a destination object.

+
+ + + +
+ (RKAttributeMapping *)attributeMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath
+ + + +
+

Parameters

+ +
+
sourceKeyPath
+

The key path on the source object from which to read the data being mapped.

+
+ +
+
destinationKeyPath
+

The key path on the destination object on which to set the mapped data.

+
+ +
+ + + +
+

Return Value

+

A newly created attribute mapping object that is ready to be added to an object mapping.

+
+ + + + + +
+

Discussion

+

Creates and returns a new attribute mapping specifying that data is to be read from a given key path on a source object +and set to a given key path on a destination object.

+ +

Attribute mappings define transformation between key paths in the source and destination object beings mapped. In the simplest +case, an attribute mapping may simply specify that data from one object is to be copied to another. A common example of this +type of transformation is copying the name key from a JSON payload onto a local object. In this case, the source and +destination key paths are identical, as are the source and destination types (NSString), so a simple get and set operation +has been defined.

+ +

The next most common use-case is the transformation of identical data between two different key paths in the +source and destination objects. This is typically encountered when you wish to transform inbound data to conform with the naming +conventions of the platform or the data model of your application. An example of this type of transformation would be from the +source key path of first_name to the destination key path of firstName. In this transformation, the key paths have diverged +but both sides of the mapping correspond to NSString properties.

+ +

The final type of transformation to be specified via an attribute mapping involves the transformation between types in the mapping. +By far, the most common example of this use-case is the transformation of a inbound string or numeric property into a date on +the target object. For example, consider a backend system that returns the creation date of a piece of content in a JSON payload. +This data might be returned in JSON as {"created_on": "2012-08-27"}. In a given application, the developer may wish to model this +data as an NSDate createdOn property on the target object. An attribute mapping to support this mapping would specify a source +key path of created_on and a destination key path of createdOn. On the destination object, the createdOn property would be defined +as @property (nonatomic, strong) NSDate *createdOn;. At mapping time, the mapping operation inspects the type of the content being +mapped and attempts to transform the source content into the type of the desination property specified by the mapping. In this case, +an NSDateFormatter object would be used to process the inbound NSString into an outbound NSDate object.

+
+ + + + + + + +
+

Declared In

+ RKAttributeMapping.h
+
+ + +
+ +
+ + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKConnectionMapping.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKConnectionMapping.html new file mode 100644 index 00000000..cc4479bf --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKConnectionMapping.html @@ -0,0 +1,425 @@ + + + + + RKConnectionMapping Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromRKPropertyMapping : NSObject
Declared inRKConnectionMapping.h
+ + + + +
+ +

Overview

+

Conditionally connect a relationship of the object being mapped when the object being mapped has +block evaluate to YES. This variant is useful in cases where you want to execute an arbitrary +block to determine whether or not to connect a relationship.

+ +

For example, given a Project object associated with a User, where the ‘admin’ relationship is +specified by a adminID property on the managed object:

+ +

[mapping connectRelationship:@“admin” fromKeyPath:@“adminId” toKeyPath:@“adminID” withMapping:userMapping usingEvaluationBlock:^(id data) { +return [User isAuthenticated]; +}];

+ +

Will hydrate the ‘admin’ association on the managed object with the object +in the local object graph having the primary key specified in the managed object’s +userID property. Note that this connection will only occur when the provided block evalutes to YES. +In cases where no match occurs, the relationship connection is skipped.

+
+ + + + + +
+ +

Tasks

+ + + + + + + +
+ + + + + +
+ +

Properties

+ +
+ +

matcher

+ + + +
@property (nonatomic, strong, readonly) RKDynamicMappingMatcher *matcher
+ + +
+ +
+ +

relationship

+ + + +
@property (nonatomic, strong, readonly) NSRelationshipDescription *relationship
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

initWithRelationship:sourceKeyPath:destinationKeyPath:matcher:

+ + + +
+

**

+
+ + + +
- (id)initWithRelationship:(NSRelationshipDescription *)relationship sourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath matcher:(RKDynamicMappingMatcher *)matcher
+ + + + + + + + + +
+

Discussion

+

**

+
+ + + + + + + +
+

Declared In

+ RKConnectionMapping.h
+
+ + +
+ +
+ +

isForeignKeyConnection

+ + + +
- (BOOL)isForeignKeyConnection
+ + +
+ +
+ +

isKeyPathConnection

+ + + +
- (BOOL)isKeyPathConnection
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKDotNetDateFormatter.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKDotNetDateFormatter.html new file mode 100644 index 00000000..61d95a03 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKDotNetDateFormatter.html @@ -0,0 +1,488 @@ + + + + + RKDotNetDateFormatter Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSDateFormatter
Declared inRKDotNetDateFormatter.h
+ + + + +
+ +

Overview

+

A subclass of NSDateFormatter that serves as translator between ASP.NET date serializations in JSON strings and NSDate objects. This is useful for properly mapping these dates from an ASP.NET driven backend.

Warning: DO NOT attempt to use setDateFormat: on this class. It will return invalid results.

+
+ + + + + +
+ +

Tasks

+ + + + + +
    +
  • + + + dotNetDateFormatterWithTimeZone: +

    Instantiates an autoreleased RKDotNetDateFormatter object with the timezone set to the given value. The default time zone is UTC.

    +
    + + +
  • + + – dateFromString: +

    Returns an NSDate object from an ASP.NET style date string respresentation, as seen in JSON.

    +
    + + +
  • + + – stringFromDate: +

    Returns an ASP.NET style date string from an NSDate, such as /Date(1112715000000+0000)/ Where 1112715000000 is the number of milliseconds since January 1, 1970 00:00 GMT/UTC, and +0000 is the timezone offset from GMT in 24-hour time.

    +
    + + +
  • +
+ +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

dotNetDateFormatterWithTimeZone:

+ + + +
+

Instantiates an autoreleased RKDotNetDateFormatter object with the timezone set to the given value. The default time zone is UTC.

+
+ + + +
+ (RKDotNetDateFormatter *)dotNetDateFormatterWithTimeZone:(NSTimeZone *)timeZone
+ + + +
+

Parameters

+ +
+
timeZone
+

An NSTimeZone object. A nil value sets the timezone to the default value of UTC.

+
+ +
+ + + +
+

Return Value

+

An autoreleased RKDotNetDateFormatter object

+
+ + + + + +
+

Discussion

+

Instantiates an autoreleased RKDotNetDateFormatter object with the timezone set to the given value. The default time zone is UTC.

+ +

The supplied timeZone, such as one produced with [NSTimeZone timeZoneWithName:@"UTC"], +is only used during calls to stringFromDate:, for a detailed explanation seedateFromString:`

+
+ + + + + + + +
+

Declared In

+ RKDotNetDateFormatter.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

dateFromString:

+ + + +
+

Returns an NSDate object from an ASP.NET style date string respresentation, as seen in JSON.

+
+ + + +
- (NSDate *)dateFromString:(NSString *)string
+ + + +
+

Parameters

+ +
+
string
+

The ASP.NET style string, /Date(1112715000000-0500)/

+
+ +
+ + + +
+

Return Value

+

An NSDate object.

+
+ + + + + +
+

Discussion

+

Returns an NSDate object from an ASP.NET style date string respresentation, as seen in JSON.

+ +

Acceptable examples are:

+ +
/Date(1112715000000-0500)/
+/Date(1112715000000)/
+/Date(-1112715000000)/
+
+ +

Where 1112715000000 is the number of milliseconds since January 1, 1970 00:00 GMT/UTC, and -0500 represents the timezone offset from GMT in 24-hour time. Negatives milliseconds are treated as dates before January 1, 1970.

+ +

NOTE NSDate objects do not have timezones, and you should never change an actual date value based on a timezone offset. However, timezones are important when presenting dates to the user. Therefore, If an offset is present in the ASP.NET string (it should be), we actually ignore the offset portion because we want to store the actual date value in its raw form, without any pollution of timezone information. If, on the other hand, there is no offset in the ASP.NET string, we assume GMT (+0000) anyway. In summation, for this class setTimeZone: is ignored except when using stringFromDate:

+
+ + + + + + + +
+

Declared In

+ RKDotNetDateFormatter.h
+
+ + +
+ +
+ +

stringFromDate:

+ + + +
+

Returns an ASP.NET style date string from an NSDate, such as /Date(1112715000000+0000)/ Where 1112715000000 is the number of milliseconds since January 1, 1970 00:00 GMT/UTC, and +0000 is the timezone offset from GMT in 24-hour time.

+
+ + + +
- (NSString *)stringFromDate:(NSDate *)date
+ + + +
+

Parameters

+ +
+
date
+

An NSDate object from which to return a string value.

+
+ +
+ + + +
+

Return Value

+

The ASP.NET style string, /Date(1112715000000-0500)/

+
+ + + + + +
+

Discussion

+

Returns an ASP.NET style date string from an NSDate, such as /Date(1112715000000+0000)/ Where 1112715000000 is the number of milliseconds since January 1, 1970 00:00 GMT/UTC, and +0000 is the timezone offset from GMT in 24-hour time.

+ +

NOTE GMT (+0000) is assumed otherwise specified via setTimeZone:

+
+ + + + + + + +
+

Declared In

+ RKDotNetDateFormatter.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKDynamicMapping.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKDynamicMapping.html new file mode 100644 index 00000000..d520b403 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKDynamicMapping.html @@ -0,0 +1,548 @@ + + + + + RKDynamicMapping Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromRKMapping : NSObject
Declared inRKDynamicMapping.h
+ + + + +
+ +

Overview

+

Defines a dynamic object mapping that determines the appropriate concrete object mapping to apply at mapping time. This allows you to map very similar payloads differently depending on the type of data contained therein.

+
+ + + + + +
+ +

Tasks

+ + + +

Configuring Mapping Selection

+ + + + + +

Retrieving the Object Mapping for an Object Representation

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

objectMappings

+ + + +
+

Returns an array of object mappings that have been registered with the receiver.

+
+ + + +
@property (nonatomic, readonly) NSArray *objectMappings
+ + + + + +
+

Return Value

+

An array of RKObjectMapping objects registered with the receiver.

+
+ + + + + +
+

Discussion

+

Returns an array of object mappings that have been registered with the receiver.

+
+ + + + + + + +
+

Declared In

+ RKDynamicMapping.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

objectMappingForRepresentation:

+ + + +
+

Invoked by the RKMapperOperation and RKMappingOperation to determine the appropriate RKObjectMapping to use when mapping the given object representation.

+
+ + + +
- (RKObjectMapping *)objectMappingForRepresentation:(id)representation
+ + + +
+

Parameters

+ +
+
representation
+

The object representation that being mapped dynamically for which to determine the appropriate concrete mapping.

+
+ +
+ + + +
+

Return Value

+

The object mapping to be used to map the given object representation.

+
+ + + + + +
+

Discussion

+

Invoked by the RKMapperOperation and RKMappingOperation to determine the appropriate RKObjectMapping to use when mapping the given object representation.

+
+ + + + + + + +
+

Declared In

+ RKDynamicMapping.h
+
+ + +
+ +
+ +

setObjectMapping:whenValueOfKeyPath:isEqualTo:

+ + + +
+

Defines a dynamic mapping rule stating that when the value of the key property matches the specified value, the given mapping should be used to map the representation.

+
+ + + +
- (void)setObjectMapping:(RKObjectMapping *)objectMapping whenValueOfKeyPath:(NSString *)keyPath isEqualTo:(id)value
+ + + +
+

Parameters

+ +
+
objectMapping
+

The mapping to be used when the value at the given key path is equal to the given value.

+
+ +
+
keyPath
+

The key path to retrieve the comparison value from in the object representation being mapped.

+
+ +
+
value
+

The value to be compared with the value at keyPath. If they are equal, the objectMapping will be used to map the representation.

+
+ +
+ + + + + + + +
+

Discussion

+

Defines a dynamic mapping rule stating that when the value of the key property matches the specified value, the given mapping should be used to map the representation.

+ +

For example, suppose that we have a JSON fragment for a person that we want to map differently based on the gender of the person. When the gender is ‘male’, we want to use the Boy class and when then the gender is ‘female’ we want to use the Girl class. We might define our dynamic mapping like so:

+ +
RKDynamicMapping *mapping = [RKDynamicMapping new];
+[mapping setObjectMapping:boyMapping whenValueOfKeyPath:@"gender" isEqualTo:@"male"];
+[mapping setObjectMapping:boyMapping whenValueOfKeyPath:@"gender" isEqualTo:@"female"];
+
+
+ + + + + + + +
+

Declared In

+ RKDynamicMapping.h
+
+ + +
+ +
+ +

setObjectMappingForRepresentationBlock:

+ + + +
+

Sets a block to be invoked to determine the appropriate concrete object mapping with which to map an object representation.

+
+ + + +
- (void)setObjectMappingForRepresentationBlock:(RKDynamicMappingDelegateBlock)block
+ + + +
+

Parameters

+ +
+
block
+

The block object to invoke to select the object mapping with which to map the given object representation.

+
+ +
+ + + + + + + +
+

Discussion

+

Sets a block to be invoked to determine the appropriate concrete object mapping with which to map an object representation.

+
+ + + + + + + +
+

Declared In

+ RKDynamicMapping.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKDynamicMappingMatcher.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKDynamicMappingMatcher.html new file mode 100644 index 00000000..3c890e94 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKDynamicMappingMatcher.html @@ -0,0 +1,585 @@ + + + + + RKDynamicMappingMatcher Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKDynamicMappingMatcher.h
+ + + + +
+ +

Overview

+

The RKDynamicMappingMatcher class provides an interface for encapsulating the selection of an object mapping based on the runtime value of a property at a given key path. A matcher object is initialized with a key path, an expected value to be read from the key path, and an object mapping that is to be applied if the match evaluates to YES. When evaluating the match, the matcher invokes valueForKeyPath: on the object being matched and compares the value returned with the expectedValue via the RKObjectIsEqualToObject function.

+
+ + + + + +
+ +

Tasks

+ + + +

Initializing a Matcher

+ + + + + +

Evaluating a Match

+ +
    +
  • + + – matches: +

    Returns a Boolean value that indicates if the given object matches the expectations of the receiver.

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

expectedValue

+ + + +
+

The value that is expected to be read from keyPath if there is a match.

+
+ + + +
@property (nonatomic, strong, readonly) id expectedValue
+ + + + + + + + + +
+

Discussion

+

The value that is expected to be read from keyPath if there is a match.

+
+ + + + + + + +
+

Declared In

+ RKDynamicMappingMatcher.h
+
+ + +
+ +
+ +

keyPath

+ + + +
+

The key path to obtain the comparison value from the object being matched via valueForKeyPath:.

+
+ + + +
@property (nonatomic, copy, readonly) NSString *keyPath
+ + + + + + + + + +
+

Discussion

+

The key path to obtain the comparison value from the object being matched via valueForKeyPath:.

+
+ + + + + + + +
+

Declared In

+ RKDynamicMappingMatcher.h
+
+ + +
+ +
+ +

objectMapping

+ + + +
+

The object mapping object that applies if the comparison value read from keyPath is equal to the expectedValue.

+
+ + + +
@property (nonatomic, strong, readonly) RKObjectMapping *objectMapping
+ + + + + + + + + +
+

Discussion

+

The object mapping object that applies if the comparison value read from keyPath is equal to the expectedValue.

+
+ + + + + + + +
+

Declared In

+ RKDynamicMappingMatcher.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

initWithKeyPath:expectedValue:objectMapping:

+ + + +
+

Initializes the receiver with a given key path, expected value, and an object mapping that applies in the event of a positive match.

+
+ + + +
- (id)initWithKeyPath:(NSString *)keyPath expectedValue:(id)expectedValue objectMapping:(RKObjectMapping *)objectMapping
+ + + +
+

Parameters

+ +
+
keyPath
+

The key path to obtain the comparison value from the object being matched via valueForKeyPath:.

+
+ +
+
expectedValue
+

The value that is expected to be read from keyPath if there is a match.

+
+ +
+
objectMapping
+

The object mapping object that applies if the comparison value is equal to the expected value.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given key path, expected value, and object mapping.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a given key path, expected value, and an object mapping that applies in the event of a positive match.

+
+ + + + + + + +
+

Declared In

+ RKDynamicMappingMatcher.h
+
+ + +
+ +
+ +

matches:

+ + + +
+

Returns a Boolean value that indicates if the given object matches the expectations of the receiver.

+
+ + + +
- (BOOL)matches:(id)object
+ + + +
+

Parameters

+ +
+
object
+

The object to be evaluated.

+
+ +
+ + + +
+

Return Value

+

YES if the object matches the expectations of the receiver, else NO.

+
+ + + + + +
+

Discussion

+

Returns a Boolean value that indicates if the given object matches the expectations of the receiver.

+ +

The match is evaluated by invoking valueForKeyPath: on the give object with the value of the keyPath property and comparing the returned value with the expectedValue using the RKObjectIsEqualToObject function.

+
+ + + + + + + +
+

Declared In

+ RKDynamicMappingMatcher.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKEntityByAttributeCache.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKEntityByAttributeCache.html new file mode 100644 index 00000000..7a0034e7 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKEntityByAttributeCache.html @@ -0,0 +1,1373 @@ + + + + + RKEntityByAttributeCache Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKEntityByAttributeCache.h
+ + + + +
+ +

Overview

+

The RKEntityByAttributeCache class provides an in-memory caching mechanism for managed objects instances of an entity in a managed object context with the value of one of the object’s attributes acting as the cache key. When loaded, the cache will retrieve all instances of an entity from the store and build a dictionary mapping values for the given cache key attribute to the managed object ID for all objects matching the value. The cache can then be used to quickly retrieve objects by attribute value for the cache key without executing another fetch request against the managed object context. This can provide a large performance improvement when a large number of objects are being retrieved using a particular attribute as the key.

+ +

RKEntityByAttributeCache instances are used by the RKEntityCache to provide caching for multiple entities at once.

Bug: Please note that the RKEntityByAttribute cache is implemented using a NSFetchRequest with a result type of NSDictionaryResultType. This means that the cache cannot load pending object instances via a fetch from the load method. Pending objects must be manually added to the cache via addObject: if it is desirable for the pending objects to be retrieved by subsequent invocations of objectWithAttributeValue:inContext: and objectsWithAttributeValue:inContext: prior to a save.

+ +

This is a limitation imposed by Core Data. The dictionary result type implementation is leveraged instead a normal fetch request because it offers very large performance and memory utilization improvements by avoiding construction of managed object instances and faulting.

+
+ + + + + +
+ +

Tasks

+ + + +

Creating a Cache

+ + + + + +

Getting Cache Identity

+ +
    +
  • + +   entity +

    The Core Data entity description for the managed objects being cached.

    +
    + property + +
  • + +   attribute +

    An attribute that is part of the cached entity that acts as the cache key.

    +
    + property + +
  • + +   managedObjectContext +

    The managed object context the receiver fetches cached objects from.

    +
    + property + +
  • + +   monitorsContextForChanges +

    A Boolean value determining if the receiever monitors the managed object context +for changes and updates the cache entries using the notifications emitted.

    +
    + property + +
  • +
+ + + +

Loading and Flushing the Cache

+ +
    +
  • + + – load +

    Loads the cache by finding all instances of the configured entity and building +an association between the value of the cached attribute’s value and the +managed object ID for the object.

    +
    + + +
  • + + – flush +

    Flushes the cache by releasing all cache attribute value to managed object ID +associations.

    +
    + + +
  • +
+ + + +

Inspecting Cache State

+ + + + + +

Managing Cached Objects

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

attribute

+ + + +
+

An attribute that is part of the cached entity that acts as the cache key.

+
+ + + +
@property (nonatomic, readonly) NSString *attribute
+ + + + + + + + + +
+

Discussion

+

An attribute that is part of the cached entity that acts as the cache key.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

entity

+ + + +
+

The Core Data entity description for the managed objects being cached.

+
+ + + +
@property (nonatomic, readonly) NSEntityDescription *entity
+ + + + + + + + + +
+

Discussion

+

The Core Data entity description for the managed objects being cached.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

managedObjectContext

+ + + +
+

The managed object context the receiver fetches cached objects from.

+
+ + + +
@property (nonatomic, readonly) NSManagedObjectContext *managedObjectContext
+ + + + + + + + + +
+

Discussion

+

The managed object context the receiver fetches cached objects from.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

monitorsContextForChanges

+ + + +
+

A Boolean value determining if the receiever monitors the managed object context +for changes and updates the cache entries using the notifications emitted.

+
+ + + +
@property (nonatomic, assign) BOOL monitorsContextForChanges
+ + + + + + + + + +
+

Discussion

+

A Boolean value determining if the receiever monitors the managed object context +for changes and updates the cache entries using the notifications emitted.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

addObject:

+ + + +
+

Adds a managed object to the cache.

+
+ + + +
- (void)addObject:(NSManagedObject *)object
+ + + +
+

Parameters

+ +
+
object
+

The managed object to add to the cache.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds a managed object to the cache.

+ +

The object must be an instance of the cached entity.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

containsObject:

+ + + +
+

Returns a Boolean value that indicates whether a given object is present +in the cache.

+
+ + + +
- (BOOL)containsObject:(NSManagedObject *)object
+ + + +
+

Parameters

+ +
+
object
+

An object.

+
+ +
+ + + +
+

Return Value

+

YES if object is present in the cache, otherwise NO.

+
+ + + + + +
+

Discussion

+

Returns a Boolean value that indicates whether a given object is present +in the cache.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

containsObjectWithAttributeValue:

+ + + +
+

Returns a Boolean value that indicates whether one of more objects is present +in the cache with a given value of the cache key attribute.

+
+ + + +
- (BOOL)containsObjectWithAttributeValue:(id)attributeValue
+ + + +
+

Parameters

+ +
+
attributeValue
+

The value with which to check the cache for objects with a matching value.

+
+ +
+ + + +
+

Return Value

+

YES if one or more objects with the given value for the cache key attribute is present in the cache, otherwise NO.

+
+ + + + + +
+

Discussion

+

Returns a Boolean value that indicates whether one of more objects is present +in the cache with a given value of the cache key attribute.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

count

+ + + +
+

Returns a count of the total number of cached objects.

+
+ + + +
- (NSUInteger)count
+ + + + + + + + + +
+

Discussion

+

Returns a count of the total number of cached objects.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

countOfAttributeValues

+ + + +
+

Returns the number of unique attribute values contained within the receiver.

+
+ + + +
- (NSUInteger)countOfAttributeValues
+ + + + + +
+

Return Value

+

The number of unique attribute values within the receiver.

+
+ + + + + +
+

Discussion

+

Returns the number of unique attribute values contained within the receiver.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

countWithAttributeValue:

+ + + +
+

Returns the total number of cached objects with a given value for the attribute acting as the cache key.

+
+ + + +
- (NSUInteger)countWithAttributeValue:(id)attributeValue
+ + + +
+

Parameters

+ +
+
attributeValue
+

The value for the cache key attribute to retrieve

+ +
a count of the objects with a matching value.
+
+
+ +
+ + + +
+

Return Value

+

The number of objects in the cache with the given value for the cache

+ +
attribute of the receiver.
+
+
+ + + + + +
+

Discussion

+

Returns the total number of cached objects with a given value for the attribute acting as the cache key.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

flush

+ + + +
+

Flushes the cache by releasing all cache attribute value to managed object ID +associations.

+
+ + + +
- (void)flush
+ + + + + + + + + +
+

Discussion

+

Flushes the cache by releasing all cache attribute value to managed object ID +associations.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

initWithEntity:attribute:managedObjectContext:

+ + + +
+

Initializes the receiver with a given entity, attribute, and managed object context.

+
+ + + +
- (id)initWithEntity:(NSEntityDescription *)entity attribute:(NSString *)attributeName managedObjectContext:(NSManagedObjectContext *)context
+ + + +
+

Parameters

+ +
+
entity
+

The Core Data entity description for the managed objects being cached.

+
+ +
+
attributeName
+

The name of an attribute within the cached entity that acts as the cache key.

+
+ +
+
context
+

The managed object context the cache retrieves the cached

+ +
objects from
+
+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given entity, attribute, and managed object

+ +
context.
+
+
+ + + + + +
+

Discussion

+

Initializes the receiver with a given entity, attribute, and managed object context.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

isLoaded

+ + + +
+

A Boolean value indicating if the cache has loaded associations between cache attribute values and managed object ID’s.

+
+ + + +
- (BOOL)isLoaded
+ + + + + + + + + +
+

Discussion

+

A Boolean value indicating if the cache has loaded associations between cache attribute values and managed object ID’s.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

load

+ + + +
+

Loads the cache by finding all instances of the configured entity and building +an association between the value of the cached attribute’s value and the +managed object ID for the object.

+
+ + + +
- (void)load
+ + + + + + + + + +
+

Discussion

+

Loads the cache by finding all instances of the configured entity and building +an association between the value of the cached attribute’s value and the +managed object ID for the object.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

objectWithAttributeValue:inContext:

+ + + +
+

Returns the first object with a matching value for the cache key attribute +in a given managed object context.

+
+ + + +
- (NSManagedObject *)objectWithAttributeValue:(id)attributeValue inContext:(NSManagedObjectContext *)context
+ + + +
+

Parameters

+ +
+
attributeValue
+

A value for the cache key attribute.

+
+ +
+
context
+

The managed object context to retrieve the object from.

+
+ +
+ + + +
+

Return Value

+

An object with the value of attribute matching attributeValue or nil.

+
+ + + + + +
+

Discussion

+

Returns the first object with a matching value for the cache key attribute +in a given managed object context.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

objectsWithAttributeValue:inContext:

+ + + +
+

Returns the collection of objects with a matching value for the cache key attribute in a given managed object context.

+
+ + + +
- (NSArray *)objectsWithAttributeValue:(id)attributeValue inContext:(NSManagedObjectContext *)context
+ + + +
+

Parameters

+ +
+
attributeValue
+

A value for the cache key attribute.

+
+ +
+
context
+

The managed object context to retrieve the objects from.

+
+ +
+ + + +
+

Return Value

+

An array of objects with the value of attribute matching attributeValue or an empty array.

+
+ + + + + +
+

Discussion

+

Returns the collection of objects with a matching value for the cache key attribute in a given managed object context.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

removeObject:

+ + + +
+

Removes a managed object from the cache.

+
+ + + +
- (void)removeObject:(NSManagedObject *)object
+ + + +
+

Parameters

+ +
+
object
+

The managed object to remove from the cache.

+
+ +
+ + + + + + + +
+

Discussion

+

Removes a managed object from the cache.

+ +

The object must be an instance of the cached entity.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKEntityCache.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKEntityCache.html new file mode 100644 index 00000000..1f30bc41 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKEntityCache.html @@ -0,0 +1,1046 @@ + + + + + RKEntityCache Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKEntityCache.h
+ + + + +
+ +

Overview

+

Instances of RKInMemoryEntityCache provide an in-memory caching mechanism for +objects in a Core Data managed object context. Managed objects can be cached by +attribute for fast retrieval without repeatedly hitting the Core Data persistent store. +This can provide a substantial speed advantage over issuing fetch requests +in cases where repeated look-ups of the same data are performed using a small set +of attributes as the query key. Internally, the cache entries are maintained as +references to the NSManagedObjectID of corresponding cached objects.

+
+ + + + + +
+ +

Tasks

+ + + +

Initializing the Cache

+ + + + + +

Caching Objects by Attribute

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

managedObjectContext

+ + + +
+

The managed object context with which the receiver is associated.

+
+ + + +
@property (nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext
+ + + + + + + + + +
+

Discussion

+

The managed object context with which the receiver is associated.

+
+ + + + + + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

addObject:

+ + + +
+

Adds a given object to all entity attribute caches for the object’s entity contained +within the receiver.

+
+ + + +
- (void)addObject:(NSManagedObject *)object
+ + + +
+

Parameters

+ +
+
object
+

The object to add to the appropriate entity attribute caches.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds a given object to all entity attribute caches for the object’s entity contained +within the receiver.

+
+ + + + + + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ +

attributeCacheForEntity:attribute:

+ + + +
+

Retrieves the underlying entity attribute cache for a given entity and attribute.

+
+ + + +
- (RKEntityByAttributeCache *)attributeCacheForEntity:(NSEntityDescription *)entity attribute:(NSString *)attributeName
+ + + +
+

Parameters

+ +
+
entity
+

The entity to retrieve the entity attribute cache object for.

+
+ +
+
attributeName
+

The attribute to retrieve the entity attribute cache object for.

+
+ +
+ + + +
+

Return Value

+

The entity attribute cache for the given entity and attribute, or nil if none was found.

+
+ + + + + +
+

Discussion

+

Retrieves the underlying entity attribute cache for a given entity and attribute.

+
+ + + + + + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ +

attributeCachesForEntity:

+ + + +
+

Retrieves all entity attributes caches for a given entity.

+
+ + + +
- (NSArray *)attributeCachesForEntity:(NSEntityDescription *)entity
+ + + +
+

Parameters

+ +
+
entity
+

The entity to retrieve the collection of entity attribute caches for.

+
+ +
+ + + +
+

Return Value

+

An array of entity attribute cache objects for the given entity or an empty array if none were found.

+
+ + + + + +
+

Discussion

+

Retrieves all entity attributes caches for a given entity.

+
+ + + + + + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ +

cacheObjectsForEntity:byAttribute:

+ + + +
+

Caches all instances of an entity using the value for an attribute as the cache key.

+
+ + + +
- (void)cacheObjectsForEntity:(NSEntityDescription *)entity byAttribute:(NSString *)attributeName
+ + + +
+

Parameters

+ +
+
entity
+

The entity to cache all instances of.

+
+ +
+
attributeName
+

The attribute to cache the instances by.

+
+ +
+ + + + + + + +
+

Discussion

+

Caches all instances of an entity using the value for an attribute as the cache key.

+
+ + + + + + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ +

flush

+ + + +
+

Flushes the entity cache by sending a flush message to each entity attribute cache +contained within the receiver.

+
+ + + +
- (void)flush
+ + + + + + + + + +
+

Discussion

+

Flushes the entity cache by sending a flush message to each entity attribute cache +contained within the receiver.

+
+ + + + + +
+

See Also

+ +
+ + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ +

initWithManagedObjectContext:

+ + + +
+

Initializes the receiver with a managed object context containing the entity instances to be cached.

+
+ + + +
- (id)initWithManagedObjectContext:(NSManagedObjectContext *)context
+ + + +
+

Parameters

+ +
+
context
+

The managed object context containing objects to be cached.

+
+ +
+ + + +
+

Return Value

+

self, initialized with context.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a managed object context containing the entity instances to be cached.

+
+ + + + + + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ +

isEntity:cachedByAttribute:

+ + + +
+

Returns a Boolean value indicating if all instances of an entity have been cached by a given attribute name.

+
+ + + +
- (BOOL)isEntity:(NSEntityDescription *)entity cachedByAttribute:(NSString *)attributeName
+ + + +
+

Parameters

+ +
+
entity
+

The entity to check the cache status of.

+
+ +
+
attributeName
+

The attribute to check the cache status with.

+
+ +
+ + + +
+

Return Value

+

YES if the cache has been loaded with instances with the given attribute, else NO.

+
+ + + + + +
+

Discussion

+

Returns a Boolean value indicating if all instances of an entity have been cached by a given attribute name.

+
+ + + + + + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ +

objectForEntity:withAttribute:value:inContext:

+ + + +
+

Retrieves the first cached instance of a given entity where the specified attribute matches the given value.

+
+ + + +
- (NSManagedObject *)objectForEntity:(NSEntityDescription *)entity withAttribute:(NSString *)attributeName value:(id)attributeValue inContext:(NSManagedObjectContext *)context
+ + + +
+

Parameters

+ +
+
entity
+

The entity to search the cache for instances of.

+
+ +
+
attributeName
+

The attribute to search the cache for matches with.

+
+ +
+
attributeValue
+

The value of the attribute to return a match for.

+
+ +
+
context
+

The managed object from which to retrieve the cached results.

+
+ +
+ + + +
+

Return Value

+

A matching managed object instance or nil. +@raise NSInvalidArgumentException Raised if instances of the entity and attribute have not been cached.

+
+ + + + + +
+

Discussion

+

Retrieves the first cached instance of a given entity where the specified attribute matches the given value.

+
+ + + + + + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ +

objectsForEntity:withAttribute:value:inContext:

+ + + +
+

Retrieves all cached instances of a given entity where the specified attribute matches the given value.

+
+ + + +
- (NSArray *)objectsForEntity:(NSEntityDescription *)entity withAttribute:(NSString *)attributeName value:(id)attributeValue inContext:(NSManagedObjectContext *)context
+ + + +
+

Parameters

+ +
+
entity
+

The entity to search the cache for instances of.

+
+ +
+
attributeName
+

The attribute to search the cache for matches with.

+
+ +
+
attributeValue
+

The value of the attribute to return a match for.

+
+ +
+
context
+

The managed object from which to retrieve the cached results.

+
+ +
+ + + +
+

Return Value

+

All matching managed object instances or nil. +@raise NSInvalidArgumentException Raised if instances of the entity and attribute have not been cached.

+
+ + + + + +
+

Discussion

+

Retrieves all cached instances of a given entity where the specified attribute matches the given value.

+
+ + + + + + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ +

removeObject:

+ + + +
+

Removed a given object from all entity attribute caches for the object’s entity contained +within the receiver.

+
+ + + +
- (void)removeObject:(NSManagedObject *)object
+ + + +
+

Parameters

+ +
+
object
+

The object to remove from the appropriate entity attribute caches.

+
+ +
+ + + + + + + +
+

Discussion

+

Removed a given object from all entity attribute caches for the object’s entity contained +within the receiver.

+
+ + + + + + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKEntityMapping.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKEntityMapping.html new file mode 100644 index 00000000..8388956e --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKEntityMapping.html @@ -0,0 +1,829 @@ + + + + + RKEntityMapping Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromRKObjectMapping : RKMapping : NSObject
Declared inRKEntityMapping.h
+ + + + +
+ +

Overview

+

RKEntityMapping objects model an object mapping with a Core Data destination entity.

+
+ + + + + +
+ +

Tasks

+ + + + +

Initializing an Entity Mapping

+ + +
+ + + + + +
+ +

Properties

+ +
+ +

connectionMappings

+ + + +
+

Retrieves an array of RKConnectionMapping objects for connecting the receiver’s relationships +by primary key.

+
+ + + +
@property (weak, nonatomic, readonly) NSArray *connectionMappings
+ + + + + + + + + +
+

Discussion

+

Retrieves an array of RKConnectionMapping objects for connecting the receiver’s relationships +by primary key.

+
+ + + + + + + +
+

Declared In

+ RKEntityMapping.h
+
+ + +
+ +
+ +

entity

+ + + +
+

The Core Data entity description used for this object mapping

+
+ + + +
@property (nonatomic, strong) NSEntityDescription *entity
+ + + + + + + + + +
+

Discussion

+

The Core Data entity description used for this object mapping

+
+ + + + + + + +
+

Declared In

+ RKEntityMapping.h
+
+ + +
+ +
+ +

primaryKeyAttribute

+ + + +
+

The name of the attribute on the destination entity that acts as the primary key for instances +of the entity in the remote backend system. Used to uniquely identify objects within the store +so that existing objects are updated rather than creating new ones.

+
+ + + +
@property (nonatomic, strong) NSString *primaryKeyAttribute
+ + + + + + + + + +
+

Discussion

+

The name of the attribute on the destination entity that acts as the primary key for instances +of the entity in the remote backend system. Used to uniquely identify objects within the store +so that existing objects are updated rather than creating new ones.

Warning: Note that primaryKeyAttribute defaults to the primaryKeyAttribute configured +on the NSEntityDescription for the entity targetted by the receiving mapping. This provides +flexibility in cases where a single entity is the target of many mappings with differing +primary key definitions.

+ +

If the primaryKeyAttribute is set on an RKEntityMapping that targets an entity with a +nil primaryKeyAttribute, then the primaryKeyAttribute will be set on the entity as well for +convenience and backwards compatibility. This may change in the future.

+
+ + + + + + + +
+

Declared In

+ RKEntityMapping.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

mappingForEntityForName:inManagedObjectStore:

+ + + +
+

A convenience initializer that creates and returns an entity mapping for the entity with the given name in +the managed object model of the given managed object store.

+
+ + + +
+ (id)mappingForEntityForName:(NSString *)entityName inManagedObjectStore:(RKManagedObjectStore *)managedObjectStore
+ + + +
+

Parameters

+ +
+
entityName
+

The name of the entity in the managed object model for which an entity mapping is to be created.

+
+ +
+
managedObjectStore
+

A managed object store containing the managed object model in which an entity with the given name is defined.

+
+ +
+ + + +
+

Return Value

+

A new entity mapping for the entity with the given name in the managed object model of the given managed object store.

+
+ + + + + +
+

Discussion

+

A convenience initializer that creates and returns an entity mapping for the entity with the given name in +the managed object model of the given managed object store.

+ +

This method is functionally equivalent to the following example code:

+ +
 NSEntityDescription *entity = [[managedObjectStore.managedObjectModel entitiesByName] objectForKey:entityName];
+ return [RKEntityMapping mappingForEntity:entity];
+
+
+ + + + + + + +
+

Declared In

+ RKEntityMapping.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

addConnectionMapping:

+ + + +
+

Adds a connection mapping to the receiver.

+
+ + + +
- (void)addConnectionMapping:(RKConnectionMapping *)connectionMapping
+ + + +
+

Parameters

+ +
+
connectionMapping
+

The connection mapping to be added.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds a connection mapping to the receiver.

+
+ + + + + + + +
+

Declared In

+ RKEntityMapping.h
+
+ + +
+ +
+ +

addConnectionMappingForRelationshipForName:fromSourceKeyPath:toKeyPath:matcher:

+ + + +
- (RKConnectionMapping *)addConnectionMappingForRelationshipForName:(NSString *)relationshipName fromSourceKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath matcher:(RKDynamicMappingMatcher *)matcher
+ + +
+ +
+ +

addConnectionMappingsFromArray:

+ + + +
- (void)addConnectionMappingsFromArray:(NSArray *)arrayOfConnectionMappings
+ + +
+ +
+ +

defaultValueForMissingAttribute:

+ + + +
+

Returns the default value for the specified attribute as expressed in the Core Data entity definition. This value will +be assigned if the object mapping is applied and a value for a missing attribute is not present in the payload.

+
+ + + +
- (id)defaultValueForMissingAttribute:(NSString *)attributeName
+ + + + + + + + + +
+

Discussion

+

Returns the default value for the specified attribute as expressed in the Core Data entity definition. This value will +be assigned if the object mapping is applied and a value for a missing attribute is not present in the payload.

+
+ + + + + + + +
+

Declared In

+ RKEntityMapping.h
+
+ + +
+ +
+ +

initWithEntity:

+ + + +
+

Initializes the receiver with a given entity.

+
+ + + +
- (id)initWithEntity:(NSEntityDescription *)entity
+ + + +
+

Parameters

+ +
+
entity
+

An entity with which to initialize the receiver.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given entity.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a given entity.

+
+ + + + + + + +
+

Declared In

+ RKEntityMapping.h
+
+ + +
+ +
+ +

removeConnectionMapping:

+ + + +
+

Removes a connection mapping from the receiver.

+
+ + + +
- (void)removeConnectionMapping:(RKConnectionMapping *)connectionMapping
+ + + +
+

Parameters

+ +
+
connectionMapping
+

The connection mapping to be added.

+
+ +
+ + + + + + + +
+

Discussion

+

Removes a connection mapping from the receiver.

+
+ + + + + + + +
+

Declared In

+ RKEntityMapping.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKErrorMessage.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKErrorMessage.html new file mode 100644 index 00000000..fddf2f3e --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKErrorMessage.html @@ -0,0 +1,368 @@ + + + + + RKErrorMessage Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKErrorMessage.h
+ + + + +
+ +

Overview

+

The RKErrorMessage is a simple class used for representing error messages returned by a remote backend system with which the client application is communicating. Error messages are typically returned in a response body in the Client Error class (status code 4xx range).

+ +

Error Message Informal Protocol

+ +

The errorMessage property method is the sole method of an informal protocol that must be adopted by objects wishing to represent error messages within RestKit. This protocol is by the RKErrorFromMappingResult function when constructing NSError messages from a mapped response body.

+
+ + + + + +
+ +

Tasks

+ + + + +

Accessing Errror Information

+
    +
  • + +   errorMessage +

    The error message to be presented to the user.

    +
    + property + +
  • + +   userInfo +

    A dictionary of application specific information that accompanies the error message.

    +
    + property + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

errorMessage

+ + + +
+

The error message to be presented to the user.

+
+ + + +
@property (nonatomic, copy) NSString *errorMessage
+ + + + + + + + + +
+

Discussion

+

The error message to be presented to the user.

+
+ + + + + + + +
+

Declared In

+ RKErrorMessage.h
+
+ + +
+ +
+ +

userInfo

+ + + +
+

A dictionary of application specific information that accompanies the error message.

+
+ + + +
@property (nonatomic, copy) NSDictionary *userInfo
+ + + + + + + + + +
+

Discussion

+

A dictionary of application specific information that accompanies the error message.

+
+ + + + + + + +
+

Declared In

+ RKErrorMessage.h
+
+ + +
+ +
+ + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKFetchRequestManagedObjectCache.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKFetchRequestManagedObjectCache.html new file mode 100644 index 00000000..12dc50fe --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKFetchRequestManagedObjectCache.html @@ -0,0 +1,231 @@ + + + + + RKFetchRequestManagedObjectCache Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + + + + +
Inherits fromNSObject
Conforms toRKManagedObjectCaching
Declared inRKFetchRequestManagedObjectCache.h
+ + + + +
+ +

Overview

+

Provides a simple managed object cache strategy in which every request for an object +is satisfied by dispatching an NSFetchRequest against the Core Data persistent store. +Performance can be disappointing for data sets with a large amount of redundant data +being mapped and connected together, but the memory footprint stays flat.

+
+ + + + + + + + + + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKHTTPRequestOperation.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKHTTPRequestOperation.html new file mode 100644 index 00000000..1d4ba998 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKHTTPRequestOperation.html @@ -0,0 +1,424 @@ + + + + + RKHTTPRequestOperation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromAFHTTPRequestOperation
Declared inRKHTTPRequestOperation.h
+ + + + +
+ +

Overview

+

The RKHTTPRequestOperation class is a subclass of AFHTTPRequestOperation for HTTP or HTTPS requests made by RestKit. It provides per-instance configuration of the acceptable status codes and content types and integrates with the RKLog system to provide detailed requested and response logging. Instances of RKHTTPRequest are created by RKObjectRequestOperation and its subclasses to HTTP requests that will be object mapped. When used to make standalone HTTP requests, RKHTTPRequestOperation instance behave identically to AFHTTPRequestOperation with the exception of emitting logging information.

+
+ + + + + +
+ +

Tasks

+ + + + +

Configuring Acceptable Status Codes and Content Types

+
    +
  • + +   acceptableStatusCodes +

    The set of status codes which the operation considers successful.

    +
    + property + +
  • + +   acceptableContentTypes +

    The set of content types which the operation considers successful.

    +
    + property + +
  • + +   wasNotModified +

    Whether the response received a 304 response, whether via the initial request, or by virtue of cache revalidation occurring from NSURLCache.

    +
    + property + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

acceptableContentTypes

+ + + +
+

The set of content types which the operation considers successful.

+
+ + + +
@property (nonatomic, strong) NSSet *acceptableContentTypes
+ + + + + + + + + +
+

Discussion

+

The set of content types which the operation considers successful.

+ +

The set may contain NSString or NSRegularExpression objects. When nil, the acceptability of content types is deferred to the superclass implementation.

+ +

Default: nil

+
+ + + + + + + +
+

Declared In

+ RKHTTPRequestOperation.h
+
+ + +
+ +
+ +

acceptableStatusCodes

+ + + +
+

The set of status codes which the operation considers successful.

+
+ + + +
@property (nonatomic, strong) NSIndexSet *acceptableStatusCodes
+ + + + + + + + + +
+

Discussion

+

The set of status codes which the operation considers successful.

+ +

When nil, the acceptability of status codes is deferred to the superclass implementation.

+ +

Default: nil

+
+ + + + + + + +
+

Declared In

+ RKHTTPRequestOperation.h
+
+ + +
+ +
+ +

wasNotModified

+ + + +
+

Whether the response received a 304 response, whether via the initial request, or by virtue of cache revalidation occurring from NSURLCache.

+
+ + + +
@property (nonatomic, readonly) BOOL wasNotModified
+ + + + + + + + + +
+

Discussion

+

Whether the response received a 304 response, whether via the initial request, or by virtue of cache revalidation occurring from NSURLCache.

+
+ + + + + + + +
+

Declared In

+ RKHTTPRequestOperation.h
+
+ + +
+ +
+ + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKISO8601DateFormatter.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKISO8601DateFormatter.html new file mode 100644 index 00000000..5ae60d16 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKISO8601DateFormatter.html @@ -0,0 +1,580 @@ + + + + + RKISO8601DateFormatter Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSFormatter
Declared inRKISO8601DateFormatter.h
+ + + + + + +
+ +

Tasks

+ + + + + + + +
+ + + + + +
+ +

Properties

+ +
+ +

defaultTimeZone

+ + + +
@property (nonatomic, retain) NSTimeZone *defaultTimeZone
+ + +
+ +
+ +

format

+ + + +
@property RKISO8601DateFormat format
+ + +
+ +
+ +

includeTime

+ + + +
@property BOOL includeTime
+ + +
+ +
+ +

parsesStrictly

+ + + +
@property BOOL parsesStrictly
+ + +
+ +
+ +

timeSeparator

+ + + +
@property unichar timeSeparator
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

purgeGlobalCaches

+ + + +
+ (void)purgeGlobalCaches
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

dateComponentsFromString:

+ + + +
- (NSDateComponents *)dateComponentsFromString:(NSString *)string
+ + +
+ +
+ +

dateComponentsFromString:timeZone:

+ + + +
- (NSDateComponents *)dateComponentsFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone
+ + +
+ +
+ +

dateComponentsFromString:timeZone:range:

+ + + +
- (NSDateComponents *)dateComponentsFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone range:(out NSRange *)outRange
+ + +
+ +
+ +

dateFromString:

+ + + +
- (NSDate *)dateFromString:(NSString *)string
+ + +
+ +
+ +

dateFromString:timeZone:

+ + + +
- (NSDate *)dateFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone
+ + +
+ +
+ +

dateFromString:timeZone:range:

+ + + +
- (NSDate *)dateFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone range:(out NSRange *)outRange
+ + +
+ +
+ +

stringFromDate:

+ + + +
- (NSString *)stringFromDate:(NSDate *)date
+ + +
+ +
+ +

stringFromDate:timeZone:

+ + + +
- (NSString *)stringFromDate:(NSDate *)date timeZone:(NSTimeZone *)timeZone
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKInMemoryManagedObjectCache.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKInMemoryManagedObjectCache.html new file mode 100644 index 00000000..58fb09d2 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKInMemoryManagedObjectCache.html @@ -0,0 +1,330 @@ + + + + + RKInMemoryManagedObjectCache Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + + + + +
Inherits fromNSObject
Conforms toRKManagedObjectCaching
Declared inRKInMemoryManagedObjectCache.h
+ + + + +
+ +

Overview

+

Provides a fast managed object cache where-in object instances are retained in memory to avoid hitting the Core Data persistent store. Performance is greatly increased over fetch request based strategy at the expense of memory consumption.

+
+ + + + + +
+ +

Tasks

+ + + + +

Initializing a Cache

+
    +
  • + + – initWithManagedObjectContext: +

    Initializes the receiver with a managed object context that is to be observed and used to populate the in memory cache. The receiver may then be used to fulfill cache requests for child contexts of the given managed object context.

    +
    + + +
  • +
+ +
+ + + + + + + + + +
+ +

Instance Methods

+ +
+ +

initWithManagedObjectContext:

+ + + +
+

Initializes the receiver with a managed object context that is to be observed and used to populate the in memory cache. The receiver may then be used to fulfill cache requests for child contexts of the given managed object context.

+
+ + + +
- (id)initWithManagedObjectContext:(NSManagedObjectContext *)managedObjectContext
+ + + +
+

Parameters

+ +
+
managedObjectContext
+

The managed object context with which to initialize the receiver.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given managed object context.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a managed object context that is to be observed and used to populate the in memory cache. The receiver may then be used to fulfill cache requests for child contexts of the given managed object context.

+
+ + + + + + + +
+

Declared In

+ RKInMemoryManagedObjectCache.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKMIMETypeSerialization.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKMIMETypeSerialization.html new file mode 100644 index 00000000..218074c6 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKMIMETypeSerialization.html @@ -0,0 +1,687 @@ + + + + + RKMIMETypeSerialization Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKMIMETypeSerialization.h
+ + + + +
+ +

Overview

+

The RKMIMETypeSerialization class provides support for the registration of classes conforming to the RKSerialization protocol by MIME Type and the serialization and deserialization of content by MIME Type. Serialization implementations may be registered by an exact string match (i.e. ‘application/json’ for a JSON serialization implementation) or by regular expression to match MIME Type by pattern.

+
+ + + + + +
+ +

Tasks

+ + + +

Managing MIME Type Registrations

+ +
    +
  • + + + registerClass:forMIMEType: +

    Registers the given serialization class to handle content for the given MIME Type identifier.

    +
    + + +
  • + + + unregisterClass: +

    Unregisters the given serialization class from handling any MIME Types.

    +
    + + +
  • + + + serializationClassForMIMEType: +

    Returns the serialization class registered to handle the given MIME Type.

    +
    + + +
  • + + + registeredMIMETypes +

    Returns a set containing the string values for all MIME Types for which a serialization implementation has been registered.

    +
    + + +
  • +
+ + + +

Serializing and Deserializing Content by MIME Type

+ +
    +
  • + + + objectFromData:MIMEType:error: +

    Deserializes and returns a Foundation object representation of the given UTF-8 encoded data in the serialization format for the given MIME Type.

    +
    + + +
  • + + + dataFromObject:MIMEType:error: +

    Serializes and returns a UTF-8 encoded data representation of the given Foundation object in the serialization format for the given MIME Type.

    +
    + + +
  • +
+ +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

dataFromObject:MIMEType:error:

+ + + +
+

Serializes and returns a UTF-8 encoded data representation of the given Foundation object in the serialization format for the given MIME Type.

+
+ + + +
+ (NSData *)dataFromObject:(id)object MIMEType:(NSString *)MIMEType error:(NSError **)error
+ + + +
+

Parameters

+ +
+
object
+

The Foundation object to serialized.

+
+ +
+
MIMEType
+

The MIME Type of the serialization format the data is in.

+
+ +
+
error
+

A pointer to an NSError object.

+
+ +
+ + + +
+

Return Value

+

A Foundation object from the serialized data in data, or nil if an error occurs.

+
+ + + + + +
+

Discussion

+

Serializes and returns a UTF-8 encoded data representation of the given Foundation object in the serialization format for the given MIME Type.

+ +

On invocation, searches the registrations by invoking serializationClassForMIMEType: with the given MIME Type and then invokes objectFromData:error: on the RKSerialization conformant class returned. If no serialization implementation is found to handle the given MIME Type, nil is returned and the given error pointer will be set to an NSError object with the RKMissingSerializationForMIMETypeError code.

+
+ + + + + + + +
+

Declared In

+ RKMIMETypeSerialization.h
+
+ + +
+ +
+ +

objectFromData:MIMEType:error:

+ + + +
+

Deserializes and returns a Foundation object representation of the given UTF-8 encoded data in the serialization format for the given MIME Type.

+
+ + + +
+ (id)objectFromData:(NSData *)data MIMEType:(NSString *)MIMEType error:(NSError **)error
+ + + +
+

Parameters

+ +
+
data
+

The UTF-8 encoded data representation of the object to be deserialized.

+
+ +
+
MIMEType
+

The MIME Type of the serialization format the data is in.

+
+ +
+
error
+

A pointer to an NSError object.

+
+ +
+ + + +
+

Return Value

+

A Foundation object from the serialized data in data, or nil if an error occurs.

+
+ + + + + +
+

Discussion

+

Deserializes and returns a Foundation object representation of the given UTF-8 encoded data in the serialization format for the given MIME Type.

+ +

On invocation, searches the registrations by invoking serializationClassForMIMEType: with the given MIME Type and then invokes objectFromData:error: on the RKSerialization conformant class returned. If no serialization implementation is found to handle the given MIME Type, nil is returned and the given error pointer will be set to an NSError object with the RKMissingSerializationForMIMETypeError code.

+
+ + + + + + + +
+

Declared In

+ RKMIMETypeSerialization.h
+
+ + +
+ +
+ +

registerClass:forMIMEType:

+ + + +
+

Registers the given serialization class to handle content for the given MIME Type identifier.

+
+ + + +
+ (void)registerClass:(Class<RKSerialization>)serializationClass forMIMEType:(id)MIMETypeStringOrRegularExpression
+ + + +
+

Parameters

+ +
+
serializationClass
+

The class conforming to the RKSerialization protocol to be registered as handling the given MIME Type.

+
+ +
+
MIMETypeStringOrRegularExpression
+

A string or regular expression specifying the MIME Type(s) that given serialization implementation is to be registered as handling.

+
+ +
+ + + + + + + +
+

Discussion

+

Registers the given serialization class to handle content for the given MIME Type identifier.

+ +

MIME Types may be given as either a string or as a regular expression that matches the MIME Types for which the given serialization should handle. Serializations are searched in the reverse order of their registration. If a registration is made for an already registered MIME Type, the new registration will take precedence.

+
+ + + + + + + +
+

Declared In

+ RKMIMETypeSerialization.h
+
+ + +
+ +
+ +

registeredMIMETypes

+ + + +
+

Returns a set containing the string values for all MIME Types for which a serialization implementation has been registered.

+
+ + + +
+ (NSSet *)registeredMIMETypes
+ + + + + +
+

Return Value

+

An NSSet object whose elements are NSString values enumerating the registered MIME Types.

+
+ + + + + +
+

Discussion

+

Returns a set containing the string values for all MIME Types for which a serialization implementation has been registered.

+
+ + + + + + + +
+

Declared In

+ RKMIMETypeSerialization.h
+
+ + +
+ +
+ +

serializationClassForMIMEType:

+ + + +
+

Returns the serialization class registered to handle the given MIME Type.

+
+ + + +
+ (Class<RKSerialization>)serializationClassForMIMEType:(NSString *)MIMEType
+ + + +
+

Parameters

+ +
+
MIMEType
+

The MIME Type for which to return the registered RKSerialization conformant class.

+
+ +
+ + + +
+

Return Value

+

A class conforming to the RKSerialization protocol registered for the given MIME Type or nil if none was found.

+
+ + + + + +
+

Discussion

+

Returns the serialization class registered to handle the given MIME Type.

+ +

Searches the registrations in reverse order for the first serialization implementation registered to handle the given MIME Type. Matches are determined by doing a lowercase string comparison if the MIME Type was registered with a string identifier or by evaluating a regular expression match against the given MIME Type if registered with a regular expression.

+
+ + + + + + + +
+

Declared In

+ RKMIMETypeSerialization.h
+
+ + +
+ +
+ +

unregisterClass:

+ + + +
+

Unregisters the given serialization class from handling any MIME Types.

+
+ + + +
+ (void)unregisterClass:(Class<RKSerialization>)serializationClass
+ + + +
+

Parameters

+ +
+
serializationClass
+

The class conforming to the RKSerialization protocol to be unregistered.

+
+ +
+ + + + + + + +
+

Discussion

+

Unregisters the given serialization class from handling any MIME Types.

+ +

After this method is invoked, invocations of serializationForMIMEType: will no longer return the unregistered serialization class.

+
+ + + + + + + +
+

Declared In

+ RKMIMETypeSerialization.h
+
+ + +
+ +
+ + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKManagedObjectImporter.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKManagedObjectImporter.html new file mode 100644 index 00000000..f91f8e65 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKManagedObjectImporter.html @@ -0,0 +1,961 @@ + + + + + RKManagedObjectImporter Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKManagedObjectImporter.h
+ + + + +
+ +

Overview

+

Instances of RKManagedObjectImporter perform bulk imports of managed objects into a persistent store from +source files (typically in JSON or XML format) using object mappings. The importer provides functionality +for updating an existing persistent store or creating a seed database that can be used to bootstrap a new +persistent store with an initial data set.

+ +

The importer requires that the source files have a MIME type that is identifiable by file extension and be +parsable using a parser registered with the shared parser registry.

+
+ + + + + +
+ +

Tasks

+ + + +

Initializing an Importer

+ +
    +
  • + + – initWithManagedObjectModel:storePath: +

    Initializes the receiver with a given managed object model and a path at which a SQLite persistent store +should be created to persist imported managed objects.

    +
    + + +
  • + + – initWithPersistentStore: +

    Initializes the receiver with a given persistent store in which to persist imported managed objects.

    +
    + + +
  • + +   resetsStoreBeforeImporting +

    A Boolean value indicating whether existing managed objects in the persistent store should +be deleted before import.

    +
    + property + +
  • +
+ + + +

Accessing Core Data Details

+ +
    +
  • + +   persistentStore +

    The persistent store in which imported managed objects will be persisted.

    +
    + property + +
  • + +   managedObjectModel +

    The managed object model containing entities that may be imported by the receiver.

    +
    + property + +
  • + +   managedObjectContext +

    A managed object context with the NSPrivateQueueConcurrencyType concurrency type +used to perform the import.

    +
    + property + +
  • + +   storePath +

    A convenience accessor for retrieving the complete filesystem path to the persistent +store in which the receiver will persist imported managed objects.

    +
    + property + +
  • +
+ + + +

Importing Managed Objects

+ + + + + +

Obtaining Seeding Info

+ +
    +
  • + + – logSeedingInfo +

    Logs information about where on the filesystem to access the SQLite database for the persistent +store in which the imported managed objects were persisted.

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

managedObjectContext

+ + + +
+

A managed object context with the NSPrivateQueueConcurrencyType concurrency type +used to perform the import.

+
+ + + +
@property (nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext
+ + + + + + + + + +
+

Discussion

+

A managed object context with the NSPrivateQueueConcurrencyType concurrency type +used to perform the import.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectImporter.h
+
+ + +
+ +
+ +

managedObjectModel

+ + + +
+

The managed object model containing entities that may be imported by the receiver.

+
+ + + +
@property (nonatomic, strong, readonly) NSManagedObjectModel *managedObjectModel
+ + + + + + + + + +
+

Discussion

+

The managed object model containing entities that may be imported by the receiver.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectImporter.h
+
+ + +
+ +
+ +

persistentStore

+ + + +
+

The persistent store in which imported managed objects will be persisted.

+
+ + + +
@property (nonatomic, strong, readonly) NSPersistentStore *persistentStore
+ + + + + + + + + +
+

Discussion

+

The persistent store in which imported managed objects will be persisted.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectImporter.h
+
+ + +
+ +
+ +

resetsStoreBeforeImporting

+ + + +
+

A Boolean value indicating whether existing managed objects in the persistent store should +be deleted before import.

+
+ + + +
@property (nonatomic, assign) BOOL resetsStoreBeforeImporting
+ + + + + + + + + +
+

Discussion

+

A Boolean value indicating whether existing managed objects in the persistent store should +be deleted before import.

+ +

The default value of this property is YES if the receiver was initialized with a +managed object model and store path, else NO.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectImporter.h
+
+ + +
+ +
+ +

storePath

+ + + +
+

A convenience accessor for retrieving the complete filesystem path to the persistent +store in which the receiver will persist imported managed objects.

+
+ + + +
@property (nonatomic, strong, readonly) NSString *storePath
+ + + + + + + + + +
+

Discussion

+

A convenience accessor for retrieving the complete filesystem path to the persistent +store in which the receiver will persist imported managed objects.

+ +

Equivalent to executing the following example code:

+ +
NSURL *URL = [importer.persistentStore.persistentStoreCoordinator URLForPersistentStore:importer.persistentStore];
+return [URL path];
+
+
+ + + + + + + +
+

Declared In

+ RKManagedObjectImporter.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

finishImporting:

+ + + +
+

Finishes the import process by saving the managed object context to the persistent store, ensuring all +imported managed objects are written to disk.

+
+ + + +
- (BOOL)finishImporting:(NSError **)error
+ + + +
+

Parameters

+ +
+
error
+

On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing +the error information. You may specify nil for this parameter if you do not want the error information.

+
+ +
+ + + +
+

Return Value

+

YES if the save to the persistent store was successful, else NO.

+
+ + + + + +
+

Discussion

+

Finishes the import process by saving the managed object context to the persistent store, ensuring all +imported managed objects are written to disk.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectImporter.h
+
+ + +
+ +
+ +

importObjectsFromItemAtPath:withMapping:keyPath:error:

+ + + +
+

Imports managed objects from the file or directory at the given path.

+
+ + + +
- (NSUInteger)importObjectsFromItemAtPath:(NSString *)path withMapping:(RKMapping *)mapping keyPath:(NSString *)keyPath error:(NSError **)error
+ + + +
+

Parameters

+ +
+
path
+

The path to the file or directory you wish to import. This parameter must not be nil.

+
+ +
+
mapping
+

The entity or dynamic mapping you wish to use for importing content at the given path.

+
+ +
+
keyPath
+

An optional key path to be evaluated against the results of parsing the content read at the given path. If the

+ +
mappable content is not contained in a nesting attribute, the key path should be specified as nil.
+
+
+ +
+
error
+

On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing

+ +
the error information. You may specify nil for this parameter if you do not want the error information.
+
+
+ +
+ + + +
+

Return Value

+

A count of the number of managed object imported from the given path or NSNotFound if an error occurred during import.

+
+ + + + + +
+

Discussion

+

Imports managed objects from the file or directory at the given path.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectImporter.h
+
+ + +
+ +
+ +

initWithManagedObjectModel:storePath:

+ + + +
+

Initializes the receiver with a given managed object model and a path at which a SQLite persistent store +should be created to persist imported managed objects.

+
+ + + +
- (id)initWithManagedObjectModel:(NSManagedObjectModel *)managedObjectModel storePath:(NSString *)storePath
+ + + +
+

Parameters

+ +
+
managedObjectModel
+

A Core Data manage object model with which to initialize the receiver.

+
+ +
+
storePath
+

The path at which to create a SQLite persistent store to persist the imported managed objects.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given managed object model and a complete Core Data persistence

+ +
stack with a SQLite persistent store at the given store path.
+
+
+ + + + + +
+

Discussion

+

Initializes the receiver with a given managed object model and a path at which a SQLite persistent store +should be created to persist imported managed objects.

+ +

When initialized with a managed object model and store path, the receiver will construct an internal +persistent store coordinator, SQLite persistent store, and managed object context with the private queue +concurrency type with which to perform the importing.

Warning: As this initialization code path is typical for generating seed databases, the value of

+ +
`resetsStoreBeforeImporting` is initialized to **YES**.
+
+
+ + + + + + + +
+

Declared In

+ RKManagedObjectImporter.h
+
+ + +
+ +
+ +

initWithPersistentStore:

+ + + +
+

Initializes the receiver with a given persistent store in which to persist imported managed objects.

+
+ + + +
- (id)initWithPersistentStore:(NSPersistentStore *)persistentStore
+ + + +
+

Parameters

+ +
+
persistentStore
+

A Core Data persistent store with which to initialize the receiver.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given persistent store. The persistent store coordinator and

+ +
managed object model are determined from the given persistent store and a new managed object context with
+the private queue concurrency type is constructed.
+
+
+ + + + + +
+

Discussion

+

Initializes the receiver with a given persistent store in which to persist imported managed objects.

+ +

When initialized with a persistent store, the receiver will construct a managed object context with the +private queue concurrency type and the persistent store coordinator of the given persistent store. This +prepares the receiver for importing content into an existing Core Data persistence stack.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectImporter.h
+
+ + +
+ +
+ +

logSeedingInfo

+ + + +
+

Logs information about where on the filesystem to access the SQLite database for the persistent +store in which the imported managed objects were persisted.

+
+ + + +
- (void)logSeedingInfo
+ + + + + + + + + +
+

Discussion

+

Logs information about where on the filesystem to access the SQLite database for the persistent +store in which the imported managed objects were persisted.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectImporter.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKManagedObjectMappingOperationDataSource.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKManagedObjectMappingOperationDataSource.html new file mode 100644 index 00000000..dd150399 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKManagedObjectMappingOperationDataSource.html @@ -0,0 +1,582 @@ + + + + + RKManagedObjectMappingOperationDataSource Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + + + + +
Inherits fromNSObject
Conforms toRKMappingOperationDataSource
Declared inRKManagedObjectMappingOperationDataSource.h
+ + + + +
+ +

Overview

+

The RKManagedObjectMappingOperationDataSource class provides support for performing object mapping operations where the mapped objects exist within a Core Data managed object context. The class is responsible for finding exist managed object instances by primary key, instantiating new managed objects, and connecting relationships for mapped objects.

+
+ + + + + +
+ +

Tasks

+ + + +

Initializing a Managed Object Mapping Operation Data Source

+ + + + + +

Accessing the Managed Object Context and Cache

+ +
    +
  • + +   managedObjectContext +

    The managed object context with which the receiver is associated.

    +
    + property + +
  • + +   managedObjectCache +

    The managed object cache utilized by the receiver to find existing managed object instances by primary key. A nil managed object cache will result in the insertion of new managed objects for all mapped content.

    +
    + property + +
  • +
+ + + +

Configuring Relationship Connection Queueing

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

managedObjectCache

+ + + +
+

The managed object cache utilized by the receiver to find existing managed object instances by primary key. A nil managed object cache will result in the insertion of new managed objects for all mapped content.

+
+ + + +
@property (nonatomic, strong, readonly) id<RKManagedObjectCaching> managedObjectCache
+ + + + + + + + + +
+

Discussion

+

The managed object cache utilized by the receiver to find existing managed object instances by primary key. A nil managed object cache will result in the insertion of new managed objects for all mapped content.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectMappingOperationDataSource.h
+
+ + +
+ +
+ +

managedObjectContext

+ + + +
+

The managed object context with which the receiver is associated.

+
+ + + +
@property (nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext
+ + + + + + + + + +
+

Discussion

+

The managed object context with which the receiver is associated.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectMappingOperationDataSource.h
+
+ + +
+ +
+ +

operationQueue

+ + + +
+

The operation queue in which instances of RKRelationshipConnectionOperation will be enqueued to connect the relationships of mapped objects.

+
+ + + +
@property (nonatomic, strong) NSOperationQueue *operationQueue
+ + + + + + + + + +
+

Discussion

+

The operation queue in which instances of RKRelationshipConnectionOperation will be enqueued to connect the relationships of mapped objects.

+ +

If nil, then current operation queue as returned from [NSOperationQueue currentQueue] will be used.

+ +

Please see the documentation for parentOperation for a discussion of this property’s function.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectMappingOperationDataSource.h
+
+ + +
+ +
+ +

parentOperation

+ + + +
+

The parent operation upon which instances of RKRelationshipConnectionOperation created by the data source are dependent upon.

+
+ + + +
@property (nonatomic, weak) NSOperation *parentOperation
+ + + + + + + + + +
+

Discussion

+

The parent operation upon which instances of RKRelationshipConnectionOperation created by the data source are dependent upon.

+ +

When connecting relationships as part of a managed object mapping operation, it is possible that the mapping operation itself will create managed objects that should be used to satisfy the connections mappings of representations being mapped. To support such cases, is is desirable to defer the execution of connection operations until the execution of the aggregate mapping operation is complete. The parentOperation property provides support for deferring the execution of the enqueued relationship connection operations by establishing a dependency between the connection operations and a parent operation, such as an instance of RKMapperOperation such that they will not be executed by the operationQueue until the parent operation has finished executing.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectMappingOperationDataSource.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

initWithManagedObjectContext:cache:

+ + + +
+

Initializes the receiver with a given managed object context and managed object cache.

+
+ + + +
- (id)initWithManagedObjectContext:(NSManagedObjectContext *)managedObjectContext cache:(id<RKManagedObjectCaching>)managedObjectCache
+ + + +
+

Parameters

+ +
+
managedObjectContext
+

The managed object context with which to associate the receiver. Cannot be nil.

+
+ +
+
managedObjectCache
+

The managed object cache used by the receiver to find existing object instances by primary key.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given managed object context and managed objet cache.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a given managed object context and managed object cache.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectMappingOperationDataSource.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKManagedObjectRequestOperation.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKManagedObjectRequestOperation.html new file mode 100644 index 00000000..6818fa8e --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKManagedObjectRequestOperation.html @@ -0,0 +1,623 @@ + + + + + RKManagedObjectRequestOperation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromRKObjectRequestOperation : NSOperation
Declared inRKManagedObjectRequestOperation.h
+ + + + +
+ +

Overview

+

RKManagedObjectRequestOperation is a subclass of RKObjectRequestOperation that implements object mapping on the response body of an NSHTTPResponse loaded via an RKHTTPRequestOperation in which the mapping targets NSManagedObject objects managed by Core Data.

+ +

The RKManagedObjectRequestOperation class extends the basic behavior of an RKObjectRequestOperation to meet the constraints imposed by Core Data. In particular, managed object request operations observe the threading requirements by making use of NSManagedObjectContext concurrency types, leverage the support for parent/child contexts, and handle obtaining a permanent NSManagedObjectID for objects being mapped so that they are addressable across contexts. Object mapping is internally performed within a block provided to the target context via performBlockAndWait:, ensuring execution on the appropriate queue.

+ +

Aside from providing the basic infrastructure for successful object mapping into Core Data, a number of additional Core Data specific features are provided by the RKManagedObjectRequestOperation class that warrant discussion in detail.

+ +

Parent Context

+ +

Every RKManagedObjectRequestOperation object must be assigned an NSManagedObjectContext in which to persist the results of the underlying object mapping operation. This context is used as the parent context for a new, private NSManagedObjectContext with a concurrency type of NSPrivateQueueConcurrencyType in which the object mapping is actually performed. The use of this parent context has a number of benefits:

+ +
    +
  1. If the context that was assigned to the managed object request operation has a concurrency type of NSMainQueueConcurrencyType, then directly mapping into the context would block the execution of the main thread for the duration of the mapping process. The use of the private child context isolates the mapping process from the main thread entirely.
  2. +
  3. In the event of an error, the private context can be discarded, leaving the state of the parent context unchanged. On successful completion, the private context is saved and ‘pushes’ its changes up one level into the parent context.
  4. +
+ + +

Permanent Managed Object IDs

+ +

One of the confounding factors when working with asycnhronous processes interacting with Core Data is the addressability of managed objects that have not been saved to the persistent store across contexts. Unpersisted NSManagedObject instances have an objectID that is temporary and unsuitable for use in uniquely addressing a given object across two managed object contexts, even if they have common ancestry and share a persistent store coordinator. To mitigate this addressability issue without requiring objects to be saved to the persistent store, managed object request operations invoke obtainPermanentIDsForObjects: on the operation’s target object (if any) and all managed objects that were inserted into the context during the mapping process. By the time the operation finishes, all managed objects in the mapping result can be referenced by objectID across contexts with no further action.

+ +

Primary Keys & Managed Object Caching

+ +

When object mapping managed objects it is necessary to differentiate between objects that already exist in the local store and those that are being created as part of the mapping process. This ensures that the local store does not become populated with duplicate records. To make this differentiation, RestKit requires that each NSEntityDescription be configured with a primary key attribute. The primary key must correspond to a static attribute assigned by the remote backend system. During mapping, this key is used to search the managed object context for an existing managed object. If one is found, the object is updated else a new object is created. Primary keys are configured at the entity level and additional discussion accompanies the NSEntityDescription (RKAdditions) category.

+ +

Primary key attributes are used in conjunction with the RKManagedObjectCaching protocol. Each managed object request operation is associated with an object conforming to the RKManagedObjectCaching protocol via the managedObjectCache proeprty. This cache is consulted during mapping to find existing objects and when establishing relationships between entities by primary key. Please see the documentation accompanying RKManagedObjectCaching and RKConnectionMapping for more information.

+ +

Fetching Result Objects

+ +

When a completionBlock is configured for an instance of RKManagedObjectRequestOperation additional work is performed before the mapping result is returned to the caller. Because mapping internally occurs on a private managed object context with the NSPrivateQueueConcurrencyType concurrency type, attempts to directly access the NSManagedObject instances contained within the RKMappingResult would violate the threading constraints imposed by Core Data. As such, before the mapping result is returned to the caller in a completion block the objects are re-fetched from the managedObjectContext. Please see RKManagedObjectThreadSafeInvocation for details about the implementation.

+ +

TODO: Is this necessary?

+ +

Deleting Managed Objects for DELETE requests

+ +

RKManagedObjectRequestOperation adds special behavior to DELETE requests. Upon retrieving a successful (2xx status code) response for a DELETE, the operation will invoke deleteObject: with the operations targetObject on the managed object context. This will delete the target object from the local store in conjunction the successfully deleted remote representation.

+ +

Fetch Request Blocks and Deleting Orphaned Objects

+ +

A common problem when accessing remote resources representing collections of objects is the problem of deletion of remote objects. The RKManagedObjectRequestOperation class provides support for the cleanup of such orphaned objects. In order to utilize the functionality, the operation must be able to compare a set of reference objects to the retrieved payload in order to determine which objects exist in the local store, but are no longer being returned by the server. This reference set of objects is built by executing an NSFetchRequest that corresponds to the URL being loaded. Configuration of this fetch request is done via an RKFetchRequestBlock block object. This block takes a single NSURL argument and returns an NSFetchRequest objects. An array of these blocks can be provided to the managed object request operation and the array will be searched in reverse order until a non-nil value is returned by a block. Any block that cannot build a fetch request for the given URL is expected to return nil to indicate that it does not match the given URL. Processing of the URL is typically performed using an RKPathMatcher object against the value returned from the relativePath or relativeString methods of NSURL.

+ +

To illustrate this concept, please consider the following real-world example which builds a fetch request for retrieving the Terminals that exist in an Airport:

+ +
RKObjectManager *manager = [RKObjectManager managerWithBaseURL:@"http://restkit.org"]http://restkit.org"];
+[manager addFetchRequestBlock:^NSFetchRequest *(NSURL *URL) {
+    RKPathMatcher *pathMatcher = [RKPathMatcher pathMatcherWithPattern:@"/airports/:airport_id/terminals.json"];
+
+    NSDictionary *argsDict = nil;
+    BOOL match = [pathMatcher matchesPath:[URL relativePath] tokenizeQueryStrings:NO parsedArguments:&argsDict];
+    NSString *airportID;
+    if (match) {
+        airportID = [argsDict objectForKey:@"airport_id"];
+        NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:@"GGTerminal"];
+        NSEntityDescription *entity = [NSEntityDescription entityForName:@"GGAirport" inManagedObjectContext:managedObjectStore.persistentStoreManagedObjectContext];
+        fetchRequest.predicate = [entity predicateForPrimaryKeyAttributeWithValue:airportID];
+        fetchRequest.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"name" ascending:YES]];
+        return fetchRequest;
+    }
+
+    return nil;
+}];
+
+ +

The above example code defines an RKFetchRequestBlock block object that will match an NSURL with a relative path matching the pattern @"/airports/:airport_id/terminals.json". If a match is found, the block extracts the airport_id key from the matched arguments and uses it to construct an NSPredicate for the primary key attribute of GGAirport entity. It then constructs an NSFetchRequest for the GGTerminal entity that will retrieve all the managed objects with an airport ID attribute whose value is equal to airport_id encoded within the URL’s path.

+ +

In more concrete terms, given the URL http://restkit.org/airports/1234/terminals.json the block would return an NSFetchRequest equal to:

+ +
NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:@"GGTerminal"];
+fetchRequest.predicate = [NSPredicate predicateWithFormat:@"airportID = 1234"];
+fetchRequest.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"name" ascending:YES]];
+
+ +

Once configured and registered with the object manager, any RKManagedObjectRequestOperation created through the manager will automatically consult the fetch request blocks and perform orphaned object cleanup. No cleanup is performed if no block in the fetchRequestBlocks property is found to match the URL of the request.

+ +

Managed Object Context Save Behaviors

+ +

The results of the operation can either be ‘pushed’ to the parent context or saved to the persistent store. Configuration is available via the savesToPersistentStore property. If an error is encountered while saving the managed object context, then the operation is considered to have failed and the error property will be set to the NSError object returned by the failed save.

+ +

Limitations and Caveats

Warning: RKManagedObjectRequestOperation does NOT support object mapping that targets an NSManagedObjectContext with a concurrencyType of NSConfinementConcurrencyType.

+
+ + + + + +
+ +

Tasks

+ + + +

Configuring Core Data Integration

+ +
    +
  • + +   managedObjectContext +

    The managed object context associated with the managed object request operation.

    +
    + property + +
  • + +   managedObjectCache +

    The managed object cache associated with the managed object request operation.

    +
    + property + +
  • + +   fetchRequestBlocks +

    An array of RKFetchRequestBlock block objects used to map NSURL objects into corresponding NSFetchRequest objects.

    +
    + property + +
  • +
+ + + +

Managing Completion Behaviors

+ +
    +
  • + +   deletesOrphanedObjects +

    A Boolean value that determines if the receiver will delete orphaned objects upon completion of the operation.

    +
    + property + +
  • + +   savesToPersistentStore +

    A Boolean value that determines if the operation saves the mapping results to the persistent store upon successful completion. If the network transport or mapping portions of the operation fail the operation then this option has no effect.

    +
    + property + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

deletesOrphanedObjects

+ + + +
+

A Boolean value that determines if the receiver will delete orphaned objects upon completion of the operation.

+
+ + + +
@property (nonatomic, assign) BOOL deletesOrphanedObjects
+ + + + + + + + + +
+

Discussion

+

A Boolean value that determines if the receiver will delete orphaned objects upon completion of the operation.

+ +

Please see the above discussion of ‘Deleting Managed Objects for DELETE requests’ for more details.

+ +

Default: NO

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectRequestOperation.h
+
+ + +
+ +
+ +

fetchRequestBlocks

+ + + +
+

An array of RKFetchRequestBlock block objects used to map NSURL objects into corresponding NSFetchRequest objects.

+
+ + + +
@property (nonatomic, copy) NSArray *fetchRequestBlocks
+ + + + + + + + + +
+

Discussion

+

An array of RKFetchRequestBlock block objects used to map NSURL objects into corresponding NSFetchRequest objects.

+ +

Fetch requests corresponding to URL’s are used when deleting orphaned objects and completing object request operations in which avoidsNetworkAccess has been set to YES. Please see the above discussion of ‘Fetch Request Blocks’ for more details.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectRequestOperation.h
+
+ + +
+ +
+ +

managedObjectCache

+ + + +
+

The managed object cache associated with the managed object request operation.

+
+ + + +
@property (nonatomic, weak) id<RKManagedObjectCaching> managedObjectCache
+ + + + + + + + + +
+

Discussion

+

The managed object cache associated with the managed object request operation.

+ +

The cache is used to look up existing objects by primary key to prevent the creation of duplicate objects during mapping. Please see the above discussion of ‘Managed Object Caching’ for more details.

Warning: A nil value for the managedObjectCache property is valid, but may result in the creation of duplicate objects.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectRequestOperation.h
+
+ + +
+ +
+ +

managedObjectContext

+ + + +
+

The managed object context associated with the managed object request operation.

+
+ + + +
@property (nonatomic, strong) NSManagedObjectContext *managedObjectContext
+ + + + + + + + + +
+

Discussion

+

The managed object context associated with the managed object request operation.

+ +

This context acts as the parent context for a private managed object context in which the object mapping is performed and changes will be saved to this context upon successful completion of the operation.

+ +

Please see the above discussion about ‘Parent Context’ for details.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectRequestOperation.h
+
+ + +
+ +
+ +

savesToPersistentStore

+ + + +
+

A Boolean value that determines if the operation saves the mapping results to the persistent store upon successful completion. If the network transport or mapping portions of the operation fail the operation then this option has no effect.

+
+ + + +
@property (nonatomic, assign) BOOL savesToPersistentStore
+ + + + + + + + + +
+

Discussion

+

A Boolean value that determines if the operation saves the mapping results to the persistent store upon successful completion. If the network transport or mapping portions of the operation fail the operation then this option has no effect.

+ +

When YES, the receiver will invoke saveToPersistentStore: on its private managed object context to persist the mapping results all the way back to the persistent store coordinator. If NO, the private mapping context will be saved causing the mapped objects to be ‘pushed’ to the parent context as represented by the managedObjectContext property.

+ +

Default: YES

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectRequestOperation.h
+
+ + +
+ +
+ + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKManagedObjectResponseMapperOperation.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKManagedObjectResponseMapperOperation.html new file mode 100644 index 00000000..7fc5a61f --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKManagedObjectResponseMapperOperation.html @@ -0,0 +1,426 @@ + + + + + RKManagedObjectResponseMapperOperation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromRKResponseMapperOperation : NSOperation
Declared inRKResponseMapperOperation.h
+ + + + +
+ +

Overview

+

RKManagedObjectResponseMapperOperation is an RKResponseMapperOperation subclass that provides support for performing object mapping using RKEntityMapping objects that target NSManagedObject derived classes. It requires an NSManagedObjectContext and a configured RKManagedObjectMappingOperationDataSource data source to execute successfully.

+ +

Performing response mapping that targets Core Data managed objects imposes some additional constraints on the process that the developer should understand thoroughly:

+ +
    +
  1. Permanent Managed Object IDs: When using managed object contexts in a parent-child configuration, it is important to obtain a permanent NSManagedObjectID for any existing objects that are to be mapped. Mapping that occur against objecs with temporary managedObjectID’s cannot be retrieved across contexts by ID. If executing an RKManagedObjectResponseMapperOperation against a NSManagedObject targetObject with a temporary ID.
  2. +
  3. Persisting Mapped Objects: Instances of RKManagedObjectResponseMapperOperation do NOT perform any persistence on the NSManagedObject in which the mapping occurs. This is by design and ensures that the operation can be used to compose higher level components that handle persistence. It is the developer’s responsibility to ensure that the mapped managed objects are eventually persisted.
  4. +
+ +
+ + + + + +
+ +

Tasks

+ + + + +

Configuring Core Data

+
    +
  • + +   managedObjectContext +

    The managed object context in which the mapping will be performed.

    +
    + property + +
  • + +   managedObjectCache +

    An object implementing the RKManagedObjectCaching protocol to be used for retrieving existing NSManagedObject instances by primary key. If nil, existing object cannot be retrieved and new objects will be created for all mappable content within the response data, likely resulting in the creation of duplicate objects.

    +
    + property + +
  • + +   targetObjectID +

    The permanent NSManagedObjectID for the target object of the mapping operation. During mapping, an instance local to the managedObjectContext is fetched and used to perform the mapping operation.

    +
    + property + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

managedObjectCache

+ + + +
+

An object implementing the RKManagedObjectCaching protocol to be used for retrieving existing NSManagedObject instances by primary key. If nil, existing object cannot be retrieved and new objects will be created for all mappable content within the response data, likely resulting in the creation of duplicate objects.

+
+ + + +
@property (nonatomic, weak) id<RKManagedObjectCaching> managedObjectCache
+ + + + + + + + + +
+

Discussion

+

An object implementing the RKManagedObjectCaching protocol to be used for retrieving existing NSManagedObject instances by primary key. If nil, existing object cannot be retrieved and new objects will be created for all mappable content within the response data, likely resulting in the creation of duplicate objects.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ +

managedObjectContext

+ + + +
+

The managed object context in which the mapping will be performed.

+
+ + + +
@property (nonatomic, strong) NSManagedObjectContext *managedObjectContext
+ + + + + + + + + +
+

Discussion

+

The managed object context in which the mapping will be performed.

Warning: The NSManagedObjectContext given must have a concurrencyType of either NSPrivateQueueConcurrencyType or NSMainQueueConcurrencyType. Thread confined contexts are not supported.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ +

targetObjectID

+ + + +
+

The permanent NSManagedObjectID for the target object of the mapping operation. During mapping, an instance local to the managedObjectContext is fetched and used to perform the mapping operation.

+
+ + + +
@property (nonatomic, copy) NSManagedObjectID *targetObjectID
+ + + + + + + + + +
+

Discussion

+

The permanent NSManagedObjectID for the target object of the mapping operation. During mapping, an instance local to the managedObjectContext is fetched and used to perform the mapping operation.

+ +

If nil and the targetObject is a managed object, the objectID of the target object will be used.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKManagedObjectStore.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKManagedObjectStore.html new file mode 100644 index 00000000..983abd72 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKManagedObjectStore.html @@ -0,0 +1,1559 @@ + + + + + RKManagedObjectStore Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKManagedObjectStore.h
+ + + + +
+ +

Overview

+

The RKManagedObjectStore class encapsulates a Core Data stack including a managed object model, a persistent store coordinator, and a set of managed object contexts. The managed object store simplifies the task of properly setting up a Core Data stack and provides some additional functionality, such as the use of a seed database to initialize a SQLite backed persistent store and a simple code path for resetting the store by destroying and recreating the persistent stores.

+ +

Initialization

+ +

The managed object store is designed to easily initialize a Core Data stack in a recommended configuration. A store object must always be initialized with a managed object model, but this managed object model can be directly provided, inferred from an already configured persistent store coordinator, or read from the currently available bundles within the application. Note that several features provided by the framework rely on the store being initialized with a mutable managed object model. Please refer to the documentation in the initWithManagedObjectModel: for details.

+ +

Managed Object Contexts

+ +

The managed object store provides the application developer with a pair of managed objects with which to work with Core Data. The store configures a primary managed object context with the NSPrivateQueueConcurrencyType that is associated with the persistent store coordinator for handling Core Data persistence. A second context is also created with the NSMainQueueConcurrencyType that is a child of the primary managed object context for doing work on the main queue. Additional child contexts can be created directly or via a convenience method interface provided by the store (see newChildManagedObjectContextWithConcurrencyType:).

+ +

The managed object context hierarchy is designed to isolate the main thread from disk I/O and avoid deadlocks. Because the primary context manages its own private queue, saving the main queue context will not result in the objects being saved to the persistent store. The primary context must be saved as well for objects to be persisted to disk.

+ +

It is also worth noting that because of the parent/child context hierarchy, objects created on the main thread will not obtain permanent managed object ID’s even after the primary context has been saved. If you need to refer to the permanent representations of objects created on the main thread after a save, you may ask the main queue context to obtain permanent managed objects for your objects via obtainPermanentIDsForObjects:error:. Be warned that when obtaining permanent managed object ID’s, you must include all newly created objects that are reachable from the object you are concerned with in the set of objects provided to obtainPermanentIDsForObjects:error:. This means any newly created object in a one-to-one or one-to-many relationship must be provided or you will face a crash from the managed object context. This is due to a bug in Core Data still present in iOS5, but fixed in iOS6 (see Open Radar http://openradar.appspot.com/11478919)..)

+
+ + + + + +
+ +

Tasks

+ + + +

Accessing the Default Object Store

+ +
    +
  • + + + defaultStore +

    Returns the default managed object store for the application.

    +
    + + +
  • + + + setDefaultStore: +

    Sets the default managed object store for the application.

    +
    + + +
  • +
+ + + +

Initializing an Object Store

+ +
    +
  • + + – initWithManagedObjectModel: +

    Initializes the receiver with a given managed object model. This is the designated initializer for RKManagedObjectStore.

    +
    + + +
  • + + – initWithPersistentStoreCoordinator: +

    Initializes the receiver with an existing persistent store coordinator.

    +
    + + +
  • + + – init +

    Initializes the receiver with a managed object model obtained by merging the models from all of the application’s non-framework bundles.

    +
    + + +
  • +
+ + + +

Configuring Persistent Stores

+ +
    +
  • + + – createPersistentStoreCoordinator +

    Creates a persistent store coordinator with the receiver’s managed object model. After invocation, the persistentStoreCoordinator property will no longer be nil.

    +
    + + +
  • + + – addInMemoryPersistentStore: +

    Adds a new in memory persistent store to the persistent store coordinator of the receiver.

    +
    + + +
  • + + – addSQLitePersistentStoreAtPath:fromSeedDatabaseAtPath:error: +

    Adds a new SQLite persistent store, optionally initialized with a seed database, to the persistent store coordinator of the receiver.

    +
    + + +
  • + + – resetPersistentStores: +

    Resets the persistent stores in the receiver’s persistent store coordinator and recreates them. If a store being reset is backed by a file on disk (such as a SQLite file), the file will be removed prior to recreating the store. If the store was originally created using a seed database, the seed will be recopied to reset the store to its seeded state.

    +
    + + +
  • +
+ + + +

Retrieving Details about the Store

+ + + + + +

Working with Managed Object Contexts

+ + + + + +

RKSearchAdditions Methods

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

mainQueueManagedObjectContext

+ + + +
+

The main queue managed object context of the receiver.

+
+ + + +
@property (nonatomic, strong, readonly) NSManagedObjectContext *mainQueueManagedObjectContext
+ + + + + + + + + +
+

Discussion

+

The main queue managed object context of the receiver.

+ +

The main queue context is available for usage on the main queue to drive user interface needs. The context is created with the NSMainQueueConcurrencyType and as such may be messaged directly from the main thread. The context is a child context of the persistentStoreManagedObjectContext and can persist changes up to the parent via a save.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

managedObjectCache

+ + + +
+

The managed object cache associated with the receiver.

+
+ + + +
@property (nonatomic, strong) id<RKManagedObjectCaching> managedObjectCache
+ + + + + + + + + +
+

Discussion

+

The managed object cache associated with the receiver.

+ +

The managed object cache is used to accelerate intensive Core Data operations by caching managed objects by their primary key value.

+ +

Default: An instance of RKFetchRequestManagedObjectCache.

Warning: A nil managed object cache will result in a store that is unable to uniquely identify existing objects by primary key attribute value and may result in the creation of duplicate objects within the store.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

managedObjectModel

+ + + +
+

Returns the managed object model of the receiver.

+
+ + + +
@property (nonatomic, strong, readonly) NSManagedObjectModel *managedObjectModel
+ + + + + +
+

Return Value

+

The managed object model of the receiver.

+
+ + + + + +
+

Discussion

+

Returns the managed object model of the receiver.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

persistentStoreCoordinator

+ + + +
+

Returns the persistent store coordinator of the receiver.

+
+ + + +
@property (nonatomic, strong, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator
+ + + + + +
+

Return Value

+

The persistent store coordinator of the receiver.

+
+ + + + + +
+

Discussion

+

Returns the persistent store coordinator of the receiver.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

persistentStoreManagedObjectContext

+ + + +
+

Returns the managed object context of the receiver that is associated with the persistent store coordinator and is responsible for managing persistence.

+
+ + + +
@property (nonatomic, strong, readonly) NSManagedObjectContext *persistentStoreManagedObjectContext
+ + + + + + + + + +
+

Discussion

+

Returns the managed object context of the receiver that is associated with the persistent store coordinator and is responsible for managing persistence.

+ +

The persistent store context is created with the NSPrivateQueueConcurrencyType and as such must be interacted with using [NSManagedObjectContext performBlock:] or [NSManagedObjectContext performBlockAndWait:]. This context typically serves as the parent context for scratch contexts or main queue contexts for interacting with the user interface. Created by the invocation of createManagedObjectContexts.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

searchIndexer

+ + + +
+

The search indexer for the receiver’s primary managed object context.

+
+ + + +
@property (nonatomic, readonly) RKSearchIndexer *searchIndexer
+ + + + + + + + + +
+

Discussion

+

The search indexer for the receiver’s primary managed object context.

+ +

A search indexer is instantiated when search indexing is added to an entity in the receiver’s managed object model.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore+RKSearchAdditions.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

defaultStore

+ + + +
+

Returns the default managed object store for the application.

+
+ + + +
+ (RKManagedObjectStore *)defaultStore
+ + + + + +
+

Return Value

+

The default managed object store.

+
+ + + + + +
+

Discussion

+

Returns the default managed object store for the application.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

setDefaultStore:

+ + + +
+

Sets the default managed object store for the application.

+
+ + + +
+ (void)setDefaultStore:(RKManagedObjectStore *)managedObjectStore
+ + + +
+

Parameters

+ +
+
managedObjectStore
+

The new default managed object store.

+
+ +
+ + + + + + + +
+

Discussion

+

Sets the default managed object store for the application.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

addInMemoryPersistentStore:

+ + + +
+

Adds a new in memory persistent store to the persistent store coordinator of the receiver.

+
+ + + +
- (NSPersistentStore *)addInMemoryPersistentStore:(NSError **)error
+ + + +
+

Parameters

+ +
+
error
+

On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information.

+
+ +
+ + + +
+

Return Value

+

The new persistent store, or nil in the event of an error.

+
+ + + + + +
+

Discussion

+

Adds a new in memory persistent store to the persistent store coordinator of the receiver.

+ +

This method will invoke createPersistentStore if a persistent store coordinator has not yet been created.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

addSQLitePersistentStoreAtPath:fromSeedDatabaseAtPath:error:

+ + + +
+

Adds a new SQLite persistent store, optionally initialized with a seed database, to the persistent store coordinator of the receiver.

+
+ + + +
- (NSPersistentStore *)addSQLitePersistentStoreAtPath:(NSString *)storePath fromSeedDatabaseAtPath:(NSString *)seedPath error:(NSError **)error
+ + + +
+

Parameters

+ +
+
storePath
+

The path at which to save the persistent store on disk.

+
+ +
+
seedPath
+

An optional path to a seed database to copy to the given storePath in the event that a store does not yet exist.

+
+ +
+
error
+

On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds a new SQLite persistent store, optionally initialized with a seed database, to the persistent store coordinator of the receiver.

Warning: If the seed database at the given path was created with an incompatible managed object model an application error may be raised.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

addSearchIndexingToEntityForName:onAttributes:

+ + + +
+

Adds search indexing to the entity for the given name in the receiver’s managed object model.

+
+ + + +
- (void)addSearchIndexingToEntityForName:(NSString *)entityName onAttributes:(NSArray *)attributes
+ + + +
+

Parameters

+ +
+
entityName
+

The name of the entity in the receiver’s managed object model that should be made searchable.

+
+ +
+
attributes
+

An array of NSAttributeDescription objects or NSString attribute names specifying the NSStringAttributeType attributes that are to be indexed for searching.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds search indexing to the entity for the given name in the receiver’s managed object model.

+ +

Invocation of this method will result in the entity for the given name being updated to include a new to-many relationship with the name searchWords. The receiver’s search indexer will also be instructed to begin monitoring changes to the specified entity’s searchable attributes to maintain the collection of search words. If no search indexer exists, a new

Warning: Must be invoked before adding persistent stores as the managed object model will become immutable once the persistent store coordinator is created.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore+RKSearchAdditions.h
+
+ + +
+ +
+ +

createManagedObjectContexts

+ + + +
+

Creates the persistent store and main queue managed object contexts for the receiver.

+
+ + + +
- (void)createManagedObjectContexts
+ + + + + + + + + +
+

Discussion

+

Creates the persistent store and main queue managed object contexts for the receiver.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

createPersistentStoreCoordinator

+ + + +
+

Creates a persistent store coordinator with the receiver’s managed object model. After invocation, the persistentStoreCoordinator property will no longer be nil.

+
+ + + +
- (void)createPersistentStoreCoordinator
+ + + + + + + + + +
+

Discussion

+

Creates a persistent store coordinator with the receiver’s managed object model. After invocation, the persistentStoreCoordinator property will no longer be nil.

Warning: Creating the persistent store coordinator will render the managed object model immutable. Attempts to use functionality that requires a mutable managed object model after the persistent store coordinator has been created will raise an application error.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

init

+ + + +
+

Initializes the receiver with a managed object model obtained by merging the models from all of the application’s non-framework bundles.

+
+ + + +
- (id)init
+ + + + + + + + + +
+

Discussion

+

Initializes the receiver with a managed object model obtained by merging the models from all of the application’s non-framework bundles.

Warning: Obtaining a managed object model by merging all bundles may result in an application error if versioned object models are in use.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

initWithManagedObjectModel:

+ + + +
+

Initializes the receiver with a given managed object model. This is the designated initializer for RKManagedObjectStore.

+
+ + + +
- (id)initWithManagedObjectModel:(NSManagedObjectModel *)managedObjectModel
+ + + +
+

Parameters

+ +
+
managedObjectModel
+

The managed object model with which to initialize the receiver.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given managed object model.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a given managed object model. This is the designated initializer for RKManagedObjectStore.

Bug: Several features require that the managed object model used to initialize the store be mutable so that entities may be changed before the persistent store coordinator is created. Since iOS 5, managed object models initialized via initWithContentsOfURL: return an immutable model. The application developer must send the returned managed object model a mutable copy message to ensure that it is mutable before initializing the managed object store. The recommended approach for initializing a managed object store is as follows:

+ +
NSURL *modelURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"MyApplication" ofType:@"momd"]];
+// NOTE: Due to an iOS 5 bug, the managed object model returned is immutable.
+NSManagedObjectModel *managedObjectModel = [[[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL] mutableCopy];
+RKManagedObjectStore *managedObjectStore = [[RKManagedObjectStore alloc] initWithManagedObjectModel:managedObjectModel];
+
+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

initWithPersistentStoreCoordinator:

+ + + +
+

Initializes the receiver with an existing persistent store coordinator.

+
+ + + +
- (id)initWithPersistentStoreCoordinator:(NSPersistentStoreCoordinator *)persistentStoreCoordinator
+ + + +
+

Parameters

+ +
+
persistentStoreCoordinator
+

The persistent store coordinator with which to initialize the receiver.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the managed object model of the given persistent store coordinator and the persistent store coordinator.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with an existing persistent store coordinator.

+ +

The managed object model from the persistent store coordinator will be used to initialize the receiver and the given persistent store coordinator will be configured as the persistent store coordinator for the managed object store.

+ +

This initialization method provides for easy integration with an existing Core Data stack.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

newChildManagedObjectContextWithConcurrencyType:

+ + + +
+

Creates a new child managed object context of the persistent store managed object context with a given concurrency type.

+
+ + + +
- (NSManagedObjectContext *)newChildManagedObjectContextWithConcurrencyType:(NSManagedObjectContextConcurrencyType)concurrencyType
+ + + +
+

Parameters

+ +
+
concurrencyType
+

The desired concurrency type for the new context.

+
+ +
+ + + +
+

Return Value

+

A newly created managed object context with the given concurrency type whose parent is the persistentStoreManagedObjectContext.

+
+ + + + + +
+

Discussion

+

Creates a new child managed object context of the persistent store managed object context with a given concurrency type.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

resetPersistentStores:

+ + + +
+

Resets the persistent stores in the receiver’s persistent store coordinator and recreates them. If a store being reset is backed by a file on disk (such as a SQLite file), the file will be removed prior to recreating the store. If the store was originally created using a seed database, the seed will be recopied to reset the store to its seeded state.

+
+ + + +
- (BOOL)resetPersistentStores:(NSError **)error
+ + + +
+

Parameters

+ +
+
error
+

On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information.

+
+ +
+ + + +
+

Return Value

+

A Boolean value indicating if the reset was successful.

+
+ + + + + +
+

Discussion

+

Resets the persistent stores in the receiver’s persistent store coordinator and recreates them. If a store being reset is backed by a file on disk (such as a SQLite file), the file will be removed prior to recreating the store. If the store was originally created using a seed database, the seed will be recopied to reset the store to its seeded state.

Warning: This method will implictly result in the managed object contexts associated with the receiver to be discarded and recreated. Any managed objects or additional child contexts associated with the store will need to be discarded or else exceptions may be raised (i.e. NSObjectInaccessibleException).

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

startIndexingPersistentStoreManagedObjectContext

+ + + +
+

Tells the search indexer to begin observing the persistent store managed object context for changes to searchable entities and updating the search words.

+
+ + + +
- (void)startIndexingPersistentStoreManagedObjectContext
+ + + + + + + + + +
+

Discussion

+

Tells the search indexer to begin observing the persistent store managed object context for changes to searchable entities and updating the search words.

+ +

This is a convenience method that is equivalent to the following example code:

+ +
RKSearchIndexer *searchIndexer = managedObjectStore.searchIndexer;
+[searchIndexer startObservingManagedObjectContext:managedObjectStore.persistentStoreManagedObjectContext];
+
+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore+RKSearchAdditions.h
+
+ + +
+ +
+ +

stopIndexingPersistentStoreManagedObjectContext

+ + + +
+

Tells the search indexer to stop observing the persistent store managed object context for changes to searchable entities.

+
+ + + +
- (void)stopIndexingPersistentStoreManagedObjectContext
+ + + + + + + + + +
+

Discussion

+

Tells the search indexer to stop observing the persistent store managed object context for changes to searchable entities.

+ +

This is a convenience method that is equivalent to the following example code:

+ +
RKSearchIndexer *searchIndexer = managedObjectStore.searchIndexer;
+[searchIndexer stopObservingManagedObjectContext:managedObjectStore.persistentStoreManagedObjectContext];
+
+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore+RKSearchAdditions.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKManagedObjectThreadSafeInvocation.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKManagedObjectThreadSafeInvocation.html new file mode 100644 index 00000000..aff8c6bc --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKManagedObjectThreadSafeInvocation.html @@ -0,0 +1,382 @@ + + + + + RKManagedObjectThreadSafeInvocation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSInvocation
Declared inRKManagedObjectThreadSafeInvocation.h
+ + + + + + +
+ +

Tasks

+ + + + + + + +
+ + + + + +
+ +

Properties

+ +
+ +

mainQueueManagedObjectContext

+ + + +
@property (nonatomic, strong) NSManagedObjectContext *mainQueueManagedObjectContext
+ + +
+ +
+ +

privateQueueManagedObjectContext

+ + + +
@property (nonatomic, strong) NSManagedObjectContext *privateQueueManagedObjectContext
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

invocationWithMethodSignature:

+ + + +
+ (RKManagedObjectThreadSafeInvocation *)invocationWithMethodSignature:(NSMethodSignature *)methodSignature
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

invokeOnMainThread

+ + + +
- (void)invokeOnMainThread
+ + +
+ +
+ +

setManagedObjectKeyPaths:forArgument:

+ + + +
- (void)setManagedObjectKeyPaths:(NSSet *)keyPaths forArgument:(NSInteger)index
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKMapperOperation.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKMapperOperation.html new file mode 100644 index 00000000..ee7fba49 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKMapperOperation.html @@ -0,0 +1,870 @@ + + + + + RKMapperOperation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSOperation
Declared inRKMapperOperation.h
+ + + + +
+ +

Overview

+

RKMapperOperation is an NSOperation subclass that implements object mapping for opaque object representations. Given a dictionary or an array of dictionaries that represent objects and a dictionary describing how to map the representations, the mapper will transform the source representations into NSObject or NSManagedObject instances. Mapper operations are used to map object representations from Foundation object representations, such as those deserialized from a JSON or XML document or loaded from a file. Not all the mappings specified in the mappings dictionary are required to match content in the source object for the operation to succeed. However, if none of the mappable key paths in the mappings dictionary match the source object then the operation will fail and the error property will be set to an NSError object in the RKErrorDomain domain with an error code value of RKMappingErrorNotFound.

+ +

RKMapperOperation does not actually perform any mapping work. Instead, it instantiates and starts RKMappingOperation objects to process the mappable object representations it encounters.

+ +

RKMapperOperation is a non-concurrent operation. Execution will occur synchronously on the calling thread unless the operation is enqueued onto an NSOperationQueue.

+ +

Mappings Dictionary

+ +

The mappings dictionary describes how to object map the source object. The keys of the dictionary are key paths into the sourceObject and the values are RKMapping objects describing how to map the representations at the corresponding key path. This dictionary based approach enables a single document to contain an arbitrary number of object representations that can be mapped independently. Consider the following example JSON structure:

+ +
{ "tags": [ "hacking", "phreaking" ], "authors": [ "Captain Crunch", "Emmanuel Goldstein" ], "magazine": { "title": "2600 The Hacker Quarterly" } }
+
+ +

Each key in the document could be mapped independently by providing a mapping for the key paths:

+ +
RKObjectMapping *tagMapping = [RKObjectMapping mappingForClass:[Tag class]];
+RKObjectMapping *authorMapping = [RKObjectMapping mappingForClass:[Author class]];
+RKObjectMapping *magazineMapping = [RKObjectMapping mappingForClass:[Magazine class]];
+NSDictionary *mappingsDictionary = @{ @"tag": tagMapping, @"author": authorMapping, @"magazine": magazine };
+
+ +

Note that the keys of the dictionary are key paths. Deeply nested content can be mapped by specifying the full key path as the key of the mappings dictionary.

+ +

The NSNull Key

+ +

A mapping set for the key [NSNull null] value has special significance to the mapper operation. When a mapping is encountered with the a null key, the entire sourceObject is processed using the given mapping. This provides support for mapping content that does not have an outer nesting attribute.

+ +

Data Source

+ +

The data source is used to instantiate new objects or find existing objects to be updated during the mapping process. The object set as the mappingOperationDataSource will be set as the dataSource for the RKMappingOperation objects created by the mapper.

+ +

Target Object

+ +

If a targetObject is configured on the mapper operation, all mapping work on the sourceObject will target the specified object. For transient NSObject mappings, this ensures that the properties of an existing object are updated rather than an new object being created for the mapped representation. If an array of representations is being processed and a targetObject is provided, it must be a mutable collection object else an exception will be raised.

+ +

Core Data

+ +

RKMapperOperation supports mapping to Core Data target entities. To do so, it must be configured with an RKManagedObjectMappingOperationDataSource object as the data source.

+
+ + + + + +
+ +

Tasks

+ + + +

Initializing a Mapper Operation

+ + + + + +

Accessing Mapping Result and Errors

+ +
    +
  • + +   error +

    The error, if any, that occurred during the mapping process.

    +
    + property + +
  • + +   mappingResult +

    The result of the mapping process. A nil value indicates that no mappable object representations were found and no mapping was performed.

    +
    + property + +
  • +
+ + + +

Managing Mapping Configuration

+ +
    +
  • + +   sourceObject +

    The source object representation against which the mapping is performed.

    +
    + property + +
  • + +   mappingsDictionary +

    A dictionary of key paths to RKMapping objects specifying how object representations in the sourceObject are to be mapped.

    +
    + property + +
  • + +   targetObject +

    The target object of the mapper. When configured, all object mapping will target the specified object.

    +
    + property + +
  • + +   mappingOperationDataSource +

    The data source for the underlying RKMappingOperation objects that perform the mapping work configured by the mapper.

    +
    + property + +
  • + +   delegate +

    The delegate for the mapper operation.

    +
    + property + +
  • +
+ + + +

Private Methods

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

delegate

+ + + +
+

The delegate for the mapper operation.

+
+ + + +
@property (nonatomic, weak) id<RKMapperOperationDelegate> delegate
+ + + + + + + + + +
+

Discussion

+

The delegate for the mapper operation.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

error

+ + + +
+

The error, if any, that occurred during the mapping process.

+
+ + + +
@property (nonatomic, strong, readonly) NSError *error
+ + + + + + + + + +
+

Discussion

+

The error, if any, that occurred during the mapping process.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mappingOperationDataSource

+ + + +
+

The data source for the underlying RKMappingOperation objects that perform the mapping work configured by the mapper.

+
+ + + +
@property (nonatomic, strong) id<RKMappingOperationDataSource> mappingOperationDataSource
+ + + + + + + + + +
+

Discussion

+

The data source for the underlying RKMappingOperation objects that perform the mapping work configured by the mapper.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mappingResult

+ + + +
+

The result of the mapping process. A nil value indicates that no mappable object representations were found and no mapping was performed.

+
+ + + +
@property (nonatomic, strong, readonly) RKMappingResult *mappingResult
+ + + + + + + + + +
+

Discussion

+

The result of the mapping process. A nil value indicates that no mappable object representations were found and no mapping was performed.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mappingsDictionary

+ + + +
+

A dictionary of key paths to RKMapping objects specifying how object representations in the sourceObject are to be mapped.

+
+ + + +
@property (nonatomic, strong, readonly) NSDictionary *mappingsDictionary
+ + + + + + + + + +
+

Discussion

+

A dictionary of key paths to RKMapping objects specifying how object representations in the sourceObject are to be mapped.

+ +

Please see the above discussion for in-depth details about the mappings dictionary.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

sourceObject

+ + + +
+

The source object representation against which the mapping is performed.

+
+ + + +
@property (nonatomic, strong, readonly) id sourceObject
+ + + + + + + + + +
+

Discussion

+

The source object representation against which the mapping is performed.

+ +

Either an NSDictionary or an NSArray of NSDictionary objects.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

targetObject

+ + + +
+

The target object of the mapper. When configured, all object mapping will target the specified object.

+
+ + + +
@property (nonatomic, weak) id targetObject
+ + + + + + + + + +
+

Discussion

+

The target object of the mapper. When configured, all object mapping will target the specified object.

+ +

Please see the above discussion for details about target objects.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

initWithObject:mappingsDictionary:

+ + + +
+

Initializes the operation with a source object and a mappings dictionary.

+
+ + + +
- (id)initWithObject:(id)object mappingsDictionary:(NSDictionary *)mappingsDictionary
+ + + +
+

Parameters

+ +
+
object
+

An NSDictionary or NSArray of NSDictionary object representations to be mapped into local domain objects.

+
+ +
+
mappingsDictionary
+

An NSDictionary wherein the keys are mappable key paths in object and the values are RKMapping objects specifying how the representations at its key path are to be mapped.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given object and and dictionary of key paths to mappings.

+
+ + + + + +
+

Discussion

+

Initializes the operation with a source object and a mappings dictionary.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mapCollection:atKeyPath:usingMapping:

+ + + +
- (NSArray *)mapCollection:(NSArray *)mappableObjects atKeyPath:(NSString *)keyPath usingMapping:(RKMapping *)mapping
+ + +
+ +
+ +

mapFromObject:toObject:atKeyPath:usingMapping:

+ + + +
- (BOOL)mapFromObject:(id)mappableObject toObject:(id)destinationObject atKeyPath:(NSString *)keyPath usingMapping:(RKMapping *)mapping
+ + +
+ +
+ +

mapObject:atKeyPath:usingMapping:

+ + + +
- (id)mapObject:(id)mappableObject atKeyPath:(NSString *)keyPath usingMapping:(RKMapping *)mapping
+ + +
+ +
+ +

objectWithMapping:andData:

+ + + +
- (id)objectWithMapping:(RKMapping *)objectMapping andData:(id)mappableData
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKMapping.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKMapping.html new file mode 100644 index 00000000..03abd45e --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKMapping.html @@ -0,0 +1,402 @@ + + + + + RKMapping Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKMapping.h
+ + + + +
+ +

Overview

+

RKMapping is an abstract class for objects defining RestKit object mappings. Its interface is common to all object mapping classes, including its concrete subclasses RKObjectMapping and RKDynamicMapping.

+
+ + + + + +
+ +

Tasks

+ + + +

Forcing Collection Mapping

+ +
    +
  • + +   forceCollectionMapping +

    Forces the mapper to treat the mapped keyPath as a collection even if it does not return an array or a set of objects. This permits mapping where a dictionary identifies a collection of objects.

    +
    + property + +
  • +
+ + + +

Comparing Mappings

+ +
    +
  • + + – isEqualToMapping: +

    Returns YES if the receiver and the specified mapping are considered equivalent.

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

forceCollectionMapping

+ + + +
+

Forces the mapper to treat the mapped keyPath as a collection even if it does not return an array or a set of objects. This permits mapping where a dictionary identifies a collection of objects.

+
+ + + +
@property (nonatomic, assign) BOOL forceCollectionMapping
+ + + + + + + + + +
+

Discussion

+

Forces the mapper to treat the mapped keyPath as a collection even if it does not return an array or a set of objects. This permits mapping where a dictionary identifies a collection of objects.

+ +

When enabled, each key/value pair in the resolved dictionary will be mapped as a separate entity. This is useful when you have a JSON structure similar to:

+ +
 { "users": {
+    "blake": { "id": 1234, "email": "blake@restkit.org" },
+    "rachit": { "id": 5678", "email": "rachit@restkit.org" }
+    }
+ }
+
+ +

By enabling forceCollectionMapping, RestKit will map “blake” => attributes and “rachit” => attributes as independent objects. This can be combined with mapKeyOfNestedDictionaryToAttribute: to properly map these sorts of structures.

+ +

@default NO

+
+ + + + + + + +
+

Declared In

+ RKMapping.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

isEqualToMapping:

+ + + +
+

Returns YES if the receiver and the specified mapping are considered equivalent.

+
+ + + +
- (BOOL)isEqualToMapping:(RKMapping *)otherMapping
+ + + + + + + + + +
+

Discussion

+

Returns YES if the receiver and the specified mapping are considered equivalent.

+ +

NOTE: Must be implemented in subclass.

+
+ + + + + + + +
+

Declared In

+ RKMapping.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKMappingOperation.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKMappingOperation.html new file mode 100644 index 00000000..98c59bcc --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKMappingOperation.html @@ -0,0 +1,817 @@ + + + + + RKMappingOperation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSOperation
Declared inRKMappingOperation.h
+ + + + +
+ +

Overview

+

Instances of RKMappingOperation perform transformation between object representations according to the rules expressed in RKObjectMapping objects. Mapping operations provide the foundation for the RestKit object mapping engine and perform the work of inspecting the attributes and relationships of a source object and determining how to map them into new representations on a destination object.

+
+ + + + + +
+ +

Tasks

+ + + +

Initializing a Mapping Operation

+ + + + + +

Accessing Mapping Configuration

+ +
    +
  • + +   sourceObject +

    A dictionary of mappable elements containing simple values or nested object structures.

    +
    + property + +
  • + +   destinationObject +

    The target object for this operation. Mappable values in the source object will be applied to the destination object using key-value coding.

    +
    + property + +
  • + +   mapping +

    The mapping defining how values contained in the source object should be transformed to the destination object via key-value coding.

    +
    + property + +
  • + +   objectMapping +

    The concrete object mapping for the operation.

    +
    + property + +
  • +
+ + + +

Configuring Delegate and Data Source

+ +
    +
  • + +   delegate +

    The delegate to inform of interesting events during the mapping operation lifecycle.

    +
    + property + +
  • + +   dataSource +

    The data source is responsible for providing the mapping operation with an appropriate target object for mapping when the destinationObject is nil.

    +
    + property + +
  • + +   error +

    The error, if any, that occurred during the execution of the mapping operation.

    +
    + property + +
  • +
+ + + +

Performing Mapping

+ +
    +
  • + + – performMapping: +

    Process all mappable values from the mappable dictionary and assign them to the target object according to the rules expressed in the object mapping definition

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

dataSource

+ + + +
+

The data source is responsible for providing the mapping operation with an appropriate target object for mapping when the destinationObject is nil.

+
+ + + +
@property (nonatomic, weak) id<RKMappingOperationDataSource> dataSource
+ + + + + + + + + +
+

Discussion

+

The data source is responsible for providing the mapping operation with an appropriate target object for mapping when the destinationObject is nil.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

delegate

+ + + +
+

The delegate to inform of interesting events during the mapping operation lifecycle.

+
+ + + +
@property (nonatomic, weak) id<RKMappingOperationDelegate> delegate
+ + + + + + + + + +
+

Discussion

+

The delegate to inform of interesting events during the mapping operation lifecycle.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

destinationObject

+ + + +
+

The target object for this operation. Mappable values in the source object will be applied to the destination object using key-value coding.

+
+ + + +
@property (nonatomic, strong, readonly) id destinationObject
+ + + + + + + + + +
+

Discussion

+

The target object for this operation. Mappable values in the source object will be applied to the destination object using key-value coding.

+ +

If initialized with a nil destination object, the mapping operation will attempt to find or create a destination object via the data source and will populate the value of the destinationObject property.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

error

+ + + +
+

The error, if any, that occurred during the execution of the mapping operation.

+
+ + + +
@property (nonatomic, strong, readonly) NSError *error
+ + + + + + + + + +
+

Discussion

+

The error, if any, that occurred during the execution of the mapping operation.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

mapping

+ + + +
+

The mapping defining how values contained in the source object should be transformed to the destination object via key-value coding.

+
+ + + +
@property (nonatomic, strong, readonly) RKMapping *mapping
+ + + + + + + + + +
+

Discussion

+

The mapping defining how values contained in the source object should be transformed to the destination object via key-value coding.

+ +

Will either be an instance of RKObjectMapping or RKDynamicMapping.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

objectMapping

+ + + +
+

The concrete object mapping for the operation.

+
+ + + +
@property (nonatomic, strong, readonly) RKObjectMapping *objectMapping
+ + + + + + + + + +
+

Discussion

+

The concrete object mapping for the operation.

+ +

If the value of mapping is an RKObjectMapping, returns the same value as mapping. If mapping is an RKDynamicMapping, then returns the concrete RKObjectMapping object selected for mapping sourceObject.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

sourceObject

+ + + +
+

A dictionary of mappable elements containing simple values or nested object structures.

+
+ + + +
@property (nonatomic, strong, readonly) id sourceObject
+ + + + + + + + + +
+

Discussion

+

A dictionary of mappable elements containing simple values or nested object structures.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

initWithSourceObject:destinationObject:mapping:

+ + + +
+

Initializes the receiver with a source object, a destination object and an object mapping with which to perform an object mapping.

+
+ + + +
- (id)initWithSourceObject:(id)sourceObject destinationObject:(id)destinationObject mapping:(RKMapping *)objectOrDynamicMapping
+ + + +
+

Parameters

+ +
+
sourceObject
+

The source object to be mapped. Cannot be nil.

+
+ +
+
destinationObject
+

The destination object the results are to be mapped onto. May be nil, in which case a new object target object will be obtained from the dataSource.

+
+ +
+
objectOrDynamicMapping
+

An instance of RKObjectMapping or RKDynamicMapping defining how the mapping is to be performed.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with a source object, a destination object, and a mapping.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a source object, a destination object and an object mapping with which to perform an object mapping.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

performMapping:

+ + + +
+

Process all mappable values from the mappable dictionary and assign them to the target object according to the rules expressed in the object mapping definition

+
+ + + +
- (BOOL)performMapping:(NSError **)error
+ + + +
+

Parameters

+ +
+
error
+

A pointer to an NSError reference to capture any error that occurs during the mapping. May be nil.

+
+ +
+ + + +
+

Return Value

+

A Boolean value indicating if the mapping operation was successful.

+
+ + + + + +
+

Discussion

+

Process all mappable values from the mappable dictionary and assign them to the target object according to the rules expressed in the object mapping definition

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKMappingResult.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKMappingResult.html new file mode 100644 index 00000000..bcdde220 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKMappingResult.html @@ -0,0 +1,640 @@ + + + + + RKMappingResult Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKMappingResult.h
+ + + + +
+ +

Overview

+

The RKMappingResult class represents the aggregate object mapping results returned by an RKMapperOperation object. The mapping result provides a thin interface on top of an NSDictionary and provides convenient interfaces for accessing the mapping results in various representations.

+
+ + + + + +
+ +

Tasks

+ + + +

Creating a Mapping Result

+ + + + + +

Retrieving Result Representations

+ +
    +
  • + + – dictionary +

    Returns a representation of the mapping result as a dictionary.

    +
    + + +
  • + + – firstObject +

    Returns a representation of the mapping result as a single object by returning the first mapped value from the aggregate array of mapped objects.

    +
    + + +
  • + + – array +

    Returns a representation of the mapping result as an array of objects.

    +
    + + +
  • + + – set +

    Returns a representation of the mapping result as a set of objects.

    +
    + + +
  • +
+ + + +

Counting Entries

+ +
    +
  • + + – count +

    Returns a count of the number of objects contained in the mapping result. This is an aggregate count of all objects across all mapped key paths in the result.

    +
    + + +
  • +
+ +
+ + + + + + + + + +
+ +

Instance Methods

+ +
+ +

array

+ + + +
+

Returns a representation of the mapping result as an array of objects.

+
+ + + +
- (NSArray *)array
+ + + + + +
+

Return Value

+

An array containing the objects contained in the mapping result.

+
+ + + + + +
+

Discussion

+

Returns a representation of the mapping result as an array of objects.

+ +

The array returned is a flattened collection of all mapped object values contained in the underlying dictionary result representation. No guarantee is made as to the ordering of objects within the returned collection when more than one key path was mapped, as NSDictionary objects are unordered,

+
+ + + + + + + +
+

Declared In

+ RKMappingResult.h
+
+ + +
+ +
+ +

count

+ + + +
+

Returns a count of the number of objects contained in the mapping result. This is an aggregate count of all objects across all mapped key paths in the result.

+
+ + + +
- (NSUInteger)count
+ + + + + +
+

Return Value

+

A count of the number of mapped objects in the mapping result.

+
+ + + + + +
+

Discussion

+

Returns a count of the number of objects contained in the mapping result. This is an aggregate count of all objects across all mapped key paths in the result.

+
+ + + + + + + +
+

Declared In

+ RKMappingResult.h
+
+ + +
+ +
+ +

dictionary

+ + + +
+

Returns a representation of the mapping result as a dictionary.

+
+ + + +
- (NSDictionary *)dictionary
+ + + + + +
+

Return Value

+

A dictionary containing the mapping results.

+
+ + + + + +
+

Discussion

+

Returns a representation of the mapping result as a dictionary.

+ +

The keys of the returned dictionary will correspond to the mapped key paths in the source object representation and the values will be the mapped objects. The returned value is a copy of the dictionary that was used to initialize the mapping result.

+
+ + + + + + + +
+

Declared In

+ RKMappingResult.h
+
+ + +
+ +
+ +

firstObject

+ + + +
+

Returns a representation of the mapping result as a single object by returning the first mapped value from the aggregate array of mapped objects.

+
+ + + +
- (id)firstObject
+ + + + + +
+

Return Value

+

The first object contained in the mapping result.

+
+ + + + + +
+

Discussion

+

Returns a representation of the mapping result as a single object by returning the first mapped value from the aggregate array of mapped objects.

+ +

The mapping result is coerced into a single object by retrieving all mapped objects and returning the first object. If the mapping result is empty, nil is returned.

+
+ + + + + + + +
+

Declared In

+ RKMappingResult.h
+
+ + +
+ +
+ +

initWithDictionary:

+ + + +
+

Initializes the receiver with a dictionary of mapped key paths and object values.

+
+ + + +
- (id)initWithDictionary:(NSDictionary *)dictionary
+ + + +
+

Parameters

+ +
+
dictionary
+

A dictionary wherein the keys represent mapped key paths and the values represent the objects mapped at those key paths. Cannot be nil.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given dictionary.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a dictionary of mapped key paths and object values.

+
+ + + + + + + +
+

Declared In

+ RKMappingResult.h
+
+ + +
+ +
+ +

set

+ + + +
+

Returns a representation of the mapping result as a set of objects.

+
+ + + +
- (NSSet *)set
+ + + + + +
+

Return Value

+

A set containing the objects contained in the mapping result.

+
+ + + + + +
+

Discussion

+

Returns a representation of the mapping result as a set of objects.

+ +

The set returned is a flattened collection of all mapped object values contained in the underlying dictionary result representation.

+
+ + + + + + + +
+

Declared In

+ RKMappingResult.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKMappingTest.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKMappingTest.html new file mode 100644 index 00000000..f62605ba --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKMappingTest.html @@ -0,0 +1,1515 @@ + + + + + RKMappingTest Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKMappingTest.h
+ + + + +
+ +

Overview

+

An RKMappingTest object provides support for unit testing a RestKit object mapping operation by evaluation expectations against events recorded during an object mapping operation.

+
+ + + + + +
+ +

Tasks

+ + + +

Creating Tests

+ + + + + +

Setting Expectations

+ + + + + +

Verifying Results

+ +
    +
  • + + – performMapping +

    Performs the object mapping operation and records any mapping events that occur. The mapping events can be verified against expectation through a subsequent call to verify.

    +
    + + +
  • + + – verify +

    Verifies that the mapping is configured correctly by performing an object mapping operation and ensuring that all expectations are met.

    +
    + + +
  • + + – evaluate +

    Evaluates the expectations and returns a Boolean value indicating if all expectations are satisfied.

    +
    + + +
  • + + – evaluateExpectation:error: +

    Evaluates the given expectation against the mapping test and returns a Boolean value indicating if the expectation is met by the receiver.

    +
    + + +
  • +
+ + + +

Test Configuration

+ + + + + +

Core Data Integration

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

destinationObject

+ + + +
+

The destionation object being mapped to.

+
+ + + +
@property (nonatomic, strong, readonly) id destinationObject
+ + + + + + + + + +
+

Discussion

+

The destionation object being mapped to.

+ +

If nil, the mapping test will instantiate a destination object to perform the mapping by invoking [self.mappingOperationDataSource objectForMappableContent:self.sourceObject mapping:self.mapping] to obtain a new object from the data source and then assign the object as the value for the destinationObject property.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

managedObjectCache

+ + + +
+

The managed object cache to use when performing a mapping test.

+
+ + + +
@property (nonatomic, strong) id<RKManagedObjectCaching> managedObjectCache
+ + + + + + + + + +
+

Discussion

+

The managed object cache to use when performing a mapping test.

+ +

If the value of this property is nil and the test targets an entity mapping, an instance of RKFetchRequestManagedObjectCache will be constructed and used as the cache for the purposes of testing.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

managedObjectContext

+ + + +
+

The managed object context within which to perform the mapping test. Required if testing an RKEntityMapping object and an appropriate mappingOperationDataSource has not been configured.

+
+ + + +
@property (nonatomic, strong) NSManagedObjectContext *managedObjectContext
+ + + + + + + + + +
+

Discussion

+

The managed object context within which to perform the mapping test. Required if testing an RKEntityMapping object and an appropriate mappingOperationDataSource has not been configured.

+ +

When the mappingOperationDataSource property is nil and the test targets an entity mapping, this context is used to configure an RKManagedObjectMappingOperationDataSource object for the purpose of executing the test.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

mapping

+ + + +
+

The mapping under test. Can be either an RKObjectMapping or RKDynamicMapping object.

+
+ + + +
@property (nonatomic, strong, readonly) RKMapping *mapping
+ + + + + + + + + +
+

Discussion

+

The mapping under test. Can be either an RKObjectMapping or RKDynamicMapping object.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

mappingOperationDataSource

+ + + +
+

A data source for the mapping operation.

+
+ + + +
@property (nonatomic, strong) id<RKMappingOperationDataSource> mappingOperationDataSource
+ + + + + + + + + +
+

Discussion

+

A data source for the mapping operation.

+ +

If nil, an appropriate data source will be constructed for you using the available configuration of the receiver.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

rootKeyPath

+ + + +
+

A key path to apply to the source object to specify the location of the root of the data under test. Useful when testing subsets of a larger payload or object graph.

+
+ + + +
@property (nonatomic, copy) NSString *rootKeyPath
+ + + + + + + + + +
+

Discussion

+

A key path to apply to the source object to specify the location of the root of the data under test. Useful when testing subsets of a larger payload or object graph.

+ +

Default: nil

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

sourceObject

+ + + +
+

The source object being mapped from.

+
+ + + +
@property (nonatomic, strong, readonly) id sourceObject
+ + + + + + + + + +
+

Discussion

+

The source object being mapped from.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

verifiesOnExpect

+ + + +
+

A Boolean value that determines if expectations should be verified immediately when added to the receiver.

+
+ + + +
@property (nonatomic, assign) BOOL verifiesOnExpect
+ + + + + + + + + +
+

Discussion

+

A Boolean value that determines if expectations should be verified immediately when added to the receiver.

+ +

Default: NO

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

testForMapping:sourceObject:destinationObject:

+ + + +
+

Creates and returns a new test for a given object mapping, source object and destination +object.

+
+ + + +
+ (RKMappingTest *)testForMapping:(RKMapping *)mapping sourceObject:(id)sourceObject destinationObject:(id)destinationObject
+ + + +
+

Parameters

+ +
+
mapping
+

The mapping being tested.

+
+ +
+
sourceObject
+

The source object being mapped from.

+
+ +
+
destinationObject
+

The destionation object being to.

+
+ +
+ + + +
+

Return Value

+

A new mapping test object for a mapping, a source object and a destination object.

+
+ + + + + +
+

Discussion

+

Creates and returns a new test for a given object mapping, source object and destination +object.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

addExpectation:

+ + + +
+

Adds an expectation to the receiver to be evaluated during verification.

+
+ + + +
- (void)addExpectation:(RKMappingTestExpectation *)expectation
+ + + +
+

Parameters

+ +
+
expectation
+

An expectation object to evaluate during test verification.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds an expectation to the receiver to be evaluated during verification.

+ +

If the receiver has been configured with verifiesOnExpect = YES, the mapping operation is performed immediately and the expectation is evaluated.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

evaluate

+ + + +
+

Evaluates the expectations and returns a Boolean value indicating if all expectations are satisfied.

+
+ + + +
- (BOOL)evaluate
+ + + + + +
+

Return Value

+

YES if all expectations were met, else NO.

+
+ + + + + +
+

Discussion

+

Evaluates the expectations and returns a Boolean value indicating if all expectations are satisfied.

+ +

Invocation of this method will implicitly invoke performMapping if the mapping has not yet been performed.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

evaluateExpectation:error:

+ + + +
+

Evaluates the given expectation against the mapping test and returns a Boolean value indicating if the expectation is met by the receiver.

+
+ + + +
- (BOOL)evaluateExpectation:(RKMappingTestExpectation *)expectation error:(NSError **)error
+ + + +
+

Parameters

+ +
+
expectation
+

The expectation to evaluate against the receiver.

+
+ +
+
error
+

A pointer to an NSError object to be set describing the failure in the event that the expectation is not met.

+
+ +
+ + + +
+

Return Value

+

YES if the expectation is met, else NO.

+
+ + + + + +
+

Discussion

+

Evaluates the given expectation against the mapping test and returns a Boolean value indicating if the expectation is met by the receiver.

+ +

Invocation of this method will implicitly invoke performMapping if the mapping has not yet been performed.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

expectMappingFromKeyPath:toKeyPath:

+ + + +
+

Creates and adds an expectation that a key path on the source object will be mapped to a new key path on the destination object.

+
+ + + +
- (void)expectMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath
+ + + +
+

Parameters

+ +
+
sourceKeyPath
+

A key path on the sourceObject that should be mapped from.

+
+ +
+
destinationKeyPath
+

A key path on the destinationObject that should be mapped to.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates and adds an expectation that a key path on the source object will be mapped to a new key path on the destination object.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

expectMappingFromKeyPath:toKeyPath:passingTest:

+ + + +
+

Creates and adds an expectation that a key path on the source object will be mapped to a new key path on the destination object with a value that passes a given test block.

+
+ + + +
- (void)expectMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath passingTest:(RKMappingTestExpectationEvaluationBlock)evaluationBlock
+ + + +
+

Parameters

+ +
+
sourceKeyPath
+

A key path on the sourceObject that should be mapped from.

+
+ +
+
destinationKeyPath
+

A key path on the destinationObject that should be mapped to.

+
+ +
+
evaluationBlock
+

A block with which to evaluate the success of the mapping.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates and adds an expectation that a key path on the source object will be mapped to a new key path on the destination object with a value that passes a given test block.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

expectMappingFromKeyPath:toKeyPath:usingMapping:

+ + + +
+

Creates and adds an expectation that a key path on the source object will be mapped to a new key path on the destination object using the given object mapping.

+
+ + + +
- (void)expectMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath usingMapping:(RKMapping *)mapping
+ + + +
+

Parameters

+ +
+
sourceKeyPath
+

A key path on the sourceObject that should be mapped from.

+
+ +
+
destinationKeyPath
+

A key path on the destinationObject that should be mapped to.

+
+ +
+
mapping
+

An object mapping that should be used for mapping the source key path.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates and adds an expectation that a key path on the source object will be mapped to a new key path on the destination object using the given object mapping.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

expectMappingFromKeyPath:toKeyPath:withValue:

+ + + +
+

Creates and adds an expectation that a key path on the source object will be mapped to a new key path on the destination object with a given value.

+
+ + + +
- (void)expectMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath withValue:(id)value
+ + + +
+

Parameters

+ +
+
sourceKeyPath
+

A key path on the sourceObject that should be mapped from.

+
+ +
+
destinationKeyPath
+

A key path on the destinationObject that should be mapped from.

+
+ +
+
value
+

A value that is expected to be assigned to destinationKeyPath on the destinationObject.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates and adds an expectation that a key path on the source object will be mapped to a new key path on the destination object with a given value.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

initWithMapping:sourceObject:destinationObject:

+ + + +
+

Initializes the receiver with a given object mapping, source object, and destination object.

+
+ + + +
- (id)initWithMapping:(RKMapping *)mapping sourceObject:(id)sourceObject destinationObject:(id)destinationObject
+ + + +
+

Parameters

+ +
+
mapping
+

The mapping being tested.

+
+ +
+
sourceObject
+

The source object being mapped from.

+
+ +
+
destinationObject
+

The destionation object being to.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with mapping, sourceObject and destinationObject.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a given object mapping, source object, and destination object.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

performMapping

+ + + +
+

Performs the object mapping operation and records any mapping events that occur. The mapping events can be verified against expectation through a subsequent call to verify.

+
+ + + +
- (void)performMapping
+ + + + + + + + + +
+

Discussion

+

Performs the object mapping operation and records any mapping events that occur. The mapping events can be verified against expectation through a subsequent call to verify.

+
+ + + +
+

Exceptions

+ +
+
NSInternalInconsistencyException
+

Raises an NSInternalInconsistencyException if mapping fails.

+
+ +
+ + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

verify

+ + + +
+

Verifies that the mapping is configured correctly by performing an object mapping operation and ensuring that all expectations are met.

+
+ + + +
- (void)verify
+ + + + + + + + + +
+

Discussion

+

Verifies that the mapping is configured correctly by performing an object mapping operation and ensuring that all expectations are met.

+
+ + + +
+

Exceptions

+ +
+
RKMappingTestVerificationFailureException
+

Raises an RKMappingTestVerificationFailureException exception if mapping fails or any expectation is not satisfied.

+
+ +
+ + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKMappingTestExpectation.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKMappingTestExpectation.html new file mode 100644 index 00000000..51d5f7dd --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKMappingTestExpectation.html @@ -0,0 +1,918 @@ + + + + + RKMappingTestExpectation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKMappingTestExpectation.h
+ + + + +
+ +

Overview

+

An RKMappingTestExpectation object defines an expected mapping event that should occur during the execution of a RKMappingTest.

+
+ + + + + +
+ +

Tasks

+ + + +

Creating Expectations

+ + + + + +

Expectation Values

+ +
    +
  • + +   sourceKeyPath +

    Returns a keyPath on the source object that a value should be mapped from.

    +
    + property + +
  • + +   destinationKeyPath +

    Returns a keyPath on the destination object that a value should be mapped to.

    +
    + property + +
  • + +   value +

    Returns the expected value that should be set to the destinationKeyPath of the destination object.

    +
    + property + +
  • + +   evaluationBlock +

    A block used to evaluate if the expectation has been satisfied.

    +
    + property + +
  • + +   mapping +

    Returns the expected object mapping to be used for mapping a nested relationship.

    +
    + property + +
  • + + – mappingDescription +

    Returns a string summary of the expected keyPath mapping within the expectation

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

destinationKeyPath

+ + + +
+

Returns a keyPath on the destination object that a value should be mapped to.

+
+ + + +
@property (nonatomic, copy, readonly) NSString *destinationKeyPath
+ + + + + + + + + +
+

Discussion

+

Returns a keyPath on the destination object that a value should be mapped to.

+
+ + + + + + + +
+

Declared In

+ RKMappingTestExpectation.h
+
+ + +
+ +
+ +

evaluationBlock

+ + + +
+

A block used to evaluate if the expectation has been satisfied.

+
+ + + +
@property (nonatomic, copy, readonly) RKMappingTestExpectationEvaluationBlock evaluationBlock
+ + + + + + + + + +
+

Discussion

+

A block used to evaluate if the expectation has been satisfied.

+ +

The block accepts three arguments, an RKPropertyMapping object denoting the attribute or relationship that was mapped, the mapped value, and a pointer to an error object that is to be set if the block evaluates negatively, and returns a Boolean value indicating if the mapping satisfies the expectations of the block.

+
+ + + + + + + +
+

Declared In

+ RKMappingTestExpectation.h
+
+ + +
+ +
+ +

mapping

+ + + +
+

Returns the expected object mapping to be used for mapping a nested relationship.

+
+ + + +
@property (nonatomic, strong, readonly) RKMapping *mapping
+ + + + + + + + + +
+

Discussion

+

Returns the expected object mapping to be used for mapping a nested relationship.

+
+ + + + + + + +
+

Declared In

+ RKMappingTestExpectation.h
+
+ + +
+ +
+ +

sourceKeyPath

+ + + +
+

Returns a keyPath on the source object that a value should be mapped from.

+
+ + + +
@property (nonatomic, copy, readonly) NSString *sourceKeyPath
+ + + + + + + + + +
+

Discussion

+

Returns a keyPath on the source object that a value should be mapped from.

+
+ + + + + + + +
+

Declared In

+ RKMappingTestExpectation.h
+
+ + +
+ +
+ +

value

+ + + +
+

Returns the expected value that should be set to the destinationKeyPath of the destination object.

+
+ + + +
@property (nonatomic, strong, readonly) id value
+ + + + + + + + + +
+

Discussion

+

Returns the expected value that should be set to the destinationKeyPath of the destination object.

+
+ + + + + + + +
+

Declared In

+ RKMappingTestExpectation.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

expectationWithSourceKeyPath:destinationKeyPath:

+ + + +
+

Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destination object. The value mapped is not evaluated.

+
+ + + +
+ (RKMappingTestExpectation *)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath
+ + + +
+

Parameters

+ +
+
sourceKeyPath
+

A key path on the source object that should be mapped.

+
+ +
+
destinationKeyPath
+

A key path on the destination object that should be mapped onto.

+
+ +
+ + + +
+

Return Value

+

An expectation specifying that sourceKeyPath should be mapped to destinationKeyPath.

+
+ + + + + +
+

Discussion

+

Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destination object. The value mapped is not evaluated.

+
+ + + + + + + +
+

Declared In

+ RKMappingTestExpectation.h
+
+ + +
+ +
+ +

expectationWithSourceKeyPath:destinationKeyPath:evaluationBlock:

+ + + +
+

Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destinaton object and that the attribute mapping and value should evaluate to true with a given block.

+
+ + + +
+ (RKMappingTestExpectation *)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath evaluationBlock:(RKMappingTestExpectationEvaluationBlock)evaluationBlock
+ + + +
+

Parameters

+ +
+
sourceKeyPath
+

A key path on the source object that should be mapped.

+
+ +
+
destinationKeyPath
+

A key path on the destination object that should be mapped onto.

+
+ +
+
evaluationBlock
+

A block with which to evaluate the success of the mapping.

+
+ +
+ + + +
+

Return Value

+

An expectation specifying that sourceKeyPath should be mapped to destinationKeyPath with value.

+
+ + + + + +
+

Discussion

+

Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destinaton object and that the attribute mapping and value should evaluate to true with a given block.

+
+ + + + + + + +
+

Declared In

+ RKMappingTestExpectation.h
+
+ + +
+ +
+ +

expectationWithSourceKeyPath:destinationKeyPath:mapping:

+ + + +
+

Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destinaton object using a specific object mapping for the relationship.

+
+ + + +
+ (RKMappingTestExpectation *)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath mapping:(RKMapping *)mapping
+ + + +
+

Parameters

+ +
+
sourceKeyPath
+

A key path on the source object that should be mapped.

+
+ +
+
destinationKeyPath
+

A key path on the destination object that should be mapped onto.

+
+ +
+
mapping
+

An object mapping that is expected to be used for mapping the nested relationship.

+
+ +
+ + + +
+

Return Value

+

An expectation specifying that sourceKeyPath should be mapped to destinationKeyPath using a specific object mapping.

+
+ + + + + +
+

Discussion

+

Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destinaton object using a specific object mapping for the relationship.

+
+ + + + + + + +
+

Declared In

+ RKMappingTestExpectation.h
+
+ + +
+ +
+ +

expectationWithSourceKeyPath:destinationKeyPath:value:

+ + + +
+

Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destination object with a given value.

+
+ + + +
+ (RKMappingTestExpectation *)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath value:(id)value
+ + + +
+

Parameters

+ +
+
sourceKeyPath
+

A key path on the source object that should be mapped.

+
+ +
+
destinationKeyPath
+

A key path on the destination object that should be mapped onto.

+
+ +
+
value
+

The value that is expected to be assigned to the destination object at destinationKeyPath.

+
+ +
+ + + +
+

Return Value

+

An expectation specifying that sourceKeyPath should be mapped to destinationKeyPath with value.

+
+ + + + + +
+

Discussion

+

Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destination object with a given value.

+
+ + + + + + + +
+

Declared In

+ RKMappingTestExpectation.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

mappingDescription

+ + + +
+

Returns a string summary of the expected keyPath mapping within the expectation

+
+ + + +
- (NSString *)mappingDescription
+ + + + + +
+

Return Value

+

A string describing the expected sourceKeyPath to destinationKeyPath mapping.

+
+ + + + + +
+

Discussion

+

Returns a string summary of the expected keyPath mapping within the expectation

+
+ + + + + + + +
+

Declared In

+ RKMappingTestExpectation.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKNSJSONSerialization.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKNSJSONSerialization.html new file mode 100644 index 00000000..cc30585c --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKNSJSONSerialization.html @@ -0,0 +1,228 @@ + + + + + RKNSJSONSerialization Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + + + + +
Inherits fromNSObject
Conforms toRKSerialization
Declared inRKNSJSONSerialization.h
+ + + + +
+ +

Overview

+

The RKNSJSONSerialization class conforms to the RKSerialization protocol and provides support for the serialization and deserialization of data in the JSON format using the Apple provided NSJSONSerialization class. This is the default JSON implementation for RestKit.

+
+ + + + + + + + + + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKObjectManager.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKObjectManager.html new file mode 100644 index 00000000..9f75733e --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKObjectManager.html @@ -0,0 +1,3608 @@ + + + + + RKObjectManager Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKObjectManager.h
+ + + + +
+ +

Overview

+

The RKObjectManager class provides a centralized interface for performing object mapping based HTTP request and response operations. It encapsulates common configuration such as request/response descriptors and routing, provides for the creation of NSURLRequest and RKObjectRequestOperation objects, and one-line methods to enqueue object request operations for the basic HTTP request methods (GET, POST, PUT, DELETE, etc).

+ +

Object Request Operations

+ +

Object request operations model the lifecycle of an object mapped HTTP request from start to finish. They are initialized with a fully configured NSURLRequest object and a set of RKResponseDescriptor objects that specify how an HTTP response is to be mapped into local domain objects. Object request operations may be constructed as standalone objects, but are often constructed through an RKObjectManager object. The object request operation encapsulates the functionality of two underlying operations that perform the bulk of the work. The HTTP request and response loading is handled by an RKHTTPRequestOperation, which is responsible for the HTTP transport details. Once a response has been successfully loaded, the object request operation starts an RKResponseMapperOperation that is responsible for handling the mapping of the response body. When working with Core Data, the RKManagedObjectRequestOperation class is used. The object manager encapsulates the Core Data configuration details and provides an interface that will return the appropriate object request operation for a request through the appropriateObjectRequestOperationWithObject:method:path:parameters: method.

+ +

The Base URL and Path Patterns

+ +

Each object manager is configured with a base URL that defines the URL that all request sent through the manager will be relative to. The base URL is configured directly through the managerWithBaseURL: method or is inherited from an AFNetworking AFHTTPClient object if the manager is initialized via the initWithHTTPClient: method. The base URL can point directly at the root of a URL or may include a path.

+ +

Path patterns are a common unit of abstraction in RestKit for describing the path portion of URL’s. When working with API’s, there is typically one or more dynamic portions of the URL that correspond to primary keys or other identifying resource attributes. For example, a blogging application may represent articles in a URL structure such as ‘/articles/1234’ and comments about an article might appear at ‘/articles/1234/comments’. These path structures could be represented as the path patterns ‘/articles/:articleID’ and ‘/articles/:articleID/comments’, substituing the dynamic key ‘:articleID’ in place of the primary key of in the path. These keys can be used to interpolate a path with an object’s property values using key-value coding or be used to match a string.

+ +

Path patterns appear throughout RestKit, but the most fundamental uses are for the dynamic generation of URL paths from objects and the matching of request and response URLs for mapping configuration. When generating a URL, a path pattern is interpolated with the value of an object. Consider this example:

+ +
// Set object attributes
+RKArticle *article = [RKArticle new];
+article.articleID = @12345;
+
+// Interpolate with the object
+NSString *path = RKPathFromPatternWithObject(@"/articles/:articleID", article);
+NSLog(@"The path is %@", path); // prints /articles/12345
+
+ +

This may at first glance appear to provide only a small syntactic improvement over using [NSString stringWithFormat:], but it becomes more interesting once you consider that the dynamic key can include key path:

+ +
RKCategory *category = [RKCategory new];
+comment.name = @"RestKit;
+article.category = category;
+
+NSString *path = RKPathFromPatternWithObject(@"/categories/:comment.name/articles/:articleID/comments/", article);
+NSLog(@"The path is %@", path); // prints /categories/RestKit/articles/12345
+
+ +

These path patterns can then be registered with the manager via an RKRoute object (discussed in detail below), enabling one to perform object request operations like so:

+ +
RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://restkit.org"]http://restkit.org"]];
+[manager.router.routeSet addRoute:[RKRoute routeWithClass:[RKArticle class] pathPattern:@"/categories/:comment.name/articles/:articleID/comments/" method:RKRequestMethodGET]];
+
+// Now GET our article object... sending a GET to '/categories/RestKit/articles/12345'
+[manager getObject:article path:nil parameters:nil success:^(RKObjectRequestOperation *operation, RKMappingResult *result) {
+    NSLog(@"Loading mapping result: %@", result);
+} failure:nil];
+
+ +

Once a path pattern has been registered via the routing system, the manager can automatically build full request URL’s when given nothing but the object to be sent.

+ +

The second use case of path patterns is in the matching of path into a dictionary of attributes. In this case, the path pattern is evaluatd against a string and used to construct an NSDictionary object containing the matched key paths, optionally including the values of a query string. This functionality is provided via the RKPathMatcher class and is discussed in detail in the accompanying documentation.

+ +

Request and Response Descriptors

+ +

RestKit centralizes configuration for object mapping configurations into the object manager through RKRequestDescriptor and RKResponseDescriptor objects. A collection of each of these object types are maintained by the manager and used to initialize all RKObjectRequestOperation objects created by the manager.

+ +

Request descriptors describe how NSURLRequest objects constructed by the manager will be built by specifying how the attributes and relationships for a given class will be object mapped to construct request parameters and what, if any, root key path the parameters will be nested under. Request descriptor objects can also be used with the RKObjectParameterization class to map an object into an NSDictionary representation that is suitable for use as the parameters of a request.

+ +

Response descriptors describe how NSHTTPURLResponse objects loaded by object request operations sent by the manager are to be object mapped into local domain objects. Response descriptors are matched against a given response via URL path matching, parsed content key path matching, or both. The RKMapping object associated from a matched RKResponseDescriptor is given to an instance of RKMapperOperation with the parsed response body to perform object mapping on the response.

+ +

To better illustrate these concepts, consider the following example for an imaginary Wiki client application:

+ +
@interface RKWikiPage : NSObject
+@property (nonatomic, copy) NSString *title;
+@property (nonatomic, copy) NSString *body;
+@end     
+
+// Construct a request mapping for our class
+RKObjectMapping *requestMapping = [RKObjectMapping requestMapping];
+[requestMapping addAttributeMappingsFromDictionary:@{ @"title": @"title", @"body": @"body" }];
+
+// We wish to generate parameters of the format: 
+// @{ @"page": @{ @"title": @"An Example Page", @"body": @"Some example content" } }
+RKRequestDescriptor *requestDescriptor = [RKRequestDescriptor requestDescriptorWithMapping:mapping
+                                                                               objectClass:[RKWikiPage class]
+                                                                               rootKeyPath:@"page"];
+
+// Construct an object mapping for the response
+// We are expecting JSON in the format:
+// {"page": {"title": "<title value>", "body": "<body value>"}
+RKObjectMapping *responseMapping = [RKObjectMapping mappingForClass:[RKWikiPage class]];
+[responseMapping addAttributeMappingsFromArray:@[ @"title", @"body" ]];
+
+// Construct a response descriptor that matches any URL (the pathPattern is nil), when the response payload
+// contains content nested under the `@"page"` key path, if the response status code is 200 (OK)
+RKResponseDescriptor *responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:responseMapping
+                                                                                   pathPattern:nil
+                                                                                       keyPath:@"page"
+                                                                                   statusCodes:[NSIndexSet indexSetWithIndex:200]];
+
+// Register our descriptors with a manager
+RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://restkit.org/"]http://restkit.org/"]];
+[manager addRequestDescriptor:requestDescriptor];
+[manager addResponseDescriptor:responseDescriptor];
+
+// Work with the object
+RKWikiPage *page = [RKWikiPage new];
+page.title = @"An Example Page";
+page.body  = @"Some example content";
+
+// POST the parameterized representation of the `page` object to `/posts` and map the response
+[manager postObject:page path:@"/pages" parameters:nil success:^(RKObjectRequestOperation *operation, RKMappingResult *result) {
+    NSLog(@"We object mapped the response with the following result: %@", result);
+} failure:nil];
+
+ +

In the above example, request and response mapping configurations were described for a simple data model and then used to perform a basic POST operation and map the results. An arbitrary number of request and response descriptors may be added to the manager to accommodate your application’s needs.

+ +

MIME Types

+ +

MIME Types serve an important function to the object manager. They are used to identify how content is to be serialized when constructing request bodies and also used to set the ‘Accept’ header for content negotiation. RestKit aspires to be content type agnostic by leveraging the pluggable RKMIMESerialization class to handle content serialization and deserialization.

+ +

Routing

+ +

Routing is the process of generating an NSURL appropriate for a particular HTTP server request interaction. Using routing instead of hard-coding paths enables centralization of configuration and allows the developer to focus on what they want done rather than the details of how to do it. Changes to the URL structure in the application can be made in one place. Routes can also be useful in testing, as they permit for the changing of paths at run-time.

+ +

Routing interfaces are provided by the RKRouter class. Each object manager is in initialized with an RKRouter object with a baseURL equal to the baseURL of the underlying AFHTTPClient object. Each RKRouter instance maintains an RKRouteSet object that manages a collection of RKRoute objects. Routes are defined in terms of a path pattern.

+ +

There are three types of routes currently supported:

+ +
    +
  1. Class Routes. Class routes are configured to target a given object class and HTTP request method. For example, we might route the HTTP GET for a User class to the path pattern @"/users/:userID".
  2. +
  3. Relationship Routes. Relationship routes identify the path appropriate for performing a request for an object that is related to another object. For example, each User may have many friends. This might be routed as a relationship route for the User class with the name @"friends" to the path pattern @"/users/:userID/friends".
  4. +
  5. Named Routes. Names routes bind an arbitrary name to a path. For example, there might be an action to follow another user that could be added as a named route with the name @"follow_user" that generates a POST to the path pattern @"/users/:userID/follow".
  6. +
+ + +

To better understand these concepts, please consider the following example code for configuring the above routing examples:

+ +
RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://restkit.org"]http://restkit.org"]];
+
+// Class Route
+[manager.router.routeSet addRoute:[RKRoute routeWithClass:[User class] pathPattern:@"/users/:userID" method:RKRequestMethodGET]];
+
+// Relationship Route
+[manager.router.routeSet addRoute:[RKRoute routeWithRelationshipName:@"friends" objectClass:[User class] pathPattern:@"/users/:userID/friends" method:RKRequestMethodGET]];
+
+// Named Route
+[manager.router.routeSet addRoute:[RKRoute routeWithName:@"follow_user" pathPattern:@"/users/:userID/follow" method:RKRequestMethodPOST]];
+
+ +

Once configured, routes will be consulted by the object manager whenever the path parameter provided to a method is given as nil. For example, invoking the following code would result in a GET to the path @"/users/1234":

+ +
User *user = [User new];
+user.userID = 1234;
+[manager getObject:user path:nil parameters:nil success:^(RKObjectRequestOperation *operation, RKMappingResult *result) {
+    // Request 
+} failure:nil];
+
+ +

Routes can also be explicitly used to construct NSMutableURLRequest objects and are referenced explicitly in a few object request operation methods:

+ +
    +
  1. requestWithObject:method:path:parameters: – Consults routing when path is nil.
  2. +
  3. multipartFormRequestWithObject:method:path:parameters:constructingBodyWithBlock: – Consults routing when path is nil.
  4. +
  5. requestWithPathForRouteNamed:object:parameters: – Explicitly retrieves the route with the given name.
  6. +
  7. getObjectsAtPathForRelationship:ofObject:parameters:success:failure: – Explicitly retrieves the route for the given name and object class.
  8. +
  9. getObjectsAtPathForRouteNamed:object:parameters:success:failure: – Explicitly retrieves the route for the given name.
  10. +
+ + +

Please see the documentation for RKRouter, RKRouteSet, and RKRoute for more details about the routing classes.

+ +

Core Data

+ +

RestKit features deep integration with Apple’s Core Data persistence framework. The object manager provides access to this integration by creating RKManagedObjectRequestOperation objects when an attempt is made to interact with a resource that has been mapped using an RKEntityMapping. To utilize the Core Data integration, the object manager must be provided with a fully configured RKManagedObjectStore object. The RKManagedObjectStore provides access to the NSManagedObjectModel and NSManagedObjectContext objects required to peform object mapping that targets a Core Data entity.

+ +

Please see the documentation for RKManagedObjectStore, RKEntityMapping, and RKManagedObjectRequestOperation for in depth information about Core Data in RestKit.

+ +

Subclassing Notes

+ +

The object manager is designed to support subclassing. The default behaviors can be altered and tailored to the specific needs of your application easily by manipulating a few core methods:

+ + + + +

Also note that the behavior of the lower level HTTP details can also be altered by subclassing AFHTTPClient and using an instance of your subclassed client to initialize the manager.

Warning: Note that when subclassing AFHTTPClient to change object manager behaviors it is not possible to alter the paramters of requests that are constructed on behalf of the manager. This is because the object manager handles its own serialization and construction of the request body, but defers to the AFHTTPClient for all other details (such as default HTTP headers, etc).

+
+ + + + + +
+ +

Tasks

+ + + +

Configuring the Shared Manager Instance

+ + + + + +

Initializing an Object Manager

+ +
    +
  • + + + managerWithBaseURL: +

    Creates and returns a new RKObjectManager object initialized with a new AFHTTPClient object that was in turn initialized with the given base URL. The RestKit defaults are applied to the object manager.

    +
    + + +
  • + + – initWithHTTPClient: +

    Initializes the receiver with the given AFNetworking HTTP client object, adopting the network configuration from the client.

    +
    + + +
  • +
+ + + +

Accessing Object Manager Properties

+ +
    +
  • + +   HTTPClient +

    The AFNetworking HTTP client with which the receiver makes requests.

    +
    + property + +
  • + +   baseURL +

    The base URL of the underlying HTTP client.

    +
    + property + +
  • + +   defaultHeaders +

    The default HTTP headers for all NSURLRequest objects constructed by the object manager.

    +
    + property + +
  • + +   operationQueue +

    The operation queue which manages operations enqueued by the object manager.

    +
    + property + +
  • + +   router +

    The router used to generate URL objects for routable requests created by the manager.

    +
    + property + +
  • +
+ + + +

Configuring Request and Response MIME Types

+ + + + + +

Creating Request Objects

+ + + + + +

Creating Object Request Operations

+ + + + + +

Managing Enqueued Object Request Operations

+ + + + + +

Batching Object Request Operations

+ + + + + +

Making Object Requests by Path

+ + + + + +

Making Object Requests for an Object

+ + + + + +

Managing Request and Response Descriptors

+ + + + + +

Configuring Core Data Integration

+ +
    +
  • + +   managedObjectStore +

    A Core Data backed object store for persisting objects that have been fetched from the Web

    +
    + property + +
  • + +   fetchRequestBlocks +

    An array of RKFetchRequestBlock blocks used to map NSURL objects into corresponding NSFetchRequest objects.

    +
    + property + +
  • + + – addFetchRequestBlock: +

    Adds the given RKFetchRequestBlock block to the manager.

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

HTTPClient

+ + + +
+

The AFNetworking HTTP client with which the receiver makes requests.

+
+ + + +
@property (nonatomic, strong, readonly) AFHTTPClient *HTTPClient
+ + + + + + + + + +
+

Discussion

+

The AFNetworking HTTP client with which the receiver makes requests.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

baseURL

+ + + +
+

The base URL of the underlying HTTP client.

+
+ + + +
@property (nonatomic, readonly) NSURL *baseURL
+ + + + + + + + + +
+

Discussion

+

The base URL of the underlying HTTP client.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

defaultHeaders

+ + + +
+

The default HTTP headers for all NSURLRequest objects constructed by the object manager.

+
+ + + +
@property (nonatomic, readonly) NSDictionary *defaultHeaders
+ + + + + + + + + +
+

Discussion

+

The default HTTP headers for all NSURLRequest objects constructed by the object manager.

+ +

The returned dictionary contains all of the default headers set on the underlying AFHTTPClient object and the value of the ‘Accept’ header set on the object manager, if any.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

fetchRequestBlocks

+ + + +
+

An array of RKFetchRequestBlock blocks used to map NSURL objects into corresponding NSFetchRequest objects.

+
+ + + +
@property (nonatomic, readonly) NSArray *fetchRequestBlocks
+ + + + + + + + + +
+

Discussion

+

An array of RKFetchRequestBlock blocks used to map NSURL objects into corresponding NSFetchRequest objects.

+ +

When searched, the blocks are iterated in the reverse-order of their registration and the first block with a non-nil return value halts the search.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

managedObjectStore

+ + + +
+

A Core Data backed object store for persisting objects that have been fetched from the Web

+
+ + + +
@property (nonatomic, strong) RKManagedObjectStore *managedObjectStore
+ + + + + + + + + +
+

Discussion

+

A Core Data backed object store for persisting objects that have been fetched from the Web

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

operationQueue

+ + + +
+

The operation queue which manages operations enqueued by the object manager.

+
+ + + +
@property (nonatomic, strong) NSOperationQueue *operationQueue
+ + + + + + + + + +
+

Discussion

+

The operation queue which manages operations enqueued by the object manager.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

requestDescriptors

+ + + +
+

Returns an array containing the RKRequestDescriptor objects added to the manager.

+
+ + + +
@property (nonatomic, readonly) NSArray *requestDescriptors
+ + + + + +
+

Return Value

+

An array containing the request descriptors of the receiver. The elements of the array are instances of RKRequestDescriptor.

+
+ + + + + +
+

Discussion

+

Returns an array containing the RKRequestDescriptor objects added to the manager.

+
+ + + + + +
+

See Also

+ +
+ + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

requestSerializationMIMEType

+ + + +
+

The MIME Type to serialize request parameters into when constructing request objects.

+
+ + + +
@property (nonatomic, strong) NSString *requestSerializationMIMEType
+ + + + + + + + + +
+

Discussion

+

The MIME Type to serialize request parameters into when constructing request objects.

+ +

The value of the requestSerializationMIMEType is used to obtain an appropriate RKSerialization conforming class from the RKMIMESerialization interface. Parameterized objects and dictionaries of parameters are then serialized for transport using the class registered for the MIME Type. By default, the value is RKMIMETypeFormURLEncoded which means that the request body of all POST, PUT, and PATCH requests will be sent in the URL encoded format. This is analagous to submitting an HTML form via a web browser. Other common formats include RKMIMETypeJSON, which will cause request bodies to be encoded as JSON.

+ +

The value given for the requestSerializationMIMEType must correspond to a MIME Type registered via [RKMIMETypeSerialization registerClass:forMIMEType:]. Implementations are provided by default for RKMIMETypeFormURLEncoded and RKMIMETypeJSON.

+ +

Default: RKMIMETypeFormURLEncoded or the value of the parameter encoding for the underlying AFHTTPClient.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

responseDescriptors

+ + + +
+

Returns an array containing the RKResponseDescriptor objects added to the manager.

+
+ + + +
@property (nonatomic, readonly) NSArray *responseDescriptors
+ + + + + +
+

Return Value

+

An array containing the request descriptors of the receiver. The elements of the array are instances of RKRequestDescriptor.

+
+ + + + + +
+

Discussion

+

Returns an array containing the RKResponseDescriptor objects added to the manager.

+
+ + + + + +
+

See Also

+ +
+ + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

router

+ + + +
+

The router used to generate URL objects for routable requests created by the manager.

+
+ + + +
@property (nonatomic, strong) RKRouter *router
+ + + + + + + + + +
+

Discussion

+

The router used to generate URL objects for routable requests created by the manager.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

managerWithBaseURL:

+ + + +
+

Creates and returns a new RKObjectManager object initialized with a new AFHTTPClient object that was in turn initialized with the given base URL. The RestKit defaults are applied to the object manager.

+
+ + + +
+ (id)managerWithBaseURL:(NSURL *)baseURL
+ + + +
+

Parameters

+ +
+
baseURL
+

The base URL with which to initialize the AFHTTPClient object

+
+ +
+ + + +
+

Return Value

+

A new RKObjectManager initialized with an AFHTTPClient that was initialized with the given baseURL.

+
+ + + + + +
+

Discussion

+

Creates and returns a new RKObjectManager object initialized with a new AFHTTPClient object that was in turn initialized with the given base URL. The RestKit defaults are applied to the object manager.

+ +

When initialized with a base URL, the returned object manager will have a requestSerializationMIMEType with the value of RKMIMETypeFormURLEncoded and a default value for the ‘Accept’ header set to RKMIMETypeJSON.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

setSharedManager:

+ + + +
+

Set the shared instance of the object manager

+
+ + + +
+ (void)setSharedManager:(RKObjectManager *)manager
+ + + +
+

Parameters

+ +
+
manager
+

The new shared manager instance.

+
+ +
+ + + + + + + +
+

Discussion

+

Set the shared instance of the object manager

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

sharedManager

+ + + +
+

Return the shared instance of the object manager

+
+ + + +
+ (RKObjectManager *)sharedManager
+ + + + + +
+

Return Value

+

The shared manager instance.

+
+ + + + + +
+

Discussion

+

Return the shared instance of the object manager

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

addFetchRequestBlock:

+ + + +
+

Adds the given RKFetchRequestBlock block to the manager.

+
+ + + +
- (void)addFetchRequestBlock:(RKFetchRequestBlock)block
+ + + +
+

Parameters

+ +
+
A
+

block object to be executed when constructing an NSFetchRequest object from a given NSURL. The block has a return type of NSFetchRequest and accepts a single NSURL argument.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds the given RKFetchRequestBlock block to the manager.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

addRequestDescriptor:

+ + + +
+

Adds a request descriptor to the manager.

+
+ + + +
- (void)addRequestDescriptor:(RKRequestDescriptor *)requestDescriptor
+ + + +
+

Parameters

+ +
+
requestDescriptor
+

The request descriptor object to the be added to the manager.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds a request descriptor to the manager.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

addRequestDescriptorsFromArray:

+ + + +
+

Adds the RKRequestDescriptor objects contained in a given array to the manager.

+
+ + + +
- (void)addRequestDescriptorsFromArray:(NSArray *)requestDescriptors
+ + + +
+

Parameters

+ +
+
requestDescriptors
+

An array of RKRequestDescriptor objects to be added to the manager.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds the RKRequestDescriptor objects contained in a given array to the manager.

+
+ + + +
+

Exceptions

+ +
+
NSInvalidArgumentException
+

Raised if any element of the given array is not an RKRequestDescriptor object.

+
+ +
+ + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

addResponseDescriptor:

+ + + +
+

Adds a response descriptor to the manager.

+
+ + + +
- (void)addResponseDescriptor:(RKResponseDescriptor *)responseDescriptor
+ + + +
+

Parameters

+ +
+
responseDescriptor
+

The response descriptor object to the be added to the manager.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds a response descriptor to the manager.

+ +

Adding a response descriptor to the manager sets the baseURL of the descriptor to the baseURL of the manager, causing it to evaluate URL objects relatively.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

addResponseDescriptorsFromArray:

+ + + +
+

Adds the RKResponseDescriptor objects contained in a given array to the manager.

+
+ + + +
- (void)addResponseDescriptorsFromArray:(NSArray *)responseDescriptors
+ + + +
+

Parameters

+ +
+
responseDescriptors
+

An array of RKResponseDescriptor objects to be added to the manager.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds the RKResponseDescriptor objects contained in a given array to the manager.

+
+ + + +
+

Exceptions

+ +
+
NSInvalidArgumentException
+

Raised if any element of the given array is not an RKResponseDescriptor object.

+
+ +
+ + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

appropriateObjectRequestOperationWithObject:method:path:parameters:

+ + + +
+

Creates and returns an object request operation of the appropriate type for the given object, request method, path, and parameters.

+
+ + + +
- (id)appropriateObjectRequestOperationWithObject:(id)object method:(RKRequestMethod)method path:(NSString *)path parameters:(NSDictionary *)parameters
+ + + +
+

Parameters

+ +
+
object
+

The object with which to construct the object request operation. May be nil.

+
+ +
+
method
+

The request method for the request.

+
+ +
+
path
+

The path to be appended to the HTTP client’s baseURL and set as the URL of the request. If nil, the router is consulted.

+
+ +
+
parameters
+

The parameters to be either set as a query string for GET requests, or reverse merged with the parameterization of the object and set as the request HTTP body.

+
+ +
+ + + +
+

Return Value

+

A newly created RKObjectRequestOperation or RKManagedObjectRequest operation as deemed appropriate by the manager for the given parameters.

+
+ + + + + +
+

Discussion

+

Creates and returns an object request operation of the appropriate type for the given object, request method, path, and parameters.

+ +

The type of object request operation created is determined by evaluating the type of the object given and examining the list of RKResponseDescriptor objects added to the manager.

+ +

If the given object is non-nil and inherits from NSManagedObject, then an instance of RKManagedObjectRequestOperation is returned.

+ +

If the given object is nil, then the RKResponseDescriptor objects added to the manager are evaluated to determine the type of operation created. In this case, the path of the operation is used to filter the set of RKResponseDescriptor objects to those that may be used to map the response. If the path is nil, the router is consulted to determine an appropriate path with which to perform the matching. If the filtered array of matching response descriptors defines a mapping configuration with an RKEntityMapping object, then an RKManagedObjectRequestOperation is returned; otherwise an RKObjectRequestOperation is returned.

+ +

If an RKManagedObjectRequestOperation operation is created, the managed object context used will be the mainQueueManagedObjectContext of the manager’s managedObjectStore.

Warning: The given object must be a single object instance. Collections are not yet supported.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

cancelAllObjectRequestOperationsWithMethod:matchingPathPattern:

+ + + +
+

Cancels all operations in the object manager’s operation queue whose requests match the specified HTTP method and path pattern.

+
+ + + +
- (void)cancelAllObjectRequestOperationsWithMethod:(RKRequestMethod)method matchingPathPattern:(NSString *)pathPattern
+ + + +
+

Parameters

+ +
+
method
+

The HTTP method to match for the cancelled requests, such as RKRequestMethodGET, RKRequestMethodPOST, RKRequestMethodPUT, RKRequestMethodPatch, or RKRequestMethodDELETE. If RKRequestMethodAny, all object request operations with URLs matching the given path pattern will be cancelled.

+
+ +
+
pathPattern
+

The pattern to match against the path of the request URL for executing object request operations considered for cancellation.

+
+ +
+ + + + + + + +
+

Discussion

+

Cancels all operations in the object manager’s operation queue whose requests match the specified HTTP method and path pattern.

+ +

Paths are matches against the path of the NSURL of the NSURLRequest of each RKObjectRequestOperation contained in the receiver’s operation queue using a RKPathMatcher object.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

deleteObject:path:parameters:success:failure:

+ + + +
+

Creates an RKObjectRequestOperation with a DELETE request for the given object, and enqueues it to the manager’s operation queue.

+
+ + + +
- (void)deleteObject:(id)object path:(NSString *)path parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
object
+

The object with which to construct the object request operation. Cannot be nil.

+
+ +
+
path
+

The path to be appended to the HTTP client’s base URL and used as the request URL. If nil, the request URL will be obtained by consulting the router for a route registered for the given object’s class and the RKRequestMethodDELETE request method.

+
+ +
+
parameters
+

The parameters to be encoded and appended as the query string for the request URL.

+
+ +
+
success
+

A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request.

+
+ +
+
failure
+

A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates an RKObjectRequestOperation with a DELETE request for the given object, and enqueues it to the manager’s operation queue.

+ +

The type of object request operation created is determined by invoking appropriateObjectRequestOperationWithObject:method:path:parameters:.

+
+ + + + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

enqueueBatchOfObjectRequestOperations:progress:completion:

+ + + +
+

Enqueues a set of RKObjectRequestOperation to the object manager’s operation queue.

+
+ + + +
- (void)enqueueBatchOfObjectRequestOperations:(NSArray *)operations progress:(void ( ^ ) ( NSUInteger numberOfFinishedOperations , NSUInteger totalNumberOfOperations ))progress completion:(void ( ^ ) ( NSArray *operations ))completion
+ + + +
+

Parameters

+ +
+
operations
+

The set of object request operations to be enqueued.

+
+ +
+
progress
+

A block object to be executed when an object request operation completes. This block has no return value and takes two arguments: the number of finished operations and the total number of operations initially executed.

+
+ +
+
completion
+

A block object to be executed when the object request operations complete. This block has no return value and takes one argument: the list of operations executed.

+
+ +
+ + + + + + + +
+

Discussion

+

Enqueues a set of RKObjectRequestOperation to the object manager’s operation queue.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

enqueueBatchOfObjectRequestOperationsWithRoute:objects:progress:completion:

+ + + +
+

Creates and enqueues an RKObjectRequestOperation to the object manager’s operation queue for each specified object into a batch. Each object request operation is built by evaluating the object against the given route to construct a request path and then invoking appropriateObjectRequestOperationWithObject:method:path:parameters:. When each object request operation finishes, the specified progress block is executed, until all of the request operations have finished, at which point the completion block also executes.

+
+ + + +
- (void)enqueueBatchOfObjectRequestOperationsWithRoute:(RKRoute *)route objects:(NSArray *)objects progress:(void ( ^ ) ( NSUInteger numberOfFinishedOperations , NSUInteger totalNumberOfOperations ))progress completion:(void ( ^ ) ( NSArray *operations ))completion
+ + + +
+

Parameters

+ +
+
route
+

The route specifying the request method and the path pattern with which to construct the request for each object object request operation in the batch.

+
+ +
+
objects
+

The set of objects for which to enqueue a batch of object request operations.

+
+ +
+
progress
+

A block object to be executed when an object request operation completes. This block has no return value and takes two arguments: the number of finished operations and the total number of operations initially executed.

+
+ +
+
completion
+

A block object to be executed when the object request operations complete. This block has no return value and takes one argument: the list of operations executed.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates and enqueues an RKObjectRequestOperation to the object manager’s operation queue for each specified object into a batch. Each object request operation is built by evaluating the object against the given route to construct a request path and then invoking appropriateObjectRequestOperationWithObject:method:path:parameters:. When each object request operation finishes, the specified progress block is executed, until all of the request operations have finished, at which point the completion block also executes.

Warning: Note that the route type is significant in how that the object request operation is constructed. If the given route is a class route, then the targetObject of the operation will be set to the object for which the operation is being constructed. For named routes and relationship routes, the target object is nil.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

enqueueObjectRequestOperation:

+ + + +
+

Enqueues an RKObjectRequestOperation to the object manager’s operation queue.

+
+ + + +
- (void)enqueueObjectRequestOperation:(RKObjectRequestOperation *)objectRequestOperation
+ + + +
+

Parameters

+ +
+
objectRequestOperation
+

The object request operation to be enqueued.

+
+ +
+ + + + + + + +
+

Discussion

+

Enqueues an RKObjectRequestOperation to the object manager’s operation queue.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

getObject:path:parameters:success:failure:

+ + + +
+

Creates an RKObjectRequestOperation with a GET request for the given object, and enqueues it to the manager’s operation queue.

+
+ + + +
- (void)getObject:(id)object path:(NSString *)path parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
object
+

The object with which to construct the object request operation. Cannot be nil.

+
+ +
+
path
+

The path to be appended to the HTTP client’s base URL and used as the request URL. If nil, the request URL will be obtained by consulting the router for a route registered for the given object’s class and the RKRequestMethodGET request method.

+
+ +
+
parameters
+

The parameters to be encoded and appended as the query string for the request URL.

+
+ +
+
success
+

A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request.

+
+ +
+
failure
+

A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates an RKObjectRequestOperation with a GET request for the given object, and enqueues it to the manager’s operation queue.

+ +

The type of object request operation created is determined by invoking appropriateObjectRequestOperationWithObject:method:path:parameters:.

+
+ + + + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

getObjectsAtPath:parameters:success:failure:

+ + + +
+

Creates an RKObjectRequestOperation with a GET request with a URL for the given path, and enqueues it to the manager’s operation queue.

+
+ + + +
- (void)getObjectsAtPath:(NSString *)path parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
path
+

The path to be appended to the HTTP client’s base URL and used as the request URL.

+
+ +
+
parameters
+

The parameters to be encoded and appended as the query string for the request URL.

+
+ +
+
success
+

A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request.

+
+ +
+
failure
+

A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates an RKObjectRequestOperation with a GET request with a URL for the given path, and enqueues it to the manager’s operation queue.

+ +

The type of object request operation created is determined by invoking appropriateObjectRequestOperationWithObject:method:path:parameters:.

+
+ + + + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

getObjectsAtPathForRelationship:ofObject:parameters:success:failure:

+ + + +
+

Creates an RKObjectRequestOperation with a GET request for the relationship with the given name of the given object, and enqueues it to the manager’s operation queue.

+
+ + + +
- (void)getObjectsAtPathForRelationship:(NSString *)relationshipName ofObject:(id)object parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
relationshipName
+

The name of the relationship being loaded. Used to retrieve the RKRoute object from the router for the given object’s class and the relationship name. Cannot be nil.

+
+ +
+
object
+

The object for which related objects are being loaded. Evaluated against the RKRoute for the relationship for the object’s class with the given name to compute the path. Cannot be nil.

+
+ +
+
parameters
+

The parameters to be encoded and appended as the query string for the request URL. May be nil.

+
+ +
+
success
+

A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the mapped result created from object mapping the response data of request.

+
+ +
+
failure
+

A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred.

+ +

@raises NSInvalidArgumentException Raised if no route is configured for a relationship of the given object’s class with the given name.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates an RKObjectRequestOperation with a GET request for the relationship with the given name of the given object, and enqueues it to the manager’s operation queue.

+ +

The type of object request operation created is determined by invoking appropriateObjectRequestOperationWithObject:method:path:parameters:.

+
+ + + + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

getObjectsAtPathForRouteNamed:object:parameters:success:failure:

+ + + +
+

Creates an RKObjectRequestOperation with a GET request for the URL returned by the router for the given route name, and enqueues it to the manager’s operation queue.

+
+ + + +
- (void)getObjectsAtPathForRouteNamed:(NSString *)routeName object:(id)object parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
routeName
+

The name of the route being loaded. Used to retrieve the RKRoute object from the router with the given name. Cannot be nil.

+
+ +
+
object
+

The object to be interpolated against the path pattern of the RKRoute object retrieved with the given name. Used to compute the path to be appended to the HTTP client’s base URL and used as the request URL. May be nil.

+
+ +
+
parameters
+

The parameters to be encoded and appended as the query string for the request URL. May be nil.

+
+ +
+
success
+

A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the mapped result created from object mapping the response data of request.

+
+ +
+
failure
+

A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred.

+ +

@raises NSInvalidArgumentException Raised if no route is configured with the given name or the route returned specifies an HTTP method other than GET.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates an RKObjectRequestOperation with a GET request for the URL returned by the router for the given route name, and enqueues it to the manager’s operation queue.

+ +

The type of object request operation created is determined by invoking appropriateObjectRequestOperationWithObject:method:path:parameters:.

+
+ + + + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

initWithHTTPClient:

+ + + +
+

Initializes the receiver with the given AFNetworking HTTP client object, adopting the network configuration from the client.

+
+ + + +
- (id)initWithHTTPClient:(AFHTTPClient *)client
+ + + +
+

Parameters

+ +
+
client
+

The AFNetworking HTTP client with which to initialize the receiver.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given client.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with the given AFNetworking HTTP client object, adopting the network configuration from the client.

+ +

This is the designated initializer. If the sharedManager instance is nil, the receiver will be set as the sharedManager. The default headers and parameter encoding of the given HTTP client are adopted by the receiver to initialize the values of the defaultHeaders and requestSerializationMIMEType properties.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

managedObjectRequestOperationWithRequest:managedObjectContext:success:failure:

+ + + +
+

Creates an RKManagedObjectRequestOperation operation with the given request and managed object context, and sets the completion block with the given success and failure blocks.

+
+ + + +
- (RKManagedObjectRequestOperation *)managedObjectRequestOperationWithRequest:(NSURLRequest *)request managedObjectContext:(NSManagedObjectContext *)managedObjectContext success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
request
+

The request object to be loaded asynchronously during execution of the operation.

+
+ +
+
managedObjectContext
+

The managed object context with which to associate the operation. This context will be used as the parent context of a new operation local NSManagedObjectContext with the NSPrivateQueueConcurrencyType concurrency type. Upon success, the private context will be saved and changes resulting from the object mapping will be ‘pushed’ to the given context.

+
+ +
+
success
+

A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request.

+
+ +
+
failure
+

A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred.

+
+ +
+ + + +
+

Return Value

+

An RKObjectRequestOperation object that is ready to be sent.

+
+ + + + + +
+

Discussion

+

Creates an RKManagedObjectRequestOperation operation with the given request and managed object context, and sets the completion block with the given success and failure blocks.

+ +

The given managed object context given will be used as the parent context of the private managed context in which the response is mapped and will be used to fetch the results upon invocation of the success completion block.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

multipartFormRequestWithObject:method:path:parameters:constructingBodyWithBlock:

+ + + +
+

Creates an NSMutableURLRequest object with the specified HTTP method and path, and constructs a multipart/form-data HTTP body, using the specified parameters and multipart form data block. See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2

+
+ + + +
- (NSMutableURLRequest *)multipartFormRequestWithObject:(id)object method:(RKRequestMethod)method path:(NSString *)path parameters:(NSDictionary *)parameters constructingBodyWithBlock:(void ( ^ ) ( id<AFMultipartFormData> formData ))block
+ + + +
+

Parameters

+ +
+
object
+

The object with which to construct the request. For the POST, PUT, and PATCH request methods, the object will parameterized using the RKRequestDescriptor for the object.

+
+ +
+
method
+

The HTTP method for the request, such as GET, POST, PUT, or DELETE.

+
+ +
+
path
+

The path to be appended to the HTTP client’s base URL and used as the request URL. If nil, the router is consulted.

+
+ +
+
parameters
+

The parameters to be either set as a query string for GET requests, or reverse merged with the parameterization of the object and set as the request HTTP body.

+
+ +
+
block
+

A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the AFMultipartFormData protocol. This can be used to upload files, encode HTTP body as JSON or XML, or specify multiple values for the same parameter, as one might for array values.

+
+ +
+ + + +
+

Return Value

+

An NSMutableURLRequest object.

+
+ + + + + +
+

Discussion

+

Creates an NSMutableURLRequest object with the specified HTTP method and path, and constructs a multipart/form-data HTTP body, using the specified parameters and multipart form data block. See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2

+ +

This method wraps the underlying AFHTTPClient method multipartFormRequestWithMethod:path:parameters:constructingBodyWithBlock and adds routing and object parameterization.

Warning: An exception will be raised if the specified method is not POST, PUT or DELETE.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

objectRequestOperationWithRequest:success:failure:

+ + + +
+

Creates an RKObjectRequestOperation operation with the given request and sets the completion block with the given success and failure blocks.

+
+ + + +
- (RKObjectRequestOperation *)objectRequestOperationWithRequest:(NSURLRequest *)request success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
request
+

The request object to be loaded asynchronously during execution of the operation.

+
+ +
+
success
+

A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request.

+
+ +
+
failure
+

A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred.

+
+ +
+ + + +
+

Return Value

+

An RKObjectRequestOperation object that is ready to be sent.

+
+ + + + + +
+

Discussion

+

Creates an RKObjectRequestOperation operation with the given request and sets the completion block with the given success and failure blocks.

Warning: Instances of RKObjectRequestOperation are not capable of mapping the loaded NSHTTPURLResponse into a Core Data entity. Use an instance of RKManagedObjectRequestOperation if the response is to be mapped using an RKEntityMapping.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

patchObject:path:parameters:success:failure:

+ + + +
+

Creates an RKObjectRequestOperation with a PATCH request for the given object, and enqueues it to the manager’s operation queue.

+
+ + + +
- (void)patchObject:(id)object path:(NSString *)path parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
object
+

The object with which to construct the object request operation. Cannot be nil.

+
+ +
+
path
+

The path to be appended to the HTTP client’s base URL and used as the request URL. If nil, the request URL will be obtained by consulting the router for a route registered for the given object’s class and the RKRequestMethodPATCH method.

+
+ +
+
parameters
+

The parameters to be reverse merged with the parameterization of the given object and set as the request body.

+
+ +
+
success
+

A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request.

+
+ +
+
failure
+

A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates an RKObjectRequestOperation with a PATCH request for the given object, and enqueues it to the manager’s operation queue.

+
+ + + + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

postObject:path:parameters:success:failure:

+ + + +
+

Creates an RKObjectRequestOperation with a POST request for the given object, and enqueues it to the manager’s operation queue.

+
+ + + +
- (void)postObject:(id)object path:(NSString *)path parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
object
+

The object with which to construct the object request operation. Cannot be nil.

+
+ +
+
path
+

The path to be appended to the HTTP client’s base URL and used as the request URL. If nil, the request URL will be obtained by consulting the router for a route registered for the given object’s class and the RKRequestMethodPOST method.

+
+ +
+
parameters
+

The parameters to be reverse merged with the parameterization of the given object and set as the request body.

+
+ +
+
success
+

A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request.

+
+ +
+
failure
+

A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates an RKObjectRequestOperation with a POST request for the given object, and enqueues it to the manager’s operation queue.

+
+ + + + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

putObject:path:parameters:success:failure:

+ + + +
+

Creates an RKObjectRequestOperation with a PUT request for the given object, and enqueues it to the manager’s operation queue.

+
+ + + +
- (void)putObject:(id)object path:(NSString *)path parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
object
+

The object with which to construct the object request operation. Cannot be nil.

+
+ +
+
path
+

The path to be appended to the HTTP client’s base URL and used as the request URL. If nil, the request URL will be obtained by consulting the router for a route registered for the given object’s class and the RKRequestMethodPUT method.

+
+ +
+
parameters
+

The parameters to be reverse merged with the parameterization of the given object and set as the request body.

+
+ +
+
success
+

A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request.

+
+ +
+
failure
+

A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates an RKObjectRequestOperation with a PUT request for the given object, and enqueues it to the manager’s operation queue.

+
+ + + + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

removeRequestDescriptor:

+ + + +
+

Removes a given request descriptor from the manager.

+
+ + + +
- (void)removeRequestDescriptor:(RKRequestDescriptor *)requestDescriptor
+ + + +
+

Parameters

+ +
+
requestDescriptor
+

An RKRequestDescriptor object to be removed from the manager.

+
+ +
+ + + + + + + +
+

Discussion

+

Removes a given request descriptor from the manager.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

removeResponseDescriptor:

+ + + +
+

Removes a given response descriptor from the manager.

+
+ + + +
- (void)removeResponseDescriptor:(RKResponseDescriptor *)responseDescriptor
+ + + +
+

Parameters

+ +
+
responseDescriptor
+

An RKResponseDescriptor object to be removed from the manager.

+
+ +
+ + + + + + + +
+

Discussion

+

Removes a given response descriptor from the manager.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

requestWithObject:method:path:parameters:

+ + + +
+

Creates and returns an NSMutableURLRequest object with a given object, method, path, and parameters.

+
+ + + +
- (NSMutableURLRequest *)requestWithObject:(id)object method:(RKRequestMethod)method path:(NSString *)path parameters:(NSDictionary *)parameters
+ + + +
+

Parameters

+ +
+
object
+

The object with which to construct the request. For the POST, PUT, and PATCH request methods, the object will parameterized using the RKRequestDescriptor for the object.

+
+ +
+
method
+

The HTTP method for the request, such as GET, POST, PUT, or DELETE.

+
+ +
+
path
+

The path to be appended to the HTTP client’s base URL and used as the request URL. If nil, the router is consulted.

+
+ +
+
parameters
+

The parameters to be either set as a query string for GET requests, or reverse merged with the parameterization of the object and set as the request HTTP body.

+
+ +
+ + + +
+

Return Value

+

An NSMutableURLRequest object.

+
+ + + + + +
+

Discussion

+

Creates and returns an NSMutableURLRequest object with a given object, method, path, and parameters.

+ +

The manager is searched for an RKRequestDescriptor object with an objectClass that matches the class of the given object. If found, the matching request descriptor and object are used to build a parameterization of the object’s attributes using the RKObjectParameterization class if the request method is a POST, PUT, or PATCH. The parameterized representation of the object is reverse merged with the given parameters dictionary, if any, and then serialized and set as the request body. If the HTTP method is GET or DELETE, the object will not be parameterized and the given parameters, if any, will be used to construct a url-encoded query string that is appended to the request’s URL.

+ +

If the given path is nil, the router is searched for a class route with the class of the object andthe method. The path pattern of the retrieved route is interpolated with the object and the resulting path is appended to the HTTP client’s base URL and used as the request URL.

+
+ + + + + +
+

See Also

+ +
+ + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

requestWithPathForRelationship:ofObject:method:parameters:

+ + + +
+

Creates an NSMutableURLRequest object with the NSURL returned by the router for the relationship of the given object and the given parameters.

+
+ + + +
- (NSMutableURLRequest *)requestWithPathForRelationship:(NSString *)relationship ofObject:(id)object method:(RKRequestMethod)method parameters:(NSDictionary *)parameters
+ + + +
+

Parameters

+ +
+
object
+

The object for which related objects are being loaded. Evaluated against the RKRoute for the relationship for the object’s class with the given name to compute the path. Cannot be nil.

+
+ +
+
method
+

The HTTP method for the request.

+
+ +
+
parameters
+

The parameters to be encoded and appended as the query string for the request URL, or parameterized and set as the request body. May be nil.

+
+ +
+
relationshipName
+

The name of the relationship being loaded. Used to retrieve the RKRoute object from the router for the given object’s class and the relationship name. Cannot be nil.

+
+ +
+ + + +
+

Return Value

+

An NSMutableURLRequest object for the specified relationship.

+ +

@raises NSInvalidArgumentException Raised if no route is configured for a relationship of the given object’s class with the given name.

+
+ + + + + +
+

Discussion

+

Creates an NSMutableURLRequest object with the NSURL returned by the router for the relationship of the given object and the given parameters.

+ +

The implementation invokes requestWithObject:method:path:parameters: after constructing the path with the given route.

+ +

Creates an RKObjectRequestOperation with a GET request for the relationship with the given name of the given object, and enqueues it to the manager’s operation queue.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

requestWithPathForRouteNamed:object:parameters:

+ + + +
+

Creates an NSMutableURLRequest object with the NSURL returned by the router for the given route name and object and the given parameters.

+
+ + + +
- (NSMutableURLRequest *)requestWithPathForRouteNamed:(NSString *)routeName object:(id)object parameters:(NSDictionary *)parameters
+ + + +
+

Parameters

+ +
+
routeName
+

The name of the route object containing the path pattern which is to be interpolated against the given object, appended to the HTTP client’s base URL and used as the request URL.

+
+ +
+
object
+

The object with which to interpolate the path pattern of the named route. Can be nil.

+
+ +
+
parameters
+

The parameters to be either set as a query string for GET requests, or the request HTTP body.

+
+ +
+ + + +
+

Return Value

+

An NSMutableRequest object.

+
+ + + + + +
+

Discussion

+

Creates an NSMutableURLRequest object with the NSURL returned by the router for the given route name and object and the given parameters.

+ +

The implementation invokes requestWithObject:method:path:parameters: after constructing the path with the given route.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

setAcceptHeaderWithMIMEType:

+ + + +
+

The value for the HTTP “Accept” header to specify the preferred serialization format for retrieved data.

+
+ + + +
- (void)setAcceptHeaderWithMIMEType:(NSString *)MIMEType
+ + + +
+

Parameters

+ +
+
MIMEType
+

The MIME Type to set as the value for the HTTP “Accept” header.

+
+ +
+ + + + + + + +
+

Discussion

+

The value for the HTTP “Accept” header to specify the preferred serialization format for retrieved data.

+ +

If the receiver was initialized with an AFHTTPClient, then the value of the ‘Accept’ header is deferred to the client. If initialized directly with a baseURL, the default value is RKMIMETypeJSON, which is equal to the string @"application/json". A value of nil will prevent the object manager from explicitly setting a value for the “Accept” header.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

setHTTPOperationClass:

+ + + +
+

Sets the RKHTTPRequestOperation subclass to be used when constructing HTTP request operations for requests dispatched through the manager.

+
+ + + +
- (void)setHTTPOperationClass:(Class)operationClass
+ + + +
+

Parameters

+ +
+
operationClass
+

A class object inheriting from RKHTTPRequestOperation to be used for HTTP requests dispatched through the manager. +@raises NSInvalidArgumentException Raised if the given class does not inherit from RKHTTPRequestOperation.

+
+ +
+ + + + + + + +
+

Discussion

+

Sets the RKHTTPRequestOperation subclass to be used when constructing HTTP request operations for requests dispatched through the manager.

+ +

When set, an instance of the given class will be initialized via initWithRequest: each time that the receiver constructs an HTTP request operation. HTTP request operations are used to initialize instances of RKObjectRequestOperation and are responsible for managing the HTTP request/response lifecycle of a request whose response is destined to be object mapped. Providing a subclass implementation of RKHTTPRequestOperation allows the behavior of all requests sent through the manager to be changed.

Warning: The given class must inherit from RKHTTPRequestOperation, else an exception will be raised.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKObjectMapping.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKObjectMapping.html new file mode 100644 index 00000000..fd04ae52 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKObjectMapping.html @@ -0,0 +1,2299 @@ + + + + + RKObjectMapping Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + + + + +
Inherits fromRKMapping : NSObject
Conforms toNSCopying
Declared inRKObjectMapping.h
+ + + + +
+ +

Overview

+

An RKObjectMapping object describes a transformation between object represenations using key-value coding and run-time type introspection. The mapping is defined in terms of a source object class and a collection of RKPropertyMapping objects describing how key paths in the source representation should be transformed into attributes and relationships on the target object. Object mappings are provided to instances of RKMapperOperation and RKMappingOperation to perform the transformations they describe.

+ +

Object mappings are containers of property mappings that describe the actual key path transformations. There are two types of property mappings:

+ +
    +
  1. RKAttributeMapping: An attribute mapping describes a transformation between a single value from a source key path to a destination key path. The value to be mapped is read from the source object representation using valueForKeyPath: and then set to the destination key path using setValueForKeyPath:. Before the value is set, the RKObjecMappingOperation performing the mapping performs runtime introspection on the destination property to determine what, if any, type transformation is to be performed. Typical type transformations include reading an NSString value representation and mapping it to an NSDecimalNumber destination key path or reading an NSString and transforming it into an NSDate value before assigning to the destination.
  2. +
  3. RKRelationshipMapping: A relationship mapping describes a transformation between a nested child object or objects from a source key path to a destination key path using another RKObjectMapping. The child objects to be mapped are read from the source object representation using valueForKeyPath:, then mapped recursively using the object mapping associated with the relationship mapping, and then finally assigned to the destination key path. Before assignment to the destination key path runtime type introspection is performed to determine if any type transformation is necessary. For relationship mappings, common type transformations include transforming a single object value in an NSArray or transforming an NSArray of object values into an NSSet.
  4. +
+ + +

All type transformations available are discussed in detail in the documentation for RKObjectMappingOperation.

+
+ + + + + +
+ +

Tasks

+ + + +

Creating an Object Mapping

+ +
    +
  • + + + mappingForClass: +

    Returns an object mapping for the specified class that is ready for configuration

    +
    + + +
  • + + – initWithClass: +

    Initializes the receiver with a given object class. This is the designated initializer.

    +
    + + +
  • + + + requestMapping +

    Returns an object mapping with an objectClass of NSMutableDictionary.

    +
    + + +
  • +
+ + + +

Managing Property Mappings

+ + + + + +

Mapping Nested Dictionaries

+ + + + + +

Configuring Mapping Options

+ +
    +
  • + +   objectClass +

    The target class that the receiver describes a mapping for.

    +
    + property + +
  • + +   setDefaultValueForMissingAttributes +

    When YES, any attributes that have mappings defined but are not present within the source object will be set to nil, clearing any existing value.

    +
    + property + +
  • + +   setNilForMissingRelationships +

    When YES, any relationships that have mappings defined but are not present within the source object will be set to nil, clearing any existing value.

    +
    + property + +
  • + +   performKeyValueValidation +

    When YES, key-value validation will be invoked at object mapping time.

    +
    + property + +
  • + +   ignoreUnknownKeyPaths +

    When YES, the mapping operation will check that the object being mapped is key-value coding compliant for the mapped key. If it is not, the attribute/relationship mapping will be ignored and mapping will continue. When NO, property mappings for unknown key paths will trigger NSUnknownKeyException exceptions for the unknown keyPath.

    +
    + property + +
  • + + – defaultValueForMissingAttribute: +

    Returns the default value to be assigned to the specified attribute when it is missing from a mappable payload.

    +
    + + +
  • +
+ + + +

Configuring Date Formatters

+ +
    +
  • + +   dateFormatters +

    An array of NSFormatter objects to use when mapping string values into NSDate attributes on the target objectClass. Each date formatter will be invoked with the string value being mapped until one of the date formatters does not return nil.

    +
    + property + +
  • + +   preferredDateFormatter +

    The NSFormatter object for your application’s preferred date and time configuration. This date formatter will be used when generating string representations of NSDate attributes (i.e. during serialization to URL form encoded or JSON format).

    +
    + property + +
  • + + – inverseMapping +

    Generates an inverse mapping for the rules specified within this object mapping. This can be used to +quickly generate a corresponding serialization mapping from a configured object mapping. The inverse +mapping will have the source and destination keyPaths swapped for all attribute and relationship mappings.

    +
    + + +
  • +
+ + + +

Obtaining Information About the Target Class

+ + + + + +

DateAndTimeFormatting Methods

+ +
    +
  • + + + defaultDateFormatters +

    Returns the collection of default date formatters that will be used for all object mappings that have not been configured specifically.

    +
    + + +
  • + + + setDefaultDateFormatters: +

    Sets the collection of default date formatters to the specified array. The array should contain configured instances of NSDateFormatter in the order in which you want them applied during object mapping operations.

    +
    + + +
  • + + + addDefaultDateFormatter: +

    Adds a date formatter instance to the default collection

    +
    + + +
  • + + + addDefaultDateFormatterForString:inTimeZone: +

    Convenience method for quickly constructing a date formatter and adding it to the collection of default date formatters. The locale is auto-configured to en_US_POSIX.

    +
    + + +
  • + + + preferredDateFormatter +

    Returns the preferred date formatter to use when generating NSString representations from NSDate attributes. This type of transformation occurs when RestKit is mapping local objects into JSON or form encoded serializations that do not have a native time construct.

    +
    + + +
  • + + + setPreferredDateFormatter: +

    Sets the preferred date formatter to use when generating NSString representations from NSDate attributes. This type of transformation occurs when RestKit is mapping local objects into JSON or form encoded serializations that do not have a native time construct.

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

attributeMappings

+ + + +
+

The collection of attribute mappings within this object mapping.

+
+ + + +
@property (nonatomic, readonly) NSArray *attributeMappings
+ + + + + + + + + +
+

Discussion

+

The collection of attribute mappings within this object mapping.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

dateFormatters

+ + + +
+

An array of NSFormatter objects to use when mapping string values into NSDate attributes on the target objectClass. Each date formatter will be invoked with the string value being mapped until one of the date formatters does not return nil.

+
+ + + +
@property (nonatomic, strong) NSArray *dateFormatters
+ + + + + + + + + +
+

Discussion

+

An array of NSFormatter objects to use when mapping string values into NSDate attributes on the target objectClass. Each date formatter will be invoked with the string value being mapped until one of the date formatters does not return nil.

+ +

Defaults to the application-wide collection of date formatters configured via [RKObjectMapping setDefaultDateFormatters:]

+
+ + + + + +
+

See Also

+
    + +
  • [RKObjectMapping defaultDateFormatters]

  • + +
+
+ + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

ignoreUnknownKeyPaths

+ + + +
+

When YES, the mapping operation will check that the object being mapped is key-value coding compliant for the mapped key. If it is not, the attribute/relationship mapping will be ignored and mapping will continue. When NO, property mappings for unknown key paths will trigger NSUnknownKeyException exceptions for the unknown keyPath.

+
+ + + +
@property (nonatomic, assign) BOOL ignoreUnknownKeyPaths
+ + + + + + + + + +
+

Discussion

+

When YES, the mapping operation will check that the object being mapped is key-value coding compliant for the mapped key. If it is not, the attribute/relationship mapping will be ignored and mapping will continue. When NO, property mappings for unknown key paths will trigger NSUnknownKeyException exceptions for the unknown keyPath.

+ +

Defaults to NO to help the developer catch incorrect mapping configurations during development.

+ +

Default: NO

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

objectClass

+ + + +
+

The target class that the receiver describes a mapping for.

+
+ + + +
@property (nonatomic, weak, readonly) Class objectClass
+ + + + + + + + + +
+

Discussion

+

The target class that the receiver describes a mapping for.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

performKeyValueValidation

+ + + +
+

When YES, key-value validation will be invoked at object mapping time.

+
+ + + +
@property (nonatomic, assign) BOOL performKeyValueValidation
+ + + + + + + + + +
+

Discussion

+

When YES, key-value validation will be invoked at object mapping time.

+ +

Default: YES

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

preferredDateFormatter

+ + + +
+

The NSFormatter object for your application’s preferred date and time configuration. This date formatter will be used when generating string representations of NSDate attributes (i.e. during serialization to URL form encoded or JSON format).

+
+ + + +
@property (nonatomic, strong) NSFormatter *preferredDateFormatter
+ + + + + + + + + +
+

Discussion

+

The NSFormatter object for your application’s preferred date and time configuration. This date formatter will be used when generating string representations of NSDate attributes (i.e. during serialization to URL form encoded or JSON format).

+ +

Defaults to the application-wide preferred date formatter configured via: [RKObjectMapping setPreferredDateFormatter:]

+
+ + + + + +
+

See Also

+
    + +
  • [RKObjectMapping preferredDateFormatter]

  • + +
+
+ + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

propertyMappings

+ + + +
+

The aggregate collection of attribute and relationship mappings within this object mapping.

+
+ + + +
@property (nonatomic, strong, readonly) NSArray *propertyMappings
+ + + + + + + + + +
+

Discussion

+

The aggregate collection of attribute and relationship mappings within this object mapping.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

propertyMappingsByDestinationKeyPath

+ + + +
+

Returns the property mappings of the receiver in a dictionary, where the keys are the destination key paths and the values are instances of RKAttributeMapping or RKRelationshipMapping.

+
+ + + +
@property (nonatomic, readonly) NSDictionary *propertyMappingsByDestinationKeyPath
+ + + + + +
+

Return Value

+

The property mappings of the receiver in a dictionary, where the keys are the destination key paths and the values are instances of RKAttributeMapping or RKRelationshipMapping.

+
+ + + + + +
+

Discussion

+

Returns the property mappings of the receiver in a dictionary, where the keys are the destination key paths and the values are instances of RKAttributeMapping or RKRelationshipMapping.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

propertyMappingsBySourceKeyPath

+ + + +
+

Returns the property mappings of the receiver in a dictionary, where the keys are the source key paths and the values are instances of RKAttributeMapping or RKRelationshipMapping.

+
+ + + +
@property (nonatomic, readonly) NSDictionary *propertyMappingsBySourceKeyPath
+ + + + + +
+

Return Value

+

The property mappings of the receiver in a dictionary, where the keys are the source key paths and the values are instances of RKAttributeMapping or RKRelationshipMapping.

+
+ + + + + +
+

Discussion

+

Returns the property mappings of the receiver in a dictionary, where the keys are the source key paths and the values are instances of RKAttributeMapping or RKRelationshipMapping.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

relationshipMappings

+ + + +
+

The collection of relationship mappings within this object mapping.

+
+ + + +
@property (nonatomic, readonly) NSArray *relationshipMappings
+ + + + + + + + + +
+

Discussion

+

The collection of relationship mappings within this object mapping.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

setDefaultValueForMissingAttributes

+ + + +
+

When YES, any attributes that have mappings defined but are not present within the source object will be set to nil, clearing any existing value.

+
+ + + +
@property (nonatomic, assign, getter=shouldSetDefaultValueForMissingAttributes) BOOL setDefaultValueForMissingAttributes
+ + + + + + + + + +
+

Discussion

+

When YES, any attributes that have mappings defined but are not present within the source object will be set to nil, clearing any existing value.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

setNilForMissingRelationships

+ + + +
+

When YES, any relationships that have mappings defined but are not present within the source object will be set to nil, clearing any existing value.

+
+ + + +
@property (nonatomic, assign) BOOL setNilForMissingRelationships
+ + + + + + + + + +
+

Discussion

+

When YES, any relationships that have mappings defined but are not present within the source object will be set to nil, clearing any existing value.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

addDefaultDateFormatter:

+ + + +
+

Adds a date formatter instance to the default collection

+
+ + + +
+ (void)addDefaultDateFormatter:(NSFormatter *)dateFormatter
+ + + +
+

Parameters

+ +
+
dateFormatter
+

An NSFormatter object to prepend to the default formatters collection

+
+ +
+ + + + + + + +
+

Discussion

+

Adds a date formatter instance to the default collection

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

addDefaultDateFormatterForString:inTimeZone:

+ + + +
+

Convenience method for quickly constructing a date formatter and adding it to the collection of default date formatters. The locale is auto-configured to en_US_POSIX.

+
+ + + +
+ (void)addDefaultDateFormatterForString:(NSString *)dateFormatString inTimeZone:(NSTimeZone *)nilOrTimeZone
+ + + +
+

Parameters

+ +
+
dateFormatString
+

The dateFormat string to assign to the newly constructed NSDateFormatter instance

+
+ +
+
nilOrTimeZone
+

The NSTimeZone object to configure on the NSDateFormatter instance. Defaults to UTC time.

+
+ +
+ + + +
+

Return Value

+

A new NSDateFormatter will be prepended to the defaultDateFormatters with the specified date format and time zone

+
+ + + + + +
+

Discussion

+

Convenience method for quickly constructing a date formatter and adding it to the collection of default date formatters. The locale is auto-configured to en_US_POSIX.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

defaultDateFormatters

+ + + +
+

Returns the collection of default date formatters that will be used for all object mappings that have not been configured specifically.

+
+ + + +
+ (NSArray *)defaultDateFormatters
+ + + + + +
+

Return Value

+

An array of NSFormatter objects used when mapping strings into NSDate attributes

+
+ + + + + +
+

Discussion

+

Returns the collection of default date formatters that will be used for all object mappings that have not been configured specifically.

+ +

Out of the box, RestKit initializes default date formatters for you in the UTC time zone with the following format strings:

+ +
    +
  • yyyy-MM-dd'T'HH:mm:ss'Z'
  • +
  • MM/dd/yyyy
  • +
+ +
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

mappingForClass:

+ + + +
+

Returns an object mapping for the specified class that is ready for configuration

+
+ + + +
+ (id)mappingForClass:(Class)objectClass
+ + + +
+

Parameters

+ +
+
objectClass
+

The class that the mapping targets.

+
+ +
+ + + +
+

Return Value

+

A new mapping object.

+
+ + + + + +
+

Discussion

+

Returns an object mapping for the specified class that is ready for configuration

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

preferredDateFormatter

+ + + +
+

Returns the preferred date formatter to use when generating NSString representations from NSDate attributes. This type of transformation occurs when RestKit is mapping local objects into JSON or form encoded serializations that do not have a native time construct.

+
+ + + +
+ (NSFormatter *)preferredDateFormatter
+ + + + + +
+

Return Value

+

The preferred NSFormatter object to use when serializing dates into strings

+
+ + + + + +
+

Discussion

+

Returns the preferred date formatter to use when generating NSString representations from NSDate attributes. This type of transformation occurs when RestKit is mapping local objects into JSON or form encoded serializations that do not have a native time construct.

+ +

Defaults to a date formatter configured for the UTC Time Zone with a format string of “yyyy-MM-dd HH:mm:ss Z”

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

requestMapping

+ + + +
+

Returns an object mapping with an objectClass of NSMutableDictionary.

+
+ + + +
+ (id)requestMapping
+ + + + + +
+

Return Value

+

An object mapping with an object class of NSMutableDictionary.

+
+ + + + + +
+

Discussion

+

Returns an object mapping with an objectClass of NSMutableDictionary.

+ +

Request mappings are used when configuring mappings that are to be used for transforming local objects into HTTP parameters using the RKObjectParameterization class.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

setDefaultDateFormatters:

+ + + +
+

Sets the collection of default date formatters to the specified array. The array should contain configured instances of NSDateFormatter in the order in which you want them applied during object mapping operations.

+
+ + + +
+ (void)setDefaultDateFormatters:(NSArray *)dateFormatters
+ + + +
+

Parameters

+ +
+
dateFormatters
+

An array of date formatters to replace the existing defaults.

+
+ +
+ + + + + + + +
+

Discussion

+

Sets the collection of default date formatters to the specified array. The array should contain configured instances of NSDateFormatter in the order in which you want them applied during object mapping operations.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

setPreferredDateFormatter:

+ + + +
+

Sets the preferred date formatter to use when generating NSString representations from NSDate attributes. This type of transformation occurs when RestKit is mapping local objects into JSON or form encoded serializations that do not have a native time construct.

+
+ + + +
+ (void)setPreferredDateFormatter:(NSFormatter *)dateFormatter
+ + + +
+

Parameters

+ +
+
dateFormatter
+

The NSFormatter object to designate as the new preferred instance

+
+ +
+ + + + + + + +
+

Discussion

+

Sets the preferred date formatter to use when generating NSString representations from NSDate attributes. This type of transformation occurs when RestKit is mapping local objects into JSON or form encoded serializations that do not have a native time construct.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

addAttributeMappingsFromArray:

+ + + +
+

Adds attribute mappings to the receiver from a given array.

+
+ + + +
- (void)addAttributeMappingsFromArray:(NSArray *)arrayOfAttributeNamesOrMappings
+ + + +
+

Parameters

+ +
+
An
+

array of RKAttributeMapping or NSString values to be added to the receiver’s set of attribute mappings,

+
+ +
+ + + + + + + +
+

Discussion

+

Adds attribute mappings to the receiver from a given array.

+ +

The array can contain RKAttributeMapping objects or NSString values. If an NSString is given, then a new RKAttributeMapping object is instantiated with a sourceKeyPath and destinationKeyPath equal to the string value.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

addAttributeMappingsFromDictionary:

+ + + +
+

Adds attribute mappings from a given dictionary wherein the keys represent the source key path and the values represent the names of the target attributes on the destination object.

+
+ + + +
- (void)addAttributeMappingsFromDictionary:(NSDictionary *)keyPathToAttributeNames
+ + + +
+

Parameters

+ +
+
keyPathToAttributeNames
+

A dictionary keyed by source key to destination attribute name.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds attribute mappings from a given dictionary wherein the keys represent the source key path and the values represent the names of the target attributes on the destination object.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

addPropertyMapping:

+ + + +
+

Adds a property mapping to the receiver.

+
+ + + +
- (void)addPropertyMapping:(RKPropertyMapping *)propertyMapping
+ + + +
+

Parameters

+ +
+
propertyMapping
+

The property mapping to be added to the object mapping.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds a property mapping to the receiver.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

addPropertyMappingsFromArray:

+ + + +
+

Adds an array of RKAttributeMapping or RKRelationshipMapping objects to the receiver.

+
+ + + +
- (void)addPropertyMappingsFromArray:(NSArray *)arrayOfPropertyMappings
+ + + +
+

Parameters

+ +
+
propertyMappings
+

The array of property mappings to be added to the object mapping.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds an array of RKAttributeMapping or RKRelationshipMapping objects to the receiver.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

attributeMappingForKeyOfNestedDictionary

+ + + +
+

Returns the attribute mapping targeting the key of a nested dictionary in the source JSON.

+
+ + + +
- (RKAttributeMapping *)attributeMappingForKeyOfNestedDictionary
+ + + + + +
+

Return Value

+

An attribute mapping for the key of a nested dictionary being mapped or nil

+
+ + + + + +
+

Discussion

+

Returns the attribute mapping targeting the key of a nested dictionary in the source JSON.

+ +

This attribute mapping corresponds to the attributeName configured via mapKeyOfNestedDictionaryToAttribute:

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

classForKeyPath:

+ + + +
+

Returns the class of the attribute or relationship property of the target objectClass at the given key path.

+
+ + + +
- (Class)classForKeyPath:(NSString *)keyPath
+ + + +
+

Parameters

+ +
+
propertyName
+

The name of the property we would like to retrieve the type of.

+
+ +
+ + + +
+

Return Value

+

The class of the property at the given key path.

+
+ + + + + +
+

Discussion

+

Returns the class of the attribute or relationship property of the target objectClass at the given key path.

+ +

Given a key path to a string property, this will return an NSString, etc.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

classForProperty:

+ + + +
+

Returns the class of the attribute or relationship property of the target objectClass with the given name.

+
+ + + +
- (Class)classForProperty:(NSString *)propertyName
+ + + +
+

Parameters

+ +
+
propertyName
+

The name of the property we would like to retrieve the type of.

+
+ +
+ + + +
+

Return Value

+

The class of the property.

+
+ + + + + +
+

Discussion

+

Returns the class of the attribute or relationship property of the target objectClass with the given name.

+ +

Given the name of a string property, this will return an NSString, etc.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

defaultValueForMissingAttribute:

+ + + +
+

Returns the default value to be assigned to the specified attribute when it is missing from a mappable payload.

+
+ + + +
- (id)defaultValueForMissingAttribute:(NSString *)attributeName
+ + + + + + + + + +
+

Discussion

+

Returns the default value to be assigned to the specified attribute when it is missing from a mappable payload.

+ +

The default implementation returns nil for transient object mappings. On an entity mapping, the default value returned from the Entity definition will be used.

+
+ + + + + +
+

See Also

+
    + +
  • [RKEntityMapping defaultValueForMissingAttribute:]

  • + +
+
+ + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

initWithClass:

+ + + +
+

Initializes the receiver with a given object class. This is the designated initializer.

+
+ + + +
- (id)initWithClass:(Class)objectClass
+ + + +
+

Parameters

+ +
+
objectClass
+

The class that the mapping targets. Cannot be nil.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given class.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a given object class. This is the designated initializer.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

inverseMapping

+ + + +
+

Generates an inverse mapping for the rules specified within this object mapping. This can be used to +quickly generate a corresponding serialization mapping from a configured object mapping. The inverse +mapping will have the source and destination keyPaths swapped for all attribute and relationship mappings.

+
+ + + +
- (RKObjectMapping *)inverseMapping
+ + + + + + + + + +
+

Discussion

+

Generates an inverse mapping for the rules specified within this object mapping. This can be used to +quickly generate a corresponding serialization mapping from a configured object mapping. The inverse +mapping will have the source and destination keyPaths swapped for all attribute and relationship mappings.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

mapKeyOfNestedDictionaryToAttribute:

+ + + +
+

Configures a sub-key mapping for cases where JSON has been nested underneath a key named after an attribute.

+
+ + + +
- (void)mapKeyOfNestedDictionaryToAttribute:(NSString *)attributeName
+ + + + + + + + + +
+

Discussion

+

Configures a sub-key mapping for cases where JSON has been nested underneath a key named after an attribute.

+ +

For example, consider the following JSON:

+ +
 { "users":
+     {
+         "blake": { "id": 1234, "email": "blake@restkit.org" },
+         "rachit": { "id": 5678", "email": "rachit@restkit.org" }
+     }
+ }
+
+ +

We can configure our mappings to handle this in the following form:

+ +
 RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[User class]];
+ mapping.forceCollectionMapping = YES; // RestKit cannot infer this is a collection, so we force it
+ [mapping mapKeyOfNestedDictionaryToAttribute:@"firstName"];
+ [mapping mapFromKeyPath:@"(firstName).id" toAttribute:"userID"];
+ [mapping mapFromKeyPath:@"(firstName).email" toAttribute:"email"];
+
+ [[RKObjectManager sharedManager].mappingProvider setObjectMapping:mapping forKeyPath:@"users"];
+
+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

removePropertyMapping:

+ + + +
+

Removes an RKAttributeMapping or RKRelationshipMapping from the receiver.

+
+ + + +
- (void)removePropertyMapping:(RKPropertyMapping *)propertyMapping
+ + + +
+

Parameters

+ +
+
propertyMapping
+

The attribute or relationship mapping to remove.

+
+ +
+ + + + + + + +
+

Discussion

+

Removes an RKAttributeMapping or RKRelationshipMapping from the receiver.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKObjectMappingOperationDataSource.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKObjectMappingOperationDataSource.html new file mode 100644 index 00000000..3db1faaa --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKObjectMappingOperationDataSource.html @@ -0,0 +1,228 @@ + + + + + RKObjectMappingOperationDataSource Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + + + + +
Inherits fromNSObject
Conforms toRKMappingOperationDataSource
Declared inRKObjectMappingOperationDataSource.h
+ + + + +
+ +

Overview

+

The RKObjectMappingOperationDataSource class is an implementation of the RKMappingOperationDataSource protocol for use in performing object mappings that target plain old NSObject derived classes (as opposed to NSManagedObject derived persistent entities).

+
+ + + + + + + + + + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKObjectParameterization.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKObjectParameterization.html new file mode 100644 index 00000000..f0bdb601 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKObjectParameterization.html @@ -0,0 +1,343 @@ + + + + + RKObjectParameterization Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKObjectParameterization.h
+ + + + +
+ +

Overview

+

The RKObjectParameterization class provides an interface for mapping a local domain object into an NSDictionary representation suitable for use as the parameters of an HTTP request.

+
+ + + + + +
+ +

Tasks

+ + + + +

Parameterizing an Object

+
    +
  • + + + parametersWithObject:requestDescriptor:error: +

    Returns a dictionary representation of the given object by performing object mapping using the mapping +from the given request descriptor. If the request descriptor specifies a root key path, the mapped parameters +will be nested within the dictionary under the specified root key path.

    +
    + + +
  • +
+ +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

parametersWithObject:requestDescriptor:error:

+ + + +
+

Returns a dictionary representation of the given object by performing object mapping using the mapping +from the given request descriptor. If the request descriptor specifies a root key path, the mapped parameters +will be nested within the dictionary under the specified root key path.

+
+ + + +
+ (NSDictionary *)parametersWithObject:(id)object requestDescriptor:(RKRequestDescriptor *)requestDescriptor error:(NSError **)error
+ + + +
+

Parameters

+ +
+
object
+

The object to be parameterized.

+
+ +
+
requestDescriptor
+

The request descriptor describing how the object is to be mapped into an NSDictionary of parameters.

+
+ +
+
error
+

If there is a problem mapping the parameters, upon return contains a pointer to an instance of NSError that describes the problem.

+
+ +
+ + + +
+

Return Value

+

A new dictionary containing the mapped parameters or nil if an error has occurred.

+
+ + + + + +
+

Discussion

+

Returns a dictionary representation of the given object by performing object mapping using the mapping +from the given request descriptor. If the request descriptor specifies a root key path, the mapped parameters +will be nested within the dictionary under the specified root key path.

+
+ + + + + + + +
+

Declared In

+ RKObjectParameterization.h
+
+ + +
+ +
+ + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKObjectRequestOperation.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKObjectRequestOperation.html new file mode 100644 index 00000000..83898a87 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKObjectRequestOperation.html @@ -0,0 +1,1141 @@ + + + + + RKObjectRequestOperation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSOperation
Declared inRKObjectRequestOperation.h
+ + + + +
+ +

Overview

+

RKObjectRequestOperation is an NSOperation subclass that implements object mapping on the response body of an NSHTTPResponse loaded via an RKHTTPRequestOperation.

+ +

Object request operations are initialized with a fully configured NSURLRequest object and an array of RKResponseDescriptor objects. RKObjectRequestOperation is internally implemented as an aggregate operation that constructs and starts an RKHTTPRequestOperation to perform the network access and retrieve the mappable data. If an error occurs during HTTP transport, the object request operation is failed with the transport error. Once response data is loaded for the request, the object request operation creates and starts an RKObjectResponseMapperOperation to perform the object mapping on the response body. If the mapping operation fails, then object request operation is failed and the error property is set. If mapping is successful, then the mappingResult property is set and the operation is finished successfully.

+ +

Acceptable Content Types and Status Codes

+ +

Instances of RKObjectRequestOperation determine the acceptability of status codes and content types differently than is typical for AFNetworking derived network opertations. The RKHTTPRequestOperation (which is a subclass of the AFNetworking AFHTTPRequestOperation class) supports the dynamic assigning of acceptable status codes and content types. This facility is utilized during the configuration of the network operation for an object request operation. The set of acceptable content types is determined by consulting the RKMIMETypeSerialization via an invocation of [RKMIMETypeSerialization registeredMIMETypes]. The registeredMIMETypes method returns an NSSet containing either NSString or NSRegularExpression objects that specify the content types for which RKSerialization classes have been registered to handle. The set of acceptable status codes is determined by aggregating the value of the statusCodes property from all registered RKResponseDescriptor objects.

+ +

Error Mapping

+ +

If the HTTP request returned a response in the Client Error (400-499 range) or Server Error (500-599 range) class and an appropriate RKResponseDescriptor is provided to perform mapping on the response, then the object mapping result is considered to contain a server returned error. In this case, an NSError object is created in the RKErrorDomain with an error code of RKMappingErrorFromMappingResult and the object request operation is failed. In the event that an a response is returned in an error class and no RKResponseDescriptor has been provided to the operation to handle it, then an NSError object in the AFNetworkingErrorDomain with an error code of NSURLErrorBadServerResponse will be returned by the underlying RKHTTPRequestOperation indicating that an unexpected status code was returned.

+ +

Prioritization and Cancellation

+ +

Object request operations support prioritization and cancellation of the underlying RKHTTPRequestOperation and RKResponseMapperOperation operations that perform the network transport and object mapping duties on their behalf. The queue priority of the object request operation, as set via the [NSOperation setQueuePriority:] method, is applied to the underlying response mapping operation when it is enqueued onto the responseMappingQueue. If the object request operation is cancelled, then the underlying HTTP request operation and response mapping operation are also cancelled.

+ +

Caching

+ +

Instances of RKObjectRequestOperation support all the HTTP caching facilities available via the NSURLConnection family of API’s. For caching to be enabled, the remote web server that the application is communicating with must emit the appropriate Cache-Control, Expires, and/or ETag headers. When the response headers include the appropriate caching information, the shared NSURLCache instance will manage responses and transparently add conditional GET support to cachable requests. HTTP caching is a deep topic explored in depth across the web and detailed in RFC 2616: http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html

+ +

The RKObjectRequestOperation class also provides support for utilizing the NSURLCache to satisfy requests without hitting the network. This support enables applications to display views presenting data retrieved via a cachable GET request without revalidating with the server and incurring any overhead. The optimization is controlled via avoidsNetworkAccess property. When enabled, the operation will skip the network transport portion of the object request operation and proceed directly to object mapping the cached response data. When the object request operation is an instance of RKManagedObjectRequestOperation, the deserialization and mapping portion of the process can be skipped entirely and the operation will fetch the appropriate object directly from Core Data, falling back to network transport once the cache entry has expired. Please refer to the documentation accompanying RKManagedObjectRequestOperation for more details.

+ +

Core Data

+ +

RKObjectRequestOperation is not able to perform object mapping that targets Core Data destination entities. Please refer to the RKManagedObjectRequestOperation subclass for details regarding performing a Core Data object request operation.

+
+ + + + + +
+ +

Tasks

+ + + +

Initializing an Object Request Operation

+ + + + + +

Configuring Object Mapping

+ + + + + +

Accessing Operation Results

+ + + + + +

Accessing the HTTP Request Operation

+ + + + + +

Setting the Completion Block and Callback Queues

+ +
    +
  • + + – setCompletionBlockWithSuccess:failure: +

    Sets the completionBlock property with a block that executes either the specified success or failure block, depending on the state of the object request on completion. If error returns a value, which can be set during HTTP transport by the underlying HTTPRequestOperation or during object mapping by the RKResponseMapperOperation object, then failure is executed. If the object request operation is cancelled, then neither success nor failure will be executed. Otherwise, success is executed.

    +
    + + +
  • + +   successCallbackQueue +

    The callback dispatch queue on success. If NULL (default), the main queue is used.

    +
    + property + +
  • + +   failureCallbackQueue +

    The callback dispatch queue on failure. If NULL (default), the main queue is used.

    +
    + property + +
  • +
+ + + +

Accessing the Response Mapping Queue

+ +
    +
  • + + + responseMappingQueue +

    Returns the operation queue used by all object request operations when object mapping the body of a response loaded via HTTP.

    +
    + + +
  • +
+ + + +

ForSubclassEyesOnly Methods

+ +
    +
  • + + – performMappingOnResponse: +

    Performs object mapping using the response and responseData properties.

    +
    + + +
  • + + – willFinish +

    Invoked to tell the receiver that the object request operation is finishing its work and is about to transition into the finished state. Used to perform any necessary cleanup before the operation is finished.

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

HTTPRequestOperation

+ + + +
+

The underlying RKHTTPRequestOperation object used to manage the HTTP request/response lifecycle of the object request operation.

+
+ + + +
@property (nonatomic, strong, readonly) RKHTTPRequestOperation *HTTPRequestOperation
+ + + + + + + + + +
+

Discussion

+

The underlying RKHTTPRequestOperation object used to manage the HTTP request/response lifecycle of the object request operation.

+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ +

error

+ + + +
+

The error, if any, that occurred during execution of the operation.

+
+ + + +
@property (nonatomic, strong, readonly) NSError *error
+ + + + + + + + + +
+

Discussion

+

The error, if any, that occurred during execution of the operation.

+ +

Errors may originate during the network transport or object mapping phases of the object request operation. A nil error value indicates that the operation completed successfully.

+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ +

failureCallbackQueue

+ + + +
+

The callback dispatch queue on failure. If NULL (default), the main queue is used.

+
+ + + +
@property (nonatomic, assign) dispatch_queue_t failureCallbackQueue
+ + + + + + + + + +
+

Discussion

+

The callback dispatch queue on failure. If NULL (default), the main queue is used.

+ +

The queue is retained while this operation is living

+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ +

mappingResult

+ + + +
+

The mapping result returned by the underlying RKObjectResponseMapperOperation.

+
+ + + +
@property (nonatomic, strong, readonly) RKMappingResult *mappingResult
+ + + + + + + + + +
+

Discussion

+

The mapping result returned by the underlying RKObjectResponseMapperOperation.

+ +

This property is nil if the operation is failed due to a network transport error.

+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ +

responseDescriptors

+ + + +
+

The array of RKResponseDescriptor objects that specify how the deserialized responseData is to be object mapped.

+
+ + + +
@property (nonatomic, strong, readonly) NSArray *responseDescriptors
+ + + + + + + + + +
+

Discussion

+

The array of RKResponseDescriptor objects that specify how the deserialized responseData is to be object mapped.

+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ +

successCallbackQueue

+ + + +
+

The callback dispatch queue on success. If NULL (default), the main queue is used.

+
+ + + +
@property (nonatomic, assign) dispatch_queue_t successCallbackQueue
+ + + + + + + + + +
+

Discussion

+

The callback dispatch queue on success. If NULL (default), the main queue is used.

+ +

The queue is retained while this operation is living

+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ +

targetObject

+ + + +
+

The target object for the object mapping operation.

+
+ + + +
@property (nonatomic, strong) id targetObject
+ + + + + + + + + +
+

Discussion

+

The target object for the object mapping operation.

+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

responseMappingQueue

+ + + +
+

Returns the operation queue used by all object request operations when object mapping the body of a response loaded via HTTP.

+
+ + + +
+ (NSOperationQueue *)responseMappingQueue
+ + + + + +
+

Return Value

+

The response mapping queue.

+
+ + + + + +
+

Discussion

+

Returns the operation queue used by all object request operations when object mapping the body of a response loaded via HTTP.

+ +

By default, the response mapping queue is configured with a maximum concurrent operation count of 1, ensuring that only one HTTP response is mapped at a time.

+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

initWithHTTPRequestOperation:responseDescriptors:

+ + + +
+

Initializes an object request operation with an HTTP request operation and a set of response descriptors.

+
+ + + +
- (id)initWithHTTPRequestOperation:(RKHTTPRequestOperation *)requestOperation responseDescriptors:(NSArray *)responseDescriptors
+ + + +
+

Parameters

+ +
+
responseDescriptors
+

An array of RKResponseDescriptor objects specifying how object mapping is to be performed on the response loaded by the network operation.

+
+ +
+
request
+

The request object to be used with the underlying network operation.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given request and response descriptors.

+
+ + + + + +
+

Discussion

+

Initializes an object request operation with an HTTP request operation and a set of response descriptors.

+ +

This is the designated initializer.

+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ +

initWithRequest:responseDescriptors:

+ + + +
+

Initializes an object request operation with a request object and a set of response descriptors.

+
+ + + +
- (id)initWithRequest:(NSURLRequest *)request responseDescriptors:(NSArray *)responseDescriptors
+ + + +
+

Parameters

+ +
+
request
+

The request object to be used with the underlying network operation.

+
+ +
+
responseDescriptors
+

An array of RKResponseDescriptor objects specifying how object mapping is to be performed on the response loaded by the network operation.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given request and response descriptors.

+
+ + + + + +
+

Discussion

+

Initializes an object request operation with a request object and a set of response descriptors.

+ +

This method is a convenience initializer for initializing an object request operation from a URL request with the default HTTP operation class RKHTTPRequestOperation. This method is functionally equivalent to the following example code:

+ +
RKHTTPRequestOperation *requestOperation = [[RKHTTPRequestOperation alloc] initWithRequest:request];
+RKObjectRequestOperation *objectRequestOperation = [[RKObjectRequestOperation alloc] initWithHTTPRequestOperation:requestOperation responseDescriptors:responseDescriptors];
+
+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ +

performMappingOnResponse:

+ + + +
+

Performs object mapping using the response and responseData properties.

+
+ + + +
- (RKMappingResult *)performMappingOnResponse:(NSError **)error
+ + + +
+

Parameters

+ +
+
error
+

A pointer to an NSError object to be set in the event that the object mapping process has failed.

+
+ +
+ + + +
+

Return Value

+

A mapping result or nil if an error has occurred.

+
+ + + + + +
+

Discussion

+

Performs object mapping using the response and responseData properties.

+ +

The RKObjectRequestOperation superclass is responsible for the invocation of this method and the subsequent handling of the mapping result or error.

+
+ + + + + + + +
+

Declared In

+ RKRequestOperationSubclass.h
+
+ + +
+ +
+ +

setCompletionBlockWithSuccess:failure:

+ + + +
+

Sets the completionBlock property with a block that executes either the specified success or failure block, depending on the state of the object request on completion. If error returns a value, which can be set during HTTP transport by the underlying HTTPRequestOperation or during object mapping by the RKResponseMapperOperation object, then failure is executed. If the object request operation is cancelled, then neither success nor failure will be executed. Otherwise, success is executed.

+
+ + + +
- (void)setCompletionBlockWithSuccess:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
success
+

The block to be executed on the completion of a successful operation. This block has no return value and takes two arguments: the receiver operation and the mapping result from object mapping the response data of the request.

+
+ +
+
failure
+

The block to be executed on the completion of an unsuccessful operation. This block has no return value and takes two arguments: the receiver operation and the error that occurred during the execution of the operation.

+
+ +
+ + + + + + + +
+

Discussion

+

Sets the completionBlock property with a block that executes either the specified success or failure block, depending on the state of the object request on completion. If error returns a value, which can be set during HTTP transport by the underlying HTTPRequestOperation or during object mapping by the RKResponseMapperOperation object, then failure is executed. If the object request operation is cancelled, then neither success nor failure will be executed. Otherwise, success is executed.

+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ +

willFinish

+ + + +
+

Invoked to tell the receiver that the object request operation is finishing its work and is about to transition into the finished state. Used to perform any necessary cleanup before the operation is finished.

+
+ + + +
- (void)willFinish
+ + + + + + + + + +
+

Discussion

+

Invoked to tell the receiver that the object request operation is finishing its work and is about to transition into the finished state. Used to perform any necessary cleanup before the operation is finished.

+
+ + + + + + + +
+

Declared In

+ RKRequestOperationSubclass.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKObjectResponseMapperOperation.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKObjectResponseMapperOperation.html new file mode 100644 index 00000000..2f5867a7 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKObjectResponseMapperOperation.html @@ -0,0 +1,225 @@ + + + + + RKObjectResponseMapperOperation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromRKResponseMapperOperation : NSOperation
Declared inRKResponseMapperOperation.h
+ + + + +
+ +

Overview

+

RKObjectResponseMapperOperation is an RKResponseMapperOperation subclass that provides support for performing object mapping for mappings that target NSObject derived classes. It does not require a data source to perform its work.

+
+ + + + + + + + + + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKPathMatcher.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKPathMatcher.html new file mode 100644 index 00000000..28230152 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKPathMatcher.html @@ -0,0 +1,795 @@ + + + + + RKPathMatcher Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + + + + +
Inherits fromNSObject
Conforms toNSCopying
Declared inRKPathMatcher.h
+ + + + +
+ +

Overview

+

The RKPathMatcher class performs pattern matching and parameter parsing of strings, typically representing the path portion of an NSURL object. It provides much of the necessary tools to map a given path to local objects (the inverse of RKRouter’s function). This makes it easier to implement the RKManagedObjectCaching protocol and generate NSFetchRequest objects from a given path. There are two means of instantiating and using a matcher object in order to provide more flexibility in implementations, and to improve efficiency by eliminating repetitive and costly pattern initializations.

+
+ + + + + +
+ +

Tasks

+ + + +

Matching Paths to Patterns

+ + + + + +

Matching Patterns to Paths

+ + + + + +

Creating Paths from Objects

+ +
    +
  • + + – pathFromObject: +

    Generates a new path by interpolating the properties of the ‘object’ argument, assuming the existence of a previously specified pattern established via pathMatcherWithPattern:. Otherwise, this method is identical in function to RKPathFromPatternWithObject (in fact it is a shortcut for this method).

    +
    + + +
  • + + – pathFromObject:addingEscapes: +

    Generates a path by interpolating the properties of the ‘object’ argument, assuming the existence of a previously specified pattern established via pathMatcherWithPattern:. Otherwise, this method is identical in function to RKPathFromPatternWithObject (in fact it is a shortcut for this method).

    +
    + + +
  • +
+ + + +

Accessing Tokenized Query Parameters

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

queryParameters

+ + + +
@property (copy, readonly) NSDictionary *queryParameters
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

pathMatcherWithPath:

+ + + +
+

Creates a path match object starting from a path string. This method should be followed by matchesPattern:tokenizeQueryStrings:parsedArguments:

+
+ + + +
+ (RKPathMatcher *)pathMatcherWithPath:(NSString *)pathString
+ + + +
+

Parameters

+ +
+
pathString
+

The string to evaluate and parse, such as /districts/tx/upper/?apikey=GC5512354

+
+ +
+ + + +
+

Return Value

+

An instantiated RKPathMatcher without an established pattern.

+
+ + + + + +
+

Discussion

+

Creates a path match object starting from a path string. This method should be followed by matchesPattern:tokenizeQueryStrings:parsedArguments:

+
+ + + + + + + +
+

Declared In

+ RKPathMatcher.h
+
+ + +
+ +
+ +

pathMatcherWithPattern:

+ + + +
+

Creates a path matcher object starting from a pattern string. This method should be followed by matchesPath:tokenizeQueryStrings:parsedArguments:. Patterns should include encoded parameter keys, delimited by a single colon at the beginning of the key name.

+
+ + + +
+ (RKPathMatcher *)pathMatcherWithPattern:(NSString *)patternString
+ + + +
+

Parameters

+ +
+
patternString
+

The pattern to use for evaluating, such as /:entityName/:stateID/:chamber/

+
+ +
+ + + +
+

Return Value

+

An instantiated RKPathMatcher with an established pattern.

+
+ + + + + +
+

Discussion

+

Creates a path matcher object starting from a pattern string. This method should be followed by matchesPath:tokenizeQueryStrings:parsedArguments:. Patterns should include encoded parameter keys, delimited by a single colon at the beginning of the key name.

+ +

NOTE 1 – Numerous colon-encoded parameter keys can be joined in a long pattern, but each key must be separated by at least one unmapped character. For instance, /:key1:key2:key3/ is invalid, whereas /:key1/:key2/:key3/ is acceptable.

+ +

NOTE 2 – The pattern matcher supports KVM, so :key1.otherKey normally resolves as it would in any other KVM situation, … otherKey is a sub-key on a the object represented by key1. This presents problems in circumstances where you might want to build a pattern like /:filename.json, where the dot isn’t intended as a sub-key on the filename, but rather part of the json static string. In these instances, you need to escape the dot with two backslashes, like so: /:filename\\.json

+
+ + + + + + + +
+

Declared In

+ RKPathMatcher.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

matchesPath:tokenizeQueryStrings:parsedArguments:

+ + + +
+

Determines if the given path string matches a pattern, and yields a dictionary with the resulting matched key/value pairs. Use of this method should be preceded by pathMatcherWithPattern:.

+
+ + + +
- (BOOL)matchesPath:(NSString *)pathString tokenizeQueryStrings:(BOOL)shouldTokenize parsedArguments:(NSDictionary **)arguments
+ + + +
+

Parameters

+ +
+
pathString
+

The string to evaluate and parse, such as /districts/tx/upper/?apikey=GC5512354

+
+ +
+
shouldTokenize
+

If YES, any query parameters will be tokenized and inserted into the parsed argument dictionary.

+
+ +
+
arguments
+

A pointer to a dictionary that contains the key/values from the pattern (and parameter) matching.

+
+ +
+ + + +
+

Return Value

+

A boolean value indicating if the path string successfully matched the pattern.

+
+ + + + + +
+

Discussion

+

Determines if the given path string matches a pattern, and yields a dictionary with the resulting matched key/value pairs. Use of this method should be preceded by pathMatcherWithPattern:.

+
+ + + + + + + +
+

Declared In

+ RKPathMatcher.h
+
+ + +
+ +
+ +

matchesPattern:tokenizeQueryStrings:parsedArguments:

+ + + +
+

Determines if the path string matches the provided pattern, and yields a dictionary with the resulting matched key/value pairs. Use of this method should be preceded by pathMatcherWithPath: Pattern strings should include encoded parameter keys, delimited by a single colon at the beginning of the key name.

+
+ + + +
- (BOOL)matchesPattern:(NSString *)patternString tokenizeQueryStrings:(BOOL)shouldTokenize parsedArguments:(NSDictionary **)arguments
+ + + +
+

Parameters

+ +
+
patternString
+

The pattern to use for evaluating, such as /:entityName/:stateID/:chamber/

+
+ +
+
shouldTokenize
+

If YES, any query parameters will be tokenized and inserted into the parsed argument dictionary.

+
+ +
+
arguments
+

A pointer to a dictionary that contains the key/values from the pattern (and parameter) matching.

+
+ +
+ + + +
+

Return Value

+

A boolean value indicating if the path string successfully matched the pattern.

+
+ + + + + +
+

Discussion

+

Determines if the path string matches the provided pattern, and yields a dictionary with the resulting matched key/value pairs. Use of this method should be preceded by pathMatcherWithPath: Pattern strings should include encoded parameter keys, delimited by a single colon at the beginning of the key name.

+ +

NOTE 1 – Numerous colon-encoded parameter keys can be joined in a long pattern, but each key must be separated by at least one unmapped character. For instance, /:key1:key2:key3/ is invalid, whereas /:key1/:key2/:key3/ is acceptable.

+ +

NOTE 2 – The pattern matcher supports KVM, so :key1.otherKey normally resolves as it would in any other KVM +situation, … otherKey is a sub-key on a the object represented by key1. This presents problems in circumstances where +you might want to build a pattern like /:filename.json, where the dot isn’t intended as a sub-key on the filename, but rather +part of the json static string. In these instances, you need to escape the dot with two backslashes, like so: +/:filename\.json

+
+ + + + + + + +
+

Declared In

+ RKPathMatcher.h
+
+ + +
+ +
+ +

pathFromObject:

+ + + +
+

Generates a new path by interpolating the properties of the ‘object’ argument, assuming the existence of a previously specified pattern established via pathMatcherWithPattern:. Otherwise, this method is identical in function to RKPathFromPatternWithObject (in fact it is a shortcut for this method).

+
+ + + +
- (NSString *)pathFromObject:(id)object
+ + + +
+

Parameters

+ +
+
object
+

The object containing the properties to interpolate.

+
+ +
+ + + +
+

Return Value

+

A string with the object’s interpolated property values inserted into the receiver’s established pattern.

+
+ + + + + +
+

Discussion

+

Generates a new path by interpolating the properties of the ‘object’ argument, assuming the existence of a previously specified pattern established via pathMatcherWithPattern:. Otherwise, this method is identical in function to RKPathFromPatternWithObject (in fact it is a shortcut for this method).

+ +

For example, given an ‘article’ object with an ‘articleID’ property value of 12345 …

+ +

RKPathMatcher matcher = [RKPathMatcher pathMatcherWithPattern:@“/articles/:articleID”]; + NSString path = [matcher pathFromObject:article];

+ +

… will produce a ‘path’ containing the string “/articles/12345”

+
+ + + + + + + +
+

Declared In

+ RKPathMatcher.h
+
+ + +
+ +
+ +

pathFromObject:addingEscapes:

+ + + +
+

Generates a path by interpolating the properties of the ‘object’ argument, assuming the existence of a previously specified pattern established via pathMatcherWithPattern:. Otherwise, this method is identical in function to RKPathFromPatternWithObject (in fact it is a shortcut for this method).

+
+ + + +
- (NSString *)pathFromObject:(id)object addingEscapes:(BOOL)addEscapes
+ + + +
+

Parameters

+ +
+
object
+

The object containing the properties to interpolate.

+
+ +
+
addEscapes
+

Conditionally add percent escapes to the interpolated property values

+
+ +
+ + + +
+

Return Value

+

A string with the object’s interpolated property values inserted into the receiver’s established pattern.

+
+ + + + + +
+

Discussion

+

Generates a path by interpolating the properties of the ‘object’ argument, assuming the existence of a previously specified pattern established via pathMatcherWithPattern:. Otherwise, this method is identical in function to RKPathFromPatternWithObject (in fact it is a shortcut for this method).

+ +

For example, given an ‘article’ object with an ‘articleID’ property value of 12345 and a code of “This/That”…

+ +
 RKPathMatcher *matcher = [RKPathMatcher pathMatcherWithPattern:@"/articles/:articleID/:code"];
+ NSString *path = [matcher pathFromObject:article addingEscapes:YES];
+
+ +

… will produce a ‘path’ containing the string @"/articles/12345/This%2FThat"

+
+ + + + + + + +
+

Declared In

+ RKPathMatcher.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKPropertyInspector.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKPropertyInspector.html new file mode 100644 index 00000000..4fb76a0b --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKPropertyInspector.html @@ -0,0 +1,630 @@ + + + + + RKPropertyInspector Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKPropertyInspector.h
+ + + + +
+ +

Overview

+

The RKPropertyInspector class provides an interface for introspecting the properties and attributes of classes using the reflection capabilities of the Objective-C runtime. Once inspected, the properties and types are cached.

+
+ + + + + +
+ +

Tasks

+ + + +

Retrieving the Shared Inspector Instance

+ +
    +
  • + + + sharedInspector +

    Returns the shared property inspector singleton instance.

    +
    + + +
  • +
+ + + +

Retrieving the Properties and Types for a Class

+ + + + + +

CoreData Methods

+ + + +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

propertyTypeFromAttributeString:

+ + + +
+

Returns the name of a property when provided the name of a property obtained via the property_getAttributes reflection API.

+
+ + + +
+ (NSString *)propertyTypeFromAttributeString:(NSString *)attributeString
+ + + +
+

Parameters

+ +
+
attributeString
+

A string object encoding attribute information.

+
+ +
+ + + +
+

Return Value

+

The class name for the property type encoded in the given attribute string or @"NULL" if the property does not have an object type (the declared property is for a primitive type).

+
+ + + + + +
+

Discussion

+

Returns the name of a property when provided the name of a property obtained via the property_getAttributes reflection API.

+
+ + + + + + + +
+

Declared In

+ RKPropertyInspector.h
+
+ + +
+ +
+ +

sharedInspector

+ + + +
+

Returns the shared property inspector singleton instance.

+
+ + + +
+ (RKPropertyInspector *)sharedInspector
+ + + + + +
+

Return Value

+

The shared RKPropertyInspector instance.

+
+ + + + + +
+

Discussion

+

Returns the shared property inspector singleton instance.

+
+ + + + + + + +
+

Declared In

+ RKPropertyInspector.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

propertyNamesAndTypesForClass:

+ + + +
+

Returns a dictionary of names and types for the properties of a given class.

+
+ + + +
- (NSDictionary *)propertyNamesAndTypesForClass:(Class)objectClass
+ + + +
+

Parameters

+ +
+
objectClass
+

The class to retrieve the property name and types for.

+
+ +
+ + + +
+

Return Value

+

A dictionary containing metadata about the properties of the given class, where the keys in the dictionary are the property names and the values are Class objects specifying the type of the property.

+
+ + + + + +
+

Discussion

+

Returns a dictionary of names and types for the properties of a given class.

+
+ + + + + + + +
+

Declared In

+ RKPropertyInspector.h
+
+ + +
+ +
+ +

propertyNamesAndTypesForEntity:

+ + + +
- (NSDictionary *)propertyNamesAndTypesForEntity:(NSEntityDescription *)entity
+ + +
+ +
+ +

typeForProperty:ofClass:

+ + + +
+

Returns the Class object specifying the type of the property with given name on a class.

+
+ + + +
- (Class)typeForProperty:(NSString *)propertyName ofClass:(Class)objectClass
+ + + +
+

Parameters

+ +
+
propertyName
+

The name of the property to retrieve the type of.

+
+ +
+
objectClass
+

The class to retrieve the property from.

+
+ +
+ + + +
+

Return Value

+

A Class object specifying the type of the requested property.

+
+ + + + + +
+

Discussion

+

Returns the Class object specifying the type of the property with given name on a class.

+
+ + + + + + + +
+

Declared In

+ RKPropertyInspector.h
+
+ + +
+ +
+ +

typeForProperty:ofEntity:

+ + + +
+

Returns the Class type of the specified property on the object class

+
+ + + +
- (Class)typeForProperty:(NSString *)propertyName ofEntity:(NSEntityDescription *)entity
+ + + + + + + + + +
+

Discussion

+

Returns the Class type of the specified property on the object class

+
+ + + + + + + +
+

Declared In

+ RKPropertyInspector+CoreData.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKPropertyMapping.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKPropertyMapping.html new file mode 100644 index 00000000..455c8e50 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKPropertyMapping.html @@ -0,0 +1,521 @@ + + + + + RKPropertyMapping Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + + + + +
Inherits fromNSObject
Conforms toNSCopying
Declared inRKPropertyMapping.h
+ + + + +
+ +

Overview

+

RKPropertyMapping is an abstract class for describing the properties being mapped within an RKObjectMapping or RKEntityMapping object. It defines the common interface for its concrete subclasses RKAttributeMapping and RKRelationshipMapping. Each property mapping defines a single transformation from a source key path (often in the deserialized representation of a JSON or XML document) to a destination key path (typically on a target object).

+
+ + + + + +
+ +

Tasks

+ + + +

Accessing the Parent Object Mapping

+ +
    +
  • + +   objectMapping +

    Returns the object mapping the receiver is added to.

    +
    + property + +
  • +
+ + + +

Accessing the Source and Destination Key Paths

+ +
    +
  • + +   sourceKeyPath +

    A key path on the source object from which to get information that is to be mapped onto the destination object.

    +
    + property + +
  • + +   destinationKeyPath +

    A key path on the destination object on which to set information that has been mapped from the source object.

    +
    + property + +
  • +
+ + + +

Comparing Property Mappings

+ +
    +
  • + + – isEqualToMapping: +

    Compares the receiving property mapping to another property mapping.

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

destinationKeyPath

+ + + +
+

A key path on the destination object on which to set information that has been mapped from the source object.

+
+ + + +
@property (nonatomic, strong, readonly) NSString *destinationKeyPath
+ + + + + + + + + +
+

Discussion

+

A key path on the destination object on which to set information that has been mapped from the source object.

+
+ + + + + + + +
+

Declared In

+ RKPropertyMapping.h
+
+ + +
+ +
+ +

objectMapping

+ + + +
+

Returns the object mapping the receiver is added to.

+
+ + + +
@property (nonatomic, weak, readonly) RKObjectMapping *objectMapping
+ + + + + + + + + +
+

Discussion

+

Returns the object mapping the receiver is added to.

+
+ + + + + + + +
+

Declared In

+ RKPropertyMapping.h
+
+ + +
+ +
+ +

sourceKeyPath

+ + + +
+

A key path on the source object from which to get information that is to be mapped onto the destination object.

+
+ + + +
@property (nonatomic, strong, readonly) NSString *sourceKeyPath
+ + + + + + + + + +
+

Discussion

+

A key path on the source object from which to get information that is to be mapped onto the destination object.

+
+ + + + + + + +
+

Declared In

+ RKPropertyMapping.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

isEqualToMapping:

+ + + +
+

Compares the receiving property mapping to another property mapping.

+
+ + + +
- (BOOL)isEqualToMapping:(RKPropertyMapping *)otherMapping
+ + + +
+

Parameters

+ +
+
otherMapping
+

The property mapping object with which to compare the receiver.

+
+ +
+ + + +
+

Return Value

+

YES if otherMapping specifies the same mapping as the receiver, otherwise NO.

+
+ + + + + +
+

Discussion

+

Compares the receiving property mapping to another property mapping.

+ +

Two property mappings are equal if they are of the same type (i.e. an RKAttributeMapping or an RKRelatiobshipMapping object) and specify a mapping from the same source key path to the same destination key path.

+
+ + + + + + + +
+

Declared In

+ RKPropertyMapping.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKRelationshipConnectionOperation.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKRelationshipConnectionOperation.html new file mode 100644 index 00000000..b513558f --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKRelationshipConnectionOperation.html @@ -0,0 +1,518 @@ + + + + + RKRelationshipConnectionOperation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSOperation
Declared inRKRelationshipConnectionOperation.h
+ + + + +
+ +

Overview

+

The RKRelationshipConnectionOperation class is a subclass of NSOperation that manages the connection of NSManagedObject relationships as described by an RKConnectionMapping object. When executed, the operation will find related objects by searching the associated managed object cache for a matching object whose destination attribute value matches that of the associated managed object’s source attribute.

+ +

For example, given a managed object for the Employee entity with a one-to-one relationship to a Company named company (with an inverse relationship one-to-many relationship named employees) and a connection mapping specifying that the relationship can be connected by finding the Company managed object whose companyID attribute matches the companyID of the Employee, the operation would find the Company that employs the Employee by primary key and set the Core Data relationship to reflect the relationship appropriately.

+
+ + + + + +
+ +

Tasks

+ + + +

Initializing a Relationship Connection Operation

+ + + + + +

Accessing Details About the Operation

+ +
    +
  • + +   managedObject +

    The managed object the receiver will attempt to connect a relationship for.

    +
    + property + +
  • + +   connectionMapping +

    The connection mapping describing the relationship connection the receiver will attempt to connect.

    +
    + property + +
  • + +   managedObjectCache +

    The managed object cache the receiver will use to fetch a related object satisfying the connection mapping.

    +
    + property + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

connectionMapping

+ + + +
+

The connection mapping describing the relationship connection the receiver will attempt to connect.

+
+ + + +
@property (nonatomic, strong, readonly) RKConnectionMapping *connectionMapping
+ + + + + + + + + +
+

Discussion

+

The connection mapping describing the relationship connection the receiver will attempt to connect.

+
+ + + + + + + +
+

Declared In

+ RKRelationshipConnectionOperation.h
+
+ + +
+ +
+ +

managedObject

+ + + +
+

The managed object the receiver will attempt to connect a relationship for.

+
+ + + +
@property (nonatomic, strong, readonly) NSManagedObject *managedObject
+ + + + + + + + + +
+

Discussion

+

The managed object the receiver will attempt to connect a relationship for.

+
+ + + + + + + +
+

Declared In

+ RKRelationshipConnectionOperation.h
+
+ + +
+ +
+ +

managedObjectCache

+ + + +
+

The managed object cache the receiver will use to fetch a related object satisfying the connection mapping.

+
+ + + +
@property (nonatomic, strong, readonly) id<RKManagedObjectCaching> managedObjectCache
+ + + + + + + + + +
+

Discussion

+

The managed object cache the receiver will use to fetch a related object satisfying the connection mapping.

+
+ + + + + + + +
+

Declared In

+ RKRelationshipConnectionOperation.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

initWithManagedObject:connectionMapping:managedObjectCache:

+ + + +
+

Initializes the receiver with a given managed object, connection mapping, and managed object cache.

+
+ + + +
- (id)initWithManagedObject:(NSManagedObject *)managedObject connectionMapping:(RKConnectionMapping *)connectionMapping managedObjectCache:(id<RKManagedObjectCaching>)managedObjectCache
+ + + +
+

Parameters

+ +
+
managedObject
+

The object to attempt to connect a relationship to.

+
+ +
+
connectionMapping
+

A mapping describing the relationship and attributes necessary to perform the connection.

+
+ +
+
managedObjectCache
+

The managed object cache from which to attempt to fetch a matching object to satisfy the connection.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given managed object, connection mapping, and managed object cache.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a given managed object, connection mapping, and managed object cache.

+
+ + + + + + + +
+

Declared In

+ RKRelationshipConnectionOperation.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKRelationshipMapping.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKRelationshipMapping.html new file mode 100644 index 00000000..ee2f4667 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKRelationshipMapping.html @@ -0,0 +1,411 @@ + + + + + RKRelationshipMapping Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromRKPropertyMapping : NSObject
Declared inRKRelationshipMapping.h
+ + + + +
+ +

Overview

+

The RKRelationshipMapping class is used to describe relationships of a class in an RKObjectMapping or an entity in an RKEntityMapping object.

+ +

RKRelationshipMapping extends RKPropertyMapping to describe features specific to relationships, including the RKMapping object describing how to map the destination object.

+
+ + + + + +
+ +

Tasks

+ + + +

Creating a Relationship Mapping

+ + + + + +

Accessing the Destination Mapping

+ +
    +
  • + +   mapping +

    An RKMapping object describing how to map the object representation at sourceKeyPath to a new represenation at destinationKeyPath.

    +
    + property + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

mapping

+ + + +
+

An RKMapping object describing how to map the object representation at sourceKeyPath to a new represenation at destinationKeyPath.

+
+ + + +
@property (nonatomic, strong, readonly) RKMapping *mapping
+ + + + + + + + + +
+

Discussion

+

An RKMapping object describing how to map the object representation at sourceKeyPath to a new represenation at destinationKeyPath.

+
+ + + + + + + +
+

Declared In

+ RKRelationshipMapping.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

relationshipMappingFromKeyPath:toKeyPath:withMapping:

+ + + +
+

Creates and returns a new relationship mapping object describing how to transform a related object representation at sourceKeyPath to a new representation at destinationKeyPath using the given mapping.

+
+ + + +
+ (RKRelationshipMapping *)relationshipMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath withMapping:(RKMapping *)mapping
+ + + +
+

Parameters

+ +
+
sourceKeyPath
+

A key path from which to retrieve data in the source object representation that is to be mapped as a relationship.

+
+ +
+
destinationKeyPath
+

The key path on the destination object to set the object mapped results.

+
+ +
+
mapping
+

A mapping object describing how to map the data retrieved from sourceKeyPath that is to be set on destinationKeyPath.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates and returns a new relationship mapping object describing how to transform a related object representation at sourceKeyPath to a new representation at destinationKeyPath using the given mapping.

+ +

The mapping may describe a to-one or a to-many relationship. The appropriate handling of the source representation is deferred until run-time and is determined by performing reflection on the data retrieved from the source object representation by sending a valueForKeyPath: message where the key path is the value given in sourceKeyPath. If an NSArray, NSSet or NSOrderedSet object is returned, the related object representation is processed as a to-many collection. Otherwise the representation is considered to be a to-one.

+
+ + + + + + + +
+

Declared In

+ RKRelationshipMapping.h
+
+ + +
+ +
+ + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKRequestDescriptor.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKRequestDescriptor.html new file mode 100644 index 00000000..219e63a0 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKRequestDescriptor.html @@ -0,0 +1,615 @@ + + + + + RKRequestDescriptor Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKRequestDescriptor.h
+ + + + +
+ +

Overview

+

An RKRequestDescriptor object describes an object mapping configuration that is used to construct the parameters of an HTTP request for an object. Request descriptors are defined by specifying the RKMapping object that is to be used when object mapping an object into an NSDictionary of parameters, the class of the type of object for which the mapping is to be applied, and an optional root key path under which the paramters are to be nested. Response descriptors are only utilized when construct parameters for an NSURLRequest with an HTTP method of POST, PUT, or PATCH.

+
+ + + + + +
+ +

Tasks

+ + + +

Creating a Response Descriptor

+ + + + + +

Getting Information About a Request Descriptor

+ +
    +
  • + +   mapping +

    The mapping specifying how the object being parameterized is to be mapped into an NSDictionary representation. The mapping must have an objectClass equal to [NSMutableDictionary class].

    +
    + property + +
  • + +   objectClass +

    The class of objects that the request descriptor is appropriate for use in parameterizing.

    +
    + property + +
  • + +   rootKeyPath +

    The root key path that the paramters for the object are to be nested under. May be nil.

    +
    + property + +
  • +
+ + + +

Using Request Descriptors

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

mapping

+ + + +
+

The mapping specifying how the object being parameterized is to be mapped into an NSDictionary representation. The mapping must have an objectClass equal to [NSMutableDictionary class].

+
+ + + +
@property (nonatomic, strong, readonly) RKMapping *mapping
+ + + + + + + + + +
+

Discussion

+

The mapping specifying how the object being parameterized is to be mapped into an NSDictionary representation. The mapping must have an objectClass equal to [NSMutableDictionary class].

+
+ + + + + + + +
+

Declared In

+ RKRequestDescriptor.h
+
+ + +
+ +
+ +

objectClass

+ + + +
+

The class of objects that the request descriptor is appropriate for use in parameterizing.

+
+ + + +
@property (nonatomic, strong, readonly) Class objectClass
+ + + + + + + + + +
+

Discussion

+

The class of objects that the request descriptor is appropriate for use in parameterizing.

+
+ + + + + + + +
+

Declared In

+ RKRequestDescriptor.h
+
+ + +
+ +
+ +

rootKeyPath

+ + + +
+

The root key path that the paramters for the object are to be nested under. May be nil.

+
+ + + +
@property (nonatomic, copy, readonly) NSString *rootKeyPath
+ + + + + + + + + +
+

Discussion

+

The root key path that the paramters for the object are to be nested under. May be nil.

+
+ + + + + + + +
+

Declared In

+ RKRequestDescriptor.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

requestDescriptorWithMapping:objectClass:rootKeyPath:

+ + + +
+

Creates and returns a new RKRequestDescriptor object.

+
+ + + +
+ (id)requestDescriptorWithMapping:(RKMapping *)mapping objectClass:(Class)objectClass rootKeyPath:(NSString *)rootKeyPath
+ + + +
+

Parameters

+ +
+
mapping
+

The mapping to be used when parameterizing an object using the request descriptor. Cannot be nil and must have an objectClass equal to [NSMutableDictionary class].

+
+ +
+
objectClass
+

The class of objects for which the request descriptor should be used. Cannot be nil.

+
+ +
+
rootKeyPath
+

The root key path under which paramters constructed using the response descriptor will be nested. If nil, the parameters will not be nested and returned as a flat dictionary object.

+
+ +
+ + + +
+

Return Value

+

A new RKRequestDescriptor object.

+
+ + + + + +
+

Discussion

+

Creates and returns a new RKRequestDescriptor object.

Warning: An exception will be raised if the objectClass of the given mapping is not [NSMutableDictionary class].

+
+ + + + + +
+

See Also

+ +
+ + + +
+

Declared In

+ RKRequestDescriptor.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

matchesObject:

+ + + +
+

Returns YES if the given object is instance of objectClass or any class that inherits from objectClass, else NO.

+
+ + + +
- (BOOL)matchesObject:(id)object
+ + + +
+

Parameters

+ +
+
object
+

The object to be matched against the receiver.

+
+ +
+ + + +
+

Return Value

+

YES if the given object matches objectClass, else NO.

+
+ + + + + +
+

Discussion

+

Returns YES if the given object is instance of objectClass or any class that inherits from objectClass, else NO.

+
+ + + + + + + +
+

Declared In

+ RKRequestDescriptor.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKResponseDescriptor.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKResponseDescriptor.html new file mode 100644 index 00000000..e3192819 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKResponseDescriptor.html @@ -0,0 +1,876 @@ + + + + + RKResponseDescriptor Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKResponseDescriptor.h
+ + + + +
+ +

Overview

+

An RKResponseDescriptor object describes an object mapping configuration that is applicable to an HTTP response. Response descriptors are defined by specifying the RKMapping object that is to be used when performing object mapping on the deserialized response body and the URL path pattern, key path, and status codes for which the mapping is appropriate. The path pattern is a SOCKit SOCPattern string that will be matched against the URL of the request that loaded the response being mapped. If the path pattern is nil, the response descriptor is considered to be appropriate for a response loaded from any URL. The key path specifies the location of data within the deserialized response body for which the mapping is appropriate. If nil, the mapping is considered to apply to the entire response body. The status codes specify a set of HTTP response status codes for which the mapping is appropriate. It is common to constrain a response descriptor to the HTTP Successful status code class (status codes in the 200-299 range). Object mapping for error responses can be configured by configuring a response descriptor to handle the Client Error status code class (status codes in the 400-499 range). Instances of RKResponseDescriptor are immutable.

+
+ + + + + +
+ +

Tasks

+ + + +

Creating a Response Descriptor

+ + + + + +

Getting Information About a Response Descriptor

+ +
    +
  • + +   mapping +

    The mapping to be used when object mapping the deserialized HTTP response body. Cannot be nil.

    +
    + property + +
  • + +   pathPattern +

    The path pattern to match against the request URL. If nil, the response descriptor matches any URL.

    +
    + property + +
  • + +   keyPath +

    The key path to match against the deserialized response body. If nil, the response descriptor matches the entire response body.

    +
    + property + +
  • + +   statusCodes +

    The set of status codes for which response descriptor matches. If nil, the the response descriptor matches any status code.

    +
    + property + +
  • +
+ + + +

Setting the Base URL

+ + + + + +

Using Response Descriptors

+ +
    +
  • + + – matchesPath: +

    Returns a Boolean value that indicates if the receiver’s path pattern matches the given path.

    +
    + + +
  • + + – matchesURL: +

    Returns a Boolean value that indicates if the given URL object matches the base URL and path pattern of the receiver.

    +
    + + +
  • + + – matchesResponse: +

    Returns a Boolean value that indicates if the given URL response object matches the receiver.

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

baseURL

+ + + +
+

The base URL that the pathPattern is to be evaluated relative to.

+
+ + + +
@property (nonatomic, copy) NSURL *baseURL
+ + + + + + + + + +
+

Discussion

+

The base URL that the pathPattern is to be evaluated relative to.

+ +

The base URL is set to the base URL of the object manager when a response descriptor is added to an object manager.

+
+ + + + + + + +
+

Declared In

+ RKResponseDescriptor.h
+
+ + +
+ +
+ +

keyPath

+ + + +
+

The key path to match against the deserialized response body. If nil, the response descriptor matches the entire response body.

+
+ + + +
@property (nonatomic, copy, readonly) NSString *keyPath
+ + + + + + + + + +
+

Discussion

+

The key path to match against the deserialized response body. If nil, the response descriptor matches the entire response body.

+ +

When evaluating a key path match, the Foundation object parsed from the response body is sent valueForKeyPath: with the keyPath of the receiver. If the value returned is non-nil, object mapping is performed using the response descriptor’s mapping.

+
+ + + + + + + +
+

Declared In

+ RKResponseDescriptor.h
+
+ + +
+ +
+ +

mapping

+ + + +
+

The mapping to be used when object mapping the deserialized HTTP response body. Cannot be nil.

+
+ + + +
@property (nonatomic, strong, readonly) RKMapping *mapping
+ + + + + + + + + +
+

Discussion

+

The mapping to be used when object mapping the deserialized HTTP response body. Cannot be nil.

+
+ + + + + + + +
+

Declared In

+ RKResponseDescriptor.h
+
+ + +
+ +
+ +

pathPattern

+ + + +
+

The path pattern to match against the request URL. If nil, the response descriptor matches any URL.

+
+ + + +
@property (nonatomic, copy, readonly) NSString *pathPattern
+ + + + + + + + + +
+

Discussion

+

The path pattern to match against the request URL. If nil, the response descriptor matches any URL.

+
+ + + + + + + +
+

Declared In

+ RKResponseDescriptor.h
+
+ + +
+ +
+ +

statusCodes

+ + + +
+

The set of status codes for which response descriptor matches. If nil, the the response descriptor matches any status code.

+
+ + + +
@property (nonatomic, copy, readonly) NSIndexSet *statusCodes
+ + + + + + + + + +
+

Discussion

+

The set of status codes for which response descriptor matches. If nil, the the response descriptor matches any status code.

+
+ + + + + + + +
+

Declared In

+ RKResponseDescriptor.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

responseDescriptorWithMapping:pathPattern:keyPath:statusCodes:

+ + + +
+

Creates and returns a new RKResponseDescriptor object.

+
+ + + +
+ (RKResponseDescriptor *)responseDescriptorWithMapping:(RKMapping *)mapping pathPattern:(NSString *)pathPattern keyPath:(NSString *)keyPath statusCodes:(NSIndexSet *)statusCodes
+ + + +
+

Parameters

+ +
+
mapping
+

The mapping for the response descriptor.

+
+ +
+
pathPattern
+

A path pattern that matches against URLs for which the mapping should be used.

+
+ +
+
keyPath
+

A key path specifying the subset of the parsed response for which the mapping is to be used.

+
+ +
+
statusCodes
+

A set of HTTP status codes for which the mapping is to be used.

+
+ +
+ + + +
+

Return Value

+

A new RKResponseDescriptor object.

+
+ + + + + +
+

Discussion

+

Creates and returns a new RKResponseDescriptor object.

+
+ + + + + + + +
+

Declared In

+ RKResponseDescriptor.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

matchesPath:

+ + + +
+

Returns a Boolean value that indicates if the receiver’s path pattern matches the given path.

+
+ + + +
- (BOOL)matchesPath:(NSString *)path
+ + + +
+

Parameters

+ +
+
path
+

The path to compare with the path pattern of the receiver.

+
+ +
+ + + +
+

Return Value

+

YES if the path matches the receiver’s pattern, else NO.

+
+ + + + + +
+

Discussion

+

Returns a Boolean value that indicates if the receiver’s path pattern matches the given path.

+ +

Path matching is performed using an RKPathMatcher object. If the receiver has a nil path pattern or the given path is nil, YES is returned.

+
+ + + + + + + +
+

Declared In

+ RKResponseDescriptor.h
+
+ + +
+ +
+ +

matchesResponse:

+ + + +
+

Returns a Boolean value that indicates if the given URL response object matches the receiver.

+
+ + + +
- (BOOL)matchesResponse:(NSHTTPURLResponse *)response
+ + + +
+

Parameters

+ +
+
response
+

The HTTP response object to compare with the base URL, path pattern, and status codes set of the receiver.

+
+ +
+ + + +
+

Return Value

+

YES if the response matches the base URL, path pattern, and status codes set of the receiver, else NO.

+
+ + + + + +
+

Discussion

+

Returns a Boolean value that indicates if the given URL response object matches the receiver.

+ +

The match is evaluated by checking if the URL of the response matches the base URL and path pattern of the receiver via the matchesURL: method. If the URL is found to match, then the status code of the response is checked for inclusion in the receiver’s set of status codes.

+
+ + + + + + + +
+

Declared In

+ RKResponseDescriptor.h
+
+ + +
+ +
+ +

matchesURL:

+ + + +
+

Returns a Boolean value that indicates if the given URL object matches the base URL and path pattern of the receiver.

+
+ + + +
- (BOOL)matchesURL:(NSURL *)URL
+ + + +
+

Parameters

+ +
+
URL
+

The URL to compare with the base URL and path pattern of the receiver.

+
+ +
+ + + +
+

Return Value

+

YES if the URL matches the base URL and path pattern of the receiver, else NO.

+
+ + + + + +
+

Discussion

+

Returns a Boolean value that indicates if the given URL object matches the base URL and path pattern of the receiver.

+ +

This method considers both the baseURL and pathPattern of the receiver when evaluating the given URL object. The results evaluate in the following ways:

+ +
    +
  1. If the baseURL and pathPattern of the receiver are both nil, then YES is returned.
  2. +
  3. If the baseURL of the receiver is nil, but the path pattern is not, then the entire path and query string of the given URL will be evaluated against the path pattern of the receiver using matchesPath:.
  4. +
  5. If the baseURL and the pathPattern are both non-nil, then the given URL is first checked to verify that it is relative to the base URL using a string prefix comparison. If the absolute string value of the given URL is prefixed with the string value of the base URL, then the URL is considered relative. If the given URL is found not to be relative to the receiver’s baseURL, then NO is returned. If the URL is found to be relative to the base URL, then the path and query string of the URL are evaluated against the path pattern of the receiver using matchesPath:.
  6. +
+ +
+ + + + + + + +
+

Declared In

+ RKResponseDescriptor.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKResponseMapperOperation.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKResponseMapperOperation.html new file mode 100644 index 00000000..db72ade9 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKResponseMapperOperation.html @@ -0,0 +1,872 @@ + + + + + RKResponseMapperOperation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSOperation
Declared inRKResponseMapperOperation.h
+ + + + +
+ +

Overview

+

RKResponseMapperOperation is an NSOperation that provides support for performing object mapping on an NSHTTPURLResponse and its associated response data.

+ +

This is an abstract base class encapsulating the common interface API for its concrete subclasses RKObjectResponseMapperOperation and RKManagedObjectResponseMapperOperation.

+ +

The common behaviors encapsulated within RKResponseMapperOperation include:

+ +
    +
  1. Handling Empty Responses: Empty response data (see note below) requires special handling depending on the status code of the HTTP response. If an empty response is loaded with a status code in 4xx (Client Error) range, an NSError in the RKErrorDomain is created with the NSURLErrorBadServerResponse code to indicate that the response was not processable. If an empty response is loaded with a status code in 2xx (Successful) range, the interpretation of the response is dependent on the value of treatsEmptyResponseAsSuccess. When YES, empty responses result in the successful completion of the operation with an RKMappingResult containing the targetObject of the operation, if any.
  2. +
  3. Deserializing Response Data: When started, the operation attempts to deserialize the response data into a Foundation object representation using the RKMIMETypeSerialization class. This deserialized representation is then made available to subclass implementations that perform the actual object mapping work.
  4. +
+ + +

How ‘Empty’ Responses are Evaluated

+ +

Any nil response or NSData object with a length equal to zero is considered empty. To support a common behavior of the widely deployed Ruby on Rails Framework, RKResponseMapperOperation also considers a response containing a single space character to be empty. This type of response is generated by Rails whe render :nothing => true is invoked.

+
+ + + + + +
+ +

Tasks

+ + + +

Initializing a Response Mapping Operation

+ + + + + +

Accessing Response Data

+ +
    +
  • + +   response +

    The response object that loaded the data that is to be object mapped by the operation. Cannot be nil.

    +
    + property + +
  • + +   data +

    The response data that is to be deserialized and mapped by the operation. May be nil.

    +
    + property + +
  • +
+ + + +

Configuring Object Mapping

+ + + + + +

Accessing Mapping Results

+ +
    +
  • + +   mappingResult +

    The results of performing object mapping on the deserialized response data. In the event that the operation has failed, the value will is nil.

    +
    + property + +
  • + +   error +

    The error, if any, that occured during execution of the operation.

    +
    + property + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

data

+ + + +
+

The response data that is to be deserialized and mapped by the operation. May be nil.

+
+ + + +
@property (nonatomic, strong, readonly) NSData *data
+ + + + + + + + + +
+

Discussion

+

The response data that is to be deserialized and mapped by the operation. May be nil.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ +

error

+ + + +
+

The error, if any, that occured during execution of the operation.

+
+ + + +
@property (nonatomic, strong, readonly) NSError *error
+ + + + + + + + + +
+

Discussion

+

The error, if any, that occured during execution of the operation.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ +

mapperDelegate

+ + + +
+

The delegate for the RKMapperOperation created by the receiver to perform object mapping on the deserialized response data. May be nil.

+
+ + + +
@property (nonatomic, weak) id<RKMapperOperationDelegate> mapperDelegate
+ + + + + + + + + +
+

Discussion

+

The delegate for the RKMapperOperation created by the receiver to perform object mapping on the deserialized response data. May be nil.

+ +

The delegate provides access to the details of the mapping process as it is executing. Be aware that the delegate will be invoked from the thread on which the mapping is executing.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ +

mappingResult

+ + + +
+

The results of performing object mapping on the deserialized response data. In the event that the operation has failed, the value will is nil.

+
+ + + +
@property (nonatomic, strong, readonly) RKMappingResult *mappingResult
+ + + + + + + + + +
+

Discussion

+

The results of performing object mapping on the deserialized response data. In the event that the operation has failed, the value will is nil.

+ +

The keyPath of each RKResponseDescriptor from the responseDescriptors set that was successfully mapped from the response data will appear as an entry in the mapping result.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ +

response

+ + + +
+

The response object that loaded the data that is to be object mapped by the operation. Cannot be nil.

+
+ + + +
@property (nonatomic, strong, readonly) NSHTTPURLResponse *response
+ + + + + + + + + +
+

Discussion

+

The response object that loaded the data that is to be object mapped by the operation. Cannot be nil.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ +

responseDescriptors

+ + + +
+

An array of RKResponseDescriptor objects that specify object mapping configurations that may be applied to the deserialized response data if they are found to match the response.

+
+ + + +
@property (nonatomic, strong, readonly) NSArray *responseDescriptors
+ + + + + + + + + +
+

Discussion

+

An array of RKResponseDescriptor objects that specify object mapping configurations that may be applied to the deserialized response data if they are found to match the response.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ +

responseMappingsDictionary

+ + + +
+

Returns a dictionary of key path to RKMapping objects that are applicable to mapping the response. This is determined by evaluating the URL and status codes of the response against the set of responseDescriptors.

+
+ + + +
@property (nonatomic, strong, readonly) NSDictionary *responseMappingsDictionary
+ + + + + + + + + +
+

Discussion

+

Returns a dictionary of key path to RKMapping objects that are applicable to mapping the response. This is determined by evaluating the URL and status codes of the response against the set of responseDescriptors.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ +

targetObject

+ + + +
+

The target object for the object mapping operation performed on the deserialized response data. May be nil.

+
+ + + +
@property (nonatomic, strong) id targetObject
+ + + + + + + + + +
+

Discussion

+

The target object for the object mapping operation performed on the deserialized response data. May be nil.

+ +

When object mapping is being performed against a known object, the targetObject is set to ensure that the mapping is applied to the appropriate object reference. When nil, the mapping operation will result in the fetching or creation of new objects as necessary to satisfy the mapping configuration.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ +

treatsEmptyResponseAsSuccess

+ + + +
+

A Boolean value that indicates if the receiver should consider empty responses as being successfully mapped even though no mapping is actually performed.

+
+ + + +
@property (nonatomic, assign) BOOL treatsEmptyResponseAsSuccess
+ + + + + + + + + +
+

Discussion

+

A Boolean value that indicates if the receiver should consider empty responses as being successfully mapped even though no mapping is actually performed.

+ +

When YES and the response data is empty (see below), a mapping result will be returned containing the target object (if any). Otherwise, the response data will be pass through to the parser which may generate an error.

+ +

Default: YES

Warning: To support the Ruby on Rails behavior of rendering a single space character on invocation of render :nothing => true, a response body’s containing only a single space is treated as empty.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

initWithResponse:data:responseDescriptors:

+ + + +
+

Initializes and returns a newly created response mapper operation with the given response object, response data, and an array of RKResponseDescriptor objects.

+
+ + + +
- (id)initWithResponse:(NSHTTPURLResponse *)response data:(NSData *)data responseDescriptors:(NSArray *)responseDescriptors
+ + + +
+

Parameters

+ +
+
response
+

The HTTP response object to be used for object mapping.

+
+ +
+
data
+

The data loaded for the response body.

+
+ +
+
responseDescriptors
+

An array whose elements are RKResponseDescriptor objects specifying object mapping configurations that may be applied to the response.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the response, data, and response descriptor objects.

+
+ + + + + +
+

Discussion

+

Initializes and returns a newly created response mapper operation with the given response object, response data, and an array of RKResponseDescriptor objects.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKRoute.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKRoute.html new file mode 100644 index 00000000..becccd9d --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKRoute.html @@ -0,0 +1,994 @@ + + + + + RKRoute Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKRoute.h
+ + + + +
+ +

Overview

+

The RKRoute class models a single routable path pattern in use by the application. A route can be combined with an NSURL base URL and interpolated with an object to produce a new fully hydrated URL object. Routes are always instantiated with a path pattern and metadata to provide for the subsequent identification of the defined route.

+ +

There are three types of routes modeled by the RKRoute class:

+ +
    +
  1. Named Routes: A named route represents a single path and optional request method within the application. The route is not affiliated with any particular class. For example, one might define a route with the name @"airlines_list" as a GET to the path ‘/airlines.json’.
  2. +
  3. Class Routes: An class route represents a single path that is identified by object class and request method for which it is appropriate. For example, one might define a route for the class RKArticle for a POST to the path ‘/articles.json’.
  4. +
  5. Relationship Routes: A relationship route represents a single path through which the relationship of a parent object can be manipulated. For example, given an RKArticle and RKComment class, one might define a relationship route for the RKArticle class’s @"comments" relationship as pointing to a GET to the path `@“/articles/:articleID/comments”.
  6. +
+ + +

The RKRoute class is internally implemented as a class cluster and is not to be directly instantiated via alloc and init.

+
+ + + + + +
+ +

Tasks

+ + + +

Instantiating Routes

+ + + + + +

Accessing Route Attributes

+ +
    +
  • + +   name +

    The name of the receiver.

    +
    + property + +
  • + +   objectClass +

    The object class of the receiver.

    +
    + property + +
  • + +   method +

    The request method of the receiver.

    +
    + property + +
  • + +   pathPattern +

    The path pattern of the receiver.

    +
    + property + +
  • + +   shouldEscapePath +

    A Boolean value that determines if the path pattern should be escaped when evaluated.

    +
    + property + +
  • +
+ + + +

Inspecting Route Types

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

method

+ + + +
+

The request method of the receiver.

+
+ + + +
@property (nonatomic, assign, readonly) RKRequestMethod method
+ + + + + + + + + +
+

Discussion

+

The request method of the receiver.

+ +

Appropriate for all route types. If the route is appropriate for any HTTP request method, then the RKRequestMethodAny value is used.

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ +

name

+ + + +
+

The name of the receiver.

+
+ + + +
@property (nonatomic, strong, readonly) NSString *name
+ + + + + + + + + +
+

Discussion

+

The name of the receiver.

+ +

The name is used to identify named and relationship routes and is always nil for object routes.

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ +

objectClass

+ + + +
+

The object class of the receiver.

+
+ + + +
@property (nonatomic, strong, readonly) Class objectClass
+ + + + + + + + + +
+

Discussion

+

The object class of the receiver.

+ +

Defines the class for which the route is appropriate. Always returns nil for named routes.

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ +

pathPattern

+ + + +
+

The path pattern of the receiver.

+
+ + + +
@property (nonatomic, strong, readonly) NSString *pathPattern
+ + + + + + + + + +
+

Discussion

+

The path pattern of the receiver.

+ +

A SOCKit pattern that describes the format of the path portion of URL’s generated from the receiver. Required and used by all route types.

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ +

shouldEscapePath

+ + + +
+

A Boolean value that determines if the path pattern should be escaped when evaluated.

+
+ + + +
@property (nonatomic, assign) BOOL shouldEscapePath
+ + + + + + + + + +
+

Discussion

+

A Boolean value that determines if the path pattern should be escaped when evaluated.

+ +

Default: NO

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

routeWithClass:pathPattern:method:

+ + + +
+

Creates and returns a new class route object with the given object class, path pattern and method.

+
+ + + +
+ (id)routeWithClass:(Class)objectClass pathPattern:(NSString *)pathPattern method:(RKRequestMethod)method
+ + + +
+

Parameters

+ +
+
objectClass
+

The class that is represented by the route.

+
+ +
+
pathPattern
+

A SOCKit pattern describing the format of URL paths generated from the route.

+
+ +
+
method
+

The request method of the route.

+
+ +
+ + + +
+

Return Value

+

A new class route object with the given object class, path pattern and request method.

+
+ + + + + +
+

Discussion

+

Creates and returns a new class route object with the given object class, path pattern and method.

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ +

routeWithName:pathPattern:method:

+ + + +
+

Creates and returns a new named route object with the given name, path pattern and method.

+
+ + + +
+ (id)routeWithName:(NSString *)name pathPattern:(NSString *)pathPattern method:(RKRequestMethod)method
+ + + +
+

Parameters

+ +
+
name
+

A unique identifying name for the route.

+
+ +
+
pathPattern
+

A SOCKit pattern describing the format of URL paths generated from the route.

+
+ +
+
method
+

The request method of the route.

+
+ +
+ + + +
+

Return Value

+

A new named route object with the given name, path pattern and request method.

+
+ + + + + +
+

Discussion

+

Creates and returns a new named route object with the given name, path pattern and method.

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ +

routeWithRelationshipName:objectClass:pathPattern:method:

+ + + +
+

Creates and returns a new relationship route object with the given relationship name, object class, path pattern and method.

+
+ + + +
+ (id)routeWithRelationshipName:(NSString *)name objectClass:(Class)objectClass pathPattern:(NSString *)pathPattern method:(RKRequestMethod)method
+ + + +
+

Parameters

+ +
+
name
+

The name of the relationship represented by the route.

+
+ +
+
objectClass
+

The class containing the relationship represented by the route.

+
+ +
+
pathPattern
+

A SOCKit pattern describing the format of URL paths generated from the route.

+
+ +
+
method
+

The request method of the route.

+
+ +
+ + + +
+

Return Value

+

A new class route object with the given object class, path pattern and request method.

+
+ + + + + +
+

Discussion

+

Creates and returns a new relationship route object with the given relationship name, object class, path pattern and method.

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

isClassRoute

+ + + +
+

Determines if the receiver is a class route.

+
+ + + +
- (BOOL)isClassRoute
+ + + + + +
+

Return Value

+

YES if the receiver is a class route, else NO.

+
+ + + + + +
+

Discussion

+

Determines if the receiver is a class route.

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ +

isNamedRoute

+ + + +
+

Determines if the receiver is a named route.

+
+ + + +
- (BOOL)isNamedRoute
+ + + + + +
+

Return Value

+

YES if the receiver is a named route, else NO.

+
+ + + + + +
+

Discussion

+

Determines if the receiver is a named route.

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ +

isRelationshipRoute

+ + + +
+

Determines if the receiver is a relationship route.

+
+ + + +
- (BOOL)isRelationshipRoute
+ + + + + +
+

Return Value

+

YES if the receiver is a relationship route, else NO.

+
+ + + + + +
+

Discussion

+

Determines if the receiver is a relationship route.

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKRouteSet.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKRouteSet.html new file mode 100644 index 00000000..66ede3c4 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKRouteSet.html @@ -0,0 +1,1166 @@ + + + + + RKRouteSet Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKRouteSet.h
+ + + + +
+ +

Overview

+

The RKRouteSet class provides for the storage and retrieval of RKRoute objects. Route objects are added and removed the route set to manipulate the routing table of the application.

+
+ + + + + +
+ +

Tasks

+ + + +

Adding and Removing Routes

+ + + + + +

Querying a Route Set

+ + + +
+ + + + + + + + + +
+ +

Instance Methods

+ +
+ +

addRoute:

+ + + +
+

Adds a route to the receiver.

+
+ + + +
- (void)addRoute:(RKRoute *)route
+ + + +
+

Parameters

+ +
+
route
+

The route to be added. +@raises NSInvalidArgumentException Raised if the route already exists in the receiver or overlaps an existing name.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds a route to the receiver.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

allRoutes

+ + + +
+

Returns all routes from the receiver in an array.

+
+ + + +
- (NSArray *)allRoutes
+ + + + + +
+

Return Value

+

An array containing all the routes in the receiver.

+
+ + + + + +
+

Discussion

+

Returns all routes from the receiver in an array.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

classRoutes

+ + + +
+

Returns all class routes from the receiver in an array.

+
+ + + +
- (NSArray *)classRoutes
+ + + + + +
+

Return Value

+

An array containing all the class routes in the receiver.

+
+ + + + + +
+

Discussion

+

Returns all class routes from the receiver in an array.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

containsRoute:

+ + + +
+

Determines if a given route exists within the receiver.

+
+ + + +
- (BOOL)containsRoute:(RKRoute *)route
+ + + +
+

Parameters

+ +
+
route
+

The route to be tested for containement.

+
+ +
+ + + +
+

Return Value

+

YES if the route is contained within the route set, else NO.

+
+ + + + + +
+

Discussion

+

Determines if a given route exists within the receiver.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

namedRoutes

+ + + +
+

Returns all named routes from the receiver in an array.

+
+ + + +
- (NSArray *)namedRoutes
+ + + + + +
+

Return Value

+

An array containing all the named routes in the receiver.

+
+ + + + + +
+

Discussion

+

Returns all named routes from the receiver in an array.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

relationshipRoutes

+ + + +
+

Returns all relationship routes from the receiver in an array.

+
+ + + +
- (NSArray *)relationshipRoutes
+ + + + + +
+

Return Value

+

An array containing all the relationship routes in the receiver.

+
+ + + + + +
+

Discussion

+

Returns all relationship routes from the receiver in an array.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

removeRoute:

+ + + +
+

Removes a route from the receiver.

+
+ + + +
- (void)removeRoute:(RKRoute *)route
+ + + +
+

Parameters

+ +
+
route
+

The route to be removed. +@raises NSInvalidArgumentException Raised if the route does not exist in the receiver.

+
+ +
+ + + + + + + +
+

Discussion

+

Removes a route from the receiver.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

routeForClass:method:

+ + + +
+

Retrieves a route for the given object class and request method.

+
+ + + +
- (RKRoute *)routeForClass:(Class)objectClass method:(RKRequestMethod)method
+ + + +
+

Parameters

+ +
+
objectClass
+

The object class of the route to be retrieved.

+
+ +
+
method
+

The request method of the route to be retrieved.

+
+ +
+ + + +
+

Return Value

+

A route with the given object class and method or nil if none was found.

+
+ + + + + +
+

Discussion

+

Retrieves a route for the given object class and request method.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

routeForName:

+ + + +
+

Retrieves a route with the given name.

+
+ + + +
- (RKRoute *)routeForName:(NSString *)name
+ + + +
+

Parameters

+ +
+
name
+

The name of the named route to be found.

+
+ +
+ + + +
+

Return Value

+

A route with the given name or nil if none was found.

+
+ + + + + +
+

Discussion

+

Retrieves a route with the given name.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

routeForObject:method:

+ + + +
+

Retrieves a route for a given object and request method.

+
+ + + +
- (RKRoute *)routeForObject:(id)object method:(RKRequestMethod)method
+ + + + + + + + + +
+

Discussion

+

Retrieves a route for a given object and request method.

+ +

The object routes are first searched for an exact match with the given object’s class and request method. If no exact match is found for the given request method, but a route is found for the RKRequestMethodAny method, it is returned. If neither are found, the search process begins again and traverses up the inheritance hierarchy.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

routeForRelationship:ofClass:method:

+ + + +
+

Retrieves a route for a given relationship of a class with a given request method.

+
+ + + +
- (RKRoute *)routeForRelationship:(NSString *)relationship ofClass:(Class)objectClass method:(RKRequestMethod)method
+ + + +
+

Parameters

+ +
+
relationship
+

The name of the relationship of the route to be retrieved.

+
+ +
+
method
+

The request method of the route to be retrieved.

+
+ +
+ + + +
+

Return Value

+

A route with the given relationship name, object class and method or nil if none was found.

+
+ + + + + +
+

Discussion

+

Retrieves a route for a given relationship of a class with a given request method.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

routesForClass:

+ + + +
+

Retrieves all class routes with a given object class.

+
+ + + +
- (NSArray *)routesForClass:(Class)objectClass
+ + + +
+

Parameters

+ +
+
objectClass
+

The object class of the routes to be retrieved.

+
+ +
+ + + +
+

Return Value

+

An array containing all class routes with the given class.

+
+ + + + + +
+

Discussion

+

Retrieves all class routes with a given object class.

+ +

Class matches are determined by direct comparison of the class objects. The inheritance hierarchy is not consulted.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

routesForObject:

+ + + +
+

Retrieves all object routes for a given object.

+
+ + + +
- (NSArray *)routesForObject:(id)object
+ + + +
+

Parameters

+ +
+
object
+

An object for which all object routes are to be retrieved.

+
+ +
+ + + +
+

Return Value

+

An array containing all object routes where the target class is included in the given object’s class hierarchy.

+
+ + + + + +
+

Discussion

+

Retrieves all object routes for a given object.

+ +

All object routes are searched and returned if they target a class or superclass of the given object (using - [NSObject isKindOfClass:]).

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

routesForRelationship:ofClass:

+ + + +
+

Retrieves all routes for a given relationship name and object class.

+
+ + + +
- (NSArray *)routesForRelationship:(NSString *)relationshipName ofClass:(Class)objectClass
+ + + +
+

Parameters

+ +
+
relationshipName
+

The name of the relationship of the routes to be retrieved.

+
+ +
+
objectClass
+

The object class of the routes to be retrieved.

+
+ +
+ + + +
+

Return Value

+

An array containing all relationship routes with the given relationship name and object class.

+
+ + + + + +
+

Discussion

+

Retrieves all routes for a given relationship name and object class.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKRouter.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKRouter.html new file mode 100644 index 00000000..d3cd956d --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKRouter.html @@ -0,0 +1,779 @@ + + + + + RKRouter Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKRouter.h
+ + + + +
+ +

Overview

+

An RKRouter instance is responsible for generating NSURL objects with a given base URL and a route set. It is used to centralize the knowledge about the URL’s that are used by the application.

+ +

Route Generation

+ +

URL’s can be generated by the router in three ways:

+ +
    +
  1. By name. Named routes link a symbolic name with a path and an HTTP request method. (see URLForRouteNamed:method:object:)
  2. +
  3. By object. Routes can be defined by class and HTTP request method. When a URL is requested from the router for an object, the router will identify the most appropriate route for the object and instantiate an NSURL with the route’s path pattern and interpolate it against the object. (see URLForObject:method:)
  4. +
  5. By object relationship. Routes can be defined for relationships to other objects. When a URL is requested from the router for a relationship, the router will retrieve the appropriate route for the relationship from the route set and interpolate the route’s path pattern against the source object. (see URLForRelationship:ofObject:method:)
  6. +
+ +
+ + + + + +
+ +

Tasks

+ + + +

Initializing a Router

+ + + + + +

Generating URLs

+ + + + + +

Configuring the Base URL and Route Set

+ +
    +
  • + +   baseURL +

    The base URL that all URLs constructed by the receiver are relative to.

    +
    + property + +
  • + +   routeSet +

    A route set defining all the routes addressable through the receiver.

    +
    + property + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

baseURL

+ + + +
+

The base URL that all URLs constructed by the receiver are relative to.

+
+ + + +
@property (nonatomic, strong, readonly) NSURL *baseURL
+ + + + + + + + + +
+

Discussion

+

The base URL that all URLs constructed by the receiver are relative to.

+
+ + + + + + + +
+

Declared In

+ RKRouter.h
+
+ + +
+ +
+ +

routeSet

+ + + +
+

A route set defining all the routes addressable through the receiver.

+
+ + + +
@property (nonatomic, strong, readonly) RKRouteSet *routeSet
+ + + + + + + + + +
+

Discussion

+

A route set defining all the routes addressable through the receiver.

+
+ + + + + + + +
+

Declared In

+ RKRouter.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

URLForObject:method:

+ + + +
+

Generates a URL for a given object and HTTP method.

+
+ + + +
- (NSURL *)URLForObject:(id)object method:(RKRequestMethod)method
+ + + +
+

Parameters

+ +
+
object
+

The object for which a URL is to be generated.

+
+ +
+
method
+

The HTTP method for which the URL is to be generated.

+
+ +
+ + + +
+

Return Value

+

A new URL object constructed by appending the path pattern of the route for the object an HTTP method to the baseURL of the receiver, interpolated against the routed object; or nil if no route was found for the given object and HTTP method.

+
+ + + + + +
+

Discussion

+

Generates a URL for a given object and HTTP method.

+ +

The route set is searched for a route that matches the HTTP method and class of the object being routed. If there is not an exact match for the object’s class, the inheritance hierarchy is searched until a match is found or all possible routes are exhausted. Exact HTTP request matches are favored over the wildcard method (RKRequestMethodAny). Once the appropriate route is identified, a new NSURL object is instantiated with the baseURL of the receiver and the path pattern of the route, interpolated against the object being routed.

+
+ + + + + + + +
+

Declared In

+ RKRouter.h
+
+ + +
+ +
+ +

URLForRelationship:ofObject:method:

+ + + +
+

Generates a URL for a relationship of a given object with a given HTTP method.

+
+ + + +
- (NSURL *)URLForRelationship:(NSString *)relationshipName ofObject:(id)object method:(RKRequestMethod)method
+ + + +
+

Parameters

+ +
+
relationshipName
+

The name of the relationship for which a URL is to be generated.

+
+ +
+
object
+

The object for which the URL is to be generated.

+
+ +
+
method
+

The HTTP method for which the URL is to be generated.

+
+ +
+ + + +
+

Return Value

+

A new URL object constructed by appending the path pattern of the route for the given object’s relationship and HTTP method to the baseURL of the receiver, interpolated against the routed object; or nil if no route was found for the given relationship, object and HTTP method.

+
+ + + + + +
+

Discussion

+

Generates a URL for a relationship of a given object with a given HTTP method.

+ +

The route set is searched for a route that matches the relationship of the given object’s class and the given HTTP method. If a matching route is found, a new NSURL object is instantiated with the baseURL of the receiver and the path pattern of the route, interpolated against the object being routed.

+
+ + + + + + + +
+

Declared In

+ RKRouter.h
+
+ + +
+ +
+ +

URLForRouteNamed:method:object:

+ + + +
+

Generates a URL for the route with the given name.

+
+ + + +
- (NSURL *)URLForRouteNamed:(NSString *)routeName method:(out RKRequestMethod *)method object:(id)object
+ + + +
+

Parameters

+ +
+
routeName
+

The name of the route for which a URL is to be generated.

+
+ +
+
method
+

A pointer to an RKRequestMethod variable in which to store the HTTP method associated with the named route. May be nil.

+
+ +
+
object
+

An optional object against which to interpolate the path pattern.

+
+ +
+ + + +
+

Return Value

+

A new NSURL object constructed by appending the path pattern to the baseURL of the receiver and interpolating against a given object; or nil if no route was found with the given name.

+
+ + + + + +
+

Discussion

+

Generates a URL for the route with the given name.

+ +

The route set is searched for a route with the given name and a new NSURL object is instantiated with the baseURL of the receiver and the path pattern of the route, optionally interpolated with a given object. If a pointer to an RKRequestMethod variable is provided, the HTTP method for the route will be assigned to the reference.

+
+ + + + + + + +
+

Declared In

+ RKRouter.h
+
+ + +
+ +
+ +

URLWithRoute:object:

+ + + +
+

Generates a URL with a given route and object.

+
+ + + +
- (NSURL *)URLWithRoute:(RKRoute *)route object:(id)object
+ + + +
+

Parameters

+ +
+
route
+

The route to generate the URL with.

+
+ +
+
object
+

The object with which to interpolate the path pattern of the given route.

+
+ +
+ + + +
+

Return Value

+

A new URL object constructed by interpolating the path pattern of the given route with the given object to construct a path and constructing an NSURL object relative to the baseURL of the receiver.

+
+ + + + + +
+

Discussion

+

Generates a URL with a given route and object.

+
+ + + + + + + +
+

Declared In

+ RKRouter.h
+
+ + +
+ +
+ +

initWithBaseURL:

+ + + +
+

Initializes a router with a given base URL.

+
+ + + +
- (id)initWithBaseURL:(NSURL *)baseURL
+ + + +
+

Parameters

+ +
+
baseURL
+

The base URL with which to initialize the receiver.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given base URL.

+
+ + + + + +
+

Discussion

+

Initializes a router with a given base URL.

+
+ + + + + + + +
+

Declared In

+ RKRouter.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKSearchIndexer.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKSearchIndexer.html new file mode 100644 index 00000000..77aa131c --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKSearchIndexer.html @@ -0,0 +1,880 @@ + + + + + RKSearchIndexer Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKSearchIndexer.h
+ + + + +
+ +

Overview

+

The RKSearchIndexer class provides support for adding full text searching to Core Data entities and managing the indexing of managed object instances of searchable entities.

+
+ + + + + +
+ +

Tasks

+ + + +

Adding Indexing to an Entity

+ +
    +
  • + + + addSearchIndexingToEntity:onAttributes: +

    Adds search indexing to the given entity for a given list of attributes identified by name. The entity will have a to-many relationship to the RKSearchWordEntity added and the list of searchable attributes stored into the user info dictionary.

    +
    + + +
  • +
+ + + +

Configuring Indexing

+ +
    +
  • + +   stopWords +

    An optional set of stop words to be removed from the set of tokens used to create the search words for indexed entities.

    +
    + property + +
  • + +   indexingContext +

    An optional NSManagedObjectContext in which to perform indexing operations.

    +
    + property + +
  • +
+ + + +

Indexing Changes in a Managed Object Context

+ + + + + +

Indexing a Managed Object

+ + + + + +

Managing Indexing Operations

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

indexingContext

+ + + +
+

An optional NSManagedObjectContext in which to perform indexing operations.

+
+ + + +
@property (nonatomic, strong) NSManagedObjectContext *indexingContext
+ + + + + + + + + +
+

Discussion

+

An optional NSManagedObjectContext in which to perform indexing operations.

+ +

Default: nil

Warning: It is recommended that the indexing context be configured with a direct connection to the persistent store coordinator and a merge policy of NSMergeByPropertyObjectTrumpMergePolicy.

+
+ + + + + + + +
+

Declared In

+ RKSearchIndexer.h
+
+ + +
+ +
+ +

stopWords

+ + + +
+

An optional set of stop words to be removed from the set of tokens used to create the search words for indexed entities.

+
+ + + +
@property (nonatomic, strong) NSSet *stopWords
+ + + + + + + + + +
+

Discussion

+

An optional set of stop words to be removed from the set of tokens used to create the search words for indexed entities.

+
+ + + + + + + +
+

Declared In

+ RKSearchIndexer.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

addSearchIndexingToEntity:onAttributes:

+ + + +
+

Adds search indexing to the given entity for a given list of attributes identified by name. The entity will have a to-many relationship to the RKSearchWordEntity added and the list of searchable attributes stored into the user info dictionary.

+
+ + + +
+ (void)addSearchIndexingToEntity:(NSEntityDescription *)entity onAttributes:(NSArray *)attributes
+ + + +
+

Parameters

+ +
+
entity
+

The entity to which search indexing support is to be added.

+
+ +
+
attributes
+

An array of NSAttributeDescription objects or NSString attribute names specifying the NSStringAttributeType attributes that are to be indexed for searching.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds search indexing to the given entity for a given list of attributes identified by name. The entity will have a to-many relationship to the RKSearchWordEntity added and the list of searchable attributes stored into the user info dictionary.

+ +

Managed objects for entities that have had indexing added to them can be indexed by instances of RKSearchIndexer and searched via an RKSearchPredicate used with an NSFetchRequest object.

+ +

The given entity must exist in a mutable managed object model (that is, one that has not been used to create an object graph in a managed object context). The given list of attributes must identify attributes of the given entity with the attribute type of NSStringAttributeType.

+
+ + + + + + + +
+

Declared In

+ RKSearchIndexer.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

cancelAllIndexingOperations

+ + + +
+

Tells the indexer to cancel all indexing operations in progress.

+
+ + + +
- (void)cancelAllIndexingOperations
+ + + + + + + + + +
+

Discussion

+

Tells the indexer to cancel all indexing operations in progress.

+ +

When a managed object context that is being observed is saved, the indexer enqueues an indexing operation for each indexable object that was inserted or updated during the save event. This method provides support for cancelling all in indexing operations that have not yet been processed.

+
+ + + + + + + +
+

Declared In

+ RKSearchIndexer.h
+
+ + +
+ +
+ +

indexChangedObjectsInManagedObjectContext:waitUntilFinished:

+ + + +
+

Tells the receiver to build a list of all inserted or updated managed objects in the given context and index each one. Objects for entities that are not indexed are silently ignored.

+
+ + + +
- (void)indexChangedObjectsInManagedObjectContext:(NSManagedObjectContext *)managedObjectContext waitUntilFinished:(BOOL)wait
+ + + +
+

Parameters

+ +
+
managedObjectContext
+

The managed object context that is to be indexed.

+
+ +
+
wait
+

A Boolean value that determines if the current thread will be blocked until all indexing operations have completed.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the receiver to build a list of all inserted or updated managed objects in the given context and index each one. Objects for entities that are not indexed are silently ignored.

+ +

The value of the wait parameter is significant in the determination of the indexing strategy. When YES, indexing is perform synchronously. When NO, indexing operations are enqueued and the method returns to the caller immediately. Enqueued indexing operations can later be cancelled by invoking cancelAllIndexingOperations.

+ +

This method is called by the indexer in response to a NSManagedObjectContextWillSaveNotification for contexts observed with startObservingManagedObjectContext:.

Warning: Indexing all changed objects in a managed object context does not utilize the indexingContext as unsaved objects in the graph would not be visible to that context.

+ +

Please beware that indexing changed objects in a context with the NSMainQueueConcurrencyType asynchronously (where wait == NO) and then invoking waitUntilAllIndexingOperationsAreFinished will result in a deadlock if called from the main thread. It is highly recommended that indexing be performed in contexts with the NSPrivateQueueConcurrencyType to take advantage of queueing and avoid blocking the main thread.

+
+ + + + + + + +
+

Declared In

+ RKSearchIndexer.h
+
+ + +
+ +
+ +

indexManagedObject:

+ + + +
+

Tells the receiver to index a given managed object instance.

+
+ + + +
- (NSUInteger)indexManagedObject:(NSManagedObject *)managedObject
+ + + +
+

Parameters

+ +
+
managedObject
+

The managed object that is to be indexed.

+
+ +
+ + + +
+

Return Value

+

A count of the number of search words that were indexed from the given object’s searchable attributes. +@raises NSInvalidArgumentException Raised if the given managed object is not for a searchable entity.

+
+ + + + + +
+

Discussion

+

Tells the receiver to index a given managed object instance.

+
+ + + + + + + +
+

Declared In

+ RKSearchIndexer.h
+
+ + +
+ +
+ +

startObservingManagedObjectContext:

+ + + +
+

Tells the receiver to start monitoring the given managed object context for save notifications and to index any changed objects in response to the save.

+
+ + + +
- (void)startObservingManagedObjectContext:(NSManagedObjectContext *)managedObjectContext
+ + + +
+

Parameters

+ +
+
managedObjectContext
+

The managed object context to be monitored for save notifications.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the receiver to start monitoring the given managed object context for save notifications and to index any changed objects in response to the save.

Warning: The behavior of this method changes based on the availability of an indexingContext. When the indexing context is nil, this method will register the receiver as an observer for the NSManagedObjectContextWillSaveNotification. At save time, the indexer will scan the set of changed objects in the save notification and synchronously index each changed object prior to the completion of the save. This is simple, but introduces a performance penalty that may not be unacceptable.

+ +

When an indexing context is provided, invoking startObservingManagedObjectContext: will cause the receiver to register for the NSManagedObjectContextDidSaveNotification instead. After a save completes, the indexer will reset the indexing context and enqueue an indexing operation for each changed object in the notification. Once all the indexing operations have completed, the indexing context will be saved and its contents should be merged into other contexts.

+
+ + + + + + + +
+

Declared In

+ RKSearchIndexer.h
+
+ + +
+ +
+ +

stopObservingManagedObjectContext:

+ + + +
+

Tells the receiver to stop monitoring the given managed object context for save notifications and cease indexing changed objects in response to the save.

+
+ + + +
- (void)stopObservingManagedObjectContext:(NSManagedObjectContext *)managedObjectContext
+ + + +
+

Parameters

+ +
+
managedObjectContext
+

The managed object context that is no longer to be monitored for save notifications.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the receiver to stop monitoring the given managed object context for save notifications and cease indexing changed objects in response to the save.

+
+ + + + + + + +
+

Declared In

+ RKSearchIndexer.h
+
+ + +
+ +
+ +

waitUntilAllIndexingOperationsAreFinished

+ + + +
+

Blocks the current thread until all of the receiver’s queued and executing indexing operations finish executing.

+
+ + + +
- (void)waitUntilAllIndexingOperationsAreFinished
+ + + + + + + + + +
+

Discussion

+

Blocks the current thread until all of the receiver’s queued and executing indexing operations finish executing.

+ +

When called, this method blocks the current thread and waits for the receiver’s current and queued indexing operations to finish executing. While the current thread is blocked, the receiver continues to launch already queued operations and monitor those that are executing. During this time, the current thread cannot add operations to the queue, but other threads may. Once all of the pending operations are finished, this method returns.

+ +

If there are no indexing operations in the queue, this method returns immediately.

Warning: Invoking this method may cause a deadlock if indexing operations have been enqueued for a managed object context with the NSMainQueueConcurrencyType and the method is called from the main thread.

+
+ + + + + + + +
+

Declared In

+ RKSearchIndexer.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKSearchPredicate.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKSearchPredicate.html new file mode 100644 index 00000000..b50de652 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKSearchPredicate.html @@ -0,0 +1,419 @@ + + + + + RKSearchPredicate Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSCompoundPredicate
Declared inRKSearchPredicate.h
+ + + + +
+ +

Overview

+

RKSearchPredicate is a suclass of NSCompoundPredicate used to represent textual search operations against entities indexed by an instance of RKSearchIndexer.

+
+ + + + + +
+ +

Tasks

+ + + + +

Creating a Search Predicate

+
    +
  • + + + searchPredicateWithText:type: +

    Creates and returns a new predicate for performing a full text search on an entity indexed by an instance of RKSearchIndexer. The given search text will be tokenized, normalized and used to construct a collection of subpredicates specifying a BEGINSWITH match against the searchWords relationship of the searchable entity.

    +
    + + +
  • + + – initWithSearchText:type: +

    Initializes the receiver with a string of search text and a compound predicate type.

    +
    + + +
  • +
+ +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

searchPredicateWithText:type:

+ + + +
+

Creates and returns a new predicate for performing a full text search on an entity indexed by an instance of RKSearchIndexer. The given search text will be tokenized, normalized and used to construct a collection of subpredicates specifying a BEGINSWITH match against the searchWords relationship of the searchable entity.

+
+ + + +
+ (NSPredicate *)searchPredicateWithText:(NSString *)searchText type:(NSCompoundPredicateType)type
+ + + +
+

Parameters

+ +
+
searchText
+

A string of text with which to construct subpredicates for searching.

+
+ +
+
type
+

The type of the new compound predicate.

+
+ +
+ + + +
+

Return Value

+

A new compound predicate for performing a full text search with the given search text and type.

+
+ + + + + +
+

Discussion

+

Creates and returns a new predicate for performing a full text search on an entity indexed by an instance of RKSearchIndexer. The given search text will be tokenized, normalized and used to construct a collection of subpredicates specifying a BEGINSWITH match against the searchWords relationship of the searchable entity.

+
+ + + + + + + +
+

Declared In

+ RKSearchPredicate.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

initWithSearchText:type:

+ + + +
+

Initializes the receiver with a string of search text and a compound predicate type.

+
+ + + +
- (id)initWithSearchText:(NSString *)searchText type:(NSCompoundPredicateType)type
+ + + +
+

Parameters

+ +
+
searchText
+

A string of text with which to construct subpredicates for searching.

+
+ +
+
type
+

The type of the new compound predicate.

+
+ +
+ + + +
+

Return Value

+

The receiver with its type set to the given type and its subpredicates set to an array of subpredicates for searching for the given text.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a string of search text and a compound predicate type.

+ +

The search text will be tokenized, normalized and then used to construct an array of subpredicates specifying a BEGINSWITH match against the searchWords relationship of the searchable entity.

+
+ + + + + + + +
+

Declared In

+ RKSearchPredicate.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKSearchTokenizer.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKSearchTokenizer.html new file mode 100644 index 00000000..627a7a03 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKSearchTokenizer.html @@ -0,0 +1,404 @@ + + + + + RKSearchTokenizer Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKSearchTokenizer.h
+ + + + +
+ +

Overview

+

The RKSearchTokenizer class provides an interface for tokenizing input text into a set of searchable words. Diacritics are removed and the input text is tokenized case insensitively. A set of stop words can be optionally trimmed from the result token set.

+
+ + + + + +
+ +

Tasks

+ + + +

Configuring Tokenization

+ +
    +
  • + +   stopWords +

    The set of stop words that are to be removed from the token set.

    +
    + property + +
  • +
+ + + +

Tokenizing a String of Text

+ +
    +
  • + + – tokenize: +

    Tokenizes the given string by folding it case and diacritic insensitively and then splitting it apart using the the word unit delimiters for the current locale. If a set of stop words has been provided, the resulting token set will have the stop words subtracted.

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

stopWords

+ + + +
+

The set of stop words that are to be removed from the token set.

+
+ + + +
@property (nonatomic, strong) NSSet *stopWords
+ + + + + + + + + +
+

Discussion

+

The set of stop words that are to be removed from the token set.

+ +

Defaults to nil.

+
+ + + + + + + +
+

Declared In

+ RKSearchTokenizer.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

tokenize:

+ + + +
+

Tokenizes the given string by folding it case and diacritic insensitively and then splitting it apart using the the word unit delimiters for the current locale. If a set of stop words has been provided, the resulting token set will have the stop words subtracted.

+
+ + + +
- (NSSet *)tokenize:(NSString *)string
+ + + +
+

Parameters

+ +
+
string
+

A string of text you wish to tokenize.

+
+ +
+ + + +
+

Return Value

+

A set of searchable text tokens extracted from the given string.

+
+ + + + + +
+

Discussion

+

Tokenizes the given string by folding it case and diacritic insensitively and then splitting it apart using the the word unit delimiters for the current locale. If a set of stop words has been provided, the resulting token set will have the stop words subtracted.

+
+ + + + + + + +
+

Declared In

+ RKSearchTokenizer.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKSearchWord.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKSearchWord.html new file mode 100644 index 00000000..7111e058 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKSearchWord.html @@ -0,0 +1,300 @@ + + + + + RKSearchWord Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSManagedObject
Declared inRKSearchWord.h
+ + + + + + +
+ +

Tasks

+ + + + +

Accessing the Search Word Attribute

+
    +
  • + +   word +

    A single search word extracted from an indexed entity.

    +
    + property + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

word

+ + + +
+

A single search word extracted from an indexed entity.

+
+ + + +
@property (nonatomic, strong) NSString *word
+ + + + + + + + + +
+

Discussion

+

A single search word extracted from an indexed entity.

+
+ + + + + + + +
+

Declared In

+ RKSearchWord.h
+
+ + +
+ +
+ + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKSearchWordEntity.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKSearchWordEntity.html new file mode 100644 index 00000000..10441fff --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKSearchWordEntity.html @@ -0,0 +1,213 @@ + + + + + RKSearchWordEntity Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSEntityDescription
Declared inRKSearchWordEntity.h
+ + + + + + + + + + + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKTestFactory.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKTestFactory.html new file mode 100644 index 00000000..771ee586 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKTestFactory.html @@ -0,0 +1,1313 @@ + + + + + RKTestFactory Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + + + + +
Inherits fromNSObject
Conforms toRKTestFactoryCallbacks
Declared inRKTestFactory.h
+ + + + +
+ +

Overview

+

The RKTestFactory class provides an interface for initializing RestKit objects within a unit testing environment. The factory is used to ensure isolation between test cases by ensuring that RestKit’s important singleton objects are torn down between tests and that each test is working within a clean Core Data environment. Callback hooks are provided so that application specific set up and tear down logic can be integrated as well.

+ +

The factory also provides for the definition of named factories for instantiating objects quickly. At initialization, there are factories defined for creating instances of AFHTTPClient, RKObjectManager, and RKManagedObjectStore. These factories may be redefined within your application should you choose to utilize a subclass or wish to centralize configuration of objects across the test suite. You may also define additional factories for building instances of objects specific to your application using the same infrastructure.

+
+ + + + + +
+ +

Tasks

+ + + +

Configuring the Factory

+ + + + + +

Defining & Instantiating Objects from Factories

+ +
    +
  • + + + defineFactory:withBlock: +

    Defines a factory with a given name for building object instances using the +given block. When the factory singleton receives an objectFromFactory: message, +the block designated for the given factory name is invoked and the resulting object +reference is returned.

    +
    + + +
  • + + + objectFromFactory:properties: +

    Creates and returns a new instance of an object using the factory with the given name.

    +
    + + +
  • + + + objectFromFactory: + + + + +
  • + + + sharedObjectFromFactory: +

    Fetches a shared object from the factory with the given name. If an existing object has already been created, then that instance is returned. If a shared instance does not yet exist, one will be constructed and returned for this and all subsequent invocations of sharedObjectFromFactory:. Shared object instances are discarded when the factory is torn down.

    +
    + + +
  • + + + insertManagedObjectForEntityForName:inManagedObjectContext:withProperties: +

    Inserts a new managed object for the NSEntityDescription with the given name into the specified managed object context and sets properties on the instance from the given dictionary. A permanent managed object ID is obtained for the object so that it can be referenced across threads without any further work.

    +
    + + +
  • + + + factoryNames +

    Returns a set of names for all defined factories.

    +
    + + +
  • +
+ + + +

Retrieving Shared Objects

+ +
    +
  • + + + client +

    Fetches the shared AFHTTPClient object using the factory defined for the name RKTestFactoryDefaultNamesClient.

    +
    + + +
  • + + + objectManager +

    Fetches the shared RKObjectManager object using the factory defined for the name RKTestFactoryDefaultNamesObjectManager.

    +
    + + +
  • + + + managedObjectStore +

    Fetches the shared an RKManagedObjectStore object using the factory defined for the name RKTestFactoryDefaultNamesManagedObjectStore.

    +
    + + +
  • +
+ + + +

Managing Test State

+ +
    +
  • + + + setUp +

    Sets up the RestKit testing environment. Invokes the didSetUp callback for application specific setup.

    +
    + + +
  • + + + tearDown +

    Tears down the RestKit testing environment by clearing singleton instances, helping to ensure test case isolation. Invokes the didTearDown callback for application specific cleanup.

    +
    + + +
  • +
+ +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

baseURL

+ + + +
+

Returns the base URL with which to initialize AFHTTPClient and RKObjectManager instances created via the factory.

+
+ + + +
+ (NSURL *)baseURL
+ + + + + +
+

Return Value

+

The base URL for the factory.

+
+ + + + + +
+

Discussion

+

Returns the base URL with which to initialize AFHTTPClient and RKObjectManager instances created via the factory.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

baseURLString

+ + + +
+

Returns the base URL as a string value.

+
+ + + +
+ (NSString *)baseURLString
+ + + + + +
+

Return Value

+

The base URL for the factory, as a string.

+
+ + + + + +
+

Discussion

+

Returns the base URL as a string value.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

client

+ + + +
+

Fetches the shared AFHTTPClient object using the factory defined for the name RKTestFactoryDefaultNamesClient.

+
+ + + +
+ (id)client
+ + + + + +
+

Return Value

+

The shared client instance.

+
+ + + + + +
+

Discussion

+

Fetches the shared AFHTTPClient object using the factory defined for the name RKTestFactoryDefaultNamesClient.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

defineFactory:withBlock:

+ + + +
+

Defines a factory with a given name for building object instances using the +given block. When the factory singleton receives an objectFromFactory: message, +the block designated for the given factory name is invoked and the resulting object +reference is returned.

+
+ + + +
+ (void)defineFactory:(NSString *)factoryName withBlock:(id ( ^ ) ( ))block
+ + + +
+

Parameters

+ +
+
factoryName
+

The name to assign the factory.

+
+ +
+
block
+

A block to execute when building an object instance for the factory name.

+
+ +
+ + + +
+

Return Value

+

A configured object instance.

+
+ + + + + +
+

Discussion

+

Defines a factory with a given name for building object instances using the +given block. When the factory singleton receives an objectFromFactory: message, +the block designated for the given factory name is invoked and the resulting object +reference is returned.

+ +

Existing factories can be invoking defineFactory:withBlock: with an existing factory name.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

factoryNames

+ + + +
+

Returns a set of names for all defined factories.

+
+ + + +
+ (NSSet *)factoryNames
+ + + + + +
+

Return Value

+

A set of the string names for all defined factories.

+
+ + + + + +
+

Discussion

+

Returns a set of names for all defined factories.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

insertManagedObjectForEntityForName:inManagedObjectContext:withProperties:

+ + + +
+

Inserts a new managed object for the NSEntityDescription with the given name into the specified managed object context and sets properties on the instance from the given dictionary. A permanent managed object ID is obtained for the object so that it can be referenced across threads without any further work.

+
+ + + +
+ (id)insertManagedObjectForEntityForName:(NSString *)entityName inManagedObjectContext:(NSManagedObjectContext *)managedObjectContext withProperties:(NSDictionary *)properties
+ + + +
+

Parameters

+ +
+
entityName
+

The name of the entity to insert a new managed object for.

+
+ +
+
managedObjectContext
+

The managed object context to insert the new object into. If nil, then the managed object context returned by invoking [[RKTestFactory managedObjectStore]](#//api/name/managedObjectStore).mainQueueManagedObjectContext] is used.

+
+ +
+
properties
+

A dictionary of properties to be set on the new managed object instance.

+
+ +
+ + + +
+

Return Value

+

A new object inheriting from NSManagedObject.

+
+ + + + + +
+

Discussion

+

Inserts a new managed object for the NSEntityDescription with the given name into the specified managed object context and sets properties on the instance from the given dictionary. A permanent managed object ID is obtained for the object so that it can be referenced across threads without any further work.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

managedObjectStore

+ + + +
+

Fetches the shared an RKManagedObjectStore object using the factory defined for the name RKTestFactoryDefaultNamesManagedObjectStore.

+
+ + + +
+ (id)managedObjectStore
+ + + + + +
+

Return Value

+

The shared managed object store instance.

+
+ + + + + +
+

Discussion

+

Fetches the shared an RKManagedObjectStore object using the factory defined for the name RKTestFactoryDefaultNamesManagedObjectStore.

+ +

On first invocation per factory setup/teardown, a new managed object store will be configured and returned. If there is an existing persistent store (i.e. from a previous test invocation), then the persistent store is deleted.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

managedObjectStoreFilename

+ + + +
+

Returns the filename used when constructing instances of RKManagedObjectStore via the factory.

+
+ + + +
+ (NSString *)managedObjectStoreFilename
+ + + + + +
+

Return Value

+

A string containing the filename to use when creating a managed object store.

+
+ + + + + +
+

Discussion

+

Returns the filename used when constructing instances of RKManagedObjectStore via the factory.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

objectFromFactory:

+ + + +
+ (id)objectFromFactory:(NSString *)factoryName
+ + +
+ +
+ +

objectFromFactory:properties:

+ + + +
+

Creates and returns a new instance of an object using the factory with the given name.

+
+ + + +
+ (id)objectFromFactory:(NSString *)factoryName properties:(NSDictionary *)properties
+ + + +
+

Parameters

+ +
+
factoryName
+

The name of the factory to use when building the requested object. +@raises NSInvalidArgumentException Raised if a factory with the given name is not defined.

+
+ +
+
properties
+

An NSDictionary of properties to be set on the created object.

+
+ +
+ + + +
+

Return Value

+

An object built using the factory registered for the given name.

+
+ + + + + +
+

Discussion

+

Creates and returns a new instance of an object using the factory with the given name.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

objectManager

+ + + +
+

Fetches the shared RKObjectManager object using the factory defined for the name RKTestFactoryDefaultNamesObjectManager.

+
+ + + +
+ (id)objectManager
+ + + + + +
+

Return Value

+

The shared object manager instance.

+
+ + + + + +
+

Discussion

+

Fetches the shared RKObjectManager object using the factory defined for the name RKTestFactoryDefaultNamesObjectManager.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

setBaseURL:

+ + + +
+

Sets the base URL for the factory.

+
+ + + +
+ (void)setBaseURL:(NSURL *)URL
+ + + +
+

Parameters

+ +
+
URL
+

The new base URL.

+
+ +
+ + + + + + + +
+

Discussion

+

Sets the base URL for the factory.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

setBaseURLString:

+ + + +
+

Sets the base URL for the factory to a new value by constructing an RKURL +from the given string.

+
+ + + +
+ (void)setBaseURLString:(NSString *)baseURLString
+ + + +
+

Parameters

+ +
+
baseURLString
+

A string containing the URL to set as the base URL for the factory.

+
+ +
+ + + + + + + +
+

Discussion

+

Sets the base URL for the factory to a new value by constructing an RKURL +from the given string.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

setManagedObjectStoreFilename:

+ + + +
+

Sets the filename to use when the factory constructs an instance of RKManagedObjectStore.

+
+ + + +
+ (void)setManagedObjectStoreFilename:(NSString *)managedObjectStoreFilename
+ + + +
+

Parameters

+ +
+
managedObjectStoreFilename
+

A string containing the filename to use when creating managed object store instances.

+
+ +
+ + + + + + + +
+

Discussion

+

Sets the filename to use when the factory constructs an instance of RKManagedObjectStore.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

setUp

+ + + +
+

Sets up the RestKit testing environment. Invokes the didSetUp callback for application specific setup.

+
+ + + +
+ (void)setUp
+ + + + + + + + + +
+

Discussion

+

Sets up the RestKit testing environment. Invokes the didSetUp callback for application specific setup.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

sharedObjectFromFactory:

+ + + +
+

Fetches a shared object from the factory with the given name. If an existing object has already been created, then that instance is returned. If a shared instance does not yet exist, one will be constructed and returned for this and all subsequent invocations of sharedObjectFromFactory:. Shared object instances are discarded when the factory is torn down.

+
+ + + +
+ (id)sharedObjectFromFactory:(NSString *)factoryName
+ + + +
+

Parameters

+ +
+
factoryName
+

The name of the factory to retrieve the shared instance of.

+
+ +
+ + + +
+

Return Value

+

The shared object instance for the factory registered with the given name.

+
+ + + + + +
+

Discussion

+

Fetches a shared object from the factory with the given name. If an existing object has already been created, then that instance is returned. If a shared instance does not yet exist, one will be constructed and returned for this and all subsequent invocations of sharedObjectFromFactory:. Shared object instances are discarded when the factory is torn down.

+ +

Shared objects are used to return object instances for cases where it does not make sense to instantiate a new instance on every invocation of the factory. A common example where this is appropriate is the managedObjectStore factory, where construction of a new store on each invocation would yield managed objects that cross Core Data stacks.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

tearDown

+ + + +
+

Tears down the RestKit testing environment by clearing singleton instances, helping to ensure test case isolation. Invokes the didTearDown callback for application specific cleanup.

+
+ + + +
+ (void)tearDown
+ + + + + + + + + +
+

Discussion

+

Tears down the RestKit testing environment by clearing singleton instances, helping to ensure test case isolation. Invokes the didTearDown callback for application specific cleanup.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKTestFixture.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKTestFixture.html new file mode 100644 index 00000000..3defa752 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKTestFixture.html @@ -0,0 +1,720 @@ + + + + + RKTestFixture Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKTestFixture.h
+ + + + +
+ +

Overview

+

Provides a static method API for conveniently accessing fixture data +contained within a designated NSBundle. Useful when writing unit tests that +leverage fixture data for testing parsing and object mapping operations.

+
+ + + + + +
+ +

Tasks

+ + + + + +
    +
  • + + + fixtureBundle +

    Returns the NSBundle object designated as the source location for unit testing fixture data.

    +
    + + +
  • + + + setFixtureBundle: +

    Designates the specified NSBundle object as the source location for unit testing fixture data.

    +
    + + +
  • + + + pathForFixture: +

    Returns the full path to the specified fixture file on within the fixture bundle.

    +
    + + +
  • + + + stringWithContentsOfFixture: +

    Creates and returns a string object by reading data from the fixture identified by the specified file name using UTF-8 encoding.

    +
    + + +
  • + + + dataWithContentsOfFixture: +

    Creates and returns a data object by reading every byte from the fixture identified by the specified file name.

    +
    + + +
  • + + + MIMETypeForFixture: +

    Returns the MIME Type for the fixture identified by the specified name.

    +
    + + +
  • + + + parsedObjectWithContentsOfFixture: +

    Creates and returns an object representation of the data from the fixture identified by the specified file name by reading the +data as a string and parsing it using a parser appropriate for the MIME Type of the file.

    +
    + + +
  • +
+ +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

MIMETypeForFixture:

+ + + +
+

Returns the MIME Type for the fixture identified by the specified name.

+
+ + + +
+ (NSString *)MIMETypeForFixture:(NSString *)fixtureName
+ + + +
+

Parameters

+ +
+
fixtureName
+

The name of the fixture file.

+
+ +
+ + + +
+

Return Value

+

The MIME Type for the resource file or nil if the file could not be located.

+
+ + + + + +
+

Discussion

+

Returns the MIME Type for the fixture identified by the specified name.

+
+ + + + + + + +
+

Declared In

+ RKTestFixture.h
+
+ + +
+ +
+ +

dataWithContentsOfFixture:

+ + + +
+

Creates and returns a data object by reading every byte from the fixture identified by the specified file name.

+
+ + + +
+ (NSData *)dataWithContentsOfFixture:(NSString *)fixtureName
+ + + +
+

Parameters

+ +
+
fixtureName
+

The name of the resource file.

+
+ +
+ + + +
+

Return Value

+

A data object by reading every byte from the fixture file.

+
+ + + + + +
+

Discussion

+

Creates and returns a data object by reading every byte from the fixture identified by the specified file name.

+
+ + + + + + + +
+

Declared In

+ RKTestFixture.h
+
+ + +
+ +
+ +

fixtureBundle

+ + + +
+

Returns the NSBundle object designated as the source location for unit testing fixture data.

+
+ + + +
+ (NSBundle *)fixtureBundle
+ + + + + +
+

Return Value

+

The NSBundle object designated as the source location for unit testing fixture data

+ +
or nil if none has been configured.
+
+
+ + + + + +
+

Discussion

+

Returns the NSBundle object designated as the source location for unit testing fixture data.

+
+ + + + + + + +
+

Declared In

+ RKTestFixture.h
+
+ + +
+ +
+ +

parsedObjectWithContentsOfFixture:

+ + + +
+

Creates and returns an object representation of the data from the fixture identified by the specified file name by reading the +data as a string and parsing it using a parser appropriate for the MIME Type of the file.

+
+ + + +
+ (id)parsedObjectWithContentsOfFixture:(NSString *)fixtureName
+ + + +
+

Parameters

+ +
+
fixtureName
+

The name of the resource file.

+
+ +
+ + + +
+

Return Value

+

A new image object for the specified file, or nil if the method could not initialize the image from the specified file.

+
+ + + + + +
+

Discussion

+

Creates and returns an object representation of the data from the fixture identified by the specified file name by reading the +data as a string and parsing it using a parser appropriate for the MIME Type of the file.

+
+ + + + + + + +
+

Declared In

+ RKTestFixture.h
+
+ + +
+ +
+ +

pathForFixture:

+ + + +
+

Returns the full path to the specified fixture file on within the fixture bundle.

+
+ + + +
+ (NSString *)pathForFixture:(NSString *)fixtureName
+ + + +
+

Parameters

+ +
+
fixtureName
+

The name of the fixture file.

+
+ +
+ + + +
+

Return Value

+

The full path to the specified fixture file or nil if it cannot be located.

+
+ + + + + +
+

Discussion

+

Returns the full path to the specified fixture file on within the fixture bundle.

+
+ + + + + + + +
+

Declared In

+ RKTestFixture.h
+
+ + +
+ +
+ +

setFixtureBundle:

+ + + +
+

Designates the specified NSBundle object as the source location for unit testing fixture data.

+
+ + + +
+ (void)setFixtureBundle:(NSBundle *)bundle
+ + + +
+

Parameters

+ +
+
bundle
+

The new fixture NSBundle object.

+
+ +
+ + + + + + + +
+

Discussion

+

Designates the specified NSBundle object as the source location for unit testing fixture data.

+
+ + + + + + + +
+

Declared In

+ RKTestFixture.h
+
+ + +
+ +
+ +

stringWithContentsOfFixture:

+ + + +
+

Creates and returns a string object by reading data from the fixture identified by the specified file name using UTF-8 encoding.

+
+ + + +
+ (NSString *)stringWithContentsOfFixture:(NSString *)fixtureName
+ + + +
+

Parameters

+ +
+
fixtureName
+

The name of the fixture file.

+
+ +
+ + + +
+

Return Value

+

A string created by reading data from the specified fixture file using the NSUTF8StringEncoding.

+
+ + + + + +
+

Discussion

+

Creates and returns a string object by reading data from the fixture identified by the specified file name using UTF-8 encoding.

+
+ + + + + + + +
+

Declared In

+ RKTestFixture.h
+
+ + +
+ +
+ + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKTestHelpers.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKTestHelpers.html new file mode 100644 index 00000000..3c1a3910 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKTestHelpers.html @@ -0,0 +1,784 @@ + + + + + RKTestHelpers Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKTestHelpers.h
+ + + + +
+ +

Overview

+

The RKTestHelpers class provides a number of helpful utility methods for use in unit or integration tests for RestKit applications.

+
+ + + + + +
+ +

Tasks

+ + + +

Stubbing Routes

+ + + + + +

Working with the Cache

+ +
    +
  • + + + disableCaching +

    Disables caching by setting a new [NSURLCache sharedURLCache] instance in which the memory and disk limits have been set to zero.

    +
    + + +
  • + + + cacheResponseForRequest:withResponseData: +

    Creates, stores, and returns a NSCachedURLResponse object containing an NSHTTPURLResponse for the given request with a 200 (OK) status code.

    +
    + + +
  • + + + cacheResponseForURL:HTTPMethod:headers:withData: +

    Creates, stores, and returns a NSCachedURLResponse object containing an NSHTTPURLResponse for the given URL and HTTP method with the given response data and a 200 (OK) status code.

    +
    + + +
  • +
+ +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

cacheResponseForRequest:withResponseData:

+ + + +
+

Creates, stores, and returns a NSCachedURLResponse object containing an NSHTTPURLResponse for the given request with a 200 (OK) status code.

+
+ + + +
+ (NSCachedURLResponse *)cacheResponseForRequest:(NSURLRequest *)request withResponseData:(NSData *)responseData
+ + + +
+

Parameters

+ +
+
request
+

The request to cache the response for.

+
+ +
+
responseData
+

The response data to be stored in the cache.

+
+ +
+ + + +
+

Return Value

+

The cached URL response that was stored to the cache.

+
+ + + + + +
+

Discussion

+

Creates, stores, and returns a NSCachedURLResponse object containing an NSHTTPURLResponse for the given request with a 200 (OK) status code.

+
+ + + + + + + +
+

Declared In

+ RKTestHelpers.h
+
+ + +
+ +
+ +

cacheResponseForURL:HTTPMethod:headers:withData:

+ + + +
+

Creates, stores, and returns a NSCachedURLResponse object containing an NSHTTPURLResponse for the given URL and HTTP method with the given response data and a 200 (OK) status code.

+
+ + + +
+ (NSCachedURLResponse *)cacheResponseForURL:(NSURL *)URL HTTPMethod:(NSString *)HTTPMethod headers:(NSDictionary *)requestHeaders withData:(NSData *)responseData
+ + + +
+

Parameters

+ +
+
URL
+

The URL to cache the response for.

+
+ +
+
HTTPMethod
+

The HTTP method of the request (i.e. ‘GET’, ‘POST’, ‘PUT’, ‘PATCH’, or ‘DELETE’).

+
+ +
+
responseData
+

The response data to be stored in the cache.

+
+ +
+ + + +
+

Return Value

+

The cached URL response that was stored to the cache.

+
+ + + + + +
+

Discussion

+

Creates, stores, and returns a NSCachedURLResponse object containing an NSHTTPURLResponse for the given URL and HTTP method with the given response data and a 200 (OK) status code.

+
+ + + + + + + +
+

Declared In

+ RKTestHelpers.h
+
+ + +
+ +
+ +

copyFetchRequestBlocksMatchingPathPattern:toBlocksMatchingRelativeString:onObjectManager:

+ + + +
+

Finds all registered fetch request blocks matching the given path pattern and adds a new fetch request block that returns the same value as the origin block that matches the given relative string portion of a URL object.

+
+ + + +
+ (void)copyFetchRequestBlocksMatchingPathPattern:(NSString *)pathPattern toBlocksMatchingRelativeString:(NSString *)relativeString onObjectManager:(RKObjectManager *)nilOrObjectManager
+ + + +
+

Parameters

+ +
+
pathPattern
+

The path pattern that matches the fetch request blocks to be copied.

+
+ +
+
relativeString
+

The relative string portion of the NSURL objects that the new blocks will match exactly.

+
+ +
+
nilOrObjectManager
+

The object manager to stub the route on. If nil, the shared object manager be be used.

+
+ +
+ + + + + + + +
+

Discussion

+

Finds all registered fetch request blocks matching the given path pattern and adds a new fetch request block that returns the same value as the origin block that matches the given relative string portion of a URL object.

+
+ + + + + + + +
+

Declared In

+ RKTestHelpers.h
+
+ + +
+ +
+ +

disableCaching

+ + + +
+

Disables caching by setting a new [NSURLCache sharedURLCache] instance in which the memory and disk limits have been set to zero.

+
+ + + +
+ (void)disableCaching
+ + + + + + + + + +
+

Discussion

+

Disables caching by setting a new [NSURLCache sharedURLCache] instance in which the memory and disk limits have been set to zero.

+
+ + + + + + + +
+

Declared In

+ RKTestHelpers.h
+
+ + +
+ +
+ +

stubRouteForClass:method:withPathPattern:onObjectManager:

+ + + +
+

Stubs the route with the given class and method with a given path pattern.

+
+ + + +
+ (RKRoute *)stubRouteForClass:(Class)objectClass method:(RKRequestMethod)method withPathPattern:(NSString *)pathPattern onObjectManager:(RKObjectManager *)nilOrObjectManager
+ + + +
+

Parameters

+ +
+
objectClass
+

The class of the route to stub.

+
+ +
+
method
+

The method of the route to stub.

+
+ +
+
pathPattern
+

The path pattern to return instead in place of the current route’s value.

+
+ +
+
nilOrObjectManager
+

The object manager to stub the route on. If nil, the shared object manager be be used.

+
+ +
+ + + +
+

Return Value

+

The new stubbed route object that was added to the route set of the target object manager.

+
+ + + + + +
+

Discussion

+

Stubs the route with the given class and method with a given path pattern.

+
+ + + + + + + +
+

Declared In

+ RKTestHelpers.h
+
+ + +
+ +
+ +

stubRouteForRelationship:ofClass:pathPattern:onObjectManager:

+ + + +
+

Stubs the relationship route for a given class with a given path pattern.

+
+ + + +
+ (RKRoute *)stubRouteForRelationship:(NSString *)relationshipName ofClass:(Class)objectClass pathPattern:(NSString *)pathPattern onObjectManager:(RKObjectManager *)nilOrObjectManager
+ + + +
+

Parameters

+ +
+
relationshipName
+

The name of the relationship to stub the route of.

+
+ +
+
objectClass
+

The class of the route to stub.

+
+ +
+
pathPattern
+

The path pattern to return instead in place of the current route’s value.

+
+ +
+
nilOrObjectManager
+

The object manager to stub the route on. If nil, the shared object manager be be used.

+
+ +
+ + + +
+

Return Value

+

The new stubbed route object that was added to the route set of the target object manager.

+
+ + + + + +
+

Discussion

+

Stubs the relationship route for a given class with a given path pattern.

+
+ + + + + + + +
+

Declared In

+ RKTestHelpers.h
+
+ + +
+ +
+ +

stubRouteNamed:withPathPattern:onObjectManager:

+ + + +
+

Stubs the route with the given name with a given path pattern.

+
+ + + +
+ (RKRoute *)stubRouteNamed:(NSString *)routeName withPathPattern:(NSString *)pathPattern onObjectManager:(RKObjectManager *)nilOrObjectManager
+ + + +
+

Parameters

+ +
+
routeName
+

The name of the route to stub.

+
+ +
+
pathPattern
+

The path pattern to return instead in place of the current route’s value.

+
+ +
+
nilOrObjectManager
+

The object manager to stub the route on. If nil, the shared object manager be be used.

+
+ +
+ + + +
+

Return Value

+

The new stubbed route object that was added to the route set of the target object manager.

+
+ + + + + +
+

Discussion

+

Stubs the route with the given name with a given path pattern.

+
+ + + + + + + +
+

Declared In

+ RKTestHelpers.h
+
+ + +
+ +
+ + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKTestNotificationObserver.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKTestNotificationObserver.html new file mode 100644 index 00000000..f6ddd01b --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKTestNotificationObserver.html @@ -0,0 +1,893 @@ + + + + + RKTestNotificationObserver Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKTestNotificationObserver.h
+ + + + +
+ +

Overview

+

An RKTestNotificationObserver object provides support for awaiting a notification +to be posted as the result of an asynchronous operation by spinning the run loop. This +enables a straight-forward unit testing workflow by blocking execution of the test until +a notification is posted.

+
+ + + + + +
+ +

Tasks

+ + + + + + + +
+ + + + + +
+ +

Properties

+ +
+ +

name

+ + + +
+

The name of the notification the receiver is awaiting.

+
+ + + +
@property (nonatomic, copy) NSString *name
+ + + + + + + + + +
+

Discussion

+

The name of the notification the receiver is awaiting.

+
+ + + + + + + +
+

Declared In

+ RKTestNotificationObserver.h
+
+ + +
+ +
+ +

object

+ + + +
+

The object expected to post the notification the receiver is awaiting.

+
+ + + +
@property (nonatomic, weak) id object
+ + + + + + + + + +
+

Discussion

+

The object expected to post the notification the receiver is awaiting.

+ +

Can be nil.

+
+ + + + + + + +
+

Declared In

+ RKTestNotificationObserver.h
+
+ + +
+ +
+ +

timeout

+ + + +
+

The timeout interval, in seconds, to wait for the notification to be posted.

+
+ + + +
@property (nonatomic, assign) NSTimeInterval timeout
+ + + + + + + + + +
+

Discussion

+

The timeout interval, in seconds, to wait for the notification to be posted.

+ +

Default: 3 seconds

+
+ + + + + + + +
+

Declared In

+ RKTestNotificationObserver.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

notificationObserver

+ + + +
+

Creates and initializes a notification obsercer object.

+
+ + + +
+ (RKTestNotificationObserver *)notificationObserver
+ + + + + +
+

Return Value

+

The newly created notification observer.

+
+ + + + + +
+

Discussion

+

Creates and initializes a notification obsercer object.

+
+ + + + + + + +
+

Declared In

+ RKTestNotificationObserver.h
+
+ + +
+ +
+ +

notificationObserverForName:

+ + + +
+

Instantiate a notification observer for the given notification name

+
+ + + +
+ (RKTestNotificationObserver *)notificationObserverForName:(NSString *)notificationName
+ + + +
+

Parameters

+ +
+
notificationName
+

The name of the NSNotification we want to watch for

+
+ +
+ + + + + + + +
+

Discussion

+

Instantiate a notification observer for the given notification name

+
+ + + + + + + +
+

Declared In

+ RKTestNotificationObserver.h
+
+ + +
+ +
+ +

notificationObserverForName:object:

+ + + +
+

Instantiate a notification observer for the given notification name and object

+
+ + + +
+ (RKTestNotificationObserver *)notificationObserverForName:(NSString *)notificationName object:(id)notificationSender
+ + + +
+

Parameters

+ +
+
notificationName
+

The name of the NSNotification we want to watch for

+
+ +
+
notificationSender
+

The source object of the NSNotification we want to watch for

+
+ +
+ + + +
+

Return Value

+

The newly created notification observer initialized with notificationName and notificationSender.

+
+ + + + + +
+

Discussion

+

Instantiate a notification observer for the given notification name and object

+
+ + + + + + + +
+

Declared In

+ RKTestNotificationObserver.h
+
+ + +
+ +
+ +

waitForNotificationWithName:object:usingBlock:

+ + + +
+

Configures a notification observer to wait for the a notification with the given name to be posted +by the source object during execution of the block.

+
+ + + +
+ (void)waitForNotificationWithName:(NSString *)name object:(id)notificationSender usingBlock:(void ( ^ ) ( ))block
+ + + +
+

Parameters

+ +
+
name
+

The name of the notification we are waiting for

+
+ +
+
notificationSender
+

The object we are waiting to post the notification

+
+ +
+
block
+

A block to invoke to trigger the notification activity

+
+ +
+ + + + + + + +
+

Discussion

+

Configures a notification observer to wait for the a notification with the given name to be posted +by the source object during execution of the block.

+
+ + + + + + + +
+

Declared In

+ RKTestNotificationObserver.h
+
+ + +
+ +
+ +

waitForNotificationWithName:usingBlock:

+ + + +
+

Configures a notification observer to wait for the a notification with the given name to be posted +during execution of the block.

+
+ + + +
+ (void)waitForNotificationWithName:(NSString *)name usingBlock:(void ( ^ ) ( ))block
+ + + +
+

Parameters

+ +
+
name
+

The name of the notification we are waiting for

+
+ +
+
block
+

A block to invoke to trigger the notification activity

+
+ +
+ + + + + + + +
+

Discussion

+

Configures a notification observer to wait for the a notification with the given name to be posted +during execution of the block.

+
+ + + + + + + +
+

Declared In

+ RKTestNotificationObserver.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

addObserver

+ + + +
+

Adds the receiver as an observer for the notification name and object under test.

+
+ + + +
- (void)addObserver
+ + + + + + + + + +
+

Discussion

+

Adds the receiver as an observer for the notification name and object under test.

+ +

If the observer has not already been added when waitForNotification +is invoked, it will be added before the runloop cycling begins.

+
+ + + + + + + +
+

Declared In

+ RKTestNotificationObserver.h
+
+ + +
+ +
+ +

waitForNotification

+ + + +
+

Wait for a notification matching the name and source object we are observing to be posted.

+
+ + + +
- (void)waitForNotification
+ + + + + + + + + +
+

Discussion

+

Wait for a notification matching the name and source object we are observing to be posted.

+ +

This method will block by spinning the runloop waiting for an appropriate notification matching +our observed name and object to be posted or the timeout configured is exceeded.

+
+ + + + + + + +
+

Declared In

+ RKTestNotificationObserver.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKURLEncodedSerialization.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKURLEncodedSerialization.html new file mode 100644 index 00000000..d8026730 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RKURLEncodedSerialization.html @@ -0,0 +1,228 @@ + + + + + RKURLEncodedSerialization Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + + + + +
Inherits fromNSObject
Conforms toRKSerialization
Declared inRKURLEncodedSerialization.h
+ + + + +
+ +

Overview

+

The RKURLEncodedSerialization class conforms to the RKSerialization protocol and provides support for the serialization and deserialization of URL encoded data. URL encoding is used to replace certain characters in a string with equivalent percent escape sequences. The list of characters replaced by the implementation are designed as illegal URL characters by RFC 3986. URL encoded data is used for the submission of HTML forms with the MIME Type application/x-www-form-urlencoded.

+
+ + + + + + + + + + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RK_FIX_CATEGORY_BUG.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RK_FIX_CATEGORY_BUG.html new file mode 100644 index 00000000..10494d26 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Classes/RK_FIX_CATEGORY_BUG.html @@ -0,0 +1,210 @@ + + + + + RK_FIX_CATEGORY_BUG Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + +
Declared inRKMacros.h
+ + + + + + + + + + + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Protocols/RKManagedObjectCaching.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Protocols/RKManagedObjectCaching.html new file mode 100644 index 00000000..877d00e7 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Protocols/RKManagedObjectCaching.html @@ -0,0 +1,621 @@ + + + + + RKManagedObjectCaching Protocol Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Conforms toNSObject
Declared inRKManagedObjectCaching.h
+ + + + +
+ +

Overview

+

Objects implementing the RKManagedObjectCaching protocol can act as the cache +strategy for RestKit managed object stores. The managed object cache is consulted +when objects are retrieved from Core Data during object mapping operations and provide +an opportunity to accelerate the mapping process by trading memory for speed.

+
+ + + + + +
+ +

Tasks

+ + + + +

Finding Managed Objects

+ + +
+ + + + + + + + + +
+ +

Instance Methods

+ +
+ +

didCreateObject:

+ + + +
+

Invoked to inform the receiver that an object was created and should be added to the cache.

+
+ + + +
- (void)didCreateObject:(NSManagedObject *)object
+ + + +
+

Parameters

+ +
+
object
+

The object that was created in a managed object context.

+
+ +
+ + + + + + + +
+

Discussion

+

Invoked to inform the receiver that an object was created and should be added to the cache.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectCaching.h
+
+ + +
+ +
+ +

didDeleteObject:

+ + + +
+

Invoked to inform the receiver that an object was deleted and should be removed to the cache.

+
+ + + +
- (void)didDeleteObject:(NSManagedObject *)object
+ + + +
+

Parameters

+ +
+
object
+

The object that was deleted from a managed object context.

+
+ +
+ + + + + + + +
+

Discussion

+

Invoked to inform the receiver that an object was deleted and should be removed to the cache.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectCaching.h
+
+ + +
+ +
+ +

didFetchObject:

+ + + +
+

Invoked to inform the receiver that an object was fetched and should be added to the cache.

+
+ + + +
- (void)didFetchObject:(NSManagedObject *)object
+ + + +
+

Parameters

+ +
+
object
+

The object that was fetched from a managed object context.

+
+ +
+ + + + + + + +
+

Discussion

+

Invoked to inform the receiver that an object was fetched and should be added to the cache.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectCaching.h
+
+ + +
+ +
+ +

findInstanceOfEntity:withPrimaryKeyAttribute:value:inManagedObjectContext:

+ + + +
+

Retrieves a model object from the object store given a Core Data entity and +the primary key attribute and value for the desired object.

+
+ + + +
- (NSManagedObject *)findInstanceOfEntity:(NSEntityDescription *)entity withPrimaryKeyAttribute:(NSString *)primaryKeyAttribute value:(id)primaryKeyValue inManagedObjectContext:(NSManagedObjectContext *)managedObjectContext
+ + + +
+

Parameters

+ +
+
entity
+

The Core Data entity for the type of object to be retrieved from the cache.

+
+ +
+
primaryKeyAttribute
+

The name of the attribute that acts as the primary key for the entity.

+
+ +
+
primaryKeyValue
+

The value for the primary key attribute of the object to be retrieved from the cache.

+
+ +
+
managedObjectContext
+

The managed object context to be searched for a matching instance.

+
+ +
+ + + +
+

Return Value

+

A managed object that is an instance of the given entity with a primary key and value matching +the specified parameters, or nil if no object was found.

+
+ + + + + +
+

Discussion

+

Retrieves a model object from the object store given a Core Data entity and +the primary key attribute and value for the desired object.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectCaching.h
+
+ + +
+ +
+ +

findInstancesOfEntity:withPrimaryKeyAttribute:value:inManagedObjectContext:

+ + + +
+

Retrieves an array of model objects from the object store given a Core Data entity and +the primary key attribute and value for the desired object.

+
+ + + +
- (NSArray *)findInstancesOfEntity:(NSEntityDescription *)entity withPrimaryKeyAttribute:(NSString *)primaryKeyAttribute value:(id)primaryKeyValue inManagedObjectContext:(NSManagedObjectContext *)managedObjectContext
+ + + +
+

Parameters

+ +
+
entity
+

The Core Data entity for the type of object to be retrieved from the cache.

+
+ +
+
primaryKeyAttribute
+

The name of the attribute that acts as the primary key for the entity.

+
+ +
+
primaryKeyValue
+

The value for the primary key attribute of the object to be retrieved from the cache.

+
+ +
+
managedObjectContext
+

The managed object context to be searched for a matching instance.

+
+ +
+ + + +
+

Return Value

+

An array of managed objects that are instances of the given entity with a primary key and value matching +the specified parameters, or nil if no object was found.

+
+ + + + + +
+

Discussion

+

Retrieves an array of model objects from the object store given a Core Data entity and +the primary key attribute and value for the desired object.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectCaching.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Protocols/RKMapperOperationDelegate.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Protocols/RKMapperOperationDelegate.html new file mode 100644 index 00000000..c6a669b0 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Protocols/RKMapperOperationDelegate.html @@ -0,0 +1,826 @@ + + + + + RKMapperOperationDelegate Protocol Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Conforms toNSObject
Declared inRKMapperOperation.h
+ + + + +
+ +

Overview

+

Objects wishing to act as the delegate for RKMapperOperation objects must adopt the RKMapperOperationDelegate protocol. The protocol provides a rich set of optional callback methods that provides insight into the lifecycle of a mapper operation.

+
+ + + + + +
+ +

Tasks

+ + + +

Tracking Mapper Status

+ + + + + +

Key Path Search Messages

+ + + + + +

Tracking Child Mapping Operation Status

+ + + +
+ + + + + + + + + +
+ +

Instance Methods

+ +
+ +

mapper:didFailMappingOperation:forKeyPath:withError:

+ + + +
+

Tells the delegate that a mapping operation that was started by the mapper has failed with an error.

+
+ + + +
- (void)mapper:(RKMapperOperation *)mapper didFailMappingOperation:(RKMappingOperation *)mappingOperation forKeyPath:(NSString *)keyPath withError:(NSError *)error
+ + + +
+

Parameters

+ +
+
mapper
+

The mapper operation performing the mapping.

+
+ +
+
mappingOperation
+

The mapping operation that has failed.

+
+ +
+
keyPath
+

The key path that was mapped. A nil key path indicates that the mapping matched the entire sourceObject.

+
+ +
+
error
+

The error that occurred during the execution of the mapping operation.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that a mapping operation that was started by the mapper has failed with an error.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mapper:didFindRepresentationOrArrayOfRepresentations:atKeyPath:

+ + + +
+

Tells the delegate that the mapper has found one or more mappable object representations at a key path specified in the mappingsDictionary.

+
+ + + +
- (void)mapper:(RKMapperOperation *)mapper didFindRepresentationOrArrayOfRepresentations:(id)dictionaryOrArrayOfDictionaries atKeyPath:(NSString *)keyPath
+ + + +
+

Parameters

+ +
+
mapper
+

The mapper operation performing the mapping.

+
+ +
+
dictionaryOrArrayOfDictionaries
+

The NSDictictionary or NSArray of NSDictionary object representations that was found at the keyPath.

+
+ +
+
keyPath
+

The key path that the representation was read from in the sourceObject. If the keyPath was [NSNull null] in the mappingsDictionary, it will be given as nil to the delegate.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapper has found one or more mappable object representations at a key path specified in the mappingsDictionary.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mapper:didFinishMappingOperation:forKeyPath:

+ + + +
+

Tells the delegate that a mapping operation that was started by the mapper has finished executing.

+
+ + + +
- (void)mapper:(RKMapperOperation *)mapper didFinishMappingOperation:(RKMappingOperation *)mappingOperation forKeyPath:(NSString *)keyPath
+ + + +
+

Parameters

+ +
+
mapper
+

The mapper operation performing the mapping.

+
+ +
+
mappingOperation
+

The mapping operation that has finished.

+
+ +
+
keyPath
+

The key path that was mapped. A nil key path indicates that the mapping matched the entire sourceObject.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that a mapping operation that was started by the mapper has finished executing.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mapper:didNotFindRepresentationOrArrayOfRepresentationsAtKeyPath:

+ + + +
+

Tells the delegate that the mapper failed to find any mappable object representations at a key path specified in the mappingsDictionary.

+
+ + + +
- (void)mapper:(RKMapperOperation *)mapper didNotFindRepresentationOrArrayOfRepresentationsAtKeyPath:(NSString *)keyPath
+ + + +
+

Parameters

+ +
+
mapper
+

The mapper operation performing the mapping.

+
+ +
+
keyPath
+

The key path that was searched for a mappable object representation.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapper failed to find any mappable object representations at a key path specified in the mappingsDictionary.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mapper:willStartMappingOperation:forKeyPath:

+ + + +
+

Tells the delegate that the mapper is about to start a mapping operation to map a representation found in the sourceObject.

+
+ + + +
- (void)mapper:(RKMapperOperation *)mapper willStartMappingOperation:(RKMappingOperation *)mappingOperation forKeyPath:(NSString *)keyPath
+ + + +
+

Parameters

+ +
+
mapper
+

The mapper operation performing the mapping.

+
+ +
+
mappingOperation
+

The mapping operation that is about to be started.

+
+ +
+
keyPath
+

The key path that was mapped. A nil key path indicates that the mapping matched the entire sourceObject.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapper is about to start a mapping operation to map a representation found in the sourceObject.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mapperDidCancelMapping:

+ + + +
+

Tells the delegate that the mapper has been cancelled.

+
+ + + +
- (void)mapperDidCancelMapping:(RKMapperOperation *)mapper
+ + + +
+

Parameters

+ +
+
mapper
+

The mapper operation that was cancelled.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapper has been cancelled.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mapperDidFinishMapping:

+ + + +
+

Tells the delegate that the mapper has finished.

+
+ + + +
- (void)mapperDidFinishMapping:(RKMapperOperation *)mapper
+ + + +
+

Parameters

+ +
+
mapper
+

The mapper operation that has finished mapping.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapper has finished.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mapperWillStartMapping:

+ + + +
+

Tells the delegate that the mapper operation is about to start mapping.

+
+ + + +
- (void)mapperWillStartMapping:(RKMapperOperation *)mapper
+ + + +
+

Parameters

+ +
+
mapper
+

The mapper operation that is about to start mapping.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapper operation is about to start mapping.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Protocols/RKMappingOperationDataSource.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Protocols/RKMappingOperationDataSource.html new file mode 100644 index 00000000..36b4f4bc --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Protocols/RKMappingOperationDataSource.html @@ -0,0 +1,411 @@ + + + + + RKMappingOperationDataSource Protocol Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Conforms toNSObject
Declared inRKMappingOperationDataSource.h
+ + + + +
+ +

Overview

+

An object that adopts the RKMappingOperationDataSource protocol is responsible for the retrieval or creation of target objects within an RKMapperOperation or RKMappingOperation. A data source is responsible for meeting the requirements of the underlying data store implementation and must return a key-value coding compliant object instance that can be used as the target object of a mapping operation. It is also responsible for commiting any changes necessary to the underlying data store once a mapping operation has completed its work.

+ +

At a minimum, a data source must implement the mappingOperation:targetObjectForRepresentation:withMapping: method. This method is responsible for finding an existing object instance to be updated or creating a new object if no existing object could be found or the underlying data store does not support persistence. Object mapping operations which target NSObject derived classes will always result in mapping to new transient objects, while persistent data stores such as Core Data can be queried to retrieve existing objects for update.

+
+ + + + + +
+ +

Tasks

+ + + + + + + +
+ + + + + + + + + +
+ +

Instance Methods

+ +
+ +

commitChangesForMappingOperation:error:

+ + + +
+

Tells the data source to commit any changes to the underlying data store.

+
+ + + +
- (BOOL)commitChangesForMappingOperation:(RKMappingOperation *)mappingOperation error:(NSError **)error
+ + + +
+

Parameters

+ +
+
mappingOperation
+

The mapping operation that has completed its work.

+
+ +
+
error
+

A pointer to an error to be set in the event that the mapping operation could not be committed.

+
+ +
+ + + +
+

Return Value

+

A Boolean value indicating if the changes for the mapping operation were committed successfully.

+
+ + + + + +
+

Discussion

+

Tells the data source to commit any changes to the underlying data store.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperationDataSource.h
+
+ + +
+ +
+ +

mappingOperation:targetObjectForRepresentation:withMapping:

+ + + +
+

Asks the data source for the target object for an object mapping operation given an NSDictionary representation of the object’s properties and the mapping object that will be used to perform the mapping.

+
+ + + +
- (id)mappingOperation:(RKMappingOperation *)mappingOperation targetObjectForRepresentation:(NSDictionary *)representation withMapping:(RKObjectMapping *)mapping
+ + + +
+

Parameters

+ +
+
mappingOperation
+

The mapping operation requesting the target object.

+
+ +
+
representation
+

A dictionary representation of the properties to be mapped onto the retrieved target object.

+
+ +
+
mapping
+

The object mapping to be used to perform a mapping from the representation to the target object.

+
+ +
+ + + +
+

Return Value

+

A key-value coding compliant object to perform the mapping on to.

+
+ + + + + +
+

Discussion

+

Asks the data source for the target object for an object mapping operation given an NSDictionary representation of the object’s properties and the mapping object that will be used to perform the mapping.

+ +

The representation value is a fragment of content from a deserialized response that has been identified as containing content that is mappable using the given mapping.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperationDataSource.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Protocols/RKMappingOperationDelegate.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Protocols/RKMappingOperationDelegate.html new file mode 100644 index 00000000..c1d2fbb4 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Protocols/RKMappingOperationDelegate.html @@ -0,0 +1,776 @@ + + + + + RKMappingOperationDelegate Protocol Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Conforms toNSObject
Declared inRKMappingOperation.h
+ + + + +
+ +

Overview

+

Objects acting as the delegate for RKMappingOperation objects must adopt the RKMappingOperationDelegate protocol. These methods enable the delegate to be notified of events such as the application of attribute and relationship mappings during a mapping operation.

+
+ + + + + +
+ +

Tasks

+ + + + + + + +
+ + + + + + + + + +
+ +

Instance Methods

+ +
+ +

mappingOperation:didConnectRelationship:usingMapping:

+ + + +
+

Tells the delegate that the mapping operation has connected a relationship.

+
+ + + +
- (void)mappingOperation:(RKMappingOperation *)operation didConnectRelationship:(NSRelationshipDescription *)relationship usingMapping:(RKConnectionMapping *)connectionMapping
+ + + +
+

Parameters

+ +
+
operation
+

The mapping operation.

+
+ +
+
relationship
+

The relationship that was connected.

+
+ +
+
connectionMapping
+

The mappings that was used to connect the relationship.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapping operation has connected a relationship.

+ +

Only sent when mapping an RKEntityMapping object that contains connection mappings.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

mappingOperation:didFailWithError:

+ + + +
+

Tells the delegate that the mapping operation has failed due to an error.

+
+ + + +
- (void)mappingOperation:(RKMappingOperation *)operation didFailWithError:(NSError *)error
+ + + +
+

Parameters

+ +
+
operation
+

The object mapping operation that has failed.

+
+ +
+
error
+

An error object indicating the reason for the failure.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapping operation has failed due to an error.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

mappingOperation:didFindValue:forKeyPath:mapping:

+ + + +
+

Tells the delegate that an attribute or relationship mapping was found for a given key path within the data being mapped.

+
+ + + +
- (void)mappingOperation:(RKMappingOperation *)operation didFindValue:(id)value forKeyPath:(NSString *)keyPath mapping:(RKPropertyMapping *)propertyMapping
+ + + +
+

Parameters

+ +
+
operation
+

The object mapping operation being performed.

+
+ +
+
value
+

The value that was found at the given key path in the source object representation.

+
+ +
+
keyPath
+

The key path in the source object for which the mapping is to be applied.

+
+ +
+
propertyMapping
+

The RKAttributeMapping or RKRelationshipMapping for which the mappable value was found within the source object representation.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that an attribute or relationship mapping was found for a given key path within the data being mapped.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

mappingOperation:didNotFindValueForKeyPath:mapping:

+ + + +
+

Tells the delegate that no attribute or relationships mapping was found for a given key path within the data being mapped.

+
+ + + +
- (void)mappingOperation:(RKMappingOperation *)operation didNotFindValueForKeyPath:(NSString *)keyPath mapping:(RKPropertyMapping *)propertyMapping
+ + + +
+

Parameters

+ +
+
operation
+

The object mapping operation being performed.

+
+ +
+
keyPath
+

The key path in the source object for which no mappable value was found.

+
+ +
+
propertyMapping
+

The RKAttributeMapping or RKRelationshipMapping for which no mappable value could be found within the source object representation.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that no attribute or relationships mapping was found for a given key path within the data being mapped.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

mappingOperation:didNotSetUnchangedValue:forKeyPath:usingMapping:

+ + + +
+

Tells the delegate that the mapping operation has declined to set a value for a given key path because the value has not changed.

+
+ + + +
- (void)mappingOperation:(RKMappingOperation *)operation didNotSetUnchangedValue:(id)value forKeyPath:(NSString *)keyPath usingMapping:(RKPropertyMapping *)propertyMapping
+ + + +
+

Parameters

+ +
+
operation
+

The object mapping operation being performed.

+
+ +
+
value
+

A unchanged value for the key path in the destination object.

+
+ +
+
keyPath
+

The key path in the destination object for which a unchanged value was not set.

+
+ +
+
propertyMapping
+

The RKAttributeMapping or RKRelationshipMapping found for the key path.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapping operation has declined to set a value for a given key path because the value has not changed.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

mappingOperation:didSelectObjectMapping:forDynamicMapping:

+ + + +
+

Tells the delegate that the mapping operation has selected a concrete object mapping with which to map the source object.

+
+ + + +
- (void)mappingOperation:(RKMappingOperation *)operation didSelectObjectMapping:(RKObjectMapping *)objectMapping forDynamicMapping:(RKDynamicMapping *)dynamicMapping
+ + + +
+

Parameters

+ +
+
operation
+

The mapping operation.

+
+ +
+
objectMapping
+

The concrete object mapping with which to perform the mapping.

+
+ +
+
dynamicMapping
+

The dynamic source mapping from which the object mapping was determined.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapping operation has selected a concrete object mapping with which to map the source object.

+ +

Only sent if the receiver was initialized with an instance of RKDynamicMapping as the mapping.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

mappingOperation:didSetValue:forKeyPath:usingMapping:

+ + + +
+

Tells the delegate that the mapping operation has set a value for a given key path with an attribute or relationship mapping.

+
+ + + +
- (void)mappingOperation:(RKMappingOperation *)operation didSetValue:(id)value forKeyPath:(NSString *)keyPath usingMapping:(RKPropertyMapping *)propertyMapping
+ + + +
+

Parameters

+ +
+
operation
+

The object mapping operation being performed.

+
+ +
+
value
+

A new value that was set on the destination object.

+
+ +
+
keyPath
+

The key path in the destination object for which a new value has been set.

+
+ +
+
propertyMapping
+

The RKAttributeMapping or RKRelationshipMapping found for the key path.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapping operation has set a value for a given key path with an attribute or relationship mapping.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Protocols/RKSerialization.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Protocols/RKSerialization.html new file mode 100644 index 00000000..44bc1547 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Protocols/RKSerialization.html @@ -0,0 +1,419 @@ + + + + + RKSerialization Protocol Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Conforms toNSObject
Declared inRKSerialization.h
+ + + + +
+ +

Overview

+

The RKSerialization protocol declares two methods that a class must implement so that it can provide support for serializing objects to and deserializing objects from UTF-8 encoded data representations of a serialization format such as JSON or XML. Serialization implementations typically handle data in a given MIME Type (i.e. application/json) and may be registered with the RKMIMETypeSerialization class.

+
+ + + + + +
+ +

Tasks

+ + + +

Deserializing an Object

+ +
    +
  • + + + objectFromData:error: +

    Deserializes and returns the given data in the format supported by the receiver (i.e. JSON, XML, etc) as a Foundation object representation.

    +
    + + required method +
  • +
+ + + +

Serializing an Object

+ +
    +
  • + + + dataFromObject:error: +

    Serializes and returns a UTF-8 encoded data representation of the given Foundation object in the format supported by the receiver (i.e. JSON, XML, etc).

    +
    + + required method +
  • +
+ +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

dataFromObject:error:

+ + + +
+

Serializes and returns a UTF-8 encoded data representation of the given Foundation object in the format supported by the receiver (i.e. JSON, XML, etc).

+
+ + + +
+ (NSData *)dataFromObject:(id)object error:(NSError **)error
+ + + +
+

Parameters

+ +
+
object
+

The object to be serialized.

+
+ +
+
error
+

A pointer to an NSError object.

+
+ +
+
A
+

pointer to an NSError object.

+
+ +
+ + + +
+

Return Value

+

A data representation of the given object in UTF-8 encoding, or nil if an error occurred.

+
+ + + + + +
+

Discussion

+

Serializes and returns a UTF-8 encoded data representation of the given Foundation object in the format supported by the receiver (i.e. JSON, XML, etc).

+
+ + + + + + + +
+

Declared In

+ RKSerialization.h
+
+ + +
+ +
+ +

objectFromData:error:

+ + + +
+

Deserializes and returns the given data in the format supported by the receiver (i.e. JSON, XML, etc) as a Foundation object representation.

+
+ + + +
+ (id)objectFromData:(NSData *)data error:(NSError **)error
+ + + +
+

Parameters

+ +
+
data
+

The UTF-8 encoded data representation of the object to be deserialized.

+
+ +
+
error
+

A pointer to an NSError object.

+
+ +
+ + + +
+

Return Value

+

A Foundation object from the serialized data in data, or nil if an error occurs.

+
+ + + + + +
+

Discussion

+

Deserializes and returns the given data in the format supported by the receiver (i.e. JSON, XML, etc) as a Foundation object representation.

+
+ + + + + + + +
+

Declared In

+ RKSerialization.h
+
+ + +
+ +
+ + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Protocols/RKTestFactoryCallbacks.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Protocols/RKTestFactoryCallbacks.html new file mode 100644 index 00000000..4fcd3939 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/Protocols/RKTestFactoryCallbacks.html @@ -0,0 +1,422 @@ + + + + + RKTestFactoryCallbacks Protocol Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Conforms toNSObject
Declared inRKTestFactory.h
+ + + + +
+ +

Overview

+

Defines optional callback methods for extending the functionality of the factory. Implementation can be provided via a category.

+
+ + + + + +
+ +

Tasks

+ + + + +

Customizing the Factory

+
    +
  • + + + didInitialize +

    Application specific initialization point for the factory.

    +
    + + +
  • + + + didSetUp +

    Application specific customization point for the factory.

    +
    + + +
  • + + + didTearDown +

    Application specific customization point for the factory.

    +
    + + +
  • +
+ +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

didInitialize

+ + + +
+

Application specific initialization point for the factory.

+
+ + + +
+ (void)didInitialize
+ + + + + + + + + +
+

Discussion

+

Application specific initialization point for the factory.

+ +

Called once per unit testing run when the factory singleton instance is initialized. RestKit applications may override via a category.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

didSetUp

+ + + +
+

Application specific customization point for the factory.

+
+ + + +
+ (void)didSetUp
+ + + + + + + + + +
+

Discussion

+

Application specific customization point for the factory.

+ +

Invoked each time the factory is asked to set up the environment. RestKit applications leveraging the factory may override via a category.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

didTearDown

+ + + +
+

Application specific customization point for the factory.

+
+ + + +
+ (void)didTearDown
+ + + + + + + + + +
+

Discussion

+

Application specific customization point for the factory.

+ +

Invoked each time the factory is tearing down the environment. RestKit applications leveraging the factory may override via a category.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/css/styles.css b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/css/styles.css new file mode 100755 index 00000000..bf946c02 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/css/styles.css @@ -0,0 +1,584 @@ +body { + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + font-size: 13px; +} + +code { + font-family: Courier, Consolas, monospace; + font-size: 13px; + color: #666; +} + +pre { + font-family: Courier, Consolas, monospace; + font-size: 13px; + line-height: 18px; + tab-interval: 0.5em; + border: 1px solid #C7CFD5; + background-color: #F1F5F9; + color: #666; + padding: 0.3em 1em; +} + +ul { + list-style-type: square; +} + +li { + margin-bottom: 10px; +} + +a, a code { + text-decoration: none; + color: #36C; +} + +a:hover, a:hover code { + text-decoration: underline; + color: #36C; +} + +h2 { + border-bottom: 1px solid #8391A8; + color: #3C4C6C; + font-size: 187%; + font-weight: normal; + margin-top: 1.75em; + padding-bottom: 2px; +} + +table { + margin-bottom: 4em; + border-collapse:collapse; + vertical-align: middle; +} + +td { + border: 1px solid #9BB3CD; + padding: .667em; + font-size: 100%; +} + +th { + border: 1px solid #9BB3CD; + padding: .3em .667em .3em .667em; + background: #93A5BB; + font-size: 103%; + font-weight: bold; + color: white; + text-align: left; +} + +/* @group Common page elements */ + +#top_header { + height: 91px; + left: 0; + min-width: 598px; + position: absolute; + right: 0; + top: 0; + z-index: 900; +} + +#footer { + clear: both; + padding-top: 20px; + text-align: center; +} + +#contents, #overview_contents { + -webkit-overflow-scrolling: touch; + border-top: 1px solid #2B334F; + position: absolute; + top: 91px; + left: 0; + right: 0; + bottom: 0; + overflow-x: hidden; + overflow-y: auto; + padding-left: 2em; + padding-right: 2em; + padding-top: 1em; + min-width: 550px; +} + +#contents.isShowingTOC { + left: 230px; + min-width: 320px; +} + +.copyright { + font-size: 12px; +} + +.generator { + font-size: 11px; +} + +.main-navigation ul li { + display: inline; + margin-left: 15px; + list-style: none; +} + +.navigation-top { + clear: both; + float: right; +} + +.navigation-bottom { + clear: both; + float: right; + margin-top: 20px; + margin-bottom: -10px; +} + +.open > .disclosure { + background-image: url("../img/disclosure_open.png"); +} + +.disclosure { + background: url("../img/disclosure.png") no-repeat scroll 0 0; +} + +.disclosure, .nodisclosure { + display: inline-block; + height: 8px; + margin-right: 5px; + position: relative; + width: 9px; +} + +/* @end */ + +/* @group Header */ + +#top_header #library { + background: url("../img/library_background.png") repeat-x 0 0 #485E78; + background-color: #ccc; + height: 35px; + font-size: 115%; +} + +#top_header #library #libraryTitle { + color: #FFFFFF; + margin-left: 15px; + text-shadow: 0 -1px 0 #485E78; + top: 8px; + position: absolute; +} + +#top_header #library #developerHome { + color: #92979E; + right: 15px; + top: 8px; + position: absolute; +} + +#top_header #library a:hover { + text-decoration: none; +} + +#top_header #title { + background: url("../img/title_background.png") repeat-x 0 0 #8A98A9; + border-bottom: 1px solid #B6B6B6; + height: 25px; + overflow: hidden; +} + +#top_header h1 { + font-size: 115%; + font-weight: normal; + margin: 0; + padding: 3px 0 2px; + text-align: center; + text-shadow: 0 1px 0 #D5D5D5; + white-space: nowrap; +} + +#headerButtons { + background-color: #D8D8D8; + background-image: url("../img/button_bar_background.png"); + border-bottom: 1px solid #EDEDED; + border-top: 1px solid #2B334F; + font-size: 8pt; + height: 28px; + left: 0; + list-style: none outside none; + margin: 0; + overflow: hidden; + padding: 0; + position: absolute; + right: 0; + top: 61px; +} + +#headerButtons li { + background-repeat: no-repeat; + display: inline; + margin-top: 0; + margin-bottom: 0; + padding: 0; +} + +#toc_button button { + border-color: #ACACAC; + border-style: none solid none none; + border-width: 0 1px 0 0; + height: 28px; + margin: 0; + padding-left: 30px; + text-align: left; + width: 230px; +} + +li#jumpto_button { + left: 230px; + margin-left: 0; + position: absolute; +} + +li#jumpto_button select { + height: 22px; + margin: 5px 2px 0 10px; + max-width: 300px; +} + +/* @end */ + +/* @group Table of contents */ + +#tocContainer.isShowingTOC { + border-right: 1px solid #ACACAC; + display: block; + overflow-x: hidden; + overflow-y: auto; + padding: 0; +} + +#tocContainer { + background-color: #E4EBF7; + border-top: 1px solid #2B334F; + bottom: 0; + display: none; + left: 0; + overflow: hidden; + position: absolute; + top: 91px; + width: 229px; +} + +#tocContainer > ul#toc { + font-size: 11px; + margin: 0; + padding: 12px 0 18px; + width: 209px; + -moz-user-select: none; + -webkit-user-select: none; + user-select: none; +} + +#tocContainer > ul#toc > li { + margin: 0; + padding: 0 0 7px 30px; + text-indent: -15px; +} + +#tocContainer > ul#toc > li > .sectionName a { + color: #000000; + font-weight: bold; +} + +#tocContainer > ul#toc > li > .sectionName a:hover { + text-decoration: none; +} + +#tocContainer > ul#toc li.children > ul { + display: none; + height: 0; +} + +#tocContainer > ul#toc > li > ul { + margin: 0; + padding: 0; +} + +#tocContainer > ul#toc > li > ul, ul#toc > li > ul > li { + margin-left: 0; + margin-bottom: 0; + padding-left: 15px; +} + +#tocContainer > ul#toc > li ul { + list-style: none; + margin-right: 0; + padding-right: 0; +} + +#tocContainer > ul#toc li.children.open > ul { + display: block; + height: auto; + margin-left: -15px; + padding-left: 0; +} + +#tocContainer > ul#toc > li > ul, ul#toc > li > ul > li { + margin-left: 0; + padding-left: 15px; +} + +#tocContainer li ul li { + margin-top: 0.583em; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +#tocContainer li ul li span.sectionName { + white-space: normal; +} + +#tocContainer > ul#toc > li > ul > li > .sectionName a { + font-weight: bold; +} + +#tocContainer > ul#toc > li > ul a { + color: #4F4F4F; +} + +/* @end */ + +/* @group Index formatting */ + +.index-title { + font-size: 13px; + font-weight: normal; +} + +.index-column { + float: left; + width: 30%; + min-width: 200px; + font-size: 11px; +} + +.index-column ul { + margin: 8px 0 0 0; + padding: 0; + list-style: none; +} + +.index-column ul li { + margin: 0 0 3px 0; + padding: 0; +} + +.hierarchy-column { + min-width: 400px; +} + +.hierarchy-column ul { + margin: 3px 0 0 15px; +} + +.hierarchy-column ul li { + list-style-type: square; +} + +/* @end */ + +/* @group Common formatting elements */ + +.title { + font-weight: normal; + font-size: 215%; + margin-top:0; +} + +.subtitle { + font-weight: normal; + font-size: 180%; + color: #3C4C6C; + border-bottom: 1px solid #5088C5; +} + +.subsubtitle { + font-weight: normal; + font-size: 145%; + height: 0.7em; +} + +.note { + border: 1px solid #5088C5; + background-color: white; + margin: 1.667em 0 1.75em 0; + padding: 0 .667em .083em .750em; +} + +.warning { + border: 1px solid #5088C5; + background-color: #F0F3F7; + margin-bottom: 0.5em; + padding: 0.3em 0.8em; +} + +.bug { + border: 1px solid #000; + background-color: #ffffcc; + margin-bottom: 0.5em; + padding: 0.3em 0.8em; +} + +.deprecated { + color: #F60425; +} + +/* @end */ + +/* @group Common layout */ + +.section { + margin-top: 3em; +} + +/* @end */ + +/* @group Object specification section */ + +.section-specification { + margin-left: 2.5em; + margin-right: 2.5em; + font-size: 12px; +} + +.section-specification table { + margin-bottom: 0em; + border-top: 1px solid #d6e0e5; +} + +.section-specification td { + vertical-align: top; + border-bottom: 1px solid #d6e0e5; + border-left-width: 0px; + border-right-width: 0px; + border-top-width: 0px; + padding: .6em; +} + +.section-specification .specification-title { + font-weight: bold; +} + +/* @end */ + +/* @group Tasks section */ + +.task-list { + list-style-type: none; + padding-left: 0px; +} + +.task-list li { + margin-bottom: 3px; +} + +.task-item-suffix { + color: #996; + font-size: 12px; + font-style: italic; + margin-left: 0.5em; +} + +span.tooltip span.tooltip { + font-size: 1.0em; + display: none; + padding: 0.3em; + border: 1px solid #aaa; + background-color: #fdfec8; + color: #000; + text-align: left; +} + +span.tooltip:hover span.tooltip { + display: block; + position: absolute; + margin-left: 2em; +} + +/* @end */ + +/* @group Method section */ + +.section-method { + margin-top: 2.3em; +} + +.method-title { + margin-bottom: 1.5em; +} + +.method-subtitle { + margin-top: 0.7em; + margin-bottom: 0.2em; +} + +.method-subsection p { + margin-top: 0.4em; + margin-bottom: 0.8em; +} + +.method-declaration { + margin-top:1.182em; + margin-bottom:.909em; +} + +.method-declaration code { + font:14px Courier, Consolas, monospace; + color:#000; +} + +.declaration { + color: #000; +} + +.argument-def { + margin-top: 0.3em; + margin-bottom: 0.3em; +} + +.argument-def dd { + margin-left: 1.25em; +} + +.see-also-section ul { + list-style-type: none; + padding-left: 0px; + margin-top: 0; +} + +.see-also-section li { + margin-bottom: 3px; +} + +.declared-in-ref { + color: #666; +} + +#tocContainer.hideInXcode { + display: none; + border: 0px solid black; +} + +#top_header.hideInXcode { + display: none; +} + +#contents.hideInXcode { + border: 0px solid black; + top: 0px; + left: 0px; +} + +/* @end */ + diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/css/stylesPrint.css b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/css/stylesPrint.css new file mode 100644 index 00000000..dc54cd2f --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/css/stylesPrint.css @@ -0,0 +1,22 @@ + +header { + display: none; +} + +div.main-navigation, div.navigation-top { + display: none; +} + +div#overview_contents, div#contents.isShowingTOC, div#contents { + overflow: visible; + position: relative; + top: 0px; + border: none; + left: 0; +} +#tocContainer.isShowingTOC { + display: none; +} +nav { + display: none; +} \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/hierarchy.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/hierarchy.html new file mode 100644 index 00000000..97d0952f --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/hierarchy.html @@ -0,0 +1,283 @@ + + + + + RestKit 0.20.0dev Hierarchy + + + + + +
+ + + + +
+
+
+ + +
+ +
+

Class Hierarchy

+ + + +
+ + + + + +
+ + +
+
+ + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/img/button_bar_background.png b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/img/button_bar_background.png new file mode 100644 index 00000000..d2cd0d89 Binary files /dev/null and b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/img/button_bar_background.png differ diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/img/disclosure.png b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/img/disclosure.png new file mode 100644 index 00000000..147198f0 Binary files /dev/null and b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/img/disclosure.png differ diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/img/disclosure_open.png b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/img/disclosure_open.png new file mode 100644 index 00000000..ea3842bd Binary files /dev/null and b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/img/disclosure_open.png differ diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/img/library_background.png b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/img/library_background.png new file mode 100644 index 00000000..8fa6d457 Binary files /dev/null and b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/img/library_background.png differ diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/img/title_background.png b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/img/title_background.png new file mode 100644 index 00000000..9001dac2 Binary files /dev/null and b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/img/title_background.png differ diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/index.html b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/index.html new file mode 100644 index 00000000..bef9b9f2 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Documents/index.html @@ -0,0 +1,847 @@ + + + + + RestKit 0.20.0dev Reference + + + + + +
+ + + + +
+
+
+ + +
+ +
+ + +

RestKit

+ +

RestKit is a modern Objective-C framework for implementing RESTful web services clients on iOS and Mac OS X. It provides a powerful object mapping engine that seamlessly integrates with Core Data and a simple set of networking primitives for mapping HTTP requests and responses built on top of AFNetworking. It has an elegant, carefully designed set of APIs that make accessing and modeling RESTful resources feel almost magical. For example, here’s how to access the Twitter public timeline and turn the JSON contents into an array of Tweet objects:

+ +

``` objective-c +@interface Tweet : NSObject +@property (nonatomic, copy) NSNumber userID; +@property (nonatomic, copy) NSString username; +@property (nonatomic, copy) NSString *text; +@end

+ +

RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[RKTweet class]]; +[mapping addAttributeMappingsFromDictionary:@{

+ +
@"user.name":   @"username",
+@"user.id":     @"userID",
+@"text":        @"text"
+
+ +

}];

+ +

RKResponseDescriptor responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:mapping pathPattern:nil keyPath:nil statusCodes:nil]; +NSURL url = [NSURL URLWithString:@“http://api.twitter.com/1/statuses/public_timeline.json”]; +NSURLRequest request = [NSURLRequest requestWithURL:url]; +RKObjectRequestOperation operation = [[RKObjectRequestOperation alloc] initWithRequest:request responseDescriptors:@[responseDescriptor]]; +[operation setCompletionBlockWithSuccess:^(RKObjectRequestOperation operation, RKMappingResult result) {

+ +
NSLog(@"The public timeline Tweets: %@", [result array]);
+
+ +

} failure:nil]; +[operation start]; +```

+ +

Getting Started

+ + + + +

Overview

+ +

RestKit is designed to be modular and each module strives to maintain a minimal set of dependencies across the framework and with the host platform. At the core of library sits the object mapping engine, which is responsible for transforming objects between representations (such as JSON/XML <–> local domain objects).

+ +

Object Mapping Fundamentals

+ +

The object mapping engine is built on top of the Key-Value Coding (KVC) informal protocol that is foundational to numerous Cocoa technologies such as key-value observing, bindings, and Core Data. Object mappings are expressed as pairs of KVC key paths that specify the source and destination attributes or relationships that are to be transformed.

+ +

RestKit leverages the highly dynamic Objective-C runtime to infer the developers desired intent by examining the type of the source and destination properties and performing appropriate type transformations. For example, given a source key path of created_at that identifies a string within a parsed JSON document and a destination key path of creationDate that identifies an NSDate property on a target object, RestKit will transform the date from a string into an NSDate using an NSDateFormatter. Numerous other transformations are provided out of the box and the engine is pluggable to allow the developer to define new transformations or replace an existing transformation with a new implementation.

+ +

The mapper fully supports both simple attribute as well as relationship mappings in which nested to-one or to-many child objects are mapped recursively. Through relationship mappings, one object mapping can be added to another to compose aggregate mappings that are capable of processing arbitrarily complex source documents.

+ +

Object mapping is a deep topic and is explored in exhaustive detail in the Object Mapping Guide on the wiki.

+ +

API Quickstart

+ +

RestKit is broken into several modules that cleanly separate the mapping engine from the HTTP and Core Data integrations to provide maximum flexibility. Key classes in each module are highlighted below and each module is hyperlinked to the README.md contained within the source code.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Object Mapping
RKObjectMappingEncapsulates configuration for transforming object representations as expressed by key-value coding keypaths.
RKAttributeMappingSpecifies a desired transformation between attributes within an object or entity mapping in terms of a source and destination key path.
RKRelationshipMappingSpecifies a desired mapping of a nested to-one or to-many child objects in in terms of a source and destination key path and an RKObjectMapping with which to map the attributes of the child object.
RKDynamicMappingSpecifies a flexible mapping in which the decision about which RKObjectMapping is to be used to process a given document is deferred to run time.
RKObjectMapperProvides an interface for mapping a parsed document into a set of local domain objects.
RKObjectMappingOperationAn NSOperation that performs a mapping between object representations using an RKObjectMapping.
Networking
RKRequestDescriptorDescribes a request that can be sent from the application to a remote web application for a given object type.
RKResponseDescriptorDescribes an object mappable response that may be returned from a remote web application in terms of an object mapping, a key path, a SOCKit pattern for matching the URL, and a set of status codes that define the circumstances in which the mapping is appropriate for a given response.
RKObjectParameterizationPerforms mapping of a given object into an NSDictionary represenation suitable for use as the parameters of an HTTP request.
RKObjectRequestOperationAn NSOperation that sends an HTTP request and performs object mapping on the parsed response body using the configurations expressed in a set of RKResponseDescriptor objects.
RKResponseMapperOperationAn NSOperation that provides support for object mapping an NSHTTPURLResponse using a set of RKResponseDescriptor objects.
RKObjectManagerCaptures the common patterns for communicating with a RESTful web application over HTTP using object mapping including: +
    +
  • Centralizing RKRequestDescriptor and RKResponseDescriptor configurations
  • +
  • Describing URL configuration with an RKRouter
  • +
  • Serializing objects and sending requests with the serialized representations
  • +
  • Sending requests to load remote resources and object mapping the response bodies
  • +
  • Building multi-part form requests for objects
  • +
+
RKRouterGenerates NSURL objects from a base URL and a set of RKRoute objects describing relative paths used by the application.
RKRouteDescribes a single relative path for a given object type and HTTP method, the relationship of an object, or a symbolic name.
Core Data
RKManagedObjectStoreEncapsulates Core Data configuration including an NSManagedObjectModel, a NSPersistentStoreCoordinator, and a pair of NSManagedObjectContext objects.
RKEntityMappingModels a mapping for transforming an object representation into a NSManagedObject instance for a given NSEntityDescription.
RKConnectionMappingDescribes a mapping for establishing a relationship between Core Data entities using foreign key attributes.
RKManagedObjectRequestOperationAn NSOperation subclass that sends an HTTP request and performs object mapping on the parsed response body to create NSManagedObject instances, establishes relationships between objects using RKConnectionMapping objects, and cleans up orphaned objects that no longer exist in the remote backend system.
RKManagedObjectImporterProvides support for bulk mapping of managed objects using RKEntityMapping objects for two use cases: +
    +
  1. Bulk importing of parsed documents into an NSPersistentStore.
  2. +
  3. Generating a seed database for initializing an application's Core Data store with an initial data set upon installation.
  4. +
+
Search
RKSearchIndexerProvides support for generating a full-text searchable index within Core Data for string attributes of entities within an application.
RKSearchPredicateGenerates an NSCompoundPredicate given a string of text that will search an index built with an RKSearchIndexer across any indexed entity.
Testing
RKMappingTestProvides support for unit testing object mapping configurations given a parsed document and an object or entity mapping. Expectations are configured in terms of expected key path mappings and/or expected transformation results.
RKTestFixtureProvides an interface for easily generating test fixture data for unit testing.
RKTestFactoryProvides support for creating objects for use in testing.
+ + +

+ +

Examples

+ +

Object Request

+ +

``` objective-c +// GET a single Article from /articles/1234.json and map it into an object +// JSON looks like {“article”: {“title”: “My Article”, “author”: “Blake”, “body”: “Very cool!!”}} +RKObjectMapping mapping = [RKObjectMapping mappingForClass:[Article class]]; +[mapping addAttributeMappingsFromArray:@[@“title”, @“author”, @“body”]]; +NSIndexSet statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful); // Anything in 2xx +RKResponseDescriptor *responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:mapping pathPattern:@“/articles/:articleID” keyPath:@“article” statusCodes:statusCodes];

+ +

NSURLRequest request = [NSURLRequest requestWithURL:[NSURL URLWithString:@“http://restkit.org/articles/1234.json”]]; +RKObjectRequestOperation operation = [[RKObjectRequestOperation alloc] initWithRequest:request responseDescriptors:@[responseDescriptor]]; +[operation setCompletionBlockWithSuccess:^(RKObjectRequestOperation operation, RKMappingResult result) {

+ +
Article *article = [result firstObject];
+NSLog(@"Mapped the article: %@", article);
+
+ +

} failure:^(RKObjectRequestOperation operation, NSError error) {

+ +
NSLog(@"Failed with error: %@", [error localizedDescription]);
+
+ +

}];] +```

+ +

Managed Object Request

+ +

``` objective-c +// GET an Article and its Categories from /articles/888.json and map into Core Data entities +// JSON looks like {“article”: {“title”: “My Article”, “author”: “Blake”, “body”: “Very cool!!”, “categories”: [{“id”: 1, “name”: “Core Data”]} +NSManagedObjectModel managedObjectModel = [NSManagedObjectModel mergedModelFromBundles:nil]; +RKManagedObjectStore managedObjectStore = [[RKManagedObjectStore alloc] initWithManagedObjectModel:managedObjectModel]; +NSString *path = [RKApplicationDataDirectory() stringByAppendingPathComponent:@“Store.sqlite”]; +[managedObjectStore addSQLitePersistentStoreAtPath:path fromSeedDatabaseAtPath:nil error:nil]; +[managedObjectStore createManagedObjectContexts];

+ +

RKEntityMapping categoryMapping = [RKEntityMapping mappingForEntityForName:@“Category” inManagedObjectStore:managedObjectStore]; +[categoryMapping addAttributeMappingsFromDictionary:@{ “id”: “categoryID”, @“name”: “name” }]; +RKEntityMapping articleMapping = [RKEntityMapping mappingForEntityForName:@“Article” inManagedObjectStore:managedObjectStore]; +[articleMapping addAttributeMappingsFromArray:@[@“title”, @“author”, @“body”]]; +[articleMapping addPropertyMapping:[RKRelationshipMapping relationshipMappingFromKeyPath:@“categories” toKeyPath:@“categories” withMapping:categoryMapping]];

+ +

NSIndexSet statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful); // Anything in 2xx +RKResponseDescriptor responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:articleMapping pathPattern:@“/articles/:articleID” keyPath:@“article” statusCodes:statusCodes];

+ +

NSURLRequest request = [NSURLRequest requestWithURL:[NSURL URLWithString:@“http://restkit.org/articles/888.json”]]; +RKManagedObjectRequestOperation operation = [[RKManagedObjectRequestOperation alloc] initWithRequest:request responseDescriptors:@[responseDescriptor]]; +operation.managedObjectContext = managedObjectStore.mainQueueManagedObjectContext; +[operation setCompletionBlockWithSuccess:^(RKObjectRequestOperation operation, RKMappingResult result) { + Article *article = [result firstObject];

+ +
NSLog(@"Mapped the article: %@", article);
+NSLog(@"Mapped the category: %@", [article.categories anyObject]);
+
+ +

} failure:^(RKObjectRequestOperation operation, NSError error) {

+ +
NSLog(@"Failed with error: %@", [error localizedDescription]);
+
+ +

}]; +```

+ +

Map a Client Error Response to an NSError

+ +

``` objective-c +// GET /articles/error.json returns a 422 (Unprocessable Entity) +// JSON looks like {“errors”: “Some Error Has Occurred”}

+ +

RKObjectMapping *errorMapping = [RKObjectMapping mappingForClass:[RKErrorMessage class]]; +// The entire value at the source key path containing the errors maps to the message +[errorMapping addPropertyMapping:[RKAttributeMapping attributeMappingFromKeyPath:[NSNull null] toKeyPath:@“message”]];

+ +

NSIndexSet statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassClientError); +// Any response in the 4xx status code range with an “errors” key path uses this mapping +RKResponseDescriptor errorDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:mapping pathPattern:nil keyPath:@“errors” statusCodes:statusCodes];

+ +

NSURLRequest request = [NSURLRequest requestWithURL:[NSURL URLWithString:@“http://restkit.org/articles/error.json”]]; +RKObjectRequestOperation operation = [[RKObjectRequestOperation alloc] initWithRequest:request responseDescriptors:@[errorDescriptor]]; +[operation setCompletionBlockWithSuccess:nil failure:^(RKObjectRequestOperation operation, NSError error) {

+ +
NSLog(@"Loaded this error: %@", [error localizedDescription]);
+
+ +

}]; +```

+ +

Centralize Configuration in an Object Manager

+ +

``` objective-c +// Set up Article and Error Response Descriptors +RKObjectMapping mapping = [RKObjectMapping mappingForClass:[Article class]]; +[mapping addAttributeMappingsFromArray:@[@“title”, @“author”, @“body”]]; +NSIndexSet statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful); // Anything in 2xx +RKResponseDescriptor *articleDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:mapping pathPattern:@“/articles” keyPath:@“article” statusCodes:statusCodes];

+ +

RKObjectMapping errorMapping = [RKObjectMapping mappingForClass:[RKErrorMessage class]]; +// The entire value at the source key path containing the errors maps to the message +[errorMapping addPropertyMapping:[RKAttributeMapping attributeMappingFromKeyPath:[NSNull null] toKeyPath:@“message”]]; +NSIndexSet statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassClientError); +// Any response in the 4xx status code range with an “errors” key path uses this mapping +RKResponseDescriptor *errorDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:mapping pathPattern:nil keyPath:@“errors” statusCodes:statusCodes];

+ +

// Add our descriptors to the manager +RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@“http://restkit.org”]]; +[manager addResponseDescriptorsFromArray:@[ articleDescriptor, errorDescriptor ]];

+ +

[manager getObjectsAtPath:@“/articles/555.json” parameters:nil success:^(RKObjectRequestOperation operation, RKMappingResult mappingResult)) {

+ +
// Handled with articleDescriptor
+
+ +

} failure:^(RKObjectRequestOperation operation, NSError error) {

+ +
// Transport error or server error handled by errorDescriptor
+
+ +

}]; +```

+ +

Load a Collection of Objects at a Path

+ +

objective-c +RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://restkit.org"]`http://restkit.org`"]; +[manager getObjectsAtPath:@"/articles" parameters:nil success:^(`RKObjectRequestOperation` *operation, `RKMappingResult` *mappingResult)) { +} failure:^(`RKObjectRequestOperation` *operation, NSError *error) { +}]; +

+ +

Manage a Queue of Object Request Operations

+ +

`` objective-c +RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://restkit.org"]http://restkit.org`“];

+ +

NSURLRequest request = [NSURLRequest requestWithURL:[NSURL URLWithString:@“http://restkit.org/articles/1234.json”]http://restkit.org/articles/1234.json“]]; +RKObjectRequestOperation operation = [[RKObjectRequestOperation alloc] initWithRequest:request responseDescriptors:@[responseDescriptor]];

+ +

[manager enqueueObjectRequestOperation:operation]; +[manager cancelAllObjectRequestOperationsWithMethod:RKRequestMethodANY matchingPathPattern:@“/articles/:articleID\.json”]; +```

+ +

POST, PATCH, and DELETE an Object

+ +

``` objective-c +RKObjectMapping responseMapping = [RKObjectMapping mappingForClass:[Article class]]; +[responseMapping addAttributeMappingsFromArray:@[@“title”, @“author”, @“body”]]; +NSIndexSet statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful); // Anything in 2xx +RKResponseDescriptor *articleDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:responseMapping pathPattern:@“/articles” keyPath:@“article” statusCodes:statusCodes];

+ +

RKObjectMapping *requestMapping = [RKObjectMapping requestMapping]; // objectClass == NSMutableDictionary +[requestMapping addAttributeMappingsFromArray:@[@“title”, @“author”, @“body”]];

+ +

// For any object of class Article, serialize into an NSMutableDictionary using the given mapping and nest +// under the ‘article’ key path +RKRequestDescriptor *requestDescriptor = [RKRequestDescriptor requestDescriptorWithMapping:requestMapping objectClass:[Article class] rootKeyPath:@“article”];

+ +

RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@“http://restkit.org”]; +[manager addRequestDescriptor:requestDescriptor]; +[manager addResponseDescriptor:responseDescriptor];

+ +

Article *article = [Article new]; +article.title = @“Introduction to RestKit”; +article.body = @“This is some text.”; +article.author = @“Blake”;

+ +

// POST to create +[manager postObject:article path:@“/articles” parameters:nil success:nil failure:nil];

+ +

// PATCH to update +article.body = @“New Body”; +[manager patchObject:article path:@“/articles/1234” parameters:nil success:nil failure:nil];

+ +

// DELETE to destroy +[manager deleteObject:article path:@“/articles/1234” parameters:nil success:nil failure:nil]; +```

+ +

Configure Logging

+ +

``` objective-c +// Log all HTTP traffic with request and response bodies +RKLogConfigureByName(“RestKit/Network”, RKLogLevelTrace);

+ +

// Log debugging info about Core Data +RKLogConfigureByName(“RestKit/CoreData”, RKLogLevelDebug);

+ +

// Raise logging for a block +RKLogWithLevelWhileExecutingBlock(RKLogLevelTrace, ^{

+ +
// Do something that generates logs
+
+ +

}); +```

+ +

Configure Routing

+ +

`` objective-c +RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://restkit.org"]http://restkit.org`“];

+ +

// Class Routing +[manager.router.routeSet addRoute:[RKRoute routeWithClass:[GGSegment class] pathPattern:@“/segments/:segmentID\.json” method:RKRequestMethodGET]];

+ +

// Relationship Routing +[manager.router.routeSet addRoute:[RKRoute routeWithRelationshipName:@“amenities” objectClass:[GGAirport class] pathPattern:@“/airports/:airportID/amenities.json” method:RKRequestMethodGET]];

+ +

// Named Routes +[manager.router.routeSet addRoute:[RKRoute routeWithName:@“thumbs_down_review” resourcePathPattern:@“/reviews/:reviewID/thumbs_down” method:RKRequestMethodPOST]]; +```

+ +

POST an Object with a File Attachment

+ +

``` objective-c +Article article = [Article new]; +UIImage image = [UIImage imageNamed:@“some_image.png”];

+ +

// Serialize the Article attributes then attach a file +NSMutableURLRequest *request = [[RKObjectManager sharedManager] multipartFormRequestForObject:article method:RKRequestMethodPOST path:nil parameters:nil constructingBodyWithBlock:^(id formData) {

+ +
[formData appendPartWithFileData:UIImagePNGRepresentation(image)
+                            name:@"article[image]"
+                        fileName:@"photo.png"
+                        mimeType:@"image/png"];
+
+ +

}];

+ +

RKObjectRequestOperation *operation = [[RKObjectManager sharedManager] objectRequesOperationWithRequest:request success:nil failure:nil]; +[operation start]; +```

+ +

Enqueue a Batch of Object Request Operations

+ +

``` objective-c

+ +

RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@“http://restkit.org”]http://restkit.org“]];

+ +

Airport jfk = [Airport new]; +jfk.code = @“jfk”; +Airport lga = [Airport new]; +lga.code = @“lga”; +Airport *rdu = [Airport new]; +rdu.code = @“rdu”;

+ +

// Enqueue a GET for ‘/airports/jfk/weather’, ‘/airports/lga/weather’, ‘/airports/rdu/weather’ +RKRoute *route = [RKRoute routeWithName:@“airport_weather” resourcePathPattern:@“/airports/:code/weather” method:RKRequestMethodGET];

+ +

[manager enqueueBatchOfObjectRequestOperationsWithRoute:route

+ +
                                            objects:@[ jfk, lga, rdu]
+                                           progress:^(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations) {
+                                               NSLog(@"Finished %d operations", numberOfFinishedOperations);
+                                           } completion:^ (NSArray *operations) {
+                                               NSLog(@"All Weather Reports Loaded!");
+                                           }];
+
+ +

```

+ +

Generate a Seed Database

+ +

`` objective-c +NSManagedObjectModel *managedObjectModel = [NSManagedObjectModel mergedModelFromBundles:nil]; +RKManagedObjectStore` *managedObjectStore = [[RKManagedObjectStore alloc] initWithManagedObjectModel:managedObjectModel];

+ +

RKEntityMapping *articleMapping = [RKEntityMapping mappingForEntityForName:@“Article” inManagedObjectStore:managedObjectStore]; +[articleMapping addAttributeMappingsFromArray:@[@“title”, @“author”, @“body”]];

+ +

NSString seedPath = [RKApplicationDataDirectory() stringByAppendingPathComponent:@“MySeedDatabase.sqlite”]; +RKManagedObjectImporter importer = [[RKManagedObjectImporter alloc] initWithManagedObjectModel:managedObjectStore.managedObjectModel storePath:seedPath];

+ +

// Import the files “articles.json” from the Main Bundle using our RKEntityMapping +// JSON looks like {“articles”: [ {“title”: “Article 1”, “body”: “Text”, “author”: “Blake” ]} +NSError error; +NSBundle mainBundle = [NSBundle mainBundle]; +[importer importObjectsFromItemAtPath:[mainBundle pathForResource:@“articles” ofType:@“json”]

+ +
                          withMapping:articleMapping
+                              keyPath:@"articles"
+                                error:&error];
+
+ +

BOOL success = [importer finishImporting:&error]; +if (success) {

+ +
[importer logSeedingInfo];
+
+ +

} +```

+ +

Index and Search an Entity

+ +

`` objective-c +NSManagedObjectModel *managedObjectModel = [NSManagedObjectModel mergedModelFromBundles:nil]; +RKManagedObjectStore` *managedObjectStore = [[RKManagedObjectStore alloc] initWithManagedObjectModel:managedObjectModel]; +[managedObjectStore addSearchIndexingToEntityForName:@“Article” onAttributes:@[ @“title”, @“body” ]]; +[managedObjectStore addInMemoryPersistentStore:nil]; +[managedObjectStore createManagedObjectContexts]; +[managedObjectStore startIndexingPersistentStoreManagedObjectContext];

+ +

Article *article1 = [NSEntityDescription insertNewObjectForEntityForName:@“Article” inManagedObjectContext:managedObjectStore.mainQueueManagedObjectContext]; +article1.title = @“First Article”; +article1.body = “This should match search”;

+ +

Article *article2 = [NSEntityDescription insertNewObjectForEntityForName:@“Article” inManagedObjectContext:managedObjectStore.mainQueueManagedObjectContext]; +article2.title = @“Second Article”; +article2.body = “Does not”;

+ +

BOOL success = [managedObjectStore.mainQueueManagedObjectContext saveToPersistentStore:nil];

+ +

RKSearchPredicate predicate = [RKSearchPredicate searchPredicateWithText:@“Match” type:NSAndPredicateType]; +NSFetchRequest fetchRequest = [NSFetchRequest fetchRequestWithEntityName:@“Article”]; +fetchRequest.predicate = predicate;

+ +

// Contains article1 due to body text containing ‘match’ +NSArray *matches = [managedObjectStore.mainQueueManagedObjectContext executeFetchRequest:fetchRequest error:nil]; +NSLog(@“Found the matching articls: %@”, matches); +```

+ +

Unit Test a Mapping

+ +

``` objective-c +// JSON looks like {“article”: {“title”: “My Article”, “author”: “Blake”, “body”: “Very cool!!”}} +RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[Article class]]; +[mapping addAttributeMappingsFromArray:@[@“title”, @“author”, @“body”]];

+ +

NSDictionary article = @{ @“article”: @{ @“title”: @“My Title”, @“body”: @“The article body”, @“author”: @“Blake” } }; +RKMappingTest mappingTest = [[RKMappingTest alloc] initWithMapping:mapping sourceObject:article destinationObject:nil];

+ +

[mappingTest expectMappingFromKeyPath:@“title” toKeyPath:@“title” value:@“My Title”]; +[mappingTest performMapping]; +[mappingTest verify]; +```

+ +

Requirements

+ +

RestKit requires iOS 5.0 and above or Mac OS X 10.7 and above.

+ +

Several third-party open source libraries are used within RestKit, including:

+ +
    +
  1. AFNetworking – Networking Support
  2. +
  3. LibComponentLogging – Logging Support
  4. +
  5. SOCKit – String <–> Object Coding
  6. +
  7. iso8601parser – Support for parsing and generating ISO-8601 dates
  8. +
+ + +

The following Cocoa frameworks must be linked into the application target for proper compilation:

+ +
    +
  1. CFNetwork.framework on iOS
  2. +
  3. CoreData.framework
  4. +
  5. Security.framework
  6. +
  7. MobileCoreServices.framework on iOS or CoreServices.framework on OS X
  8. +
+ + +

And the following linker flags must be set:

+ +
    +
  1. -ObjC
  2. +
  3. -all_load
  4. +
+ + +

ARC

+ +

As of version 0.20.0, RestKit has migrated the entire codebase to ARC.

+ +

If you are including the RestKit sources directly into a project that does not yet use Automatic Reference Counting, you will need to set the -fobjc-arc compiler flag on all of the RestKit source files. To do this in Xcode, go to your active target and select the “Build Phases” tab. Now select all RestKit source files, press Enter, insert -fobjc-arc and then “Done” to enable ARC for RestKit.

+ +

Serialization Formats

+ +

RestKit provides a pluggable interface for handling arbitrary serialization formats via the ~!@[RKSerialization](Protocols/RKSerialization.html)](http://restkit.org/api/0.20.0/Classes/RKSerialization.html))@!~ protocol and the [RKMIMETypeSerialization](http://restkit.org/api/0.20.0/Classes/RKMIMETypeSerialization.html) class. Out of the box, RestKit supports handling the JSON format for serializing and deserializing object representations via the [NSJSONSerialization](http://developer.apple.com/library/mac/`#documentation/Foundation/Reference/NSJSONSerialization_Class/Reference/Reference.html) class.

+ +

Additional Serializations

+ +

Support for additional formats and alternate serialization backends is provided via external modules that can be added to the project. Currently the following serialization implementations are available for use:

+ +
    +
  • JSONKit
  • +
  • SBJSON
  • +
  • YAJL
  • +
  • NextiveJson
  • +
  • XMLReader + XMLWriter
  • +
+ + +

Installation

+ +

The recommended approach for installating RestKit is via the CocoaPods package manager, as it provides flexible dependency management and dead simple installation. For best results, it is recommended that you install via CocoaPods >= 0.15.2 using Git >= 1.8.0 installed via Homebrew.

+ +

via CocoaPods

+ +

Install CocoaPods if not already available:

+ +

bash +$ [sudo] gem install cocoapods +$ pod setup +

+ +

Edit your Podfile and add RestKit:

+ +

`` bash +$ edit Podfile +platform :ios, '5.0' +pod 'RestKit', :git => 'https://github.com/RestKit/RestKit.git',` :branch => ‘development’

+ +

Testing and Search are optional components

+ +

pod ‘RestKit/Testing’, :git => ‘https://github.com/RestKit/RestKit.git', :branch => 'development’ +pod ‘RestKit/Search’, :git => ‘https://github.com/RestKit/RestKit.git', :branch => 'development’ +```

+ +

Install into your project:

+ +

bash +$ pod install +

+ +

Please note that if your installation fails, it may be because you are installing with a version of Git lower than CocoaPods is expecting. Please ensure that you are running Git >= 1.8.0 by executing git --version. You can get a full picture of the installation details by executing pod install --verbose.

+ +

From a Release Package or as a Git submodule

+ +

Detailed installation instructions are available in the Visual Install Guide on the Wiki.

+ +

License

+ +

RestKit is licensed under the terms of the Apache License, version 2.0. Please see the LICENSE file for full details.

+ +

Credits

+ +

RestKit is brought to you by Blake Watters and the RestKit team.

+ +

Support is provided by the following organizations:

+ + + + + +
+ + + + + + + + + + + +
+ + +
+
+ + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Nodes.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Nodes.xml new file mode 100644 index 00000000..969ac162 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Nodes.xml @@ -0,0 +1,375 @@ + + + + + RestKit 0.20.0dev + index.html + + + + + Classes + index.html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Categories + index.html + + + + + + + + + + + + + Protocols + index.html + + + + + + + + + + + + + + + + + + RKAttributeMapping + Classes/RKAttributeMapping.html + + + RKConnectionMapping + Classes/RKConnectionMapping.html + + + RKDotNetDateFormatter + Classes/RKDotNetDateFormatter.html + + + RKDynamicMapping + Classes/RKDynamicMapping.html + + + RKDynamicMappingMatcher + Classes/RKDynamicMappingMatcher.html + + + RKEntityByAttributeCache + Classes/RKEntityByAttributeCache.html + + + RKEntityCache + Classes/RKEntityCache.html + + + RKEntityMapping + Classes/RKEntityMapping.html + + + RKErrorMessage + Classes/RKErrorMessage.html + + + RKFetchRequestManagedObjectCache + Classes/RKFetchRequestManagedObjectCache.html + + + RKHTTPRequestOperation + Classes/RKHTTPRequestOperation.html + + + RKISO8601DateFormatter + Classes/RKISO8601DateFormatter.html + + + RKInMemoryManagedObjectCache + Classes/RKInMemoryManagedObjectCache.html + + + RKMIMETypeSerialization + Classes/RKMIMETypeSerialization.html + + + RKManagedObjectImporter + Classes/RKManagedObjectImporter.html + + + RKManagedObjectMappingOperationDataSource + Classes/RKManagedObjectMappingOperationDataSource.html + + + RKManagedObjectRequestOperation + Classes/RKManagedObjectRequestOperation.html + + + RKManagedObjectResponseMapperOperation + Classes/RKManagedObjectResponseMapperOperation.html + + + RKManagedObjectStore + Classes/RKManagedObjectStore.html + + + RKManagedObjectThreadSafeInvocation + Classes/RKManagedObjectThreadSafeInvocation.html + + + RKMapperOperation + Classes/RKMapperOperation.html + + + RKMapping + Classes/RKMapping.html + + + RKMappingOperation + Classes/RKMappingOperation.html + + + RKMappingResult + Classes/RKMappingResult.html + + + RKMappingTest + Classes/RKMappingTest.html + + + RKMappingTestExpectation + Classes/RKMappingTestExpectation.html + + + RKNSJSONSerialization + Classes/RKNSJSONSerialization.html + + + RKObjectManager + Classes/RKObjectManager.html + + + RKObjectMapping + Classes/RKObjectMapping.html + + + RKObjectMappingOperationDataSource + Classes/RKObjectMappingOperationDataSource.html + + + RKObjectParameterization + Classes/RKObjectParameterization.html + + + RKObjectRequestOperation + Classes/RKObjectRequestOperation.html + + + RKObjectResponseMapperOperation + Classes/RKObjectResponseMapperOperation.html + + + RKPathMatcher + Classes/RKPathMatcher.html + + + RKPropertyInspector + Classes/RKPropertyInspector.html + + + RKPropertyMapping + Classes/RKPropertyMapping.html + + + RKRelationshipConnectionOperation + Classes/RKRelationshipConnectionOperation.html + + + RKRelationshipMapping + Classes/RKRelationshipMapping.html + + + RKRequestDescriptor + Classes/RKRequestDescriptor.html + + + RKResponseDescriptor + Classes/RKResponseDescriptor.html + + + RKResponseMapperOperation + Classes/RKResponseMapperOperation.html + + + RKRoute + Classes/RKRoute.html + + + RKRouteSet + Classes/RKRouteSet.html + + + RKRouter + Classes/RKRouter.html + + + RKSearchIndexer + Classes/RKSearchIndexer.html + + + RKSearchPredicate + Classes/RKSearchPredicate.html + + + RKSearchTokenizer + Classes/RKSearchTokenizer.html + + + RKSearchWord + Classes/RKSearchWord.html + + + RKSearchWordEntity + Classes/RKSearchWordEntity.html + + + RKTestFactory + Classes/RKTestFactory.html + + + RKTestFixture + Classes/RKTestFixture.html + + + RKTestHelpers + Classes/RKTestHelpers.html + + + RKTestNotificationObserver + Classes/RKTestNotificationObserver.html + + + RKURLEncodedSerialization + Classes/RKURLEncodedSerialization.html + + + RK_FIX_CATEGORY_BUG + Classes/RK_FIX_CATEGORY_BUG.html + + + + AFHTTPClient() + Categories/AFHTTPClient+.html + + + NSBundle(RKAdditions) + Categories/NSBundle+RKAdditions.html + + + NSEntityDescription(RKAdditions) + Categories/NSEntityDescription+RKAdditions.html + + + NSManagedObject(RKAdditions) + Categories/NSManagedObject+RKAdditions.html + + + NSManagedObjectContext(RKAdditions) + Categories/NSManagedObjectContext+RKAdditions.html + + + + RKManagedObjectCaching + Protocols/RKManagedObjectCaching.html + + + RKMapperOperationDelegate + Protocols/RKMapperOperationDelegate.html + + + RKMappingOperationDataSource + Protocols/RKMappingOperationDataSource.html + + + RKMappingOperationDelegate + Protocols/RKMappingOperationDelegate.html + + + RKSerialization + Protocols/RKSerialization.html + + + RKTestFactoryCallbacks + Protocols/RKTestFactoryCallbacks.html + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens1.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens1.xml new file mode 100644 index 00000000..b1221497 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens1.xml @@ -0,0 +1,35 @@ + + + + + + //apple_ref/occ/cl/RKAttributeMapping + Instances of RKAttributeMapping define a transformation of data between an attribute value on source object and an attribute value on a destination object within an object mapping. + RKAttributeMapping.h + + + + + + + //apple_ref/occ/clm/RKAttributeMapping/attributeMappingFromKeyPath:toKeyPath: + Creates and returns a new attribute mapping specifying that data is to be read from a given key path on a source object +and set to a given key path on a destination object. + RKAttributeMapping.h + + + (RKAttributeMapping *)attributeMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath + + + sourceKeyPath + The key path on the source object from which to read the data being mapped. + + destinationKeyPath + The key path on the destination object on which to set the mapped data. + + + A newly created attribute mapping object that is ready to be added to an object mapping. + //api/name/attributeMappingFromKeyPath:toKeyPath: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens10.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens10.xml new file mode 100644 index 00000000..9ba7f2b3 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens10.xml @@ -0,0 +1,18 @@ + + + + + + //apple_ref/occ/cl/RKFetchRequestManagedObjectCache + Provides a simple managed object cache strategy in which every request for an object +is satisfied by dispatching an NSFetchRequest against the Core Data persistent store. +Performance can be disappointing for data sets with a large amount of redundant data +being mapped and connected together, but the memory footprint stays flat. + RKFetchRequestManagedObjectCache.h + + + + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens11.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens11.xml new file mode 100644 index 00000000..a4dd1296 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens11.xml @@ -0,0 +1,81 @@ + + + + + + //apple_ref/occ/cl/RKHTTPRequestOperation + The RKHTTPRequestOperation class is a subclass of AFHTTPRequestOperation for HTTP or HTTPS requests made by RestKit. It provides per-instance configuration of the acceptable status codes and content types and integrates with the RKLog system to provide detailed requested and response logging. Instances of RKHTTPRequest are created by RKObjectRequestOperation and its subclasses to HTTP requests that will be object mapped. When used to make standalone HTTP requests, RKHTTPRequestOperation instance behave identically to AFHTTPRequestOperation with the exception of emitting logging information. + RKHTTPRequestOperation.h + + + + + + + //apple_ref/occ/instm/RKHTTPRequestOperation/setAcceptableStatusCodes: + The set of status codes which the operation considers successful. + RKHTTPRequestOperation.h + + @property (nonatomic, strong) NSIndexSet *acceptableStatusCodes + + + //api/name/acceptableStatusCodes + + + + //apple_ref/occ/instp/RKHTTPRequestOperation/acceptableStatusCodes + The set of status codes which the operation considers successful. + RKHTTPRequestOperation.h + + @property (nonatomic, strong) NSIndexSet *acceptableStatusCodes + + + //api/name/acceptableStatusCodes + + + + //apple_ref/occ/instm/RKHTTPRequestOperation/setAcceptableContentTypes: + The set of content types which the operation considers successful. + RKHTTPRequestOperation.h + + @property (nonatomic, strong) NSSet *acceptableContentTypes + + + //api/name/acceptableContentTypes + + + + //apple_ref/occ/instp/RKHTTPRequestOperation/acceptableContentTypes + The set of content types which the operation considers successful. + RKHTTPRequestOperation.h + + @property (nonatomic, strong) NSSet *acceptableContentTypes + + + //api/name/acceptableContentTypes + + + + //apple_ref/occ/instm/RKHTTPRequestOperation/setWasNotModified: + Whether the response received a 304 response, whether via the initial request, or by virtue of cache revalidation occurring from NSURLCache. + RKHTTPRequestOperation.h + + @property (nonatomic, readonly) BOOL wasNotModified + + + //api/name/wasNotModified + + + + //apple_ref/occ/instp/RKHTTPRequestOperation/wasNotModified + Whether the response received a 304 response, whether via the initial request, or by virtue of cache revalidation occurring from NSURLCache. + RKHTTPRequestOperation.h + + @property (nonatomic, readonly) BOOL wasNotModified + + + //api/name/wasNotModified + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens12.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens12.xml new file mode 100644 index 00000000..77dc65c2 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens12.xml @@ -0,0 +1,224 @@ + + + + + + //apple_ref/occ/cl/RKISO8601DateFormatter + + RKISO8601DateFormatter.h + + + + + + + //apple_ref/occ/clm/RKISO8601DateFormatter/purgeGlobalCaches + + RKISO8601DateFormatter.h + + + (void)purgeGlobalCaches + + + //api/name/purgeGlobalCaches + + + + //apple_ref/occ/instm/RKISO8601DateFormatter/setDefaultTimeZone: + + RKISO8601DateFormatter.h + + @property (nonatomic, retain) NSTimeZone *defaultTimeZone + + + //api/name/defaultTimeZone + + + + //apple_ref/occ/instp/RKISO8601DateFormatter/defaultTimeZone + + RKISO8601DateFormatter.h + + @property (nonatomic, retain) NSTimeZone *defaultTimeZone + + + //api/name/defaultTimeZone + + + + //apple_ref/occ/instm/RKISO8601DateFormatter/setParsesStrictly: + + RKISO8601DateFormatter.h + + @property BOOL parsesStrictly + + + //api/name/parsesStrictly + + + + //apple_ref/occ/instp/RKISO8601DateFormatter/parsesStrictly + + RKISO8601DateFormatter.h + + @property BOOL parsesStrictly + + + //api/name/parsesStrictly + + + + //apple_ref/occ/instm/RKISO8601DateFormatter/dateComponentsFromString: + + RKISO8601DateFormatter.h + + - (NSDateComponents *)dateComponentsFromString:(NSString *)string + + + //api/name/dateComponentsFromString: + + + + //apple_ref/occ/instm/RKISO8601DateFormatter/dateComponentsFromString:timeZone: + + RKISO8601DateFormatter.h + + - (NSDateComponents *)dateComponentsFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone + + + //api/name/dateComponentsFromString:timeZone: + + + + //apple_ref/occ/instm/RKISO8601DateFormatter/dateComponentsFromString:timeZone:range: + + RKISO8601DateFormatter.h + + - (NSDateComponents *)dateComponentsFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone range:(out NSRange *)outRange + + + //api/name/dateComponentsFromString:timeZone:range: + + + + //apple_ref/occ/instm/RKISO8601DateFormatter/dateFromString: + + RKISO8601DateFormatter.h + + - (NSDate *)dateFromString:(NSString *)string + + + //api/name/dateFromString: + + + + //apple_ref/occ/instm/RKISO8601DateFormatter/dateFromString:timeZone: + + RKISO8601DateFormatter.h + + - (NSDate *)dateFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone + + + //api/name/dateFromString:timeZone: + + + + //apple_ref/occ/instm/RKISO8601DateFormatter/dateFromString:timeZone:range: + + RKISO8601DateFormatter.h + + - (NSDate *)dateFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone range:(out NSRange *)outRange + + + //api/name/dateFromString:timeZone:range: + + + + //apple_ref/occ/instm/RKISO8601DateFormatter/setFormat: + + RKISO8601DateFormatter.h + + @property RKISO8601DateFormat format + + + //api/name/format + + + + //apple_ref/occ/instp/RKISO8601DateFormatter/format + + RKISO8601DateFormatter.h + + @property RKISO8601DateFormat format + + + //api/name/format + + + + //apple_ref/occ/instm/RKISO8601DateFormatter/setIncludeTime: + + RKISO8601DateFormatter.h + + @property BOOL includeTime + + + //api/name/includeTime + + + + //apple_ref/occ/instp/RKISO8601DateFormatter/includeTime + + RKISO8601DateFormatter.h + + @property BOOL includeTime + + + //api/name/includeTime + + + + //apple_ref/occ/instm/RKISO8601DateFormatter/setTimeSeparator: + + RKISO8601DateFormatter.h + + @property unichar timeSeparator + + + //api/name/timeSeparator + + + + //apple_ref/occ/instp/RKISO8601DateFormatter/timeSeparator + + RKISO8601DateFormatter.h + + @property unichar timeSeparator + + + //api/name/timeSeparator + + + + //apple_ref/occ/instm/RKISO8601DateFormatter/stringFromDate: + + RKISO8601DateFormatter.h + + - (NSString *)stringFromDate:(NSDate *)date + + + //api/name/stringFromDate: + + + + //apple_ref/occ/instm/RKISO8601DateFormatter/stringFromDate:timeZone: + + RKISO8601DateFormatter.h + + - (NSString *)stringFromDate:(NSDate *)date timeZone:(NSTimeZone *)timeZone + + + //api/name/stringFromDate:timeZone: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens13.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens13.xml new file mode 100644 index 00000000..471b2b38 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens13.xml @@ -0,0 +1,31 @@ + + + + + + //apple_ref/occ/cl/RKInMemoryManagedObjectCache + Provides a fast managed object cache where-in object instances are retained in memory to avoid hitting the Core Data persistent store. Performance is greatly increased over fetch request based strategy at the expense of memory consumption. + RKInMemoryManagedObjectCache.h + + + + + + + //apple_ref/occ/instm/RKInMemoryManagedObjectCache/initWithManagedObjectContext: + Initializes the receiver with a managed object context that is to be observed and used to populate the in memory cache. The receiver may then be used to fulfill cache requests for child contexts of the given managed object context. + RKInMemoryManagedObjectCache.h + + - (id)initWithManagedObjectContext:(NSManagedObjectContext *)managedObjectContext + + + managedObjectContext + The managed object context with which to initialize the receiver. + + + The receiver, initialized with the given managed object context. + //api/name/initWithManagedObjectContext: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens14.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens14.xml new file mode 100644 index 00000000..0a147c31 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens14.xml @@ -0,0 +1,121 @@ + + + + + + //apple_ref/occ/cl/RKMIMETypeSerialization + The RKMIMETypeSerialization class provides support for the registration of classes conforming to the RKSerialization protocol by MIME Type and the serialization and deserialization of content by MIME Type. Serialization implementations may be registered by an exact string match (i.e. 'application/json' for a JSON serialization implementation) or by regular expression to match MIME Type by pattern. + RKMIMETypeSerialization.h + + + + + + + //apple_ref/occ/clm/RKMIMETypeSerialization/registerClass:forMIMEType: + Registers the given serialization class to handle content for the given MIME Type identifier. + RKMIMETypeSerialization.h + + + (void)registerClass:(Class<RKSerialization>)serializationClass forMIMEType:(id)MIMETypeStringOrRegularExpression + + + serializationClass + The class conforming to the RKSerialization protocol to be registered as handling the given MIME Type. + + MIMETypeStringOrRegularExpression + A string or regular expression specifying the MIME Type(s) that given serialization implementation is to be registered as handling. + + + + //api/name/registerClass:forMIMEType: + + + + //apple_ref/occ/clm/RKMIMETypeSerialization/unregisterClass: + Unregisters the given serialization class from handling any MIME Types. + RKMIMETypeSerialization.h + + + (void)unregisterClass:(Class<RKSerialization>)serializationClass + + + serializationClass + The class conforming to the RKSerialization protocol to be unregistered. + + + + //api/name/unregisterClass: + + + + //apple_ref/occ/clm/RKMIMETypeSerialization/serializationClassForMIMEType: + Returns the serialization class registered to handle the given MIME Type. + RKMIMETypeSerialization.h + + + (Class<RKSerialization>)serializationClassForMIMEType:(NSString *)MIMEType + + + MIMEType + The MIME Type for which to return the registered RKSerialization conformant class. + + + A class conforming to the RKSerialization protocol registered for the given MIME Type or nil if none was found. + //api/name/serializationClassForMIMEType: + + + + //apple_ref/occ/clm/RKMIMETypeSerialization/registeredMIMETypes + Returns a set containing the string values for all MIME Types for which a serialization implementation has been registered. + RKMIMETypeSerialization.h + + + (NSSet *)registeredMIMETypes + + An NSSet object whose elements are NSString values enumerating the registered MIME Types. + //api/name/registeredMIMETypes + + + + //apple_ref/occ/clm/RKMIMETypeSerialization/objectFromData:MIMEType:error: + Deserializes and returns a Foundation object representation of the given UTF-8 encoded data in the serialization format for the given MIME Type. + RKMIMETypeSerialization.h + + + (id)objectFromData:(NSData *)data MIMEType:(NSString *)MIMEType error:(NSError **)error + + + data + The UTF-8 encoded data representation of the object to be deserialized. + + MIMEType + The MIME Type of the serialization format the data is in. + + error + A pointer to an NSError object. + + + A Foundation object from the serialized data in data, or nil if an error occurs. + //api/name/objectFromData:MIMEType:error: + + + + //apple_ref/occ/clm/RKMIMETypeSerialization/dataFromObject:MIMEType:error: + Serializes and returns a UTF-8 encoded data representation of the given Foundation object in the serialization format for the given MIME Type. + RKMIMETypeSerialization.h + + + (NSData *)dataFromObject:(id)object MIMEType:(NSString *)MIMEType error:(NSError **)error + + + object + The Foundation object to serialized. + + MIMEType + The MIME Type of the serialization format the data is in. + + error + A pointer to an NSError object. + + + A Foundation object from the serialized data in data, or nil if an error occurs. + //api/name/dataFromObject:MIMEType:error: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens15.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens15.xml new file mode 100644 index 00000000..4da3af47 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens15.xml @@ -0,0 +1,230 @@ + + + + + + //apple_ref/occ/cl/RKManagedObjectImporter + Instances of RKManagedObjectImporter perform bulk imports of managed objects into a persistent store from +source files (typically in JSON or XML format) using object mappings. The importer provides functionality +for updating an existing persistent store or creating a seed database that can be used to bootstrap a new +persistent store with an initial data set. + RKManagedObjectImporter.h + + + + + + + //apple_ref/occ/instm/RKManagedObjectImporter/initWithManagedObjectModel:storePath: + Initializes the receiver with a given managed object model and a path at which a SQLite persistent store +should be created to persist imported managed objects. + RKManagedObjectImporter.h + + - (id)initWithManagedObjectModel:(NSManagedObjectModel *)managedObjectModel storePath:(NSString *)storePath + + + managedObjectModel + A Core Data manage object model with which to initialize the receiver. + + storePath + The path at which to create a SQLite persistent store to persist the imported managed objects. + + + The receiver, initialized with the given managed object model and a complete Core Data persistence + stack with a SQLite persistent store at the given store path. + //api/name/initWithManagedObjectModel:storePath: + + + + //apple_ref/occ/instm/RKManagedObjectImporter/initWithPersistentStore: + Initializes the receiver with a given persistent store in which to persist imported managed objects. + RKManagedObjectImporter.h + + - (id)initWithPersistentStore:(NSPersistentStore *)persistentStore + + + persistentStore + A Core Data persistent store with which to initialize the receiver. + + + The receiver, initialized with the given persistent store. The persistent store coordinator and + managed object model are determined from the given persistent store and a new managed object context with + the private queue concurrency type is constructed. + //api/name/initWithPersistentStore: + + + + //apple_ref/occ/instm/RKManagedObjectImporter/setResetsStoreBeforeImporting: + A Boolean value indicating whether existing managed objects in the persistent store should +be deleted before import. + RKManagedObjectImporter.h + + @property (nonatomic, assign) BOOL resetsStoreBeforeImporting + + + //api/name/resetsStoreBeforeImporting + + + + //apple_ref/occ/instp/RKManagedObjectImporter/resetsStoreBeforeImporting + A Boolean value indicating whether existing managed objects in the persistent store should +be deleted before import. + RKManagedObjectImporter.h + + @property (nonatomic, assign) BOOL resetsStoreBeforeImporting + + + //api/name/resetsStoreBeforeImporting + + + + //apple_ref/occ/instm/RKManagedObjectImporter/setPersistentStore: + The persistent store in which imported managed objects will be persisted. + RKManagedObjectImporter.h + + @property (nonatomic, strong, readonly) NSPersistentStore *persistentStore + + + //api/name/persistentStore + + + + //apple_ref/occ/instp/RKManagedObjectImporter/persistentStore + The persistent store in which imported managed objects will be persisted. + RKManagedObjectImporter.h + + @property (nonatomic, strong, readonly) NSPersistentStore *persistentStore + + + //api/name/persistentStore + + + + //apple_ref/occ/instm/RKManagedObjectImporter/setManagedObjectModel: + The managed object model containing entities that may be imported by the receiver. + RKManagedObjectImporter.h + + @property (nonatomic, strong, readonly) NSManagedObjectModel *managedObjectModel + + + //api/name/managedObjectModel + + + + //apple_ref/occ/instp/RKManagedObjectImporter/managedObjectModel + The managed object model containing entities that may be imported by the receiver. + RKManagedObjectImporter.h + + @property (nonatomic, strong, readonly) NSManagedObjectModel *managedObjectModel + + + //api/name/managedObjectModel + + + + //apple_ref/occ/instm/RKManagedObjectImporter/setManagedObjectContext: + A managed object context with the NSPrivateQueueConcurrencyType concurrency type +used to perform the import. + RKManagedObjectImporter.h + + @property (nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext + + + //api/name/managedObjectContext + + + + //apple_ref/occ/instp/RKManagedObjectImporter/managedObjectContext + A managed object context with the NSPrivateQueueConcurrencyType concurrency type +used to perform the import. + RKManagedObjectImporter.h + + @property (nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext + + + //api/name/managedObjectContext + + + + //apple_ref/occ/instm/RKManagedObjectImporter/setStorePath: + A convenience accessor for retrieving the complete filesystem path to the persistent +store in which the receiver will persist imported managed objects. + RKManagedObjectImporter.h + + @property (nonatomic, strong, readonly) NSString *storePath + + + //api/name/storePath + + + + //apple_ref/occ/instp/RKManagedObjectImporter/storePath + A convenience accessor for retrieving the complete filesystem path to the persistent +store in which the receiver will persist imported managed objects. + RKManagedObjectImporter.h + + @property (nonatomic, strong, readonly) NSString *storePath + + + //api/name/storePath + + + + //apple_ref/occ/instm/RKManagedObjectImporter/importObjectsFromItemAtPath:withMapping:keyPath:error: + Imports managed objects from the file or directory at the given path. + RKManagedObjectImporter.h + + - (NSUInteger)importObjectsFromItemAtPath:(NSString *)path withMapping:(RKMapping *)mapping keyPath:(NSString *)keyPath error:(NSError **)error + + + path + The path to the file or directory you wish to import. This parameter must not be nil. + + mapping + The entity or dynamic mapping you wish to use for importing content at the given path. + + keyPath + An optional key path to be evaluated against the results of parsing the content read at the given path. If the + mappable content is not contained in a nesting attribute, the key path should be specified as nil. + + error + On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing + the error information. You may specify nil for this parameter if you do not want the error information. + + + A count of the number of managed object imported from the given path or NSNotFound if an error occurred during import. + //api/name/importObjectsFromItemAtPath:withMapping:keyPath:error: + + + + //apple_ref/occ/instm/RKManagedObjectImporter/finishImporting: + Finishes the import process by saving the managed object context to the persistent store, ensuring all +imported managed objects are written to disk. + RKManagedObjectImporter.h + + - (BOOL)finishImporting:(NSError **)error + + + error + On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing +the error information. You may specify nil for this parameter if you do not want the error information. + + + YES if the save to the persistent store was successful, else NO. + //api/name/finishImporting: + + + + //apple_ref/occ/instm/RKManagedObjectImporter/logSeedingInfo + Logs information about where on the filesystem to access the SQLite database for the persistent +store in which the imported managed objects were persisted. + RKManagedObjectImporter.h + + - (void)logSeedingInfo + + + //api/name/logSeedingInfo + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens16.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens16.xml new file mode 100644 index 00000000..c2c334f8 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens16.xml @@ -0,0 +1,122 @@ + + + + + + //apple_ref/occ/cl/RKManagedObjectMappingOperationDataSource + The RKManagedObjectMappingOperationDataSource class provides support for performing object mapping operations where the mapped objects exist within a Core Data managed object context. The class is responsible for finding exist managed object instances by primary key, instantiating new managed objects, and connecting relationships for mapped objects. + RKManagedObjectMappingOperationDataSource.h + + + + + + + //apple_ref/occ/instm/RKManagedObjectMappingOperationDataSource/initWithManagedObjectContext:cache: + Initializes the receiver with a given managed object context and managed object cache. + RKManagedObjectMappingOperationDataSource.h + + - (id)initWithManagedObjectContext:(NSManagedObjectContext *)managedObjectContext cache:(id<RKManagedObjectCaching>)managedObjectCache + + + managedObjectContext + The managed object context with which to associate the receiver. Cannot be nil. + + managedObjectCache + The managed object cache used by the receiver to find existing object instances by primary key. + + + The receiver, initialized with the given managed object context and managed objet cache. + //api/name/initWithManagedObjectContext:cache: + + + + //apple_ref/occ/instm/RKManagedObjectMappingOperationDataSource/setManagedObjectContext: + The managed object context with which the receiver is associated. + RKManagedObjectMappingOperationDataSource.h + + @property (nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext + + + //api/name/managedObjectContext + + + + //apple_ref/occ/instp/RKManagedObjectMappingOperationDataSource/managedObjectContext + The managed object context with which the receiver is associated. + RKManagedObjectMappingOperationDataSource.h + + @property (nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext + + + //api/name/managedObjectContext + + + + //apple_ref/occ/instm/RKManagedObjectMappingOperationDataSource/setManagedObjectCache: + The managed object cache utilized by the receiver to find existing managed object instances by primary key. A nil managed object cache will result in the insertion of new managed objects for all mapped content. + RKManagedObjectMappingOperationDataSource.h + + @property (nonatomic, strong, readonly) id<RKManagedObjectCaching> managedObjectCache + + + //api/name/managedObjectCache + + + + //apple_ref/occ/instp/RKManagedObjectMappingOperationDataSource/managedObjectCache + The managed object cache utilized by the receiver to find existing managed object instances by primary key. A nil managed object cache will result in the insertion of new managed objects for all mapped content. + RKManagedObjectMappingOperationDataSource.h + + @property (nonatomic, strong, readonly) id<RKManagedObjectCaching> managedObjectCache + + + //api/name/managedObjectCache + + + + //apple_ref/occ/instm/RKManagedObjectMappingOperationDataSource/setParentOperation: + The parent operation upon which instances of RKRelationshipConnectionOperation created by the data source are dependent upon. + RKManagedObjectMappingOperationDataSource.h + + @property (nonatomic, weak) NSOperation *parentOperation + + + //api/name/parentOperation + + + + //apple_ref/occ/instp/RKManagedObjectMappingOperationDataSource/parentOperation + The parent operation upon which instances of RKRelationshipConnectionOperation created by the data source are dependent upon. + RKManagedObjectMappingOperationDataSource.h + + @property (nonatomic, weak) NSOperation *parentOperation + + + //api/name/parentOperation + + + + //apple_ref/occ/instm/RKManagedObjectMappingOperationDataSource/setOperationQueue: + The operation queue in which instances of RKRelationshipConnectionOperation will be enqueued to connect the relationships of mapped objects. + RKManagedObjectMappingOperationDataSource.h + + @property (nonatomic, strong) NSOperationQueue *operationQueue + + + //api/name/operationQueue + + + + //apple_ref/occ/instp/RKManagedObjectMappingOperationDataSource/operationQueue + The operation queue in which instances of RKRelationshipConnectionOperation will be enqueued to connect the relationships of mapped objects. + RKManagedObjectMappingOperationDataSource.h + + @property (nonatomic, strong) NSOperationQueue *operationQueue + + + //api/name/operationQueue + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens17.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens17.xml new file mode 100644 index 00000000..ea1168e8 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens17.xml @@ -0,0 +1,125 @@ + + + + + + //apple_ref/occ/cl/RKManagedObjectRequestOperation + RKManagedObjectRequestOperation is a subclass of RKObjectRequestOperation that implements object mapping on the response body of an NSHTTPResponse loaded via an RKHTTPRequestOperation in which the mapping targets NSManagedObject objects managed by Core Data. + RKManagedObjectRequestOperation.h + + + + + + + //apple_ref/occ/instm/RKManagedObjectRequestOperation/setManagedObjectContext: + The managed object context associated with the managed object request operation. + RKManagedObjectRequestOperation.h + + @property (nonatomic, strong) NSManagedObjectContext *managedObjectContext + + + //api/name/managedObjectContext + + + + //apple_ref/occ/instp/RKManagedObjectRequestOperation/managedObjectContext + The managed object context associated with the managed object request operation. + RKManagedObjectRequestOperation.h + + @property (nonatomic, strong) NSManagedObjectContext *managedObjectContext + + + //api/name/managedObjectContext + + + + //apple_ref/occ/instm/RKManagedObjectRequestOperation/setManagedObjectCache: + The managed object cache associated with the managed object request operation. + RKManagedObjectRequestOperation.h + + @property (nonatomic, weak) id<RKManagedObjectCaching> managedObjectCache + + + //api/name/managedObjectCache + + + + //apple_ref/occ/instp/RKManagedObjectRequestOperation/managedObjectCache + The managed object cache associated with the managed object request operation. + RKManagedObjectRequestOperation.h + + @property (nonatomic, weak) id<RKManagedObjectCaching> managedObjectCache + + + //api/name/managedObjectCache + + + + //apple_ref/occ/instm/RKManagedObjectRequestOperation/setFetchRequestBlocks: + An array of RKFetchRequestBlock block objects used to map NSURL objects into corresponding NSFetchRequest objects. + RKManagedObjectRequestOperation.h + + @property (nonatomic, copy) NSArray *fetchRequestBlocks + + + //api/name/fetchRequestBlocks + + + + //apple_ref/occ/instp/RKManagedObjectRequestOperation/fetchRequestBlocks + An array of RKFetchRequestBlock block objects used to map NSURL objects into corresponding NSFetchRequest objects. + RKManagedObjectRequestOperation.h + + @property (nonatomic, copy) NSArray *fetchRequestBlocks + + + //api/name/fetchRequestBlocks + + + + //apple_ref/occ/instm/RKManagedObjectRequestOperation/setDeletesOrphanedObjects: + A Boolean value that determines if the receiver will delete orphaned objects upon completion of the operation. + RKManagedObjectRequestOperation.h + + @property (nonatomic, assign) BOOL deletesOrphanedObjects + + + //api/name/deletesOrphanedObjects + + + + //apple_ref/occ/instp/RKManagedObjectRequestOperation/deletesOrphanedObjects + A Boolean value that determines if the receiver will delete orphaned objects upon completion of the operation. + RKManagedObjectRequestOperation.h + + @property (nonatomic, assign) BOOL deletesOrphanedObjects + + + //api/name/deletesOrphanedObjects + + + + //apple_ref/occ/instm/RKManagedObjectRequestOperation/setSavesToPersistentStore: + A Boolean value that determines if the operation saves the mapping results to the persistent store upon successful completion. If the network transport or mapping portions of the operation fail the operation then this option has no effect. + RKManagedObjectRequestOperation.h + + @property (nonatomic, assign) BOOL savesToPersistentStore + + + //api/name/savesToPersistentStore + + + + //apple_ref/occ/instp/RKManagedObjectRequestOperation/savesToPersistentStore + A Boolean value that determines if the operation saves the mapping results to the persistent store upon successful completion. If the network transport or mapping portions of the operation fail the operation then this option has no effect. + RKManagedObjectRequestOperation.h + + @property (nonatomic, assign) BOOL savesToPersistentStore + + + //api/name/savesToPersistentStore + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens18.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens18.xml new file mode 100644 index 00000000..09cb85b2 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens18.xml @@ -0,0 +1,81 @@ + + + + + + //apple_ref/occ/cl/RKManagedObjectResponseMapperOperation + RKManagedObjectResponseMapperOperation is an RKResponseMapperOperation subclass that provides support for performing object mapping using RKEntityMapping objects that target NSManagedObject derived classes. It requires an NSManagedObjectContext and a configured RKManagedObjectMappingOperationDataSource data source to execute successfully. + RKResponseMapperOperation.h + + + + + + + //apple_ref/occ/instm/RKManagedObjectResponseMapperOperation/setManagedObjectContext: + The managed object context in which the mapping will be performed. + RKResponseMapperOperation.h + + @property (nonatomic, strong) NSManagedObjectContext *managedObjectContext + + + //api/name/managedObjectContext + + + + //apple_ref/occ/instp/RKManagedObjectResponseMapperOperation/managedObjectContext + The managed object context in which the mapping will be performed. + RKResponseMapperOperation.h + + @property (nonatomic, strong) NSManagedObjectContext *managedObjectContext + + + //api/name/managedObjectContext + + + + //apple_ref/occ/instm/RKManagedObjectResponseMapperOperation/setManagedObjectCache: + An object implementing the RKManagedObjectCaching protocol to be used for retrieving existing NSManagedObject instances by primary key. If nil, existing object cannot be retrieved and new objects will be created for all mappable content within the response data, likely resulting in the creation of duplicate objects. + RKResponseMapperOperation.h + + @property (nonatomic, weak) id<RKManagedObjectCaching> managedObjectCache + + + //api/name/managedObjectCache + + + + //apple_ref/occ/instp/RKManagedObjectResponseMapperOperation/managedObjectCache + An object implementing the RKManagedObjectCaching protocol to be used for retrieving existing NSManagedObject instances by primary key. If nil, existing object cannot be retrieved and new objects will be created for all mappable content within the response data, likely resulting in the creation of duplicate objects. + RKResponseMapperOperation.h + + @property (nonatomic, weak) id<RKManagedObjectCaching> managedObjectCache + + + //api/name/managedObjectCache + + + + //apple_ref/occ/instm/RKManagedObjectResponseMapperOperation/setTargetObjectID: + The permanent NSManagedObjectID for the target object of the mapping operation. During mapping, an instance local to the managedObjectContext is fetched and used to perform the mapping operation. + RKResponseMapperOperation.h + + @property (nonatomic, copy) NSManagedObjectID *targetObjectID + + + //api/name/targetObjectID + + + + //apple_ref/occ/instp/RKManagedObjectResponseMapperOperation/targetObjectID + The permanent NSManagedObjectID for the target object of the mapping operation. During mapping, an instance local to the managedObjectContext is fetched and used to perform the mapping operation. + RKResponseMapperOperation.h + + @property (nonatomic, copy) NSManagedObjectID *targetObjectID + + + //api/name/targetObjectID + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens19.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens19.xml new file mode 100644 index 00000000..4d0614e3 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens19.xml @@ -0,0 +1,350 @@ + + + + + + //apple_ref/occ/cl/RKManagedObjectStore + The RKManagedObjectStore class encapsulates a Core Data stack including a managed object model, a persistent store coordinator, and a set of managed object contexts. The managed object store simplifies the task of properly setting up a Core Data stack and provides some additional functionality, such as the use of a seed database to initialize a SQLite backed persistent store and a simple code path for resetting the store by destroying and recreating the persistent stores. + RKManagedObjectStore.h + + + + + + + //apple_ref/occ/clm/RKManagedObjectStore/defaultStore + Returns the default managed object store for the application. + RKManagedObjectStore.h + + + (RKManagedObjectStore *)defaultStore + + The default managed object store. + //api/name/defaultStore + + + + //apple_ref/occ/clm/RKManagedObjectStore/setDefaultStore: + Sets the default managed object store for the application. + RKManagedObjectStore.h + + + (void)setDefaultStore:(RKManagedObjectStore *)managedObjectStore + + + managedObjectStore + The new default managed object store. + + + + //api/name/setDefaultStore: + + + + //apple_ref/occ/instm/RKManagedObjectStore/initWithManagedObjectModel: + Initializes the receiver with a given managed object model. This is the designated initializer for RKManagedObjectStore. + RKManagedObjectStore.h + + - (id)initWithManagedObjectModel:(NSManagedObjectModel *)managedObjectModel + + + managedObjectModel + The managed object model with which to initialize the receiver. + + + The receiver, initialized with the given managed object model. + //api/name/initWithManagedObjectModel: + + + + //apple_ref/occ/instm/RKManagedObjectStore/initWithPersistentStoreCoordinator: + Initializes the receiver with an existing persistent store coordinator. + RKManagedObjectStore.h + + - (id)initWithPersistentStoreCoordinator:(NSPersistentStoreCoordinator *)persistentStoreCoordinator + + + persistentStoreCoordinator + The persistent store coordinator with which to initialize the receiver. + + + The receiver, initialized with the managed object model of the given persistent store coordinator and the persistent store coordinator. + //api/name/initWithPersistentStoreCoordinator: + + + + //apple_ref/occ/instm/RKManagedObjectStore/init + Initializes the receiver with a managed object model obtained by merging the models from all of the application's non-framework bundles. + RKManagedObjectStore.h + + - (id)init + + + //api/name/init + + + + //apple_ref/occ/instm/RKManagedObjectStore/createPersistentStoreCoordinator + Creates a persistent store coordinator with the receiver's managed object model. After invocation, the persistentStoreCoordinator property will no longer be nil. + RKManagedObjectStore.h + + - (void)createPersistentStoreCoordinator + + + //api/name/createPersistentStoreCoordinator + + + + //apple_ref/occ/instm/RKManagedObjectStore/addInMemoryPersistentStore: + Adds a new in memory persistent store to the persistent store coordinator of the receiver. + RKManagedObjectStore.h + + - (NSPersistentStore *)addInMemoryPersistentStore:(NSError **)error + + + error + On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information. + + + The new persistent store, or nil in the event of an error. + //api/name/addInMemoryPersistentStore: + + + + //apple_ref/occ/instm/RKManagedObjectStore/addSQLitePersistentStoreAtPath:fromSeedDatabaseAtPath:error: + Adds a new SQLite persistent store, optionally initialized with a seed database, to the persistent store coordinator of the receiver. + RKManagedObjectStore.h + + - (NSPersistentStore *)addSQLitePersistentStoreAtPath:(NSString *)storePath fromSeedDatabaseAtPath:(NSString *)seedPath error:(NSError **)error + + + storePath + The path at which to save the persistent store on disk. + + seedPath + An optional path to a seed database to copy to the given storePath in the event that a store does not yet exist. + + error + On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information. + + + + //api/name/addSQLitePersistentStoreAtPath:fromSeedDatabaseAtPath:error: + + + + //apple_ref/occ/instm/RKManagedObjectStore/resetPersistentStores: + Resets the persistent stores in the receiver's persistent store coordinator and recreates them. If a store being reset is backed by a file on disk (such as a SQLite file), the file will be removed prior to recreating the store. If the store was originally created using a seed database, the seed will be recopied to reset the store to its seeded state. + RKManagedObjectStore.h + + - (BOOL)resetPersistentStores:(NSError **)error + + + error + On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information. + + + A Boolean value indicating if the reset was successful. + //api/name/resetPersistentStores: + + + + //apple_ref/occ/instm/RKManagedObjectStore/setManagedObjectModel: + Returns the managed object model of the receiver. + RKManagedObjectStore.h + + @property (nonatomic, strong, readonly) NSManagedObjectModel *managedObjectModel + + The managed object model of the receiver. + //api/name/managedObjectModel + + + + //apple_ref/occ/instp/RKManagedObjectStore/managedObjectModel + Returns the managed object model of the receiver. + RKManagedObjectStore.h + + @property (nonatomic, strong, readonly) NSManagedObjectModel *managedObjectModel + + The managed object model of the receiver. + //api/name/managedObjectModel + + + + //apple_ref/occ/instm/RKManagedObjectStore/setPersistentStoreCoordinator: + Returns the persistent store coordinator of the receiver. + RKManagedObjectStore.h + + @property (nonatomic, strong, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator + + The persistent store coordinator of the receiver. + //api/name/persistentStoreCoordinator + + + + //apple_ref/occ/instp/RKManagedObjectStore/persistentStoreCoordinator + Returns the persistent store coordinator of the receiver. + RKManagedObjectStore.h + + @property (nonatomic, strong, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator + + The persistent store coordinator of the receiver. + //api/name/persistentStoreCoordinator + + + + //apple_ref/occ/instm/RKManagedObjectStore/setManagedObjectCache: + The managed object cache associated with the receiver. + RKManagedObjectStore.h + + @property (nonatomic, strong) id<RKManagedObjectCaching> managedObjectCache + + + //api/name/managedObjectCache + + + + //apple_ref/occ/instp/RKManagedObjectStore/managedObjectCache + The managed object cache associated with the receiver. + RKManagedObjectStore.h + + @property (nonatomic, strong) id<RKManagedObjectCaching> managedObjectCache + + + //api/name/managedObjectCache + + + + //apple_ref/occ/instm/RKManagedObjectStore/createManagedObjectContexts + Creates the persistent store and main queue managed object contexts for the receiver. + RKManagedObjectStore.h + + - (void)createManagedObjectContexts + + + //api/name/createManagedObjectContexts + + + + //apple_ref/occ/instm/RKManagedObjectStore/setPersistentStoreManagedObjectContext: + Returns the managed object context of the receiver that is associated with the persistent store coordinator and is responsible for managing persistence. + RKManagedObjectStore.h + + @property (nonatomic, strong, readonly) NSManagedObjectContext *persistentStoreManagedObjectContext + + + //api/name/persistentStoreManagedObjectContext + + + + //apple_ref/occ/instp/RKManagedObjectStore/persistentStoreManagedObjectContext + Returns the managed object context of the receiver that is associated with the persistent store coordinator and is responsible for managing persistence. + RKManagedObjectStore.h + + @property (nonatomic, strong, readonly) NSManagedObjectContext *persistentStoreManagedObjectContext + + + //api/name/persistentStoreManagedObjectContext + + + + //apple_ref/occ/instm/RKManagedObjectStore/setMainQueueManagedObjectContext: + The main queue managed object context of the receiver. + RKManagedObjectStore.h + + @property (nonatomic, strong, readonly) NSManagedObjectContext *mainQueueManagedObjectContext + + + //api/name/mainQueueManagedObjectContext + + + + //apple_ref/occ/instp/RKManagedObjectStore/mainQueueManagedObjectContext + The main queue managed object context of the receiver. + RKManagedObjectStore.h + + @property (nonatomic, strong, readonly) NSManagedObjectContext *mainQueueManagedObjectContext + + + //api/name/mainQueueManagedObjectContext + + + + //apple_ref/occ/instm/RKManagedObjectStore/newChildManagedObjectContextWithConcurrencyType: + Creates a new child managed object context of the persistent store managed object context with a given concurrency type. + RKManagedObjectStore.h + + - (NSManagedObjectContext *)newChildManagedObjectContextWithConcurrencyType:(NSManagedObjectContextConcurrencyType)concurrencyType + + + concurrencyType + The desired concurrency type for the new context. + + + A newly created managed object context with the given concurrency type whose parent is the persistentStoreManagedObjectContext. + //api/name/newChildManagedObjectContextWithConcurrencyType: + + + + //apple_ref/occ/instm/RKManagedObjectStore/addSearchIndexingToEntityForName:onAttributes: + Adds search indexing to the entity for the given name in the receiver's managed object model. + RKManagedObjectStore+RKSearchAdditions.h + + - (void)addSearchIndexingToEntityForName:(NSString *)entityName onAttributes:(NSArray *)attributes + + + entityName + The name of the entity in the receiver's managed object model that should be made searchable. + + attributes + An array of NSAttributeDescription objects or NSString attribute names specifying the NSStringAttributeType attributes that are to be indexed for searching. + + + + //api/name/addSearchIndexingToEntityForName:onAttributes: + + + + //apple_ref/occ/instm/RKManagedObjectStore/setSearchIndexer: + The search indexer for the receiver's primary managed object context. + RKManagedObjectStore+RKSearchAdditions.h + + @property (nonatomic, readonly) RKSearchIndexer *searchIndexer + + + //api/name/searchIndexer + + + + //apple_ref/occ/instp/RKManagedObjectStore/searchIndexer + The search indexer for the receiver's primary managed object context. + RKManagedObjectStore+RKSearchAdditions.h + + @property (nonatomic, readonly) RKSearchIndexer *searchIndexer + + + //api/name/searchIndexer + + + + //apple_ref/occ/instm/RKManagedObjectStore/startIndexingPersistentStoreManagedObjectContext + Tells the search indexer to begin observing the persistent store managed object context for changes to searchable entities and updating the search words. + RKManagedObjectStore+RKSearchAdditions.h + + - (void)startIndexingPersistentStoreManagedObjectContext + + + //api/name/startIndexingPersistentStoreManagedObjectContext + + + + //apple_ref/occ/instm/RKManagedObjectStore/stopIndexingPersistentStoreManagedObjectContext + Tells the search indexer to stop observing the persistent store managed object context for changes to searchable entities. + RKManagedObjectStore+RKSearchAdditions.h + + - (void)stopIndexingPersistentStoreManagedObjectContext + + + //api/name/stopIndexingPersistentStoreManagedObjectContext + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens2.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens2.xml new file mode 100644 index 00000000..72ef12fe --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens2.xml @@ -0,0 +1,94 @@ + + + + + + //apple_ref/occ/cl/RKConnectionMapping + Conditionally connect a relationship of the object being mapped when the object being mapped has +block evaluate to YES. This variant is useful in cases where you want to execute an arbitrary +block to determine whether or not to connect a relationship. + RKConnectionMapping.h + + + + + + + //apple_ref/occ/instm/RKConnectionMapping/setRelationship: + + RKConnectionMapping.h + + @property (nonatomic, strong, readonly) NSRelationshipDescription *relationship + + + //api/name/relationship + + + + //apple_ref/occ/instp/RKConnectionMapping/relationship + + RKConnectionMapping.h + + @property (nonatomic, strong, readonly) NSRelationshipDescription *relationship + + + //api/name/relationship + + + + //apple_ref/occ/instm/RKConnectionMapping/setMatcher: + + RKConnectionMapping.h + + @property (nonatomic, strong, readonly) RKDynamicMappingMatcher *matcher + + + //api/name/matcher + + + + //apple_ref/occ/instp/RKConnectionMapping/matcher + + RKConnectionMapping.h + + @property (nonatomic, strong, readonly) RKDynamicMappingMatcher *matcher + + + //api/name/matcher + + + + //apple_ref/occ/instm/RKConnectionMapping/isForeignKeyConnection + + RKConnectionMapping.h + + - (BOOL)isForeignKeyConnection + + + //api/name/isForeignKeyConnection + + + + //apple_ref/occ/instm/RKConnectionMapping/isKeyPathConnection + + RKConnectionMapping.h + + - (BOOL)isKeyPathConnection + + + //api/name/isKeyPathConnection + + + + //apple_ref/occ/instm/RKConnectionMapping/initWithRelationship:sourceKeyPath:destinationKeyPath:matcher: + ** + RKConnectionMapping.h + + - (id)initWithRelationship:(NSRelationshipDescription *)relationship sourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath matcher:(RKDynamicMappingMatcher *)matcher + + + //api/name/initWithRelationship:sourceKeyPath:destinationKeyPath:matcher: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens20.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens20.xml new file mode 100644 index 00000000..bd13a968 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens20.xml @@ -0,0 +1,92 @@ + + + + + + //apple_ref/occ/cl/RKManagedObjectThreadSafeInvocation + + RKManagedObjectThreadSafeInvocation.h + + + + + + + //apple_ref/occ/instm/RKManagedObjectThreadSafeInvocation/setPrivateQueueManagedObjectContext: + + RKManagedObjectThreadSafeInvocation.h + + @property (nonatomic, strong) NSManagedObjectContext *privateQueueManagedObjectContext + + + //api/name/privateQueueManagedObjectContext + + + + //apple_ref/occ/instp/RKManagedObjectThreadSafeInvocation/privateQueueManagedObjectContext + + RKManagedObjectThreadSafeInvocation.h + + @property (nonatomic, strong) NSManagedObjectContext *privateQueueManagedObjectContext + + + //api/name/privateQueueManagedObjectContext + + + + //apple_ref/occ/instm/RKManagedObjectThreadSafeInvocation/setMainQueueManagedObjectContext: + + RKManagedObjectThreadSafeInvocation.h + + @property (nonatomic, strong) NSManagedObjectContext *mainQueueManagedObjectContext + + + //api/name/mainQueueManagedObjectContext + + + + //apple_ref/occ/instp/RKManagedObjectThreadSafeInvocation/mainQueueManagedObjectContext + + RKManagedObjectThreadSafeInvocation.h + + @property (nonatomic, strong) NSManagedObjectContext *mainQueueManagedObjectContext + + + //api/name/mainQueueManagedObjectContext + + + + //apple_ref/occ/clm/RKManagedObjectThreadSafeInvocation/invocationWithMethodSignature: + + RKManagedObjectThreadSafeInvocation.h + + + (RKManagedObjectThreadSafeInvocation *)invocationWithMethodSignature:(NSMethodSignature *)methodSignature + + + //api/name/invocationWithMethodSignature: + + + + //apple_ref/occ/instm/RKManagedObjectThreadSafeInvocation/setManagedObjectKeyPaths:forArgument: + + RKManagedObjectThreadSafeInvocation.h + + - (void)setManagedObjectKeyPaths:(NSSet *)keyPaths forArgument:(NSInteger)index + + + //api/name/setManagedObjectKeyPaths:forArgument: + + + + //apple_ref/occ/instm/RKManagedObjectThreadSafeInvocation/invokeOnMainThread + + RKManagedObjectThreadSafeInvocation.h + + - (void)invokeOnMainThread + + + //api/name/invokeOnMainThread + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens21.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens21.xml new file mode 100644 index 00000000..2e45c181 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens21.xml @@ -0,0 +1,232 @@ + + + + + + //apple_ref/occ/cl/RKMapperOperation + RKMapperOperation is an NSOperation subclass that implements object mapping for opaque object representations. Given a dictionary or an array of dictionaries that represent objects and a dictionary describing how to map the representations, the mapper will transform the source representations into NSObject or NSManagedObject instances. Mapper operations are used to map object representations from Foundation object representations, such as those deserialized from a JSON or XML document or loaded from a file. Not all the mappings specified in the mappings dictionary are required to match content in the source object for the operation to succeed. However, if none of the mappable key paths in the mappings dictionary match the source object then the operation will fail and the error property will be set to an NSError object in the RKErrorDomain domain with an error code value of RKMappingErrorNotFound. + RKMapperOperation.h + + + + + + + //apple_ref/occ/instm/RKMapperOperation/initWithObject:mappingsDictionary: + Initializes the operation with a source object and a mappings dictionary. + RKMapperOperation.h + + - (id)initWithObject:(id)object mappingsDictionary:(NSDictionary *)mappingsDictionary + + + object + An NSDictionary or NSArray of NSDictionary object representations to be mapped into local domain objects. + + mappingsDictionary + An NSDictionary wherein the keys are mappable key paths in object and the values are RKMapping objects specifying how the representations at its key path are to be mapped. + + + The receiver, initialized with the given object and and dictionary of key paths to mappings. + //api/name/initWithObject:mappingsDictionary: + + + + //apple_ref/occ/instm/RKMapperOperation/setError: + The error, if any, that occurred during the mapping process. + RKMapperOperation.h + + @property (nonatomic, strong, readonly) NSError *error + + + //api/name/error + + + + //apple_ref/occ/instp/RKMapperOperation/error + The error, if any, that occurred during the mapping process. + RKMapperOperation.h + + @property (nonatomic, strong, readonly) NSError *error + + + //api/name/error + + + + //apple_ref/occ/instm/RKMapperOperation/setMappingResult: + The result of the mapping process. A nil value indicates that no mappable object representations were found and no mapping was performed. + RKMapperOperation.h + + @property (nonatomic, strong, readonly) RKMappingResult *mappingResult + + + //api/name/mappingResult + + + + //apple_ref/occ/instp/RKMapperOperation/mappingResult + The result of the mapping process. A nil value indicates that no mappable object representations were found and no mapping was performed. + RKMapperOperation.h + + @property (nonatomic, strong, readonly) RKMappingResult *mappingResult + + + //api/name/mappingResult + + + + //apple_ref/occ/instm/RKMapperOperation/setSourceObject: + The source object representation against which the mapping is performed. + RKMapperOperation.h + + @property (nonatomic, strong, readonly) id sourceObject + + + //api/name/sourceObject + + + + //apple_ref/occ/instp/RKMapperOperation/sourceObject + The source object representation against which the mapping is performed. + RKMapperOperation.h + + @property (nonatomic, strong, readonly) id sourceObject + + + //api/name/sourceObject + + + + //apple_ref/occ/instm/RKMapperOperation/setMappingsDictionary: + A dictionary of key paths to RKMapping objects specifying how object representations in the sourceObject are to be mapped. + RKMapperOperation.h + + @property (nonatomic, strong, readonly) NSDictionary *mappingsDictionary + + + //api/name/mappingsDictionary + + + + //apple_ref/occ/instp/RKMapperOperation/mappingsDictionary + A dictionary of key paths to RKMapping objects specifying how object representations in the sourceObject are to be mapped. + RKMapperOperation.h + + @property (nonatomic, strong, readonly) NSDictionary *mappingsDictionary + + + //api/name/mappingsDictionary + + + + //apple_ref/occ/instm/RKMapperOperation/setTargetObject: + The target object of the mapper. When configured, all object mapping will target the specified object. + RKMapperOperation.h + + @property (nonatomic, weak) id targetObject + + + //api/name/targetObject + + + + //apple_ref/occ/instp/RKMapperOperation/targetObject + The target object of the mapper. When configured, all object mapping will target the specified object. + RKMapperOperation.h + + @property (nonatomic, weak) id targetObject + + + //api/name/targetObject + + + + //apple_ref/occ/instm/RKMapperOperation/setMappingOperationDataSource: + The data source for the underlying RKMappingOperation objects that perform the mapping work configured by the mapper. + RKMapperOperation.h + + @property (nonatomic, strong) id<RKMappingOperationDataSource> mappingOperationDataSource + + + //api/name/mappingOperationDataSource + + + + //apple_ref/occ/instp/RKMapperOperation/mappingOperationDataSource + The data source for the underlying RKMappingOperation objects that perform the mapping work configured by the mapper. + RKMapperOperation.h + + @property (nonatomic, strong) id<RKMappingOperationDataSource> mappingOperationDataSource + + + //api/name/mappingOperationDataSource + + + + //apple_ref/occ/instm/RKMapperOperation/setDelegate: + The delegate for the mapper operation. + RKMapperOperation.h + + @property (nonatomic, weak) id<RKMapperOperationDelegate> delegate + + + //api/name/delegate + + + + //apple_ref/occ/instp/RKMapperOperation/delegate + The delegate for the mapper operation. + RKMapperOperation.h + + @property (nonatomic, weak) id<RKMapperOperationDelegate> delegate + + + //api/name/delegate + + + + //apple_ref/occ/instm/RKMapperOperation/mapObject:atKeyPath:usingMapping: + + RKMapperOperation_Private.h + + - (id)mapObject:(id)mappableObject atKeyPath:(NSString *)keyPath usingMapping:(RKMapping *)mapping + + + //api/name/mapObject:atKeyPath:usingMapping: + + + + //apple_ref/occ/instm/RKMapperOperation/mapCollection:atKeyPath:usingMapping: + + RKMapperOperation_Private.h + + - (NSArray *)mapCollection:(NSArray *)mappableObjects atKeyPath:(NSString *)keyPath usingMapping:(RKMapping *)mapping + + + //api/name/mapCollection:atKeyPath:usingMapping: + + + + //apple_ref/occ/instm/RKMapperOperation/mapFromObject:toObject:atKeyPath:usingMapping: + + RKMapperOperation_Private.h + + - (BOOL)mapFromObject:(id)mappableObject toObject:(id)destinationObject atKeyPath:(NSString *)keyPath usingMapping:(RKMapping *)mapping + + + //api/name/mapFromObject:toObject:atKeyPath:usingMapping: + + + + //apple_ref/occ/instm/RKMapperOperation/objectWithMapping:andData: + + RKMapperOperation_Private.h + + - (id)objectWithMapping:(RKMapping *)objectMapping andData:(id)mappableData + + + //api/name/objectWithMapping:andData: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens22.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens22.xml new file mode 100644 index 00000000..9e1d3ef2 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens22.xml @@ -0,0 +1,48 @@ + + + + + + //apple_ref/occ/cl/RKMapping + RKMapping is an abstract class for objects defining RestKit object mappings. Its interface is common to all object mapping classes, including its concrete subclasses RKObjectMapping and RKDynamicMapping. + RKMapping.h + + + + + + + //apple_ref/occ/instm/RKMapping/setForceCollectionMapping: + Forces the mapper to treat the mapped keyPath as a collection even if it does not return an array or a set of objects. This permits mapping where a dictionary identifies a collection of objects. + RKMapping.h + + @property (nonatomic, assign) BOOL forceCollectionMapping + + + //api/name/forceCollectionMapping + + + + //apple_ref/occ/instp/RKMapping/forceCollectionMapping + Forces the mapper to treat the mapped keyPath as a collection even if it does not return an array or a set of objects. This permits mapping where a dictionary identifies a collection of objects. + RKMapping.h + + @property (nonatomic, assign) BOOL forceCollectionMapping + + + //api/name/forceCollectionMapping + + + + //apple_ref/occ/instm/RKMapping/isEqualToMapping: + Returns YES if the receiver and the specified mapping are considered equivalent. + RKMapping.h + + - (BOOL)isEqualToMapping:(RKMapping *)otherMapping + + + //api/name/isEqualToMapping: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens23.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens23.xml new file mode 100644 index 00000000..d940e8ab --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens23.xml @@ -0,0 +1,207 @@ + + + + + + //apple_ref/occ/cl/RKMappingOperation + Instances of RKMappingOperation perform transformation between object representations according to the rules expressed in RKObjectMapping objects. Mapping operations provide the foundation for the RestKit object mapping engine and perform the work of inspecting the attributes and relationships of a source object and determining how to map them into new representations on a destination object. + RKMappingOperation.h + + + + + + + //apple_ref/occ/instm/RKMappingOperation/initWithSourceObject:destinationObject:mapping: + Initializes the receiver with a source object, a destination object and an object mapping with which to perform an object mapping. + RKMappingOperation.h + + - (id)initWithSourceObject:(id)sourceObject destinationObject:(id)destinationObject mapping:(RKMapping *)objectOrDynamicMapping + + + sourceObject + The source object to be mapped. Cannot be nil. + + destinationObject + The destination object the results are to be mapped onto. May be nil, in which case a new object target object will be obtained from the dataSource. + + objectOrDynamicMapping + An instance of RKObjectMapping or RKDynamicMapping defining how the mapping is to be performed. + + + The receiver, initialized with a source object, a destination object, and a mapping. + //api/name/initWithSourceObject:destinationObject:mapping: + + + + //apple_ref/occ/instm/RKMappingOperation/setSourceObject: + A dictionary of mappable elements containing simple values or nested object structures. + RKMappingOperation.h + + @property (nonatomic, strong, readonly) id sourceObject + + + //api/name/sourceObject + + + + //apple_ref/occ/instp/RKMappingOperation/sourceObject + A dictionary of mappable elements containing simple values or nested object structures. + RKMappingOperation.h + + @property (nonatomic, strong, readonly) id sourceObject + + + //api/name/sourceObject + + + + //apple_ref/occ/instm/RKMappingOperation/setDestinationObject: + The target object for this operation. Mappable values in the source object will be applied to the destination object using key-value coding. + RKMappingOperation.h + + @property (nonatomic, strong, readonly) id destinationObject + + + //api/name/destinationObject + + + + //apple_ref/occ/instp/RKMappingOperation/destinationObject + The target object for this operation. Mappable values in the source object will be applied to the destination object using key-value coding. + RKMappingOperation.h + + @property (nonatomic, strong, readonly) id destinationObject + + + //api/name/destinationObject + + + + //apple_ref/occ/instm/RKMappingOperation/setMapping: + The mapping defining how values contained in the source object should be transformed to the destination object via key-value coding. + RKMappingOperation.h + + @property (nonatomic, strong, readonly) RKMapping *mapping + + + //api/name/mapping + + + + //apple_ref/occ/instp/RKMappingOperation/mapping + The mapping defining how values contained in the source object should be transformed to the destination object via key-value coding. + RKMappingOperation.h + + @property (nonatomic, strong, readonly) RKMapping *mapping + + + //api/name/mapping + + + + //apple_ref/occ/instm/RKMappingOperation/setObjectMapping: + The concrete object mapping for the operation. + RKMappingOperation.h + + @property (nonatomic, strong, readonly) RKObjectMapping *objectMapping + + + //api/name/objectMapping + + + + //apple_ref/occ/instp/RKMappingOperation/objectMapping + The concrete object mapping for the operation. + RKMappingOperation.h + + @property (nonatomic, strong, readonly) RKObjectMapping *objectMapping + + + //api/name/objectMapping + + + + //apple_ref/occ/instm/RKMappingOperation/setDelegate: + The delegate to inform of interesting events during the mapping operation lifecycle. + RKMappingOperation.h + + @property (nonatomic, weak) id<RKMappingOperationDelegate> delegate + + + //api/name/delegate + + + + //apple_ref/occ/instp/RKMappingOperation/delegate + The delegate to inform of interesting events during the mapping operation lifecycle. + RKMappingOperation.h + + @property (nonatomic, weak) id<RKMappingOperationDelegate> delegate + + + //api/name/delegate + + + + //apple_ref/occ/instm/RKMappingOperation/setDataSource: + The data source is responsible for providing the mapping operation with an appropriate target object for mapping when the destinationObject is nil. + RKMappingOperation.h + + @property (nonatomic, weak) id<RKMappingOperationDataSource> dataSource + + + //api/name/dataSource + + + + //apple_ref/occ/instp/RKMappingOperation/dataSource + The data source is responsible for providing the mapping operation with an appropriate target object for mapping when the destinationObject is nil. + RKMappingOperation.h + + @property (nonatomic, weak) id<RKMappingOperationDataSource> dataSource + + + //api/name/dataSource + + + + //apple_ref/occ/instm/RKMappingOperation/setError: + The error, if any, that occurred during the execution of the mapping operation. + RKMappingOperation.h + + @property (nonatomic, strong, readonly) NSError *error + + + //api/name/error + + + + //apple_ref/occ/instp/RKMappingOperation/error + The error, if any, that occurred during the execution of the mapping operation. + RKMappingOperation.h + + @property (nonatomic, strong, readonly) NSError *error + + + //api/name/error + + + + //apple_ref/occ/instm/RKMappingOperation/performMapping: + Process all mappable values from the mappable dictionary and assign them to the target object according to the rules expressed in the object mapping definition + RKMappingOperation.h + + - (BOOL)performMapping:(NSError **)error + + + error + A pointer to an NSError reference to capture any error that occurs during the mapping. May be nil. + + + A Boolean value indicating if the mapping operation was successful. + //api/name/performMapping: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens24.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens24.xml new file mode 100644 index 00000000..e64970b7 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens24.xml @@ -0,0 +1,86 @@ + + + + + + //apple_ref/occ/cl/RKMappingResult + The RKMappingResult class represents the aggregate object mapping results returned by an RKMapperOperation object. The mapping result provides a thin interface on top of an NSDictionary and provides convenient interfaces for accessing the mapping results in various representations. + RKMappingResult.h + + + + + + + //apple_ref/occ/instm/RKMappingResult/initWithDictionary: + Initializes the receiver with a dictionary of mapped key paths and object values. + RKMappingResult.h + + - (id)initWithDictionary:(NSDictionary *)dictionary + + + dictionary + A dictionary wherein the keys represent mapped key paths and the values represent the objects mapped at those key paths. Cannot be nil. + + + The receiver, initialized with the given dictionary. + //api/name/initWithDictionary: + + + + //apple_ref/occ/instm/RKMappingResult/dictionary + Returns a representation of the mapping result as a dictionary. + RKMappingResult.h + + - (NSDictionary *)dictionary + + A dictionary containing the mapping results. + //api/name/dictionary + + + + //apple_ref/occ/instm/RKMappingResult/firstObject + Returns a representation of the mapping result as a single object by returning the first mapped value from the aggregate array of mapped objects. + RKMappingResult.h + + - (id)firstObject + + The first object contained in the mapping result. + //api/name/firstObject + + + + //apple_ref/occ/instm/RKMappingResult/array + Returns a representation of the mapping result as an array of objects. + RKMappingResult.h + + - (NSArray *)array + + An array containing the objects contained in the mapping result. + //api/name/array + + + + //apple_ref/occ/instm/RKMappingResult/set + Returns a representation of the mapping result as a set of objects. + RKMappingResult.h + + - (NSSet *)set + + A set containing the objects contained in the mapping result. + //api/name/set + + + + //apple_ref/occ/instm/RKMappingResult/count + Returns a count of the number of objects contained in the mapping result. This is an aggregate count of all objects across all mapped key paths in the result. + RKMappingResult.h + + - (NSUInteger)count + + A count of the number of mapped objects in the mapping result. + //api/name/count + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens25.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens25.xml new file mode 100644 index 00000000..2e98c6ab --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens25.xml @@ -0,0 +1,389 @@ + + + + + + //apple_ref/occ/cl/RKMappingTest + An RKMappingTest object provides support for unit testing a RestKit object mapping operation by evaluation expectations against events recorded during an object mapping operation. + RKMappingTest.h + + + + + + + //apple_ref/occ/clm/RKMappingTest/testForMapping:sourceObject:destinationObject: + Creates and returns a new test for a given object mapping, source object and destination +object. + RKMappingTest.h + + + (RKMappingTest *)testForMapping:(RKMapping *)mapping sourceObject:(id)sourceObject destinationObject:(id)destinationObject + + + mapping + The mapping being tested. + + sourceObject + The source object being mapped from. + + destinationObject + The destionation object being to. + + + A new mapping test object for a mapping, a source object and a destination object. + //api/name/testForMapping:sourceObject:destinationObject: + + + + //apple_ref/occ/instm/RKMappingTest/initWithMapping:sourceObject:destinationObject: + Initializes the receiver with a given object mapping, source object, and destination object. + RKMappingTest.h + + - (id)initWithMapping:(RKMapping *)mapping sourceObject:(id)sourceObject destinationObject:(id)destinationObject + + + mapping + The mapping being tested. + + sourceObject + The source object being mapped from. + + destinationObject + The destionation object being to. + + + The receiver, initialized with mapping, sourceObject and destinationObject. + //api/name/initWithMapping:sourceObject:destinationObject: + + + + //apple_ref/occ/instm/RKMappingTest/expectMappingFromKeyPath:toKeyPath: + Creates and adds an expectation that a key path on the source object will be mapped to a new key path on the destination object. + RKMappingTest.h + + - (void)expectMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath + + + sourceKeyPath + A key path on the sourceObject that should be mapped from. + + destinationKeyPath + A key path on the destinationObject that should be mapped to. + + + + //api/name/expectMappingFromKeyPath:toKeyPath: + + + + //apple_ref/occ/instm/RKMappingTest/expectMappingFromKeyPath:toKeyPath:withValue: + Creates and adds an expectation that a key path on the source object will be mapped to a new key path on the destination object with a given value. + RKMappingTest.h + + - (void)expectMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath withValue:(id)value + + + sourceKeyPath + A key path on the sourceObject that should be mapped from. + + destinationKeyPath + A key path on the destinationObject that should be mapped from. + + value + A value that is expected to be assigned to destinationKeyPath on the destinationObject. + + + + //api/name/expectMappingFromKeyPath:toKeyPath:withValue: + + + + //apple_ref/occ/instm/RKMappingTest/expectMappingFromKeyPath:toKeyPath:passingTest: + Creates and adds an expectation that a key path on the source object will be mapped to a new key path on the destination object with a value that passes a given test block. + RKMappingTest.h + + - (void)expectMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath passingTest:(RKMappingTestExpectationEvaluationBlock)evaluationBlock + + + sourceKeyPath + A key path on the sourceObject that should be mapped from. + + destinationKeyPath + A key path on the destinationObject that should be mapped to. + + evaluationBlock + A block with which to evaluate the success of the mapping. + + + + //api/name/expectMappingFromKeyPath:toKeyPath:passingTest: + + + + //apple_ref/occ/instm/RKMappingTest/expectMappingFromKeyPath:toKeyPath:usingMapping: + Creates and adds an expectation that a key path on the source object will be mapped to a new key path on the destination object using the given object mapping. + RKMappingTest.h + + - (void)expectMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath usingMapping:(RKMapping *)mapping + + + sourceKeyPath + A key path on the sourceObject that should be mapped from. + + destinationKeyPath + A key path on the destinationObject that should be mapped to. + + mapping + An object mapping that should be used for mapping the source key path. + + + + //api/name/expectMappingFromKeyPath:toKeyPath:usingMapping: + + + + //apple_ref/occ/instm/RKMappingTest/addExpectation: + Adds an expectation to the receiver to be evaluated during verification. + RKMappingTest.h + + - (void)addExpectation:(RKMappingTestExpectation *)expectation + + + expectation + An expectation object to evaluate during test verification. + + + + //api/name/addExpectation: + + + + //apple_ref/occ/instm/RKMappingTest/performMapping + Performs the object mapping operation and records any mapping events that occur. The mapping events can be verified against expectation through a subsequent call to verify. + RKMappingTest.h + + - (void)performMapping + + + //api/name/performMapping + + + + //apple_ref/occ/instm/RKMappingTest/verify + Verifies that the mapping is configured correctly by performing an object mapping operation and ensuring that all expectations are met. + RKMappingTest.h + + - (void)verify + + + //api/name/verify + + + + //apple_ref/occ/instm/RKMappingTest/evaluate + Evaluates the expectations and returns a Boolean value indicating if all expectations are satisfied. + RKMappingTest.h + + - (BOOL)evaluate + + YES if all expectations were met, else NO. + //api/name/evaluate + + + + //apple_ref/occ/instm/RKMappingTest/evaluateExpectation:error: + Evaluates the given expectation against the mapping test and returns a Boolean value indicating if the expectation is met by the receiver. + RKMappingTest.h + + - (BOOL)evaluateExpectation:(RKMappingTestExpectation *)expectation error:(NSError **)error + + + expectation + The expectation to evaluate against the receiver. + + error + A pointer to an NSError object to be set describing the failure in the event that the expectation is not met. + + + YES if the expectation is met, else NO. + //api/name/evaluateExpectation:error: + + + + //apple_ref/occ/instm/RKMappingTest/setMapping: + The mapping under test. Can be either an RKObjectMapping or RKDynamicMapping object. + RKMappingTest.h + + @property (nonatomic, strong, readonly) RKMapping *mapping + + + //api/name/mapping + + + + //apple_ref/occ/instp/RKMappingTest/mapping + The mapping under test. Can be either an RKObjectMapping or RKDynamicMapping object. + RKMappingTest.h + + @property (nonatomic, strong, readonly) RKMapping *mapping + + + //api/name/mapping + + + + //apple_ref/occ/instm/RKMappingTest/setMappingOperationDataSource: + A data source for the mapping operation. + RKMappingTest.h + + @property (nonatomic, strong) id<RKMappingOperationDataSource> mappingOperationDataSource + + + //api/name/mappingOperationDataSource + + + + //apple_ref/occ/instp/RKMappingTest/mappingOperationDataSource + A data source for the mapping operation. + RKMappingTest.h + + @property (nonatomic, strong) id<RKMappingOperationDataSource> mappingOperationDataSource + + + //api/name/mappingOperationDataSource + + + + //apple_ref/occ/instm/RKMappingTest/setRootKeyPath: + A key path to apply to the source object to specify the location of the root of the data under test. Useful when testing subsets of a larger payload or object graph. + RKMappingTest.h + + @property (nonatomic, copy) NSString *rootKeyPath + + + //api/name/rootKeyPath + + + + //apple_ref/occ/instp/RKMappingTest/rootKeyPath + A key path to apply to the source object to specify the location of the root of the data under test. Useful when testing subsets of a larger payload or object graph. + RKMappingTest.h + + @property (nonatomic, copy) NSString *rootKeyPath + + + //api/name/rootKeyPath + + + + //apple_ref/occ/instm/RKMappingTest/setSourceObject: + The source object being mapped from. + RKMappingTest.h + + @property (nonatomic, strong, readonly) id sourceObject + + + //api/name/sourceObject + + + + //apple_ref/occ/instp/RKMappingTest/sourceObject + The source object being mapped from. + RKMappingTest.h + + @property (nonatomic, strong, readonly) id sourceObject + + + //api/name/sourceObject + + + + //apple_ref/occ/instm/RKMappingTest/setDestinationObject: + The destionation object being mapped to. + RKMappingTest.h + + @property (nonatomic, strong, readonly) id destinationObject + + + //api/name/destinationObject + + + + //apple_ref/occ/instp/RKMappingTest/destinationObject + The destionation object being mapped to. + RKMappingTest.h + + @property (nonatomic, strong, readonly) id destinationObject + + + //api/name/destinationObject + + + + //apple_ref/occ/instm/RKMappingTest/setVerifiesOnExpect: + A Boolean value that determines if expectations should be verified immediately when added to the receiver. + RKMappingTest.h + + @property (nonatomic, assign) BOOL verifiesOnExpect + + + //api/name/verifiesOnExpect + + + + //apple_ref/occ/instp/RKMappingTest/verifiesOnExpect + A Boolean value that determines if expectations should be verified immediately when added to the receiver. + RKMappingTest.h + + @property (nonatomic, assign) BOOL verifiesOnExpect + + + //api/name/verifiesOnExpect + + + + //apple_ref/occ/instm/RKMappingTest/setManagedObjectContext: + The managed object context within which to perform the mapping test. Required if testing an RKEntityMapping object and an appropriate mappingOperationDataSource has not been configured. + RKMappingTest.h + + @property (nonatomic, strong) NSManagedObjectContext *managedObjectContext + + + //api/name/managedObjectContext + + + + //apple_ref/occ/instp/RKMappingTest/managedObjectContext + The managed object context within which to perform the mapping test. Required if testing an RKEntityMapping object and an appropriate mappingOperationDataSource has not been configured. + RKMappingTest.h + + @property (nonatomic, strong) NSManagedObjectContext *managedObjectContext + + + //api/name/managedObjectContext + + + + //apple_ref/occ/instm/RKMappingTest/setManagedObjectCache: + The managed object cache to use when performing a mapping test. + RKMappingTest.h + + @property (nonatomic, strong) id<RKManagedObjectCaching> managedObjectCache + + + //api/name/managedObjectCache + + + + //apple_ref/occ/instp/RKMappingTest/managedObjectCache + The managed object cache to use when performing a mapping test. + RKMappingTest.h + + @property (nonatomic, strong) id<RKManagedObjectCaching> managedObjectCache + + + //api/name/managedObjectCache + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens26.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens26.xml new file mode 100644 index 00000000..a25b2637 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens26.xml @@ -0,0 +1,221 @@ + + + + + + //apple_ref/occ/cl/RKMappingTestExpectation + An RKMappingTestExpectation object defines an expected mapping event that should occur during the execution of a RKMappingTest. + RKMappingTestExpectation.h + + + + + + + //apple_ref/occ/clm/RKMappingTestExpectation/expectationWithSourceKeyPath:destinationKeyPath: + Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destination object. The value mapped is not evaluated. + RKMappingTestExpectation.h + + + (RKMappingTestExpectation *)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath + + + sourceKeyPath + A key path on the source object that should be mapped. + + destinationKeyPath + A key path on the destination object that should be mapped onto. + + + An expectation specifying that sourceKeyPath should be mapped to destinationKeyPath. + //api/name/expectationWithSourceKeyPath:destinationKeyPath: + + + + //apple_ref/occ/clm/RKMappingTestExpectation/expectationWithSourceKeyPath:destinationKeyPath:value: + Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destination object with a given value. + RKMappingTestExpectation.h + + + (RKMappingTestExpectation *)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath value:(id)value + + + sourceKeyPath + A key path on the source object that should be mapped. + + destinationKeyPath + A key path on the destination object that should be mapped onto. + + value + The value that is expected to be assigned to the destination object at destinationKeyPath. + + + An expectation specifying that sourceKeyPath should be mapped to destinationKeyPath with value. + //api/name/expectationWithSourceKeyPath:destinationKeyPath:value: + + + + //apple_ref/occ/clm/RKMappingTestExpectation/expectationWithSourceKeyPath:destinationKeyPath:evaluationBlock: + Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destinaton object and that the attribute mapping and value should evaluate to true with a given block. + RKMappingTestExpectation.h + + + (RKMappingTestExpectation *)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath evaluationBlock:(RKMappingTestExpectationEvaluationBlock)evaluationBlock + + + sourceKeyPath + A key path on the source object that should be mapped. + + destinationKeyPath + A key path on the destination object that should be mapped onto. + + evaluationBlock + A block with which to evaluate the success of the mapping. + + + An expectation specifying that sourceKeyPath should be mapped to destinationKeyPath with value. + //api/name/expectationWithSourceKeyPath:destinationKeyPath:evaluationBlock: + + + + //apple_ref/occ/clm/RKMappingTestExpectation/expectationWithSourceKeyPath:destinationKeyPath:mapping: + Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destinaton object using a specific object mapping for the relationship. + RKMappingTestExpectation.h + + + (RKMappingTestExpectation *)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath mapping:(RKMapping *)mapping + + + sourceKeyPath + A key path on the source object that should be mapped. + + destinationKeyPath + A key path on the destination object that should be mapped onto. + + mapping + An object mapping that is expected to be used for mapping the nested relationship. + + + An expectation specifying that sourceKeyPath should be mapped to destinationKeyPath using a specific object mapping. + //api/name/expectationWithSourceKeyPath:destinationKeyPath:mapping: + + + + //apple_ref/occ/instm/RKMappingTestExpectation/setSourceKeyPath: + Returns a keyPath on the source object that a value should be mapped from. + RKMappingTestExpectation.h + + @property (nonatomic, copy, readonly) NSString *sourceKeyPath + + + //api/name/sourceKeyPath + + + + //apple_ref/occ/instp/RKMappingTestExpectation/sourceKeyPath + Returns a keyPath on the source object that a value should be mapped from. + RKMappingTestExpectation.h + + @property (nonatomic, copy, readonly) NSString *sourceKeyPath + + + //api/name/sourceKeyPath + + + + //apple_ref/occ/instm/RKMappingTestExpectation/setDestinationKeyPath: + Returns a keyPath on the destination object that a value should be mapped to. + RKMappingTestExpectation.h + + @property (nonatomic, copy, readonly) NSString *destinationKeyPath + + + //api/name/destinationKeyPath + + + + //apple_ref/occ/instp/RKMappingTestExpectation/destinationKeyPath + Returns a keyPath on the destination object that a value should be mapped to. + RKMappingTestExpectation.h + + @property (nonatomic, copy, readonly) NSString *destinationKeyPath + + + //api/name/destinationKeyPath + + + + //apple_ref/occ/instm/RKMappingTestExpectation/setValue: + Returns the expected value that should be set to the destinationKeyPath of the destination object. + RKMappingTestExpectation.h + + @property (nonatomic, strong, readonly) id value + + + //api/name/value + + + + //apple_ref/occ/instp/RKMappingTestExpectation/value + Returns the expected value that should be set to the destinationKeyPath of the destination object. + RKMappingTestExpectation.h + + @property (nonatomic, strong, readonly) id value + + + //api/name/value + + + + //apple_ref/occ/instm/RKMappingTestExpectation/setEvaluationBlock: + A block used to evaluate if the expectation has been satisfied. + RKMappingTestExpectation.h + + @property (nonatomic, copy, readonly) RKMappingTestExpectationEvaluationBlock evaluationBlock + + + //api/name/evaluationBlock + + + + //apple_ref/occ/instp/RKMappingTestExpectation/evaluationBlock + A block used to evaluate if the expectation has been satisfied. + RKMappingTestExpectation.h + + @property (nonatomic, copy, readonly) RKMappingTestExpectationEvaluationBlock evaluationBlock + + + //api/name/evaluationBlock + + + + //apple_ref/occ/instm/RKMappingTestExpectation/setMapping: + Returns the expected object mapping to be used for mapping a nested relationship. + RKMappingTestExpectation.h + + @property (nonatomic, strong, readonly) RKMapping *mapping + + + //api/name/mapping + + + + //apple_ref/occ/instp/RKMappingTestExpectation/mapping + Returns the expected object mapping to be used for mapping a nested relationship. + RKMappingTestExpectation.h + + @property (nonatomic, strong, readonly) RKMapping *mapping + + + //api/name/mapping + + + + //apple_ref/occ/instm/RKMappingTestExpectation/mappingDescription + Returns a string summary of the expected keyPath mapping within the expectation + RKMappingTestExpectation.h + + - (NSString *)mappingDescription + + A string describing the expected sourceKeyPath to destinationKeyPath mapping. + //api/name/mappingDescription + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens27.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens27.xml new file mode 100644 index 00000000..2451025b --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens27.xml @@ -0,0 +1,15 @@ + + + + + + //apple_ref/occ/cl/RKNSJSONSerialization + The RKNSJSONSerialization class conforms to the RKSerialization protocol and provides support for the serialization and deserialization of data in the JSON format using the Apple provided NSJSONSerialization class. This is the default JSON implementation for RestKit. + RKNSJSONSerialization.h + + + + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens28.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens28.xml new file mode 100644 index 00000000..2772b054 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens28.xml @@ -0,0 +1,993 @@ + + + + + + //apple_ref/occ/cl/RKObjectManager + The RKObjectManager class provides a centralized interface for performing object mapping based HTTP request and response operations. It encapsulates common configuration such as request/response descriptors and routing, provides for the creation of NSURLRequest and RKObjectRequestOperation objects, and one-line methods to enqueue object request operations for the basic HTTP request methods (GET, POST, PUT, DELETE, etc). + RKObjectManager.h + + + + + + + //apple_ref/occ/clm/RKObjectManager/sharedManager + Return the shared instance of the object manager + RKObjectManager.h + + + (RKObjectManager *)sharedManager + + The shared manager instance. + //api/name/sharedManager + + + + //apple_ref/occ/clm/RKObjectManager/setSharedManager: + Set the shared instance of the object manager + RKObjectManager.h + + + (void)setSharedManager:(RKObjectManager *)manager + + + manager + The new shared manager instance. + + + + //api/name/setSharedManager: + + + + //apple_ref/occ/clm/RKObjectManager/managerWithBaseURL: + Creates and returns a new RKObjectManager object initialized with a new AFHTTPClient object that was in turn initialized with the given base URL. The RestKit defaults are applied to the object manager. + RKObjectManager.h + + + (id)managerWithBaseURL:(NSURL *)baseURL + + + baseURL + The base URL with which to initialize the AFHTTPClient object + + + A new RKObjectManager initialized with an AFHTTPClient that was initialized with the given baseURL. + //api/name/managerWithBaseURL: + + + + //apple_ref/occ/instm/RKObjectManager/initWithHTTPClient: + Initializes the receiver with the given AFNetworking HTTP client object, adopting the network configuration from the client. + RKObjectManager.h + + - (id)initWithHTTPClient:(AFHTTPClient *)client + + + client + The AFNetworking HTTP client with which to initialize the receiver. + + + The receiver, initialized with the given client. + //api/name/initWithHTTPClient: + + + + //apple_ref/occ/instm/RKObjectManager/setHTTPClient: + The AFNetworking HTTP client with which the receiver makes requests. + RKObjectManager.h + + @property (nonatomic, strong, readonly) AFHTTPClient *HTTPClient + + + //api/name/HTTPClient + + + + //apple_ref/occ/instp/RKObjectManager/HTTPClient + The AFNetworking HTTP client with which the receiver makes requests. + RKObjectManager.h + + @property (nonatomic, strong, readonly) AFHTTPClient *HTTPClient + + + //api/name/HTTPClient + + + + //apple_ref/occ/instm/RKObjectManager/setBaseURL: + The base URL of the underlying HTTP client. + RKObjectManager.h + + @property (nonatomic, readonly) NSURL *baseURL + + + //api/name/baseURL + + + + //apple_ref/occ/instp/RKObjectManager/baseURL + The base URL of the underlying HTTP client. + RKObjectManager.h + + @property (nonatomic, readonly) NSURL *baseURL + + + //api/name/baseURL + + + + //apple_ref/occ/instm/RKObjectManager/setDefaultHeaders: + The default HTTP headers for all NSURLRequest objects constructed by the object manager. + RKObjectManager.h + + @property (nonatomic, readonly) NSDictionary *defaultHeaders + + + //api/name/defaultHeaders + + + + //apple_ref/occ/instp/RKObjectManager/defaultHeaders + The default HTTP headers for all NSURLRequest objects constructed by the object manager. + RKObjectManager.h + + @property (nonatomic, readonly) NSDictionary *defaultHeaders + + + //api/name/defaultHeaders + + + + //apple_ref/occ/instm/RKObjectManager/setOperationQueue: + The operation queue which manages operations enqueued by the object manager. + RKObjectManager.h + + @property (nonatomic, strong) NSOperationQueue *operationQueue + + + //api/name/operationQueue + + + + //apple_ref/occ/instp/RKObjectManager/operationQueue + The operation queue which manages operations enqueued by the object manager. + RKObjectManager.h + + @property (nonatomic, strong) NSOperationQueue *operationQueue + + + //api/name/operationQueue + + + + //apple_ref/occ/instm/RKObjectManager/setRouter: + The router used to generate URL objects for routable requests created by the manager. + RKObjectManager.h + + @property (nonatomic, strong) RKRouter *router + + + //api/name/router + + + + //apple_ref/occ/instp/RKObjectManager/router + The router used to generate URL objects for routable requests created by the manager. + RKObjectManager.h + + @property (nonatomic, strong) RKRouter *router + + + //api/name/router + + + + //apple_ref/occ/instm/RKObjectManager/setRequestSerializationMIMEType: + The MIME Type to serialize request parameters into when constructing request objects. + RKObjectManager.h + + @property (nonatomic, strong) NSString *requestSerializationMIMEType + + + //api/name/requestSerializationMIMEType + + + + //apple_ref/occ/instp/RKObjectManager/requestSerializationMIMEType + The MIME Type to serialize request parameters into when constructing request objects. + RKObjectManager.h + + @property (nonatomic, strong) NSString *requestSerializationMIMEType + + + //api/name/requestSerializationMIMEType + + + + //apple_ref/occ/instm/RKObjectManager/setAcceptHeaderWithMIMEType: + The value for the HTTP "Accept" header to specify the preferred serialization format for retrieved data. + RKObjectManager.h + + - (void)setAcceptHeaderWithMIMEType:(NSString *)MIMEType + + + MIMEType + The MIME Type to set as the value for the HTTP "Accept" header. + + + + //api/name/setAcceptHeaderWithMIMEType: + + + + //apple_ref/occ/instm/RKObjectManager/requestWithObject:method:path:parameters: + Creates and returns an NSMutableURLRequest object with a given object, method, path, and parameters. + RKObjectManager.h + + + //apple_ref/occ/cl/RKObjectParameterization + //apple_ref/occ/cl/RKRouter + + + + - (NSMutableURLRequest *)requestWithObject:(id)object method:(RKRequestMethod)method path:(NSString *)path parameters:(NSDictionary *)parameters + + + object + The object with which to construct the request. For the POST, PUT, and PATCH request methods, the object will parameterized using the RKRequestDescriptor for the object. + + method + The HTTP method for the request, such as GET, POST, PUT, or DELETE. + + path + The path to be appended to the HTTP client's base URL and used as the request URL. If nil, the router is consulted. + + parameters + The parameters to be either set as a query string for GET requests, or reverse merged with the parameterization of the object and set as the request HTTP body. + + + An NSMutableURLRequest object. + //api/name/requestWithObject:method:path:parameters: + + + + //apple_ref/occ/instm/RKObjectManager/multipartFormRequestWithObject:method:path:parameters:constructingBodyWithBlock: + Creates an NSMutableURLRequest object with the specified HTTP method and path, and constructs a multipart/form-data HTTP body, using the specified parameters and multipart form data block. See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2 + RKObjectManager.h + + - (NSMutableURLRequest *)multipartFormRequestWithObject:(id)object method:(RKRequestMethod)method path:(NSString *)path parameters:(NSDictionary *)parameters constructingBodyWithBlock:(void ( ^ ) ( id<AFMultipartFormData> formData ))block + + + object + The object with which to construct the request. For the POST, PUT, and PATCH request methods, the object will parameterized using the RKRequestDescriptor for the object. + + method + The HTTP method for the request, such as GET, POST, PUT, or DELETE. + + path + The path to be appended to the HTTP client's base URL and used as the request URL. If nil, the router is consulted. + + parameters + The parameters to be either set as a query string for GET requests, or reverse merged with the parameterization of the object and set as the request HTTP body. + + block + A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the AFMultipartFormData protocol. This can be used to upload files, encode HTTP body as JSON or XML, or specify multiple values for the same parameter, as one might for array values. + + + An NSMutableURLRequest object. + //api/name/multipartFormRequestWithObject:method:path:parameters:constructingBodyWithBlock: + + + + //apple_ref/occ/instm/RKObjectManager/requestWithPathForRouteNamed:object:parameters: + Creates an NSMutableURLRequest object with the NSURL returned by the router for the given route name and object and the given parameters. + RKObjectManager.h + + - (NSMutableURLRequest *)requestWithPathForRouteNamed:(NSString *)routeName object:(id)object parameters:(NSDictionary *)parameters + + + routeName + The name of the route object containing the path pattern which is to be interpolated against the given object, appended to the HTTP client's base URL and used as the request URL. + + object + The object with which to interpolate the path pattern of the named route. Can be nil. + + parameters + The parameters to be either set as a query string for GET requests, or the request HTTP body. + + + An NSMutableRequest object. + //api/name/requestWithPathForRouteNamed:object:parameters: + + + + //apple_ref/occ/instm/RKObjectManager/requestWithPathForRelationship:ofObject:method:parameters: + Creates an NSMutableURLRequest object with the NSURL returned by the router for the relationship of the given object and the given parameters. + RKObjectManager.h + + - (NSMutableURLRequest *)requestWithPathForRelationship:(NSString *)relationship ofObject:(id)object method:(RKRequestMethod)method parameters:(NSDictionary *)parameters + + + object + The object for which related objects are being loaded. Evaluated against the RKRoute for the relationship for the object's class with the given name to compute the path. Cannot be nil. + + method + The HTTP method for the request. + + parameters + The parameters to be encoded and appended as the query string for the request URL, or parameterized and set as the request body. May be nil. + + relationshipName + The name of the relationship being loaded. Used to retrieve the RKRoute object from the router for the given object's class and the relationship name. Cannot be nil. + + + An NSMutableURLRequest object for the specified relationship. + +@raises NSInvalidArgumentException Raised if no route is configured for a relationship of the given object's class with the given name. + //api/name/requestWithPathForRelationship:ofObject:method:parameters: + + + + //apple_ref/occ/instm/RKObjectManager/setHTTPOperationClass: + Sets the RKHTTPRequestOperation subclass to be used when constructing HTTP request operations for requests dispatched through the manager. + RKObjectManager.h + + - (void)setHTTPOperationClass:(Class)operationClass + + + operationClass + A class object inheriting from RKHTTPRequestOperation to be used for HTTP requests dispatched through the manager. +@raises NSInvalidArgumentException Raised if the given class does not inherit from RKHTTPRequestOperation. + + + + //api/name/setHTTPOperationClass: + + + + //apple_ref/occ/instm/RKObjectManager/objectRequestOperationWithRequest:success:failure: + Creates an RKObjectRequestOperation operation with the given request and sets the completion block with the given success and failure blocks. + RKObjectManager.h + + - (RKObjectRequestOperation *)objectRequestOperationWithRequest:(NSURLRequest *)request success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure + + + request + The request object to be loaded asynchronously during execution of the operation. + + success + A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request. + + failure + A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred. + + + An RKObjectRequestOperation object that is ready to be sent. + //api/name/objectRequestOperationWithRequest:success:failure: + + + + //apple_ref/occ/instm/RKObjectManager/managedObjectRequestOperationWithRequest:managedObjectContext:success:failure: + Creates an RKManagedObjectRequestOperation operation with the given request and managed object context, and sets the completion block with the given success and failure blocks. + RKObjectManager.h + + - (RKManagedObjectRequestOperation *)managedObjectRequestOperationWithRequest:(NSURLRequest *)request managedObjectContext:(NSManagedObjectContext *)managedObjectContext success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure + + + request + The request object to be loaded asynchronously during execution of the operation. + + managedObjectContext + The managed object context with which to associate the operation. This context will be used as the parent context of a new operation local NSManagedObjectContext with the NSPrivateQueueConcurrencyType concurrency type. Upon success, the private context will be saved and changes resulting from the object mapping will be 'pushed' to the given context. + + success + A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request. + + failure + A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred. + + + An RKObjectRequestOperation object that is ready to be sent. + //api/name/managedObjectRequestOperationWithRequest:managedObjectContext:success:failure: + + + + //apple_ref/occ/instm/RKObjectManager/appropriateObjectRequestOperationWithObject:method:path:parameters: + Creates and returns an object request operation of the appropriate type for the given object, request method, path, and parameters. + RKObjectManager.h + + - (id)appropriateObjectRequestOperationWithObject:(id)object method:(RKRequestMethod)method path:(NSString *)path parameters:(NSDictionary *)parameters + + + object + The object with which to construct the object request operation. May be nil. + + method + The request method for the request. + + path + The path to be appended to the HTTP client's baseURL and set as the URL of the request. If nil, the router is consulted. + + parameters + The parameters to be either set as a query string for GET requests, or reverse merged with the parameterization of the object and set as the request HTTP body. + + + A newly created RKObjectRequestOperation or RKManagedObjectRequest operation as deemed appropriate by the manager for the given parameters. + //api/name/appropriateObjectRequestOperationWithObject:method:path:parameters: + + + + //apple_ref/occ/instm/RKObjectManager/enqueueObjectRequestOperation: + Enqueues an RKObjectRequestOperation to the object manager's operation queue. + RKObjectManager.h + + - (void)enqueueObjectRequestOperation:(RKObjectRequestOperation *)objectRequestOperation + + + objectRequestOperation + The object request operation to be enqueued. + + + + //api/name/enqueueObjectRequestOperation: + + + + //apple_ref/occ/instm/RKObjectManager/cancelAllObjectRequestOperationsWithMethod:matchingPathPattern: + Cancels all operations in the object manager's operation queue whose requests match the specified HTTP method and path pattern. + RKObjectManager.h + + - (void)cancelAllObjectRequestOperationsWithMethod:(RKRequestMethod)method matchingPathPattern:(NSString *)pathPattern + + + method + The HTTP method to match for the cancelled requests, such as RKRequestMethodGET, RKRequestMethodPOST, RKRequestMethodPUT, RKRequestMethodPatch, or RKRequestMethodDELETE. If RKRequestMethodAny, all object request operations with URLs matching the given path pattern will be cancelled. + + pathPattern + The pattern to match against the path of the request URL for executing object request operations considered for cancellation. + + + + //api/name/cancelAllObjectRequestOperationsWithMethod:matchingPathPattern: + + + + //apple_ref/occ/instm/RKObjectManager/enqueueBatchOfObjectRequestOperationsWithRoute:objects:progress:completion: + Creates and enqueues an RKObjectRequestOperation to the object manager's operation queue for each specified object into a batch. Each object request operation is built by evaluating the object against the given route to construct a request path and then invoking appropriateObjectRequestOperationWithObject:method:path:parameters:. When each object request operation finishes, the specified progress block is executed, until all of the request operations have finished, at which point the completion block also executes. + RKObjectManager.h + + - (void)enqueueBatchOfObjectRequestOperationsWithRoute:(RKRoute *)route objects:(NSArray *)objects progress:(void ( ^ ) ( NSUInteger numberOfFinishedOperations , NSUInteger totalNumberOfOperations ))progress completion:(void ( ^ ) ( NSArray *operations ))completion + + + route + The route specifying the request method and the path pattern with which to construct the request for each object object request operation in the batch. + + objects + The set of objects for which to enqueue a batch of object request operations. + + progress + A block object to be executed when an object request operation completes. This block has no return value and takes two arguments: the number of finished operations and the total number of operations initially executed. + + completion + A block object to be executed when the object request operations complete. This block has no return value and takes one argument: the list of operations executed. + + + + //api/name/enqueueBatchOfObjectRequestOperationsWithRoute:objects:progress:completion: + + + + //apple_ref/occ/instm/RKObjectManager/enqueueBatchOfObjectRequestOperations:progress:completion: + Enqueues a set of RKObjectRequestOperation to the object manager's operation queue. + RKObjectManager.h + + - (void)enqueueBatchOfObjectRequestOperations:(NSArray *)operations progress:(void ( ^ ) ( NSUInteger numberOfFinishedOperations , NSUInteger totalNumberOfOperations ))progress completion:(void ( ^ ) ( NSArray *operations ))completion + + + operations + The set of object request operations to be enqueued. + + progress + A block object to be executed when an object request operation completes. This block has no return value and takes two arguments: the number of finished operations and the total number of operations initially executed. + + completion + A block object to be executed when the object request operations complete. This block has no return value and takes one argument: the list of operations executed. + + + + //api/name/enqueueBatchOfObjectRequestOperations:progress:completion: + + + + //apple_ref/occ/instm/RKObjectManager/getObjectsAtPath:parameters:success:failure: + Creates an RKObjectRequestOperation with a GET request with a URL for the given path, and enqueues it to the manager's operation queue. + RKObjectManager.h + + + //apple_ref/occ/instm/RKObjectManager/appropriateObjectRequestOperationWithObject:method:path:parameters: + + + + - (void)getObjectsAtPath:(NSString *)path parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure + + + path + The path to be appended to the HTTP client's base URL and used as the request URL. + + parameters + The parameters to be encoded and appended as the query string for the request URL. + + success + A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request. + + failure + A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred. + + + + //api/name/getObjectsAtPath:parameters:success:failure: + + + + //apple_ref/occ/instm/RKObjectManager/getObjectsAtPathForRelationship:ofObject:parameters:success:failure: + Creates an RKObjectRequestOperation with a GET request for the relationship with the given name of the given object, and enqueues it to the manager's operation queue. + RKObjectManager.h + + + //apple_ref/occ/instm/RKRouter/URLForRelationship:ofObject:method: + //apple_ref/occ/instm/RKObjectManager/appropriateObjectRequestOperationWithObject:method:path:parameters: + + + + - (void)getObjectsAtPathForRelationship:(NSString *)relationshipName ofObject:(id)object parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure + + + relationshipName + The name of the relationship being loaded. Used to retrieve the RKRoute object from the router for the given object's class and the relationship name. Cannot be nil. + + object + The object for which related objects are being loaded. Evaluated against the RKRoute for the relationship for the object's class with the given name to compute the path. Cannot be nil. + + parameters + The parameters to be encoded and appended as the query string for the request URL. May be nil. + + success + A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the mapped result created from object mapping the response data of request. + + failure + A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred. + +@raises NSInvalidArgumentException Raised if no route is configured for a relationship of the given object's class with the given name. + + + + //api/name/getObjectsAtPathForRelationship:ofObject:parameters:success:failure: + + + + //apple_ref/occ/instm/RKObjectManager/getObjectsAtPathForRouteNamed:object:parameters:success:failure: + Creates an RKObjectRequestOperation with a GET request for the URL returned by the router for the given route name, and enqueues it to the manager's operation queue. + RKObjectManager.h + + + //apple_ref/occ/instm/RKRouter/URLForRouteNamed:method:object: + //apple_ref/occ/instm/RKObjectManager/appropriateObjectRequestOperationWithObject:method:path:parameters: + + + + - (void)getObjectsAtPathForRouteNamed:(NSString *)routeName object:(id)object parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure + + + routeName + The name of the route being loaded. Used to retrieve the RKRoute object from the router with the given name. Cannot be nil. + + object + The object to be interpolated against the path pattern of the RKRoute object retrieved with the given name. Used to compute the path to be appended to the HTTP client's base URL and used as the request URL. May be nil. + + parameters + The parameters to be encoded and appended as the query string for the request URL. May be nil. + + success + A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the mapped result created from object mapping the response data of request. + + failure + A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred. + +@raises NSInvalidArgumentException Raised if no route is configured with the given name or the route returned specifies an HTTP method other than GET. + + + + //api/name/getObjectsAtPathForRouteNamed:object:parameters:success:failure: + + + + //apple_ref/occ/instm/RKObjectManager/getObject:path:parameters:success:failure: + Creates an RKObjectRequestOperation with a GET request for the given object, and enqueues it to the manager's operation queue. + RKObjectManager.h + + + //apple_ref/occ/instm/RKRouter/URLForObject:method: + //apple_ref/occ/instm/RKObjectManager/appropriateObjectRequestOperationWithObject:method:path:parameters: + + + + - (void)getObject:(id)object path:(NSString *)path parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure + + + object + The object with which to construct the object request operation. Cannot be nil. + + path + The path to be appended to the HTTP client's base URL and used as the request URL. If nil, the request URL will be obtained by consulting the router for a route registered for the given object's class and the RKRequestMethodGET request method. + + parameters + The parameters to be encoded and appended as the query string for the request URL. + + success + A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request. + + failure + A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred. + + + + //api/name/getObject:path:parameters:success:failure: + + + + //apple_ref/occ/instm/RKObjectManager/postObject:path:parameters:success:failure: + Creates an RKObjectRequestOperation with a POST request for the given object, and enqueues it to the manager's operation queue. + RKObjectManager.h + + + //apple_ref/occ/instm/RKRouter/URLForObject:method: + //apple_ref/occ/instm/RKObjectManager/appropriateObjectRequestOperationWithObject:method:path:parameters: + + + + - (void)postObject:(id)object path:(NSString *)path parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure + + + object + The object with which to construct the object request operation. Cannot be nil. + + path + The path to be appended to the HTTP client's base URL and used as the request URL. If nil, the request URL will be obtained by consulting the router for a route registered for the given object's class and the RKRequestMethodPOST method. + + parameters + The parameters to be reverse merged with the parameterization of the given object and set as the request body. + + success + A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request. + + failure + A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred. + + + + //api/name/postObject:path:parameters:success:failure: + + + + //apple_ref/occ/instm/RKObjectManager/putObject:path:parameters:success:failure: + Creates an RKObjectRequestOperation with a PUT request for the given object, and enqueues it to the manager's operation queue. + RKObjectManager.h + + + //apple_ref/occ/instm/RKRouter/URLForObject:method: + //apple_ref/occ/instm/RKObjectManager/appropriateObjectRequestOperationWithObject:method:path:parameters: + + + + - (void)putObject:(id)object path:(NSString *)path parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure + + + object + The object with which to construct the object request operation. Cannot be nil. + + path + The path to be appended to the HTTP client's base URL and used as the request URL. If nil, the request URL will be obtained by consulting the router for a route registered for the given object's class and the RKRequestMethodPUT method. + + parameters + The parameters to be reverse merged with the parameterization of the given object and set as the request body. + + success + A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request. + + failure + A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred. + + + + //api/name/putObject:path:parameters:success:failure: + + + + //apple_ref/occ/instm/RKObjectManager/patchObject:path:parameters:success:failure: + Creates an RKObjectRequestOperation with a PATCH request for the given object, and enqueues it to the manager's operation queue. + RKObjectManager.h + + + //apple_ref/occ/instm/RKRouter/URLForObject:method: + //apple_ref/occ/instm/RKObjectManager/appropriateObjectRequestOperationWithObject:method:path:parameters: + + + + - (void)patchObject:(id)object path:(NSString *)path parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure + + + object + The object with which to construct the object request operation. Cannot be nil. + + path + The path to be appended to the HTTP client's base URL and used as the request URL. If nil, the request URL will be obtained by consulting the router for a route registered for the given object's class and the RKRequestMethodPATCH method. + + parameters + The parameters to be reverse merged with the parameterization of the given object and set as the request body. + + success + A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request. + + failure + A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred. + + + + //api/name/patchObject:path:parameters:success:failure: + + + + //apple_ref/occ/instm/RKObjectManager/deleteObject:path:parameters:success:failure: + Creates an RKObjectRequestOperation with a DELETE request for the given object, and enqueues it to the manager's operation queue. + RKObjectManager.h + + + //apple_ref/occ/instm/RKRouter/URLForObject:method: + //apple_ref/occ/instm/RKObjectManager/appropriateObjectRequestOperationWithObject:method:path:parameters: + + + + - (void)deleteObject:(id)object path:(NSString *)path parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure + + + object + The object with which to construct the object request operation. Cannot be nil. + + path + The path to be appended to the HTTP client's base URL and used as the request URL. If nil, the request URL will be obtained by consulting the router for a route registered for the given object's class and the RKRequestMethodDELETE request method. + + parameters + The parameters to be encoded and appended as the query string for the request URL. + + success + A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request. + + failure + A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred. + + + + //api/name/deleteObject:path:parameters:success:failure: + + + + //apple_ref/occ/instm/RKObjectManager/setRequestDescriptors: + Returns an array containing the RKRequestDescriptor objects added to the manager. + RKObjectManager.h + + + //apple_ref/occ/cl/RKRequestDescriptor + + + + @property (nonatomic, readonly) NSArray *requestDescriptors + + An array containing the request descriptors of the receiver. The elements of the array are instances of RKRequestDescriptor. + //api/name/requestDescriptors + + + + //apple_ref/occ/instp/RKObjectManager/requestDescriptors + Returns an array containing the RKRequestDescriptor objects added to the manager. + RKObjectManager.h + + + //apple_ref/occ/cl/RKRequestDescriptor + + + + @property (nonatomic, readonly) NSArray *requestDescriptors + + An array containing the request descriptors of the receiver. The elements of the array are instances of RKRequestDescriptor. + //api/name/requestDescriptors + + + + //apple_ref/occ/instm/RKObjectManager/addRequestDescriptor: + Adds a request descriptor to the manager. + RKObjectManager.h + + - (void)addRequestDescriptor:(RKRequestDescriptor *)requestDescriptor + + + requestDescriptor + The request descriptor object to the be added to the manager. + + + + //api/name/addRequestDescriptor: + + + + //apple_ref/occ/instm/RKObjectManager/addRequestDescriptorsFromArray: + Adds the RKRequestDescriptor objects contained in a given array to the manager. + RKObjectManager.h + + - (void)addRequestDescriptorsFromArray:(NSArray *)requestDescriptors + + + requestDescriptors + An array of RKRequestDescriptor objects to be added to the manager. + + + + //api/name/addRequestDescriptorsFromArray: + + + + //apple_ref/occ/instm/RKObjectManager/removeRequestDescriptor: + Removes a given request descriptor from the manager. + RKObjectManager.h + + - (void)removeRequestDescriptor:(RKRequestDescriptor *)requestDescriptor + + + requestDescriptor + An RKRequestDescriptor object to be removed from the manager. + + + + //api/name/removeRequestDescriptor: + + + + //apple_ref/occ/instm/RKObjectManager/setResponseDescriptors: + Returns an array containing the RKResponseDescriptor objects added to the manager. + RKObjectManager.h + + + //apple_ref/occ/cl/RKResponseDescriptor + + + + @property (nonatomic, readonly) NSArray *responseDescriptors + + An array containing the request descriptors of the receiver. The elements of the array are instances of RKRequestDescriptor. + //api/name/responseDescriptors + + + + //apple_ref/occ/instp/RKObjectManager/responseDescriptors + Returns an array containing the RKResponseDescriptor objects added to the manager. + RKObjectManager.h + + + //apple_ref/occ/cl/RKResponseDescriptor + + + + @property (nonatomic, readonly) NSArray *responseDescriptors + + An array containing the request descriptors of the receiver. The elements of the array are instances of RKRequestDescriptor. + //api/name/responseDescriptors + + + + //apple_ref/occ/instm/RKObjectManager/addResponseDescriptor: + Adds a response descriptor to the manager. + RKObjectManager.h + + - (void)addResponseDescriptor:(RKResponseDescriptor *)responseDescriptor + + + responseDescriptor + The response descriptor object to the be added to the manager. + + + + //api/name/addResponseDescriptor: + + + + //apple_ref/occ/instm/RKObjectManager/addResponseDescriptorsFromArray: + Adds the RKResponseDescriptor objects contained in a given array to the manager. + RKObjectManager.h + + - (void)addResponseDescriptorsFromArray:(NSArray *)responseDescriptors + + + responseDescriptors + An array of RKResponseDescriptor objects to be added to the manager. + + + + //api/name/addResponseDescriptorsFromArray: + + + + //apple_ref/occ/instm/RKObjectManager/removeResponseDescriptor: + Removes a given response descriptor from the manager. + RKObjectManager.h + + - (void)removeResponseDescriptor:(RKResponseDescriptor *)responseDescriptor + + + responseDescriptor + An RKResponseDescriptor object to be removed from the manager. + + + + //api/name/removeResponseDescriptor: + + + + //apple_ref/occ/instm/RKObjectManager/setManagedObjectStore: + A Core Data backed object store for persisting objects that have been fetched from the Web + RKObjectManager.h + + @property (nonatomic, strong) RKManagedObjectStore *managedObjectStore + + + //api/name/managedObjectStore + + + + //apple_ref/occ/instp/RKObjectManager/managedObjectStore + A Core Data backed object store for persisting objects that have been fetched from the Web + RKObjectManager.h + + @property (nonatomic, strong) RKManagedObjectStore *managedObjectStore + + + //api/name/managedObjectStore + + + + //apple_ref/occ/instm/RKObjectManager/setFetchRequestBlocks: + An array of RKFetchRequestBlock blocks used to map NSURL objects into corresponding NSFetchRequest objects. + RKObjectManager.h + + @property (nonatomic, readonly) NSArray *fetchRequestBlocks + + + //api/name/fetchRequestBlocks + + + + //apple_ref/occ/instp/RKObjectManager/fetchRequestBlocks + An array of RKFetchRequestBlock blocks used to map NSURL objects into corresponding NSFetchRequest objects. + RKObjectManager.h + + @property (nonatomic, readonly) NSArray *fetchRequestBlocks + + + //api/name/fetchRequestBlocks + + + + //apple_ref/occ/instm/RKObjectManager/addFetchRequestBlock: + Adds the given RKFetchRequestBlock block to the manager. + RKObjectManager.h + + - (void)addFetchRequestBlock:(RKFetchRequestBlock)block + + + A + block object to be executed when constructing an NSFetchRequest object from a given NSURL. The block has a return type of NSFetchRequest and accepts a single NSURL argument. + + + + //api/name/addFetchRequestBlock: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens29.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens29.xml new file mode 100644 index 00000000..d9f26915 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens29.xml @@ -0,0 +1,594 @@ + + + + + + //apple_ref/occ/cl/RKObjectMapping + An RKObjectMapping object describes a transformation between object represenations using key-value coding and run-time type introspection. The mapping is defined in terms of a source object class and a collection of RKPropertyMapping objects describing how key paths in the source representation should be transformed into attributes and relationships on the target object. Object mappings are provided to instances of RKMapperOperation and RKMappingOperation to perform the transformations they describe. + RKObjectMapping.h + + + + + + + //apple_ref/occ/clm/RKObjectMapping/mappingForClass: + Returns an object mapping for the specified class that is ready for configuration + RKObjectMapping.h + + + (id)mappingForClass:(Class)objectClass + + + objectClass + The class that the mapping targets. + + + A new mapping object. + //api/name/mappingForClass: + + + + //apple_ref/occ/instm/RKObjectMapping/initWithClass: + Initializes the receiver with a given object class. This is the designated initializer. + RKObjectMapping.h + + - (id)initWithClass:(Class)objectClass + + + objectClass + The class that the mapping targets. Cannot be nil. + + + The receiver, initialized with the given class. + //api/name/initWithClass: + + + + //apple_ref/occ/clm/RKObjectMapping/requestMapping + Returns an object mapping with an objectClass of NSMutableDictionary. + RKObjectMapping.h + + + (id)requestMapping + + An object mapping with an object class of NSMutableDictionary. + //api/name/requestMapping + + + + //apple_ref/occ/instm/RKObjectMapping/setPropertyMappings: + The aggregate collection of attribute and relationship mappings within this object mapping. + RKObjectMapping.h + + @property (nonatomic, strong, readonly) NSArray *propertyMappings + + + //api/name/propertyMappings + + + + //apple_ref/occ/instp/RKObjectMapping/propertyMappings + The aggregate collection of attribute and relationship mappings within this object mapping. + RKObjectMapping.h + + @property (nonatomic, strong, readonly) NSArray *propertyMappings + + + //api/name/propertyMappings + + + + //apple_ref/occ/instm/RKObjectMapping/setPropertyMappingsBySourceKeyPath: + Returns the property mappings of the receiver in a dictionary, where the keys are the source key paths and the values are instances of RKAttributeMapping or RKRelationshipMapping. + RKObjectMapping.h + + @property (nonatomic, readonly) NSDictionary *propertyMappingsBySourceKeyPath + + The property mappings of the receiver in a dictionary, where the keys are the source key paths and the values are instances of RKAttributeMapping or RKRelationshipMapping. + //api/name/propertyMappingsBySourceKeyPath + + + + //apple_ref/occ/instp/RKObjectMapping/propertyMappingsBySourceKeyPath + Returns the property mappings of the receiver in a dictionary, where the keys are the source key paths and the values are instances of RKAttributeMapping or RKRelationshipMapping. + RKObjectMapping.h + + @property (nonatomic, readonly) NSDictionary *propertyMappingsBySourceKeyPath + + The property mappings of the receiver in a dictionary, where the keys are the source key paths and the values are instances of RKAttributeMapping or RKRelationshipMapping. + //api/name/propertyMappingsBySourceKeyPath + + + + //apple_ref/occ/instm/RKObjectMapping/setPropertyMappingsByDestinationKeyPath: + Returns the property mappings of the receiver in a dictionary, where the keys are the destination key paths and the values are instances of RKAttributeMapping or RKRelationshipMapping. + RKObjectMapping.h + + @property (nonatomic, readonly) NSDictionary *propertyMappingsByDestinationKeyPath + + The property mappings of the receiver in a dictionary, where the keys are the destination key paths and the values are instances of RKAttributeMapping or RKRelationshipMapping. + //api/name/propertyMappingsByDestinationKeyPath + + + + //apple_ref/occ/instp/RKObjectMapping/propertyMappingsByDestinationKeyPath + Returns the property mappings of the receiver in a dictionary, where the keys are the destination key paths and the values are instances of RKAttributeMapping or RKRelationshipMapping. + RKObjectMapping.h + + @property (nonatomic, readonly) NSDictionary *propertyMappingsByDestinationKeyPath + + The property mappings of the receiver in a dictionary, where the keys are the destination key paths and the values are instances of RKAttributeMapping or RKRelationshipMapping. + //api/name/propertyMappingsByDestinationKeyPath + + + + //apple_ref/occ/instm/RKObjectMapping/setAttributeMappings: + The collection of attribute mappings within this object mapping. + RKObjectMapping.h + + @property (nonatomic, readonly) NSArray *attributeMappings + + + //api/name/attributeMappings + + + + //apple_ref/occ/instp/RKObjectMapping/attributeMappings + The collection of attribute mappings within this object mapping. + RKObjectMapping.h + + @property (nonatomic, readonly) NSArray *attributeMappings + + + //api/name/attributeMappings + + + + //apple_ref/occ/instm/RKObjectMapping/setRelationshipMappings: + The collection of relationship mappings within this object mapping. + RKObjectMapping.h + + @property (nonatomic, readonly) NSArray *relationshipMappings + + + //api/name/relationshipMappings + + + + //apple_ref/occ/instp/RKObjectMapping/relationshipMappings + The collection of relationship mappings within this object mapping. + RKObjectMapping.h + + @property (nonatomic, readonly) NSArray *relationshipMappings + + + //api/name/relationshipMappings + + + + //apple_ref/occ/instm/RKObjectMapping/addPropertyMapping: + Adds a property mapping to the receiver. + RKObjectMapping.h + + - (void)addPropertyMapping:(RKPropertyMapping *)propertyMapping + + + propertyMapping + The property mapping to be added to the object mapping. + + + + //api/name/addPropertyMapping: + + + + //apple_ref/occ/instm/RKObjectMapping/addPropertyMappingsFromArray: + Adds an array of RKAttributeMapping or RKRelationshipMapping objects to the receiver. + RKObjectMapping.h + + - (void)addPropertyMappingsFromArray:(NSArray *)arrayOfPropertyMappings + + + propertyMappings + The array of property mappings to be added to the object mapping. + + + + //api/name/addPropertyMappingsFromArray: + + + + //apple_ref/occ/instm/RKObjectMapping/removePropertyMapping: + Removes an RKAttributeMapping or RKRelationshipMapping from the receiver. + RKObjectMapping.h + + - (void)removePropertyMapping:(RKPropertyMapping *)propertyMapping + + + propertyMapping + The attribute or relationship mapping to remove. + + + + //api/name/removePropertyMapping: + + + + //apple_ref/occ/instm/RKObjectMapping/addAttributeMappingsFromDictionary: + Adds attribute mappings from a given dictionary wherein the keys represent the source key path and the values represent the names of the target attributes on the destination object. + RKObjectMapping.h + + - (void)addAttributeMappingsFromDictionary:(NSDictionary *)keyPathToAttributeNames + + + keyPathToAttributeNames + A dictionary keyed by source key to destination attribute name. + + + + //api/name/addAttributeMappingsFromDictionary: + + + + //apple_ref/occ/instm/RKObjectMapping/addAttributeMappingsFromArray: + Adds attribute mappings to the receiver from a given array. + RKObjectMapping.h + + - (void)addAttributeMappingsFromArray:(NSArray *)arrayOfAttributeNamesOrMappings + + + An + array of RKAttributeMapping or NSString values to be added to the receiver's set of attribute mappings, + + + + //api/name/addAttributeMappingsFromArray: + + + + //apple_ref/occ/instm/RKObjectMapping/mapKeyOfNestedDictionaryToAttribute: + Configures a sub-key mapping for cases where JSON has been nested underneath a key named after an attribute. + RKObjectMapping.h + + - (void)mapKeyOfNestedDictionaryToAttribute:(NSString *)attributeName + + + //api/name/mapKeyOfNestedDictionaryToAttribute: + + + + //apple_ref/occ/instm/RKObjectMapping/attributeMappingForKeyOfNestedDictionary + Returns the attribute mapping targeting the key of a nested dictionary in the source JSON. + RKObjectMapping.h + + - (RKAttributeMapping *)attributeMappingForKeyOfNestedDictionary + + An attribute mapping for the key of a nested dictionary being mapped or nil + //api/name/attributeMappingForKeyOfNestedDictionary + + + + //apple_ref/occ/instm/RKObjectMapping/setObjectClass: + The target class that the receiver describes a mapping for. + RKObjectMapping.h + + @property (nonatomic, weak, readonly) Class objectClass + + + //api/name/objectClass + + + + //apple_ref/occ/instp/RKObjectMapping/objectClass + The target class that the receiver describes a mapping for. + RKObjectMapping.h + + @property (nonatomic, weak, readonly) Class objectClass + + + //api/name/objectClass + + + + //apple_ref/occ/instm/RKObjectMapping/setSetDefaultValueForMissingAttributes: + When YES, any attributes that have mappings defined but are not present within the source object will be set to nil, clearing any existing value. + RKObjectMapping.h + + @property (nonatomic, assign, getter=shouldSetDefaultValueForMissingAttributes) BOOL setDefaultValueForMissingAttributes + + + //api/name/setDefaultValueForMissingAttributes + + + + //apple_ref/occ/instp/RKObjectMapping/setDefaultValueForMissingAttributes + When YES, any attributes that have mappings defined but are not present within the source object will be set to nil, clearing any existing value. + RKObjectMapping.h + + @property (nonatomic, assign, getter=shouldSetDefaultValueForMissingAttributes) BOOL setDefaultValueForMissingAttributes + + + //api/name/setDefaultValueForMissingAttributes + + + + //apple_ref/occ/instm/RKObjectMapping/setSetNilForMissingRelationships: + When YES, any relationships that have mappings defined but are not present within the source object will be set to nil, clearing any existing value. + RKObjectMapping.h + + @property (nonatomic, assign) BOOL setNilForMissingRelationships + + + //api/name/setNilForMissingRelationships + + + + //apple_ref/occ/instp/RKObjectMapping/setNilForMissingRelationships + When YES, any relationships that have mappings defined but are not present within the source object will be set to nil, clearing any existing value. + RKObjectMapping.h + + @property (nonatomic, assign) BOOL setNilForMissingRelationships + + + //api/name/setNilForMissingRelationships + + + + //apple_ref/occ/instm/RKObjectMapping/setPerformKeyValueValidation: + When YES, key-value validation will be invoked at object mapping time. + RKObjectMapping.h + + @property (nonatomic, assign) BOOL performKeyValueValidation + + + //api/name/performKeyValueValidation + + + + //apple_ref/occ/instp/RKObjectMapping/performKeyValueValidation + When YES, key-value validation will be invoked at object mapping time. + RKObjectMapping.h + + @property (nonatomic, assign) BOOL performKeyValueValidation + + + //api/name/performKeyValueValidation + + + + //apple_ref/occ/instm/RKObjectMapping/setIgnoreUnknownKeyPaths: + When YES, the mapping operation will check that the object being mapped is key-value coding compliant for the mapped key. If it is not, the attribute/relationship mapping will be ignored and mapping will continue. When NO, property mappings for unknown key paths will trigger NSUnknownKeyException exceptions for the unknown keyPath. + RKObjectMapping.h + + @property (nonatomic, assign) BOOL ignoreUnknownKeyPaths + + + //api/name/ignoreUnknownKeyPaths + + + + //apple_ref/occ/instp/RKObjectMapping/ignoreUnknownKeyPaths + When YES, the mapping operation will check that the object being mapped is key-value coding compliant for the mapped key. If it is not, the attribute/relationship mapping will be ignored and mapping will continue. When NO, property mappings for unknown key paths will trigger NSUnknownKeyException exceptions for the unknown keyPath. + RKObjectMapping.h + + @property (nonatomic, assign) BOOL ignoreUnknownKeyPaths + + + //api/name/ignoreUnknownKeyPaths + + + + //apple_ref/occ/instm/RKObjectMapping/defaultValueForMissingAttribute: + Returns the default value to be assigned to the specified attribute when it is missing from a mappable payload. + RKObjectMapping.h + + + //apple_ref/occ/instm/RKEntityMapping/defaultValueForMissingAttribute: + + + + - (id)defaultValueForMissingAttribute:(NSString *)attributeName + + + //api/name/defaultValueForMissingAttribute: + + + + //apple_ref/occ/instm/RKObjectMapping/setDateFormatters: + An array of NSFormatter objects to use when mapping string values into NSDate attributes on the target objectClass. Each date formatter will be invoked with the string value being mapped until one of the date formatters does not return nil. + RKObjectMapping.h + + + //apple_ref/occ/clm/RKObjectMapping/defaultDateFormatters + + + + @property (nonatomic, strong) NSArray *dateFormatters + + + //api/name/dateFormatters + + + + //apple_ref/occ/instp/RKObjectMapping/dateFormatters + An array of NSFormatter objects to use when mapping string values into NSDate attributes on the target objectClass. Each date formatter will be invoked with the string value being mapped until one of the date formatters does not return nil. + RKObjectMapping.h + + + //apple_ref/occ/clm/RKObjectMapping/defaultDateFormatters + + + + @property (nonatomic, strong) NSArray *dateFormatters + + + //api/name/dateFormatters + + + + //apple_ref/occ/instm/RKObjectMapping/setPreferredDateFormatter: + The NSFormatter object for your application's preferred date and time configuration. This date formatter will be used when generating string representations of NSDate attributes (i.e. during serialization to URL form encoded or JSON format). + RKObjectMapping.h + + + //apple_ref/occ/instp/RKObjectMapping/preferredDateFormatter + + + + @property (nonatomic, strong) NSFormatter *preferredDateFormatter + + + //api/name/preferredDateFormatter + + + + //apple_ref/occ/instp/RKObjectMapping/preferredDateFormatter + The NSFormatter object for your application's preferred date and time configuration. This date formatter will be used when generating string representations of NSDate attributes (i.e. during serialization to URL form encoded or JSON format). + RKObjectMapping.h + + + //apple_ref/occ/instp/RKObjectMapping/preferredDateFormatter + + + + @property (nonatomic, strong) NSFormatter *preferredDateFormatter + + + //api/name/preferredDateFormatter + + + + //apple_ref/occ/instm/RKObjectMapping/inverseMapping + Generates an inverse mapping for the rules specified within this object mapping. This can be used to +quickly generate a corresponding serialization mapping from a configured object mapping. The inverse +mapping will have the source and destination keyPaths swapped for all attribute and relationship mappings. + RKObjectMapping.h + + - (RKObjectMapping *)inverseMapping + + + //api/name/inverseMapping + + + + //apple_ref/occ/instm/RKObjectMapping/classForProperty: + Returns the class of the attribute or relationship property of the target objectClass with the given name. + RKObjectMapping.h + + - (Class)classForProperty:(NSString *)propertyName + + + propertyName + The name of the property we would like to retrieve the type of. + + + The class of the property. + //api/name/classForProperty: + + + + //apple_ref/occ/instm/RKObjectMapping/classForKeyPath: + Returns the class of the attribute or relationship property of the target objectClass at the given key path. + RKObjectMapping.h + + - (Class)classForKeyPath:(NSString *)keyPath + + + propertyName + The name of the property we would like to retrieve the type of. + + + The class of the property at the given key path. + //api/name/classForKeyPath: + + + + //apple_ref/occ/clm/RKObjectMapping/defaultDateFormatters + Returns the collection of default date formatters that will be used for all object mappings that have not been configured specifically. + RKObjectMapping.h + + + (NSArray *)defaultDateFormatters + + An array of NSFormatter objects used when mapping strings into NSDate attributes + //api/name/defaultDateFormatters + + + + //apple_ref/occ/clm/RKObjectMapping/setDefaultDateFormatters: + Sets the collection of default date formatters to the specified array. The array should contain configured instances of NSDateFormatter in the order in which you want them applied during object mapping operations. + RKObjectMapping.h + + + (void)setDefaultDateFormatters:(NSArray *)dateFormatters + + + dateFormatters + An array of date formatters to replace the existing defaults. + + + + //api/name/setDefaultDateFormatters: + + + + //apple_ref/occ/clm/RKObjectMapping/addDefaultDateFormatter: + Adds a date formatter instance to the default collection + RKObjectMapping.h + + + (void)addDefaultDateFormatter:(NSFormatter *)dateFormatter + + + dateFormatter + An NSFormatter object to prepend to the default formatters collection + + + + //api/name/addDefaultDateFormatter: + + + + //apple_ref/occ/clm/RKObjectMapping/addDefaultDateFormatterForString:inTimeZone: + Convenience method for quickly constructing a date formatter and adding it to the collection of default date formatters. The locale is auto-configured to enUSPOSIX. + RKObjectMapping.h + + + (void)addDefaultDateFormatterForString:(NSString *)dateFormatString inTimeZone:(NSTimeZone *)nilOrTimeZone + + + dateFormatString + The dateFormat string to assign to the newly constructed NSDateFormatter instance + + nilOrTimeZone + The NSTimeZone object to configure on the NSDateFormatter instance. Defaults to UTC time. + + + A new NSDateFormatter will be prepended to the defaultDateFormatters with the specified date format and time zone + //api/name/addDefaultDateFormatterForString:inTimeZone: + + + + //apple_ref/occ/clm/RKObjectMapping/preferredDateFormatter + Returns the preferred date formatter to use when generating NSString representations from NSDate attributes. This type of transformation occurs when RestKit is mapping local objects into JSON or form encoded serializations that do not have a native time construct. + RKObjectMapping.h + + + (NSFormatter *)preferredDateFormatter + + The preferred NSFormatter object to use when serializing dates into strings + //api/name/preferredDateFormatter + + + + //apple_ref/occ/clm/RKObjectMapping/setPreferredDateFormatter: + Sets the preferred date formatter to use when generating NSString representations from NSDate attributes. This type of transformation occurs when RestKit is mapping local objects into JSON or form encoded serializations that do not have a native time construct. + RKObjectMapping.h + + + (void)setPreferredDateFormatter:(NSFormatter *)dateFormatter + + + dateFormatter + The NSFormatter object to designate as the new preferred instance + + + + //api/name/setPreferredDateFormatter: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens3.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens3.xml new file mode 100644 index 00000000..761d6883 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens3.xml @@ -0,0 +1,63 @@ + + + + + + //apple_ref/occ/cl/RKDotNetDateFormatter + A subclass of NSDateFormatter that serves as translator between ASP.NET date serializations in JSON strings and NSDate objects. This is useful for properly mapping these dates from an ASP.NET driven backend. + RKDotNetDateFormatter.h + + + + + + + //apple_ref/occ/clm/RKDotNetDateFormatter/dotNetDateFormatterWithTimeZone: + Instantiates an autoreleased RKDotNetDateFormatter object with the timezone set to the given value. The default time zone is UTC. + RKDotNetDateFormatter.h + + + (RKDotNetDateFormatter *)dotNetDateFormatterWithTimeZone:(NSTimeZone *)timeZone + + + timeZone + An NSTimeZone object. A nil value sets the timezone to the default value of UTC. + + + An autoreleased RKDotNetDateFormatter object + //api/name/dotNetDateFormatterWithTimeZone: + + + + //apple_ref/occ/instm/RKDotNetDateFormatter/dateFromString: + Returns an NSDate object from an ASP.NET style date string respresentation, as seen in JSON. + RKDotNetDateFormatter.h + + - (NSDate *)dateFromString:(NSString *)string + + + string + The ASP.NET style string, /Date(1112715000000-0500)/ + + + An NSDate object. + //api/name/dateFromString: + + + + //apple_ref/occ/instm/RKDotNetDateFormatter/stringFromDate: + Returns an ASP.NET style date string from an NSDate, such as /Date(1112715000000+0000)/ Where 1112715000000 is the number of milliseconds since January 1, 1970 00:00 GMT/UTC, and +0000 is the timezone offset from GMT in 24-hour time. + RKDotNetDateFormatter.h + + - (NSString *)stringFromDate:(NSDate *)date + + + date + An NSDate object from which to return a string value. + + + The ASP.NET style string, /Date(1112715000000-0500)/ + //api/name/stringFromDate: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens30.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens30.xml new file mode 100644 index 00000000..68cbd55f --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens30.xml @@ -0,0 +1,15 @@ + + + + + + //apple_ref/occ/cl/RKObjectMappingOperationDataSource + The RKObjectMappingOperationDataSource class is an implementation of the RKMappingOperationDataSource protocol for use in performing object mappings that target plain old NSObject derived classes (as opposed to NSManagedObject derived persistent entities). + RKObjectMappingOperationDataSource.h + + + + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens31.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens31.xml new file mode 100644 index 00000000..be431cfe --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens31.xml @@ -0,0 +1,39 @@ + + + + + + //apple_ref/occ/cl/RKObjectParameterization + The RKObjectParameterization class provides an interface for mapping a local domain object into an NSDictionary representation suitable for use as the parameters of an HTTP request. + RKObjectParameterization.h + + + + + + + //apple_ref/occ/clm/RKObjectParameterization/parametersWithObject:requestDescriptor:error: + Returns a dictionary representation of the given object by performing object mapping using the mapping +from the given request descriptor. If the request descriptor specifies a root key path, the mapped parameters +will be nested within the dictionary under the specified root key path. + RKObjectParameterization.h + + + (NSDictionary *)parametersWithObject:(id)object requestDescriptor:(RKRequestDescriptor *)requestDescriptor error:(NSError **)error + + + object + The object to be parameterized. + + requestDescriptor + The request descriptor describing how the object is to be mapped into an NSDictionary of parameters. + + error + If there is a problem mapping the parameters, upon return contains a pointer to an instance of NSError that describes the problem. + + + A new dictionary containing the mapped parameters or nil if an error has occurred. + //api/name/parametersWithObject:requestDescriptor:error: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens32.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens32.xml new file mode 100644 index 00000000..e0c2ee02 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens32.xml @@ -0,0 +1,264 @@ + + + + + + //apple_ref/occ/cl/RKObjectRequestOperation + RKObjectRequestOperation is an NSOperation subclass that implements object mapping on the response body of an NSHTTPResponse loaded via an RKHTTPRequestOperation. + RKObjectRequestOperation.h + + + + + + + //apple_ref/occ/instm/RKObjectRequestOperation/initWithHTTPRequestOperation:responseDescriptors: + Initializes an object request operation with an HTTP request operation and a set of response descriptors. + RKObjectRequestOperation.h + + - (id)initWithHTTPRequestOperation:(RKHTTPRequestOperation *)requestOperation responseDescriptors:(NSArray *)responseDescriptors + + + responseDescriptors + An array of RKResponseDescriptor objects specifying how object mapping is to be performed on the response loaded by the network operation. + + request + The request object to be used with the underlying network operation. + + + The receiver, initialized with the given request and response descriptors. + //api/name/initWithHTTPRequestOperation:responseDescriptors: + + + + //apple_ref/occ/instm/RKObjectRequestOperation/initWithRequest:responseDescriptors: + Initializes an object request operation with a request object and a set of response descriptors. + RKObjectRequestOperation.h + + - (id)initWithRequest:(NSURLRequest *)request responseDescriptors:(NSArray *)responseDescriptors + + + request + The request object to be used with the underlying network operation. + + responseDescriptors + An array of RKResponseDescriptor objects specifying how object mapping is to be performed on the response loaded by the network operation. + + + The receiver, initialized with the given request and response descriptors. + //api/name/initWithRequest:responseDescriptors: + + + + //apple_ref/occ/instm/RKObjectRequestOperation/setResponseDescriptors: + The array of RKResponseDescriptor objects that specify how the deserialized responseData is to be object mapped. + RKObjectRequestOperation.h + + @property (nonatomic, strong, readonly) NSArray *responseDescriptors + + + //api/name/responseDescriptors + + + + //apple_ref/occ/instp/RKObjectRequestOperation/responseDescriptors + The array of RKResponseDescriptor objects that specify how the deserialized responseData is to be object mapped. + RKObjectRequestOperation.h + + @property (nonatomic, strong, readonly) NSArray *responseDescriptors + + + //api/name/responseDescriptors + + + + //apple_ref/occ/instm/RKObjectRequestOperation/setTargetObject: + The target object for the object mapping operation. + RKObjectRequestOperation.h + + @property (nonatomic, strong) id targetObject + + + //api/name/targetObject + + + + //apple_ref/occ/instp/RKObjectRequestOperation/targetObject + The target object for the object mapping operation. + RKObjectRequestOperation.h + + @property (nonatomic, strong) id targetObject + + + //api/name/targetObject + + + + //apple_ref/occ/instm/RKObjectRequestOperation/setMappingResult: + The mapping result returned by the underlying RKObjectResponseMapperOperation. + RKObjectRequestOperation.h + + @property (nonatomic, strong, readonly) RKMappingResult *mappingResult + + + //api/name/mappingResult + + + + //apple_ref/occ/instp/RKObjectRequestOperation/mappingResult + The mapping result returned by the underlying RKObjectResponseMapperOperation. + RKObjectRequestOperation.h + + @property (nonatomic, strong, readonly) RKMappingResult *mappingResult + + + //api/name/mappingResult + + + + //apple_ref/occ/instm/RKObjectRequestOperation/setError: + The error, if any, that occurred during execution of the operation. + RKObjectRequestOperation.h + + @property (nonatomic, strong, readonly) NSError *error + + + //api/name/error + + + + //apple_ref/occ/instp/RKObjectRequestOperation/error + The error, if any, that occurred during execution of the operation. + RKObjectRequestOperation.h + + @property (nonatomic, strong, readonly) NSError *error + + + //api/name/error + + + + //apple_ref/occ/instm/RKObjectRequestOperation/setHTTPRequestOperation: + The underlying RKHTTPRequestOperation object used to manage the HTTP request/response lifecycle of the object request operation. + RKObjectRequestOperation.h + + @property (nonatomic, strong, readonly) RKHTTPRequestOperation *HTTPRequestOperation + + + //api/name/HTTPRequestOperation + + + + //apple_ref/occ/instp/RKObjectRequestOperation/HTTPRequestOperation + The underlying RKHTTPRequestOperation object used to manage the HTTP request/response lifecycle of the object request operation. + RKObjectRequestOperation.h + + @property (nonatomic, strong, readonly) RKHTTPRequestOperation *HTTPRequestOperation + + + //api/name/HTTPRequestOperation + + + + //apple_ref/occ/instm/RKObjectRequestOperation/setCompletionBlockWithSuccess:failure: + Sets the completionBlock property with a block that executes either the specified success or failure block, depending on the state of the object request on completion. If error returns a value, which can be set during HTTP transport by the underlying HTTPRequestOperation or during object mapping by the RKResponseMapperOperation object, then failure is executed. If the object request operation is cancelled, then neither success nor failure will be executed. Otherwise, success is executed. + RKObjectRequestOperation.h + + - (void)setCompletionBlockWithSuccess:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure + + + success + The block to be executed on the completion of a successful operation. This block has no return value and takes two arguments: the receiver operation and the mapping result from object mapping the response data of the request. + + failure + The block to be executed on the completion of an unsuccessful operation. This block has no return value and takes two arguments: the receiver operation and the error that occurred during the execution of the operation. + + + + //api/name/setCompletionBlockWithSuccess:failure: + + + + //apple_ref/occ/instm/RKObjectRequestOperation/setSuccessCallbackQueue: + The callback dispatch queue on success. If NULL (default), the main queue is used. + RKObjectRequestOperation.h + + @property (nonatomic, assign) dispatch_queue_t successCallbackQueue + + + //api/name/successCallbackQueue + + + + //apple_ref/occ/instp/RKObjectRequestOperation/successCallbackQueue + The callback dispatch queue on success. If NULL (default), the main queue is used. + RKObjectRequestOperation.h + + @property (nonatomic, assign) dispatch_queue_t successCallbackQueue + + + //api/name/successCallbackQueue + + + + //apple_ref/occ/instm/RKObjectRequestOperation/setFailureCallbackQueue: + The callback dispatch queue on failure. If NULL (default), the main queue is used. + RKObjectRequestOperation.h + + @property (nonatomic, assign) dispatch_queue_t failureCallbackQueue + + + //api/name/failureCallbackQueue + + + + //apple_ref/occ/instp/RKObjectRequestOperation/failureCallbackQueue + The callback dispatch queue on failure. If NULL (default), the main queue is used. + RKObjectRequestOperation.h + + @property (nonatomic, assign) dispatch_queue_t failureCallbackQueue + + + //api/name/failureCallbackQueue + + + + //apple_ref/occ/clm/RKObjectRequestOperation/responseMappingQueue + Returns the operation queue used by all object request operations when object mapping the body of a response loaded via HTTP. + RKObjectRequestOperation.h + + + (NSOperationQueue *)responseMappingQueue + + The response mapping queue. + //api/name/responseMappingQueue + + + + //apple_ref/occ/instm/RKObjectRequestOperation/performMappingOnResponse: + Performs object mapping using the response and responseData properties. + RKRequestOperationSubclass.h + + - (RKMappingResult *)performMappingOnResponse:(NSError **)error + + + error + A pointer to an NSError object to be set in the event that the object mapping process has failed. + + + A mapping result or nil if an error has occurred. + //api/name/performMappingOnResponse: + + + + //apple_ref/occ/instm/RKObjectRequestOperation/willFinish + Invoked to tell the receiver that the object request operation is finishing its work and is about to transition into the finished state. Used to perform any necessary cleanup before the operation is finished. + RKRequestOperationSubclass.h + + - (void)willFinish + + + //api/name/willFinish + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens33.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens33.xml new file mode 100644 index 00000000..fdc828a8 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens33.xml @@ -0,0 +1,15 @@ + + + + + + //apple_ref/occ/cl/RKObjectResponseMapperOperation + RKObjectResponseMapperOperation is an RKResponseMapperOperation subclass that provides support for performing object mapping for mappings that target NSObject derived classes. It does not require a data source to perform its work. + RKResponseMapperOperation.h + + + + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens34.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens34.xml new file mode 100644 index 00000000..b89bbf69 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens34.xml @@ -0,0 +1,148 @@ + + + + + + //apple_ref/occ/cl/RKPathMatcher + The RKPathMatcher class performs pattern matching and parameter parsing of strings, typically representing the path portion of an NSURL object. It provides much of the necessary tools to map a given path to local objects (the inverse of RKRouter's function). This makes it easier to implement the RKManagedObjectCaching protocol and generate NSFetchRequest objects from a given path. There are two means of instantiating and using a matcher object in order to provide more flexibility in implementations, and to improve efficiency by eliminating repetitive and costly pattern initializations. + RKPathMatcher.h + + + + + + + //apple_ref/occ/clm/RKPathMatcher/pathMatcherWithPath: + Creates a path match object starting from a path string. This method should be followed by matchesPattern:tokenizeQueryStrings:parsedArguments: + RKPathMatcher.h + + + (RKPathMatcher *)pathMatcherWithPath:(NSString *)pathString + + + pathString + The string to evaluate and parse, such as /districts/tx/upper/?apikey=GC5512354 + + + An instantiated RKPathMatcher without an established pattern. + //api/name/pathMatcherWithPath: + + + + //apple_ref/occ/instm/RKPathMatcher/matchesPattern:tokenizeQueryStrings:parsedArguments: + Determines if the path string matches the provided pattern, and yields a dictionary with the resulting matched key/value pairs. Use of this method should be preceded by pathMatcherWithPath: Pattern strings should include encoded parameter keys, delimited by a single colon at the beginning of the key name. + RKPathMatcher.h + + - (BOOL)matchesPattern:(NSString *)patternString tokenizeQueryStrings:(BOOL)shouldTokenize parsedArguments:(NSDictionary **)arguments + + + patternString + The pattern to use for evaluating, such as /:entityName/:stateID/:chamber/ + + shouldTokenize + If YES, any query parameters will be tokenized and inserted into the parsed argument dictionary. + + arguments + A pointer to a dictionary that contains the key/values from the pattern (and parameter) matching. + + + A boolean value indicating if the path string successfully matched the pattern. + //api/name/matchesPattern:tokenizeQueryStrings:parsedArguments: + + + + //apple_ref/occ/clm/RKPathMatcher/pathMatcherWithPattern: + Creates a path matcher object starting from a pattern string. This method should be followed by matchesPath:tokenizeQueryStrings:parsedArguments:. Patterns should include encoded parameter keys, delimited by a single colon at the beginning of the key name. + RKPathMatcher.h + + + (RKPathMatcher *)pathMatcherWithPattern:(NSString *)patternString + + + patternString + The pattern to use for evaluating, such as /:entityName/:stateID/:chamber/ + + + An instantiated RKPathMatcher with an established pattern. + //api/name/pathMatcherWithPattern: + + + + //apple_ref/occ/instm/RKPathMatcher/matchesPath:tokenizeQueryStrings:parsedArguments: + Determines if the given path string matches a pattern, and yields a dictionary with the resulting matched key/value pairs. Use of this method should be preceded by pathMatcherWithPattern:. + RKPathMatcher.h + + - (BOOL)matchesPath:(NSString *)pathString tokenizeQueryStrings:(BOOL)shouldTokenize parsedArguments:(NSDictionary **)arguments + + + pathString + The string to evaluate and parse, such as /districts/tx/upper/?apikey=GC5512354 + + shouldTokenize + If YES, any query parameters will be tokenized and inserted into the parsed argument dictionary. + + arguments + A pointer to a dictionary that contains the key/values from the pattern (and parameter) matching. + + + A boolean value indicating if the path string successfully matched the pattern. + //api/name/matchesPath:tokenizeQueryStrings:parsedArguments: + + + + //apple_ref/occ/instm/RKPathMatcher/pathFromObject: + Generates a new path by interpolating the properties of the 'object' argument, assuming the existence of a previously specified pattern established via pathMatcherWithPattern:. Otherwise, this method is identical in function to RKPathFromPatternWithObject (in fact it is a shortcut for this method). + RKPathMatcher.h + + - (NSString *)pathFromObject:(id)object + + + object + The object containing the properties to interpolate. + + + A string with the object's interpolated property values inserted into the receiver's established pattern. + //api/name/pathFromObject: + + + + //apple_ref/occ/instm/RKPathMatcher/pathFromObject:addingEscapes: + Generates a path by interpolating the properties of the 'object' argument, assuming the existence of a previously specified pattern established via pathMatcherWithPattern:. Otherwise, this method is identical in function to RKPathFromPatternWithObject (in fact it is a shortcut for this method). + RKPathMatcher.h + + - (NSString *)pathFromObject:(id)object addingEscapes:(BOOL)addEscapes + + + object + The object containing the properties to interpolate. + + addEscapes + Conditionally add percent escapes to the interpolated property values + + + A string with the object's interpolated property values inserted into the receiver's established pattern. + //api/name/pathFromObject:addingEscapes: + + + + //apple_ref/occ/instm/RKPathMatcher/setQueryParameters: + + RKPathMatcher.h + + @property (copy, readonly) NSDictionary *queryParameters + + + //api/name/queryParameters + + + + //apple_ref/occ/instp/RKPathMatcher/queryParameters + + RKPathMatcher.h + + @property (copy, readonly) NSDictionary *queryParameters + + + //api/name/queryParameters + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens35.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens35.xml new file mode 100644 index 00000000..c8b1115a --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens35.xml @@ -0,0 +1,99 @@ + + + + + + //apple_ref/occ/cl/RKPropertyInspector + The RKPropertyInspector class provides an interface for introspecting the properties and attributes of classes using the reflection capabilities of the Objective-C runtime. Once inspected, the properties and types are cached. + RKPropertyInspector.h + + + + + + + //apple_ref/occ/clm/RKPropertyInspector/sharedInspector + Returns the shared property inspector singleton instance. + RKPropertyInspector.h + + + (RKPropertyInspector *)sharedInspector + + The shared RKPropertyInspector instance. + //api/name/sharedInspector + + + + //apple_ref/occ/instm/RKPropertyInspector/propertyNamesAndTypesForClass: + Returns a dictionary of names and types for the properties of a given class. + RKPropertyInspector.h + + - (NSDictionary *)propertyNamesAndTypesForClass:(Class)objectClass + + + objectClass + The class to retrieve the property name and types for. + + + A dictionary containing metadata about the properties of the given class, where the keys in the dictionary are the property names and the values are Class objects specifying the type of the property. + //api/name/propertyNamesAndTypesForClass: + + + + //apple_ref/occ/instm/RKPropertyInspector/typeForProperty:ofClass: + Returns the Class object specifying the type of the property with given name on a class. + RKPropertyInspector.h + + - (Class)typeForProperty:(NSString *)propertyName ofClass:(Class)objectClass + + + propertyName + The name of the property to retrieve the type of. + + objectClass + The class to retrieve the property from. + + + A Class object specifying the type of the requested property. + //api/name/typeForProperty:ofClass: + + + + //apple_ref/occ/clm/RKPropertyInspector/propertyTypeFromAttributeString: + Returns the name of a property when provided the name of a property obtained via the property_getAttributes reflection API. + RKPropertyInspector.h + + + (NSString *)propertyTypeFromAttributeString:(NSString *)attributeString + + + attributeString + A string object encoding attribute information. + + + The class name for the property type encoded in the given attribute string or @"NULL" if the property does not have an object type (the declared property is for a primitive type). + //api/name/propertyTypeFromAttributeString: + + + + //apple_ref/occ/instm/RKPropertyInspector/propertyNamesAndTypesForEntity: + + RKPropertyInspector+CoreData.h + + - (NSDictionary *)propertyNamesAndTypesForEntity:(NSEntityDescription *)entity + + + //api/name/propertyNamesAndTypesForEntity: + + + + //apple_ref/occ/instm/RKPropertyInspector/typeForProperty:ofEntity: + Returns the Class type of the specified property on the object class + RKPropertyInspector+CoreData.h + + - (Class)typeForProperty:(NSString *)propertyName ofEntity:(NSEntityDescription *)entity + + + //api/name/typeForProperty:ofEntity: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens36.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens36.xml new file mode 100644 index 00000000..c288fe83 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens36.xml @@ -0,0 +1,97 @@ + + + + + + //apple_ref/occ/cl/RKPropertyMapping + RKPropertyMapping is an abstract class for describing the properties being mapped within an RKObjectMapping or RKEntityMapping object. It defines the common interface for its concrete subclasses RKAttributeMapping and RKRelationshipMapping. Each property mapping defines a single transformation from a source key path (often in the deserialized representation of a JSON or XML document) to a destination key path (typically on a target object). + RKPropertyMapping.h + + + + + + + //apple_ref/occ/instm/RKPropertyMapping/setObjectMapping: + Returns the object mapping the receiver is added to. + RKPropertyMapping.h + + @property (nonatomic, weak, readonly) RKObjectMapping *objectMapping + + + //api/name/objectMapping + + + + //apple_ref/occ/instp/RKPropertyMapping/objectMapping + Returns the object mapping the receiver is added to. + RKPropertyMapping.h + + @property (nonatomic, weak, readonly) RKObjectMapping *objectMapping + + + //api/name/objectMapping + + + + //apple_ref/occ/instm/RKPropertyMapping/setSourceKeyPath: + A key path on the source object from which to get information that is to be mapped onto the destination object. + RKPropertyMapping.h + + @property (nonatomic, strong, readonly) NSString *sourceKeyPath + + + //api/name/sourceKeyPath + + + + //apple_ref/occ/instp/RKPropertyMapping/sourceKeyPath + A key path on the source object from which to get information that is to be mapped onto the destination object. + RKPropertyMapping.h + + @property (nonatomic, strong, readonly) NSString *sourceKeyPath + + + //api/name/sourceKeyPath + + + + //apple_ref/occ/instm/RKPropertyMapping/setDestinationKeyPath: + A key path on the destination object on which to set information that has been mapped from the source object. + RKPropertyMapping.h + + @property (nonatomic, strong, readonly) NSString *destinationKeyPath + + + //api/name/destinationKeyPath + + + + //apple_ref/occ/instp/RKPropertyMapping/destinationKeyPath + A key path on the destination object on which to set information that has been mapped from the source object. + RKPropertyMapping.h + + @property (nonatomic, strong, readonly) NSString *destinationKeyPath + + + //api/name/destinationKeyPath + + + + //apple_ref/occ/instm/RKPropertyMapping/isEqualToMapping: + Compares the receiving property mapping to another property mapping. + RKPropertyMapping.h + + - (BOOL)isEqualToMapping:(RKPropertyMapping *)otherMapping + + + otherMapping + The property mapping object with which to compare the receiver. + + + YES if otherMapping specifies the same mapping as the receiver, otherwise NO. + //api/name/isEqualToMapping: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens37.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens37.xml new file mode 100644 index 00000000..643ec95e --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens37.xml @@ -0,0 +1,103 @@ + + + + + + //apple_ref/occ/cl/RKRelationshipConnectionOperation + The RKRelationshipConnectionOperation class is a subclass of NSOperation that manages the connection of NSManagedObject relationships as described by an RKConnectionMapping object. When executed, the operation will find related objects by searching the associated managed object cache for a matching object whose destination attribute value matches that of the associated managed object's source attribute. + RKRelationshipConnectionOperation.h + + + + + + + //apple_ref/occ/instm/RKRelationshipConnectionOperation/initWithManagedObject:connectionMapping:managedObjectCache: + Initializes the receiver with a given managed object, connection mapping, and managed object cache. + RKRelationshipConnectionOperation.h + + - (id)initWithManagedObject:(NSManagedObject *)managedObject connectionMapping:(RKConnectionMapping *)connectionMapping managedObjectCache:(id<RKManagedObjectCaching>)managedObjectCache + + + managedObject + The object to attempt to connect a relationship to. + + connectionMapping + A mapping describing the relationship and attributes necessary to perform the connection. + + managedObjectCache + The managed object cache from which to attempt to fetch a matching object to satisfy the connection. + + + The receiver, initialized with the given managed object, connection mapping, and managed object cache. + //api/name/initWithManagedObject:connectionMapping:managedObjectCache: + + + + //apple_ref/occ/instm/RKRelationshipConnectionOperation/setManagedObject: + The managed object the receiver will attempt to connect a relationship for. + RKRelationshipConnectionOperation.h + + @property (nonatomic, strong, readonly) NSManagedObject *managedObject + + + //api/name/managedObject + + + + //apple_ref/occ/instp/RKRelationshipConnectionOperation/managedObject + The managed object the receiver will attempt to connect a relationship for. + RKRelationshipConnectionOperation.h + + @property (nonatomic, strong, readonly) NSManagedObject *managedObject + + + //api/name/managedObject + + + + //apple_ref/occ/instm/RKRelationshipConnectionOperation/setConnectionMapping: + The connection mapping describing the relationship connection the receiver will attempt to connect. + RKRelationshipConnectionOperation.h + + @property (nonatomic, strong, readonly) RKConnectionMapping *connectionMapping + + + //api/name/connectionMapping + + + + //apple_ref/occ/instp/RKRelationshipConnectionOperation/connectionMapping + The connection mapping describing the relationship connection the receiver will attempt to connect. + RKRelationshipConnectionOperation.h + + @property (nonatomic, strong, readonly) RKConnectionMapping *connectionMapping + + + //api/name/connectionMapping + + + + //apple_ref/occ/instm/RKRelationshipConnectionOperation/setManagedObjectCache: + The managed object cache the receiver will use to fetch a related object satisfying the connection mapping. + RKRelationshipConnectionOperation.h + + @property (nonatomic, strong, readonly) id<RKManagedObjectCaching> managedObjectCache + + + //api/name/managedObjectCache + + + + //apple_ref/occ/instp/RKRelationshipConnectionOperation/managedObjectCache + The managed object cache the receiver will use to fetch a related object satisfying the connection mapping. + RKRelationshipConnectionOperation.h + + @property (nonatomic, strong, readonly) id<RKManagedObjectCaching> managedObjectCache + + + //api/name/managedObjectCache + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens38.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens38.xml new file mode 100644 index 00000000..ee807e11 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens38.xml @@ -0,0 +1,59 @@ + + + + + + //apple_ref/occ/cl/RKRelationshipMapping + The RKRelationshipMapping class is used to describe relationships of a class in an RKObjectMapping or an entity in an RKEntityMapping object. + RKRelationshipMapping.h + + + + + + + //apple_ref/occ/clm/RKRelationshipMapping/relationshipMappingFromKeyPath:toKeyPath:withMapping: + Creates and returns a new relationship mapping object describing how to transform a related object representation at sourceKeyPath to a new representation at destinationKeyPath using the given mapping. + RKRelationshipMapping.h + + + (RKRelationshipMapping *)relationshipMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath withMapping:(RKMapping *)mapping + + + sourceKeyPath + A key path from which to retrieve data in the source object representation that is to be mapped as a relationship. + + destinationKeyPath + The key path on the destination object to set the object mapped results. + + mapping + A mapping object describing how to map the data retrieved from sourceKeyPath that is to be set on destinationKeyPath. + + + + //api/name/relationshipMappingFromKeyPath:toKeyPath:withMapping: + + + + //apple_ref/occ/instm/RKRelationshipMapping/setMapping: + An RKMapping object describing how to map the object representation at sourceKeyPath to a new represenation at destinationKeyPath. + RKRelationshipMapping.h + + @property (nonatomic, strong, readonly) RKMapping *mapping + + + //api/name/mapping + + + + //apple_ref/occ/instp/RKRelationshipMapping/mapping + An RKMapping object describing how to map the object representation at sourceKeyPath to a new represenation at destinationKeyPath. + RKRelationshipMapping.h + + @property (nonatomic, strong, readonly) RKMapping *mapping + + + //api/name/mapping + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens39.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens39.xml new file mode 100644 index 00000000..bba28ce6 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens39.xml @@ -0,0 +1,131 @@ + + + + + + //apple_ref/occ/cl/RKRequestDescriptor + An RKRequestDescriptor object describes an object mapping configuration that is used to construct the parameters of an HTTP request for an object. Request descriptors are defined by specifying the RKMapping object that is to be used when object mapping an object into an NSDictionary of parameters, the class of the type of object for which the mapping is to be applied, and an optional root key path under which the paramters are to be nested. Response descriptors are only utilized when construct parameters for an NSURLRequest with an HTTP method of POST, PUT, or PATCH. + RKRequestDescriptor.h + + + //apple_ref/occ/cl/RKObjectParameterization + //apple_ref/occ/clm/RKObjectMapping/requestMapping + //apple_ref/occ/instm/RKObjectManager/requestWithObject:method:path:parameters: + + + + + + + + + //apple_ref/occ/clm/RKRequestDescriptor/requestDescriptorWithMapping:objectClass:rootKeyPath: + Creates and returns a new RKRequestDescriptor object. + RKRequestDescriptor.h + + + //apple_ref/occ/clm/RKObjectMapping/requestMapping + + + + + (id)requestDescriptorWithMapping:(RKMapping *)mapping objectClass:(Class)objectClass rootKeyPath:(NSString *)rootKeyPath + + + mapping + The mapping to be used when parameterizing an object using the request descriptor. Cannot be nil and must have an objectClass equal to [NSMutableDictionary class]. + + objectClass + The class of objects for which the request descriptor should be used. Cannot be nil. + + rootKeyPath + The root key path under which paramters constructed using the response descriptor will be nested. If nil, the parameters will not be nested and returned as a flat dictionary object. + + + A new RKRequestDescriptor object. + //api/name/requestDescriptorWithMapping:objectClass:rootKeyPath: + + + + //apple_ref/occ/instm/RKRequestDescriptor/setMapping: + The mapping specifying how the object being parameterized is to be mapped into an NSDictionary representation. The mapping must have an objectClass equal to [NSMutableDictionary class]. + RKRequestDescriptor.h + + @property (nonatomic, strong, readonly) RKMapping *mapping + + + //api/name/mapping + + + + //apple_ref/occ/instp/RKRequestDescriptor/mapping + The mapping specifying how the object being parameterized is to be mapped into an NSDictionary representation. The mapping must have an objectClass equal to [NSMutableDictionary class]. + RKRequestDescriptor.h + + @property (nonatomic, strong, readonly) RKMapping *mapping + + + //api/name/mapping + + + + //apple_ref/occ/instm/RKRequestDescriptor/setObjectClass: + The class of objects that the request descriptor is appropriate for use in parameterizing. + RKRequestDescriptor.h + + @property (nonatomic, strong, readonly) Class objectClass + + + //api/name/objectClass + + + + //apple_ref/occ/instp/RKRequestDescriptor/objectClass + The class of objects that the request descriptor is appropriate for use in parameterizing. + RKRequestDescriptor.h + + @property (nonatomic, strong, readonly) Class objectClass + + + //api/name/objectClass + + + + //apple_ref/occ/instm/RKRequestDescriptor/setRootKeyPath: + The root key path that the paramters for the object are to be nested under. May be nil. + RKRequestDescriptor.h + + @property (nonatomic, copy, readonly) NSString *rootKeyPath + + + //api/name/rootKeyPath + + + + //apple_ref/occ/instp/RKRequestDescriptor/rootKeyPath + The root key path that the paramters for the object are to be nested under. May be nil. + RKRequestDescriptor.h + + @property (nonatomic, copy, readonly) NSString *rootKeyPath + + + //api/name/rootKeyPath + + + + //apple_ref/occ/instm/RKRequestDescriptor/matchesObject: + Returns YES if the given object is instance of objectClass or any class that inherits from objectClass, else NO. + RKRequestDescriptor.h + + - (BOOL)matchesObject:(id)object + + + object + The object to be matched against the receiver. + + + YES if the given object matches objectClass, else NO. + //api/name/matchesObject: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens4.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens4.xml new file mode 100644 index 00000000..088fb127 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens4.xml @@ -0,0 +1,91 @@ + + + + + + //apple_ref/occ/cl/RKDynamicMapping + Defines a dynamic object mapping that determines the appropriate concrete object mapping to apply at mapping time. This allows you to map very similar payloads differently depending on the type of data contained therein. + RKDynamicMapping.h + + + + + + + //apple_ref/occ/instm/RKDynamicMapping/setObjectMappingForRepresentationBlock: + Sets a block to be invoked to determine the appropriate concrete object mapping with which to map an object representation. + RKDynamicMapping.h + + - (void)setObjectMappingForRepresentationBlock:(RKDynamicMappingDelegateBlock)block + + + block + The block object to invoke to select the object mapping with which to map the given object representation. + + + + //api/name/setObjectMappingForRepresentationBlock: + + + + //apple_ref/occ/instm/RKDynamicMapping/setObjectMapping:whenValueOfKeyPath:isEqualTo: + Defines a dynamic mapping rule stating that when the value of the key property matches the specified value, the given mapping should be used to map the representation. + RKDynamicMapping.h + + - (void)setObjectMapping:(RKObjectMapping *)objectMapping whenValueOfKeyPath:(NSString *)keyPath isEqualTo:(id)value + + + objectMapping + The mapping to be used when the value at the given key path is equal to the given value. + + keyPath + The key path to retrieve the comparison value from in the object representation being mapped. + + value + The value to be compared with the value at keyPath. If they are equal, the objectMapping will be used to map the representation. + + + + //api/name/setObjectMapping:whenValueOfKeyPath:isEqualTo: + + + + //apple_ref/occ/instm/RKDynamicMapping/setObjectMappings: + Returns an array of object mappings that have been registered with the receiver. + RKDynamicMapping.h + + @property (nonatomic, readonly) NSArray *objectMappings + + An array of RKObjectMapping objects registered with the receiver. + //api/name/objectMappings + + + + //apple_ref/occ/instp/RKDynamicMapping/objectMappings + Returns an array of object mappings that have been registered with the receiver. + RKDynamicMapping.h + + @property (nonatomic, readonly) NSArray *objectMappings + + An array of RKObjectMapping objects registered with the receiver. + //api/name/objectMappings + + + + //apple_ref/occ/instm/RKDynamicMapping/objectMappingForRepresentation: + Invoked by the RKMapperOperation and RKMappingOperation to determine the appropriate RKObjectMapping to use when mapping the given object representation. + RKDynamicMapping.h + + - (RKObjectMapping *)objectMappingForRepresentation:(id)representation + + + representation + The object representation that being mapped dynamically for which to determine the appropriate concrete mapping. + + + The object mapping to be used to map the given object representation. + //api/name/objectMappingForRepresentation: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens40.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens40.xml new file mode 100644 index 00000000..74b177f8 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens40.xml @@ -0,0 +1,203 @@ + + + + + + //apple_ref/occ/cl/RKResponseDescriptor + An RKResponseDescriptor object describes an object mapping configuration that is applicable to an HTTP response. Response descriptors are defined by specifying the RKMapping object that is to be used when performing object mapping on the deserialized response body and the URL path pattern, key path, and status codes for which the mapping is appropriate. The path pattern is a SOCKit SOCPattern string that will be matched against the URL of the request that loaded the response being mapped. If the path pattern is nil, the response descriptor is considered to be appropriate for a response loaded from any URL. The key path specifies the location of data within the deserialized response body for which the mapping is appropriate. If nil, the mapping is considered to apply to the entire response body. The status codes specify a set of HTTP response status codes for which the mapping is appropriate. It is common to constrain a response descriptor to the HTTP Successful status code class (status codes in the 200-299 range). Object mapping for error responses can be configured by configuring a response descriptor to handle the Client Error status code class (status codes in the 400-499 range). Instances of RKResponseDescriptor are immutable. + RKResponseDescriptor.h + + + //apple_ref/occ/cl/RKPathMatcher + + + + + + + + + //apple_ref/occ/clm/RKResponseDescriptor/responseDescriptorWithMapping:pathPattern:keyPath:statusCodes: + Creates and returns a new RKResponseDescriptor object. + RKResponseDescriptor.h + + + (RKResponseDescriptor *)responseDescriptorWithMapping:(RKMapping *)mapping pathPattern:(NSString *)pathPattern keyPath:(NSString *)keyPath statusCodes:(NSIndexSet *)statusCodes + + + mapping + The mapping for the response descriptor. + + pathPattern + A path pattern that matches against URLs for which the mapping should be used. + + keyPath + A key path specifying the subset of the parsed response for which the mapping is to be used. + + statusCodes + A set of HTTP status codes for which the mapping is to be used. + + + A new RKResponseDescriptor object. + //api/name/responseDescriptorWithMapping:pathPattern:keyPath:statusCodes: + + + + //apple_ref/occ/instm/RKResponseDescriptor/setMapping: + The mapping to be used when object mapping the deserialized HTTP response body. Cannot be nil. + RKResponseDescriptor.h + + @property (nonatomic, strong, readonly) RKMapping *mapping + + + //api/name/mapping + + + + //apple_ref/occ/instp/RKResponseDescriptor/mapping + The mapping to be used when object mapping the deserialized HTTP response body. Cannot be nil. + RKResponseDescriptor.h + + @property (nonatomic, strong, readonly) RKMapping *mapping + + + //api/name/mapping + + + + //apple_ref/occ/instm/RKResponseDescriptor/setPathPattern: + The path pattern to match against the request URL. If nil, the response descriptor matches any URL. + RKResponseDescriptor.h + + @property (nonatomic, copy, readonly) NSString *pathPattern + + + //api/name/pathPattern + + + + //apple_ref/occ/instp/RKResponseDescriptor/pathPattern + The path pattern to match against the request URL. If nil, the response descriptor matches any URL. + RKResponseDescriptor.h + + @property (nonatomic, copy, readonly) NSString *pathPattern + + + //api/name/pathPattern + + + + //apple_ref/occ/instm/RKResponseDescriptor/setKeyPath: + The key path to match against the deserialized response body. If nil, the response descriptor matches the entire response body. + RKResponseDescriptor.h + + @property (nonatomic, copy, readonly) NSString *keyPath + + + //api/name/keyPath + + + + //apple_ref/occ/instp/RKResponseDescriptor/keyPath + The key path to match against the deserialized response body. If nil, the response descriptor matches the entire response body. + RKResponseDescriptor.h + + @property (nonatomic, copy, readonly) NSString *keyPath + + + //api/name/keyPath + + + + //apple_ref/occ/instm/RKResponseDescriptor/setStatusCodes: + The set of status codes for which response descriptor matches. If nil, the the response descriptor matches any status code. + RKResponseDescriptor.h + + @property (nonatomic, copy, readonly) NSIndexSet *statusCodes + + + //api/name/statusCodes + + + + //apple_ref/occ/instp/RKResponseDescriptor/statusCodes + The set of status codes for which response descriptor matches. If nil, the the response descriptor matches any status code. + RKResponseDescriptor.h + + @property (nonatomic, copy, readonly) NSIndexSet *statusCodes + + + //api/name/statusCodes + + + + //apple_ref/occ/instm/RKResponseDescriptor/setBaseURL: + The base URL that the pathPattern is to be evaluated relative to. + RKResponseDescriptor.h + + @property (nonatomic, copy) NSURL *baseURL + + + //api/name/baseURL + + + + //apple_ref/occ/instp/RKResponseDescriptor/baseURL + The base URL that the pathPattern is to be evaluated relative to. + RKResponseDescriptor.h + + @property (nonatomic, copy) NSURL *baseURL + + + //api/name/baseURL + + + + //apple_ref/occ/instm/RKResponseDescriptor/matchesPath: + Returns a Boolean value that indicates if the receiver's path pattern matches the given path. + RKResponseDescriptor.h + + - (BOOL)matchesPath:(NSString *)path + + + path + The path to compare with the path pattern of the receiver. + + + YES if the path matches the receiver's pattern, else NO. + //api/name/matchesPath: + + + + //apple_ref/occ/instm/RKResponseDescriptor/matchesURL: + Returns a Boolean value that indicates if the given URL object matches the base URL and path pattern of the receiver. + RKResponseDescriptor.h + + - (BOOL)matchesURL:(NSURL *)URL + + + URL + The URL to compare with the base URL and path pattern of the receiver. + + + YES if the URL matches the base URL and path pattern of the receiver, else NO. + //api/name/matchesURL: + + + + //apple_ref/occ/instm/RKResponseDescriptor/matchesResponse: + Returns a Boolean value that indicates if the given URL response object matches the receiver. + RKResponseDescriptor.h + + - (BOOL)matchesResponse:(NSHTTPURLResponse *)response + + + response + The HTTP response object to compare with the base URL, path pattern, and status codes set of the receiver. + + + YES if the response matches the base URL, path pattern, and status codes set of the receiver, else NO. + //api/name/matchesResponse: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens41.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens41.xml new file mode 100644 index 00000000..7954a548 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens41.xml @@ -0,0 +1,235 @@ + + + + + + //apple_ref/occ/cl/RKResponseMapperOperation + RKResponseMapperOperation is an NSOperation that provides support for performing object mapping on an NSHTTPURLResponse and its associated response data. + RKResponseMapperOperation.h + + + + + + + //apple_ref/occ/instm/RKResponseMapperOperation/initWithResponse:data:responseDescriptors: + Initializes and returns a newly created response mapper operation with the given response object, response data, and an array of RKResponseDescriptor objects. + RKResponseMapperOperation.h + + - (id)initWithResponse:(NSHTTPURLResponse *)response data:(NSData *)data responseDescriptors:(NSArray *)responseDescriptors + + + response + The HTTP response object to be used for object mapping. + + data + The data loaded for the response body. + + responseDescriptors + An array whose elements are RKResponseDescriptor objects specifying object mapping configurations that may be applied to the response. + + + The receiver, initialized with the response, data, and response descriptor objects. + //api/name/initWithResponse:data:responseDescriptors: + + + + //apple_ref/occ/instm/RKResponseMapperOperation/setResponse: + The response object that loaded the data that is to be object mapped by the operation. Cannot be nil. + RKResponseMapperOperation.h + + @property (nonatomic, strong, readonly) NSHTTPURLResponse *response + + + //api/name/response + + + + //apple_ref/occ/instp/RKResponseMapperOperation/response + The response object that loaded the data that is to be object mapped by the operation. Cannot be nil. + RKResponseMapperOperation.h + + @property (nonatomic, strong, readonly) NSHTTPURLResponse *response + + + //api/name/response + + + + //apple_ref/occ/instm/RKResponseMapperOperation/setData: + The response data that is to be deserialized and mapped by the operation. May be nil. + RKResponseMapperOperation.h + + @property (nonatomic, strong, readonly) NSData *data + + + //api/name/data + + + + //apple_ref/occ/instp/RKResponseMapperOperation/data + The response data that is to be deserialized and mapped by the operation. May be nil. + RKResponseMapperOperation.h + + @property (nonatomic, strong, readonly) NSData *data + + + //api/name/data + + + + //apple_ref/occ/instm/RKResponseMapperOperation/setResponseDescriptors: + An array of RKResponseDescriptor objects that specify object mapping configurations that may be applied to the deserialized response data if they are found to match the response. + RKResponseMapperOperation.h + + @property (nonatomic, strong, readonly) NSArray *responseDescriptors + + + //api/name/responseDescriptors + + + + //apple_ref/occ/instp/RKResponseMapperOperation/responseDescriptors + An array of RKResponseDescriptor objects that specify object mapping configurations that may be applied to the deserialized response data if they are found to match the response. + RKResponseMapperOperation.h + + @property (nonatomic, strong, readonly) NSArray *responseDescriptors + + + //api/name/responseDescriptors + + + + //apple_ref/occ/instm/RKResponseMapperOperation/setTargetObject: + The target object for the object mapping operation performed on the deserialized response data. May be nil. + RKResponseMapperOperation.h + + @property (nonatomic, strong) id targetObject + + + //api/name/targetObject + + + + //apple_ref/occ/instp/RKResponseMapperOperation/targetObject + The target object for the object mapping operation performed on the deserialized response data. May be nil. + RKResponseMapperOperation.h + + @property (nonatomic, strong) id targetObject + + + //api/name/targetObject + + + + //apple_ref/occ/instm/RKResponseMapperOperation/setMapperDelegate: + The delegate for the RKMapperOperation created by the receiver to perform object mapping on the deserialized response data. May be nil. + RKResponseMapperOperation.h + + @property (nonatomic, weak) id<RKMapperOperationDelegate> mapperDelegate + + + //api/name/mapperDelegate + + + + //apple_ref/occ/instp/RKResponseMapperOperation/mapperDelegate + The delegate for the RKMapperOperation created by the receiver to perform object mapping on the deserialized response data. May be nil. + RKResponseMapperOperation.h + + @property (nonatomic, weak) id<RKMapperOperationDelegate> mapperDelegate + + + //api/name/mapperDelegate + + + + //apple_ref/occ/instm/RKResponseMapperOperation/setTreatsEmptyResponseAsSuccess: + A Boolean value that indicates if the receiver should consider empty responses as being successfully mapped even though no mapping is actually performed. + RKResponseMapperOperation.h + + @property (nonatomic, assign) BOOL treatsEmptyResponseAsSuccess + + + //api/name/treatsEmptyResponseAsSuccess + + + + //apple_ref/occ/instp/RKResponseMapperOperation/treatsEmptyResponseAsSuccess + A Boolean value that indicates if the receiver should consider empty responses as being successfully mapped even though no mapping is actually performed. + RKResponseMapperOperation.h + + @property (nonatomic, assign) BOOL treatsEmptyResponseAsSuccess + + + //api/name/treatsEmptyResponseAsSuccess + + + + //apple_ref/occ/instm/RKResponseMapperOperation/setResponseMappingsDictionary: + Returns a dictionary of key path to RKMapping objects that are applicable to mapping the response. This is determined by evaluating the URL and status codes of the response against the set of responseDescriptors. + RKResponseMapperOperation.h + + @property (nonatomic, strong, readonly) NSDictionary *responseMappingsDictionary + + + //api/name/responseMappingsDictionary + + + + //apple_ref/occ/instp/RKResponseMapperOperation/responseMappingsDictionary + Returns a dictionary of key path to RKMapping objects that are applicable to mapping the response. This is determined by evaluating the URL and status codes of the response against the set of responseDescriptors. + RKResponseMapperOperation.h + + @property (nonatomic, strong, readonly) NSDictionary *responseMappingsDictionary + + + //api/name/responseMappingsDictionary + + + + //apple_ref/occ/instm/RKResponseMapperOperation/setMappingResult: + The results of performing object mapping on the deserialized response data. In the event that the operation has failed, the value will is nil. + RKResponseMapperOperation.h + + @property (nonatomic, strong, readonly) RKMappingResult *mappingResult + + + //api/name/mappingResult + + + + //apple_ref/occ/instp/RKResponseMapperOperation/mappingResult + The results of performing object mapping on the deserialized response data. In the event that the operation has failed, the value will is nil. + RKResponseMapperOperation.h + + @property (nonatomic, strong, readonly) RKMappingResult *mappingResult + + + //api/name/mappingResult + + + + //apple_ref/occ/instm/RKResponseMapperOperation/setError: + The error, if any, that occured during execution of the operation. + RKResponseMapperOperation.h + + @property (nonatomic, strong, readonly) NSError *error + + + //api/name/error + + + + //apple_ref/occ/instp/RKResponseMapperOperation/error + The error, if any, that occured during execution of the operation. + RKResponseMapperOperation.h + + @property (nonatomic, strong, readonly) NSError *error + + + //api/name/error + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens42.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens42.xml new file mode 100644 index 00000000..7e80dcc5 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens42.xml @@ -0,0 +1,233 @@ + + + + + + //apple_ref/occ/cl/RKRoute + The RKRoute class models a single routable path pattern in use by the application. A route can be combined with an NSURL base URL and interpolated with an object to produce a new fully hydrated URL object. Routes are always instantiated with a path pattern and metadata to provide for the subsequent identification of the defined route. + RKRoute.h + + + //apple_ref/occ/cl/RKRouter + //apple_ref/occ/cl/RKRouteSet + + + + + + + + + //apple_ref/occ/clm/RKRoute/routeWithName:pathPattern:method: + Creates and returns a new named route object with the given name, path pattern and method. + RKRoute.h + + + (id)routeWithName:(NSString *)name pathPattern:(NSString *)pathPattern method:(RKRequestMethod)method + + + name + A unique identifying name for the route. + + pathPattern + A SOCKit pattern describing the format of URL paths generated from the route. + + method + The request method of the route. + + + A new named route object with the given name, path pattern and request method. + //api/name/routeWithName:pathPattern:method: + + + + //apple_ref/occ/clm/RKRoute/routeWithClass:pathPattern:method: + Creates and returns a new class route object with the given object class, path pattern and method. + RKRoute.h + + + (id)routeWithClass:(Class)objectClass pathPattern:(NSString *)pathPattern method:(RKRequestMethod)method + + + objectClass + The class that is represented by the route. + + pathPattern + A SOCKit pattern describing the format of URL paths generated from the route. + + method + The request method of the route. + + + A new class route object with the given object class, path pattern and request method. + //api/name/routeWithClass:pathPattern:method: + + + + //apple_ref/occ/clm/RKRoute/routeWithRelationshipName:objectClass:pathPattern:method: + Creates and returns a new relationship route object with the given relationship name, object class, path pattern and method. + RKRoute.h + + + (id)routeWithRelationshipName:(NSString *)name objectClass:(Class)objectClass pathPattern:(NSString *)pathPattern method:(RKRequestMethod)method + + + name + The name of the relationship represented by the route. + + objectClass + The class containing the relationship represented by the route. + + pathPattern + A SOCKit pattern describing the format of URL paths generated from the route. + + method + The request method of the route. + + + A new class route object with the given object class, path pattern and request method. + //api/name/routeWithRelationshipName:objectClass:pathPattern:method: + + + + //apple_ref/occ/instm/RKRoute/setName: + The name of the receiver. + RKRoute.h + + @property (nonatomic, strong, readonly) NSString *name + + + //api/name/name + + + + //apple_ref/occ/instp/RKRoute/name + The name of the receiver. + RKRoute.h + + @property (nonatomic, strong, readonly) NSString *name + + + //api/name/name + + + + //apple_ref/occ/instm/RKRoute/setObjectClass: + The object class of the receiver. + RKRoute.h + + @property (nonatomic, strong, readonly) Class objectClass + + + //api/name/objectClass + + + + //apple_ref/occ/instp/RKRoute/objectClass + The object class of the receiver. + RKRoute.h + + @property (nonatomic, strong, readonly) Class objectClass + + + //api/name/objectClass + + + + //apple_ref/occ/instm/RKRoute/setMethod: + The request method of the receiver. + RKRoute.h + + @property (nonatomic, assign, readonly) RKRequestMethod method + + + //api/name/method + + + + //apple_ref/occ/instp/RKRoute/method + The request method of the receiver. + RKRoute.h + + @property (nonatomic, assign, readonly) RKRequestMethod method + + + //api/name/method + + + + //apple_ref/occ/instm/RKRoute/setPathPattern: + The path pattern of the receiver. + RKRoute.h + + @property (nonatomic, strong, readonly) NSString *pathPattern + + + //api/name/pathPattern + + + + //apple_ref/occ/instp/RKRoute/pathPattern + The path pattern of the receiver. + RKRoute.h + + @property (nonatomic, strong, readonly) NSString *pathPattern + + + //api/name/pathPattern + + + + //apple_ref/occ/instm/RKRoute/setShouldEscapePath: + A Boolean value that determines if the path pattern should be escaped when evaluated. + RKRoute.h + + @property (nonatomic, assign) BOOL shouldEscapePath + + + //api/name/shouldEscapePath + + + + //apple_ref/occ/instp/RKRoute/shouldEscapePath + A Boolean value that determines if the path pattern should be escaped when evaluated. + RKRoute.h + + @property (nonatomic, assign) BOOL shouldEscapePath + + + //api/name/shouldEscapePath + + + + //apple_ref/occ/instm/RKRoute/isNamedRoute + Determines if the receiver is a named route. + RKRoute.h + + - (BOOL)isNamedRoute + + YES if the receiver is a named route, else NO. + //api/name/isNamedRoute + + + + //apple_ref/occ/instm/RKRoute/isClassRoute + Determines if the receiver is a class route. + RKRoute.h + + - (BOOL)isClassRoute + + YES if the receiver is a class route, else NO. + //api/name/isClassRoute + + + + //apple_ref/occ/instm/RKRoute/isRelationshipRoute + Determines if the receiver is a relationship route. + RKRoute.h + + - (BOOL)isRelationshipRoute + + YES if the receiver is a relationship route, else NO. + //api/name/isRelationshipRoute + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens43.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens43.xml new file mode 100644 index 00000000..2a8c89c0 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens43.xml @@ -0,0 +1,225 @@ + + + + + + //apple_ref/occ/cl/RKRouteSet + The RKRouteSet class provides for the storage and retrieval of RKRoute objects. Route objects are added and removed the route set to manipulate the routing table of the application. + RKRouteSet.h + + + + + + + //apple_ref/occ/instm/RKRouteSet/addRoute: + Adds a route to the receiver. + RKRouteSet.h + + - (void)addRoute:(RKRoute *)route + + + route + The route to be added. +@raises NSInvalidArgumentException Raised if the route already exists in the receiver or overlaps an existing name. + + + + //api/name/addRoute: + + + + //apple_ref/occ/instm/RKRouteSet/removeRoute: + Removes a route from the receiver. + RKRouteSet.h + + - (void)removeRoute:(RKRoute *)route + + + route + The route to be removed. +@raises NSInvalidArgumentException Raised if the route does not exist in the receiver. + + + + //api/name/removeRoute: + + + + //apple_ref/occ/instm/RKRouteSet/containsRoute: + Determines if a given route exists within the receiver. + RKRouteSet.h + + - (BOOL)containsRoute:(RKRoute *)route + + + route + The route to be tested for containement. + + + YES if the route is contained within the route set, else NO. + //api/name/containsRoute: + + + + //apple_ref/occ/instm/RKRouteSet/allRoutes + Returns all routes from the receiver in an array. + RKRouteSet.h + + - (NSArray *)allRoutes + + An array containing all the routes in the receiver. + //api/name/allRoutes + + + + //apple_ref/occ/instm/RKRouteSet/namedRoutes + Returns all named routes from the receiver in an array. + RKRouteSet.h + + - (NSArray *)namedRoutes + + An array containing all the named routes in the receiver. + //api/name/namedRoutes + + + + //apple_ref/occ/instm/RKRouteSet/classRoutes + Returns all class routes from the receiver in an array. + RKRouteSet.h + + - (NSArray *)classRoutes + + An array containing all the class routes in the receiver. + //api/name/classRoutes + + + + //apple_ref/occ/instm/RKRouteSet/relationshipRoutes + Returns all relationship routes from the receiver in an array. + RKRouteSet.h + + - (NSArray *)relationshipRoutes + + An array containing all the relationship routes in the receiver. + //api/name/relationshipRoutes + + + + //apple_ref/occ/instm/RKRouteSet/routeForName: + Retrieves a route with the given name. + RKRouteSet.h + + - (RKRoute *)routeForName:(NSString *)name + + + name + The name of the named route to be found. + + + A route with the given name or nil if none was found. + //api/name/routeForName: + + + + //apple_ref/occ/instm/RKRouteSet/routeForClass:method: + Retrieves a route for the given object class and request method. + RKRouteSet.h + + - (RKRoute *)routeForClass:(Class)objectClass method:(RKRequestMethod)method + + + objectClass + The object class of the route to be retrieved. + + method + The request method of the route to be retrieved. + + + A route with the given object class and method or nil if none was found. + //api/name/routeForClass:method: + + + + //apple_ref/occ/instm/RKRouteSet/routeForRelationship:ofClass:method: + Retrieves a route for a given relationship of a class with a given request method. + RKRouteSet.h + + - (RKRoute *)routeForRelationship:(NSString *)relationship ofClass:(Class)objectClass method:(RKRequestMethod)method + + + relationship + The name of the relationship of the route to be retrieved. + + method + The request method of the route to be retrieved. + + + A route with the given relationship name, object class and method or nil if none was found. + //api/name/routeForRelationship:ofClass:method: + + + + //apple_ref/occ/instm/RKRouteSet/routesForClass: + Retrieves all class routes with a given object class. + RKRouteSet.h + + - (NSArray *)routesForClass:(Class)objectClass + + + objectClass + The object class of the routes to be retrieved. + + + An array containing all class routes with the given class. + //api/name/routesForClass: + + + + //apple_ref/occ/instm/RKRouteSet/routesForObject: + Retrieves all object routes for a given object. + RKRouteSet.h + + - (NSArray *)routesForObject:(id)object + + + object + An object for which all object routes are to be retrieved. + + + An array containing all object routes where the target class is included in the given object's class hierarchy. + //api/name/routesForObject: + + + + //apple_ref/occ/instm/RKRouteSet/routesForRelationship:ofClass: + Retrieves all routes for a given relationship name and object class. + RKRouteSet.h + + - (NSArray *)routesForRelationship:(NSString *)relationshipName ofClass:(Class)objectClass + + + relationshipName + The name of the relationship of the routes to be retrieved. + + objectClass + The object class of the routes to be retrieved. + + + An array containing all relationship routes with the given relationship name and object class. + //api/name/routesForRelationship:ofClass: + + + + //apple_ref/occ/instm/RKRouteSet/routeForObject:method: + Retrieves a route for a given object and request method. + RKRouteSet.h + + - (RKRoute *)routeForObject:(id)object method:(RKRequestMethod)method + + + //api/name/routeForObject:method: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens44.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens44.xml new file mode 100644 index 00000000..d845d16a --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens44.xml @@ -0,0 +1,157 @@ + + + + + + //apple_ref/occ/cl/RKRouter + An RKRouter instance is responsible for generating NSURL objects with a given base URL and a route set. It is used to centralize the knowledge about the URL's that are used by the application. + RKRouter.h + + + + + + + //apple_ref/occ/instm/RKRouter/initWithBaseURL: + Initializes a router with a given base URL. + RKRouter.h + + - (id)initWithBaseURL:(NSURL *)baseURL + + + baseURL + The base URL with which to initialize the receiver. + + + The receiver, initialized with the given base URL. + //api/name/initWithBaseURL: + + + + //apple_ref/occ/instm/RKRouter/URLForRouteNamed:method:object: + Generates a URL for the route with the given name. + RKRouter.h + + - (NSURL *)URLForRouteNamed:(NSString *)routeName method:(out RKRequestMethod *)method object:(id)object + + + routeName + The name of the route for which a URL is to be generated. + + method + A pointer to an RKRequestMethod variable in which to store the HTTP method associated with the named route. May be nil. + + object + An optional object against which to interpolate the path pattern. + + + A new NSURL object constructed by appending the path pattern to the baseURL of the receiver and interpolating against a given object; or nil if no route was found with the given name. + //api/name/URLForRouteNamed:method:object: + + + + //apple_ref/occ/instm/RKRouter/URLForObject:method: + Generates a URL for a given object and HTTP method. + RKRouter.h + + - (NSURL *)URLForObject:(id)object method:(RKRequestMethod)method + + + object + The object for which a URL is to be generated. + + method + The HTTP method for which the URL is to be generated. + + + A new URL object constructed by appending the path pattern of the route for the object an HTTP method to the baseURL of the receiver, interpolated against the routed object; or nil if no route was found for the given object and HTTP method. + //api/name/URLForObject:method: + + + + //apple_ref/occ/instm/RKRouter/URLForRelationship:ofObject:method: + Generates a URL for a relationship of a given object with a given HTTP method. + RKRouter.h + + - (NSURL *)URLForRelationship:(NSString *)relationshipName ofObject:(id)object method:(RKRequestMethod)method + + + relationshipName + The name of the relationship for which a URL is to be generated. + + object + The object for which the URL is to be generated. + + method + The HTTP method for which the URL is to be generated. + + + A new URL object constructed by appending the path pattern of the route for the given object's relationship and HTTP method to the baseURL of the receiver, interpolated against the routed object; or nil if no route was found for the given relationship, object and HTTP method. + //api/name/URLForRelationship:ofObject:method: + + + + //apple_ref/occ/instm/RKRouter/URLWithRoute:object: + Generates a URL with a given route and object. + RKRouter.h + + - (NSURL *)URLWithRoute:(RKRoute *)route object:(id)object + + + route + The route to generate the URL with. + + object + The object with which to interpolate the path pattern of the given route. + + + A new URL object constructed by interpolating the path pattern of the given route with the given object to construct a path and constructing an NSURL object relative to the baseURL of the receiver. + //api/name/URLWithRoute:object: + + + + //apple_ref/occ/instm/RKRouter/setBaseURL: + The base URL that all URLs constructed by the receiver are relative to. + RKRouter.h + + @property (nonatomic, strong, readonly) NSURL *baseURL + + + //api/name/baseURL + + + + //apple_ref/occ/instp/RKRouter/baseURL + The base URL that all URLs constructed by the receiver are relative to. + RKRouter.h + + @property (nonatomic, strong, readonly) NSURL *baseURL + + + //api/name/baseURL + + + + //apple_ref/occ/instm/RKRouter/setRouteSet: + A route set defining all the routes addressable through the receiver. + RKRouter.h + + @property (nonatomic, strong, readonly) RKRouteSet *routeSet + + + //api/name/routeSet + + + + //apple_ref/occ/instp/RKRouter/routeSet + A route set defining all the routes addressable through the receiver. + RKRouter.h + + @property (nonatomic, strong, readonly) RKRouteSet *routeSet + + + //api/name/routeSet + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens45.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens45.xml new file mode 100644 index 00000000..1830da93 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens45.xml @@ -0,0 +1,168 @@ + + + + + + //apple_ref/occ/cl/RKSearchIndexer + The RKSearchIndexer class provides support for adding full text searching to Core Data entities and managing the indexing of managed object instances of searchable entities. + RKSearchIndexer.h + + + + + + + //apple_ref/occ/clm/RKSearchIndexer/addSearchIndexingToEntity:onAttributes: + Adds search indexing to the given entity for a given list of attributes identified by name. The entity will have a to-many relationship to the RKSearchWordEntity added and the list of searchable attributes stored into the user info dictionary. + RKSearchIndexer.h + + + (void)addSearchIndexingToEntity:(NSEntityDescription *)entity onAttributes:(NSArray *)attributes + + + entity + The entity to which search indexing support is to be added. + + attributes + An array of NSAttributeDescription objects or NSString attribute names specifying the NSStringAttributeType attributes that are to be indexed for searching. + + + + //api/name/addSearchIndexingToEntity:onAttributes: + + + + //apple_ref/occ/instm/RKSearchIndexer/setStopWords: + An optional set of stop words to be removed from the set of tokens used to create the search words for indexed entities. + RKSearchIndexer.h + + @property (nonatomic, strong) NSSet *stopWords + + + //api/name/stopWords + + + + //apple_ref/occ/instp/RKSearchIndexer/stopWords + An optional set of stop words to be removed from the set of tokens used to create the search words for indexed entities. + RKSearchIndexer.h + + @property (nonatomic, strong) NSSet *stopWords + + + //api/name/stopWords + + + + //apple_ref/occ/instm/RKSearchIndexer/setIndexingContext: + An optional NSManagedObjectContext in which to perform indexing operations. + RKSearchIndexer.h + + @property (nonatomic, strong) NSManagedObjectContext *indexingContext + + + //api/name/indexingContext + + + + //apple_ref/occ/instp/RKSearchIndexer/indexingContext + An optional NSManagedObjectContext in which to perform indexing operations. + RKSearchIndexer.h + + @property (nonatomic, strong) NSManagedObjectContext *indexingContext + + + //api/name/indexingContext + + + + //apple_ref/occ/instm/RKSearchIndexer/startObservingManagedObjectContext: + Tells the receiver to start monitoring the given managed object context for save notifications and to index any changed objects in response to the save. + RKSearchIndexer.h + + - (void)startObservingManagedObjectContext:(NSManagedObjectContext *)managedObjectContext + + + managedObjectContext + The managed object context to be monitored for save notifications. + + + + //api/name/startObservingManagedObjectContext: + + + + //apple_ref/occ/instm/RKSearchIndexer/stopObservingManagedObjectContext: + Tells the receiver to stop monitoring the given managed object context for save notifications and cease indexing changed objects in response to the save. + RKSearchIndexer.h + + - (void)stopObservingManagedObjectContext:(NSManagedObjectContext *)managedObjectContext + + + managedObjectContext + The managed object context that is no longer to be monitored for save notifications. + + + + //api/name/stopObservingManagedObjectContext: + + + + //apple_ref/occ/instm/RKSearchIndexer/indexChangedObjectsInManagedObjectContext:waitUntilFinished: + Tells the receiver to build a list of all inserted or updated managed objects in the given context and index each one. Objects for entities that are not indexed are silently ignored. + RKSearchIndexer.h + + - (void)indexChangedObjectsInManagedObjectContext:(NSManagedObjectContext *)managedObjectContext waitUntilFinished:(BOOL)wait + + + managedObjectContext + The managed object context that is to be indexed. + + wait + A Boolean value that determines if the current thread will be blocked until all indexing operations have completed. + + + + //api/name/indexChangedObjectsInManagedObjectContext:waitUntilFinished: + + + + //apple_ref/occ/instm/RKSearchIndexer/indexManagedObject: + Tells the receiver to index a given managed object instance. + RKSearchIndexer.h + + - (NSUInteger)indexManagedObject:(NSManagedObject *)managedObject + + + managedObject + The managed object that is to be indexed. + + + A count of the number of search words that were indexed from the given object's searchable attributes. +@raises NSInvalidArgumentException Raised if the given managed object is not for a searchable entity. + //api/name/indexManagedObject: + + + + //apple_ref/occ/instm/RKSearchIndexer/cancelAllIndexingOperations + Tells the indexer to cancel all indexing operations in progress. + RKSearchIndexer.h + + - (void)cancelAllIndexingOperations + + + //api/name/cancelAllIndexingOperations + + + + //apple_ref/occ/instm/RKSearchIndexer/waitUntilAllIndexingOperationsAreFinished + Blocks the current thread until all of the receiver’s queued and executing indexing operations finish executing. + RKSearchIndexer.h + + - (void)waitUntilAllIndexingOperationsAreFinished + + + //api/name/waitUntilAllIndexingOperationsAreFinished + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens46.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens46.xml new file mode 100644 index 00000000..cfe77a62 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens46.xml @@ -0,0 +1,53 @@ + + + + + + //apple_ref/occ/cl/RKSearchPredicate + RKSearchPredicate is a suclass of NSCompoundPredicate used to represent textual search operations against entities indexed by an instance of RKSearchIndexer. + RKSearchPredicate.h + + + + + + + //apple_ref/occ/clm/RKSearchPredicate/searchPredicateWithText:type: + Creates and returns a new predicate for performing a full text search on an entity indexed by an instance of RKSearchIndexer. The given search text will be tokenized, normalized and used to construct a collection of subpredicates specifying a BEGINSWITH match against the searchWords relationship of the searchable entity. + RKSearchPredicate.h + + + (NSPredicate *)searchPredicateWithText:(NSString *)searchText type:(NSCompoundPredicateType)type + + + searchText + A string of text with which to construct subpredicates for searching. + + type + The type of the new compound predicate. + + + A new compound predicate for performing a full text search with the given search text and type. + //api/name/searchPredicateWithText:type: + + + + //apple_ref/occ/instm/RKSearchPredicate/initWithSearchText:type: + Initializes the receiver with a string of search text and a compound predicate type. + RKSearchPredicate.h + + - (id)initWithSearchText:(NSString *)searchText type:(NSCompoundPredicateType)type + + + searchText + A string of text with which to construct subpredicates for searching. + + type + The type of the new compound predicate. + + + The receiver with its type set to the given type and its subpredicates set to an array of subpredicates for searching for the given text. + //api/name/initWithSearchText:type: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens47.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens47.xml new file mode 100644 index 00000000..bfdf183b --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens47.xml @@ -0,0 +1,53 @@ + + + + + + //apple_ref/occ/cl/RKSearchTokenizer + The RKSearchTokenizer class provides an interface for tokenizing input text into a set of searchable words. Diacritics are removed and the input text is tokenized case insensitively. A set of stop words can be optionally trimmed from the result token set. + RKSearchTokenizer.h + + + + + + + //apple_ref/occ/instm/RKSearchTokenizer/setStopWords: + The set of stop words that are to be removed from the token set. + RKSearchTokenizer.h + + @property (nonatomic, strong) NSSet *stopWords + + + //api/name/stopWords + + + + //apple_ref/occ/instp/RKSearchTokenizer/stopWords + The set of stop words that are to be removed from the token set. + RKSearchTokenizer.h + + @property (nonatomic, strong) NSSet *stopWords + + + //api/name/stopWords + + + + //apple_ref/occ/instm/RKSearchTokenizer/tokenize: + Tokenizes the given string by folding it case and diacritic insensitively and then splitting it apart using the the word unit delimiters for the current locale. If a set of stop words has been provided, the resulting token set will have the stop words subtracted. + RKSearchTokenizer.h + + - (NSSet *)tokenize:(NSString *)string + + + string + A string of text you wish to tokenize. + + + A set of searchable text tokens extracted from the given string. + //api/name/tokenize: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens48.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens48.xml new file mode 100644 index 00000000..271581d2 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens48.xml @@ -0,0 +1,37 @@ + + + + + + //apple_ref/occ/cl/RKSearchWord + + RKSearchWord.h + + + + + + + //apple_ref/occ/instm/RKSearchWord/setWord: + A single search word extracted from an indexed entity. + RKSearchWord.h + + @property (nonatomic, strong) NSString *word + + + //api/name/word + + + + //apple_ref/occ/instp/RKSearchWord/word + A single search word extracted from an indexed entity. + RKSearchWord.h + + @property (nonatomic, strong) NSString *word + + + //api/name/word + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens49.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens49.xml new file mode 100644 index 00000000..2768ffe3 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens49.xml @@ -0,0 +1,15 @@ + + + + + + //apple_ref/occ/cl/RKSearchWordEntity + + RKSearchWordEntity.h + + + + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens5.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens5.xml new file mode 100644 index 00000000..0dfe3321 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens5.xml @@ -0,0 +1,119 @@ + + + + + + //apple_ref/occ/cl/RKDynamicMappingMatcher + The RKDynamicMappingMatcher class provides an interface for encapsulating the selection of an object mapping based on the runtime value of a property at a given key path. A matcher object is initialized with a key path, an expected value to be read from the key path, and an object mapping that is to be applied if the match evaluates to YES. When evaluating the match, the matcher invokes valueForKeyPath: on the object being matched and compares the value returned with the expectedValue via the RKObjectIsEqualToObject function. + RKDynamicMappingMatcher.h + + + + + + + //apple_ref/occ/instm/RKDynamicMappingMatcher/initWithKeyPath:expectedValue:objectMapping: + Initializes the receiver with a given key path, expected value, and an object mapping that applies in the event of a positive match. + RKDynamicMappingMatcher.h + + - (id)initWithKeyPath:(NSString *)keyPath expectedValue:(id)expectedValue objectMapping:(RKObjectMapping *)objectMapping + + + keyPath + The key path to obtain the comparison value from the object being matched via valueForKeyPath:. + + expectedValue + The value that is expected to be read from keyPath if there is a match. + + objectMapping + The object mapping object that applies if the comparison value is equal to the expected value. + + + The receiver, initialized with the given key path, expected value, and object mapping. + //api/name/initWithKeyPath:expectedValue:objectMapping: + + + + //apple_ref/occ/instm/RKDynamicMappingMatcher/setKeyPath: + The key path to obtain the comparison value from the object being matched via valueForKeyPath:. + RKDynamicMappingMatcher.h + + @property (nonatomic, copy, readonly) NSString *keyPath + + + //api/name/keyPath + + + + //apple_ref/occ/instp/RKDynamicMappingMatcher/keyPath + The key path to obtain the comparison value from the object being matched via valueForKeyPath:. + RKDynamicMappingMatcher.h + + @property (nonatomic, copy, readonly) NSString *keyPath + + + //api/name/keyPath + + + + //apple_ref/occ/instm/RKDynamicMappingMatcher/setExpectedValue: + The value that is expected to be read from keyPath if there is a match. + RKDynamicMappingMatcher.h + + @property (nonatomic, strong, readonly) id expectedValue + + + //api/name/expectedValue + + + + //apple_ref/occ/instp/RKDynamicMappingMatcher/expectedValue + The value that is expected to be read from keyPath if there is a match. + RKDynamicMappingMatcher.h + + @property (nonatomic, strong, readonly) id expectedValue + + + //api/name/expectedValue + + + + //apple_ref/occ/instm/RKDynamicMappingMatcher/setObjectMapping: + The object mapping object that applies if the comparison value read from keyPath is equal to the expectedValue. + RKDynamicMappingMatcher.h + + @property (nonatomic, strong, readonly) RKObjectMapping *objectMapping + + + //api/name/objectMapping + + + + //apple_ref/occ/instp/RKDynamicMappingMatcher/objectMapping + The object mapping object that applies if the comparison value read from keyPath is equal to the expectedValue. + RKDynamicMappingMatcher.h + + @property (nonatomic, strong, readonly) RKObjectMapping *objectMapping + + + //api/name/objectMapping + + + + //apple_ref/occ/instm/RKDynamicMappingMatcher/matches: + Returns a Boolean value that indicates if the given object matches the expectations of the receiver. + RKDynamicMappingMatcher.h + + - (BOOL)matches:(id)object + + + object + The object to be evaluated. + + + YES if the object matches the expectations of the receiver, else NO. + //api/name/matches: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens50.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens50.xml new file mode 100644 index 00000000..fcadd0cd --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens50.xml @@ -0,0 +1,254 @@ + + + + + + //apple_ref/occ/cl/RKTestFactory + The RKTestFactory class provides an interface for initializing RestKit objects within a unit testing environment. The factory is used to ensure isolation between test cases by ensuring that RestKit's important singleton objects are torn down between tests and that each test is working within a clean Core Data environment. Callback hooks are provided so that application specific set up and tear down logic can be integrated as well. + RKTestFactory.h + + + + + + + //apple_ref/occ/clm/RKTestFactory/baseURL + Returns the base URL with which to initialize AFHTTPClient and RKObjectManager instances created via the factory. + RKTestFactory.h + + + (NSURL *)baseURL + + The base URL for the factory. + //api/name/baseURL + + + + //apple_ref/occ/clm/RKTestFactory/setBaseURL: + Sets the base URL for the factory. + RKTestFactory.h + + + (void)setBaseURL:(NSURL *)URL + + + URL + The new base URL. + + + + //api/name/setBaseURL: + + + + //apple_ref/occ/clm/RKTestFactory/baseURLString + Returns the base URL as a string value. + RKTestFactory.h + + + (NSString *)baseURLString + + The base URL for the factory, as a string. + //api/name/baseURLString + + + + //apple_ref/occ/clm/RKTestFactory/setBaseURLString: + Sets the base URL for the factory to a new value by constructing an RKURL +from the given string. + RKTestFactory.h + + + (void)setBaseURLString:(NSString *)baseURLString + + + baseURLString + A string containing the URL to set as the base URL for the factory. + + + + //api/name/setBaseURLString: + + + + //apple_ref/occ/clm/RKTestFactory/managedObjectStoreFilename + Returns the filename used when constructing instances of RKManagedObjectStore via the factory. + RKTestFactory.h + + + (NSString *)managedObjectStoreFilename + + A string containing the filename to use when creating a managed object store. + //api/name/managedObjectStoreFilename + + + + //apple_ref/occ/clm/RKTestFactory/setManagedObjectStoreFilename: + Sets the filename to use when the factory constructs an instance of RKManagedObjectStore. + RKTestFactory.h + + + (void)setManagedObjectStoreFilename:(NSString *)managedObjectStoreFilename + + + managedObjectStoreFilename + A string containing the filename to use when creating managed object store instances. + + + + //api/name/setManagedObjectStoreFilename: + + + + //apple_ref/occ/clm/RKTestFactory/defineFactory:withBlock: + Defines a factory with a given name for building object instances using the +given block. When the factory singleton receives an objectFromFactory: message, +the block designated for the given factory name is invoked and the resulting object +reference is returned. + RKTestFactory.h + + + (void)defineFactory:(NSString *)factoryName withBlock:(id ( ^ ) ( ))block + + + factoryName + The name to assign the factory. + + block + A block to execute when building an object instance for the factory name. + + + A configured object instance. + //api/name/defineFactory:withBlock: + + + + //apple_ref/occ/clm/RKTestFactory/objectFromFactory:properties: + Creates and returns a new instance of an object using the factory with the given name. + RKTestFactory.h + + + (id)objectFromFactory:(NSString *)factoryName properties:(NSDictionary *)properties + + + factoryName + The name of the factory to use when building the requested object. +@raises NSInvalidArgumentException Raised if a factory with the given name is not defined. + + properties + An NSDictionary of properties to be set on the created object. + + + An object built using the factory registered for the given name. + //api/name/objectFromFactory:properties: + + + + //apple_ref/occ/clm/RKTestFactory/objectFromFactory: + + RKTestFactory.h + + + (id)objectFromFactory:(NSString *)factoryName + + + //api/name/objectFromFactory: + + + + //apple_ref/occ/clm/RKTestFactory/sharedObjectFromFactory: + Fetches a shared object from the factory with the given name. If an existing object has already been created, then that instance is returned. If a shared instance does not yet exist, one will be constructed and returned for this and all subsequent invocations of sharedObjectFromFactory:. Shared object instances are discarded when the factory is torn down. + RKTestFactory.h + + + (id)sharedObjectFromFactory:(NSString *)factoryName + + + factoryName + The name of the factory to retrieve the shared instance of. + + + The shared object instance for the factory registered with the given name. + //api/name/sharedObjectFromFactory: + + + + //apple_ref/occ/clm/RKTestFactory/insertManagedObjectForEntityForName:inManagedObjectContext:withProperties: + Inserts a new managed object for the NSEntityDescription with the given name into the specified managed object context and sets properties on the instance from the given dictionary. A permanent managed object ID is obtained for the object so that it can be referenced across threads without any further work. + RKTestFactory.h + + + (id)insertManagedObjectForEntityForName:(NSString *)entityName inManagedObjectContext:(NSManagedObjectContext *)managedObjectContext withProperties:(NSDictionary *)properties + + + entityName + The name of the entity to insert a new managed object for. + + managedObjectContext + The managed object context to insert the new object into. If nil, then the managed object context returned by invoking [RKTestFactory managedObjectStore].mainQueueManagedObjectContext] is used. + + properties + A dictionary of properties to be set on the new managed object instance. + + + A new object inheriting from NSManagedObject. + //api/name/insertManagedObjectForEntityForName:inManagedObjectContext:withProperties: + + + + //apple_ref/occ/clm/RKTestFactory/factoryNames + Returns a set of names for all defined factories. + RKTestFactory.h + + + (NSSet *)factoryNames + + A set of the string names for all defined factories. + //api/name/factoryNames + + + + //apple_ref/occ/clm/RKTestFactory/client + Fetches the shared AFHTTPClient object using the factory defined for the name RKTestFactoryDefaultNamesClient. + RKTestFactory.h + + + (id)client + + The shared client instance. + //api/name/client + + + + //apple_ref/occ/clm/RKTestFactory/objectManager + Fetches the shared RKObjectManager object using the factory defined for the name RKTestFactoryDefaultNamesObjectManager. + RKTestFactory.h + + + (id)objectManager + + The shared object manager instance. + //api/name/objectManager + + + + //apple_ref/occ/clm/RKTestFactory/managedObjectStore + Fetches the shared an RKManagedObjectStore object using the factory defined for the name RKTestFactoryDefaultNamesManagedObjectStore. + RKTestFactory.h + + + (id)managedObjectStore + + The shared managed object store instance. + //api/name/managedObjectStore + + + + //apple_ref/occ/clm/RKTestFactory/setUp + Sets up the RestKit testing environment. Invokes the didSetUp callback for application specific setup. + RKTestFactory.h + + + (void)setUp + + + //api/name/setUp + + + + //apple_ref/occ/clm/RKTestFactory/tearDown + Tears down the RestKit testing environment by clearing singleton instances, helping to ensure test case isolation. Invokes the didTearDown callback for application specific cleanup. + RKTestFactory.h + + + (void)tearDown + + + //api/name/tearDown + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens51.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens51.xml new file mode 100644 index 00000000..8e22b009 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens51.xml @@ -0,0 +1,126 @@ + + + + + + //apple_ref/occ/cl/RKTestFixture + Provides a static method API for conveniently accessing fixture data +contained within a designated NSBundle. Useful when writing unit tests that +leverage fixture data for testing parsing and object mapping operations. + RKTestFixture.h + + + + + + + //apple_ref/occ/clm/RKTestFixture/fixtureBundle + Returns the NSBundle object designated as the source location for unit testing fixture data. + RKTestFixture.h + + + (NSBundle *)fixtureBundle + + The NSBundle object designated as the source location for unit testing fixture data + or nil if none has been configured. + //api/name/fixtureBundle + + + + //apple_ref/occ/clm/RKTestFixture/setFixtureBundle: + Designates the specified NSBundle object as the source location for unit testing fixture data. + RKTestFixture.h + + + (void)setFixtureBundle:(NSBundle *)bundle + + + bundle + The new fixture NSBundle object. + + + + //api/name/setFixtureBundle: + + + + //apple_ref/occ/clm/RKTestFixture/pathForFixture: + Returns the full path to the specified fixture file on within the fixture bundle. + RKTestFixture.h + + + (NSString *)pathForFixture:(NSString *)fixtureName + + + fixtureName + The name of the fixture file. + + + The full path to the specified fixture file or nil if it cannot be located. + //api/name/pathForFixture: + + + + //apple_ref/occ/clm/RKTestFixture/stringWithContentsOfFixture: + Creates and returns a string object by reading data from the fixture identified by the specified file name using UTF-8 encoding. + RKTestFixture.h + + + (NSString *)stringWithContentsOfFixture:(NSString *)fixtureName + + + fixtureName + The name of the fixture file. + + + A string created by reading data from the specified fixture file using the NSUTF8StringEncoding. + //api/name/stringWithContentsOfFixture: + + + + //apple_ref/occ/clm/RKTestFixture/dataWithContentsOfFixture: + Creates and returns a data object by reading every byte from the fixture identified by the specified file name. + RKTestFixture.h + + + (NSData *)dataWithContentsOfFixture:(NSString *)fixtureName + + + fixtureName + The name of the resource file. + + + A data object by reading every byte from the fixture file. + //api/name/dataWithContentsOfFixture: + + + + //apple_ref/occ/clm/RKTestFixture/MIMETypeForFixture: + Returns the MIME Type for the fixture identified by the specified name. + RKTestFixture.h + + + (NSString *)MIMETypeForFixture:(NSString *)fixtureName + + + fixtureName + The name of the fixture file. + + + The MIME Type for the resource file or nil if the file could not be located. + //api/name/MIMETypeForFixture: + + + + //apple_ref/occ/clm/RKTestFixture/parsedObjectWithContentsOfFixture: + Creates and returns an object representation of the data from the fixture identified by the specified file name by reading the +data as a string and parsing it using a parser appropriate for the MIME Type of the file. + RKTestFixture.h + + + (id)parsedObjectWithContentsOfFixture:(NSString *)fixtureName + + + fixtureName + The name of the resource file. + + + A new image object for the specified file, or nil if the method could not initialize the image from the specified file. + //api/name/parsedObjectWithContentsOfFixture: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens52.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens52.xml new file mode 100644 index 00000000..583be4fd --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens52.xml @@ -0,0 +1,161 @@ + + + + + + //apple_ref/occ/cl/RKTestHelpers + The RKTestHelpers class provides a number of helpful utility methods for use in unit or integration tests for RestKit applications. + RKTestHelpers.h + + + + + + + //apple_ref/occ/clm/RKTestHelpers/stubRouteForClass:method:withPathPattern:onObjectManager: + Stubs the route with the given class and method with a given path pattern. + RKTestHelpers.h + + + (RKRoute *)stubRouteForClass:(Class)objectClass method:(RKRequestMethod)method withPathPattern:(NSString *)pathPattern onObjectManager:(RKObjectManager *)nilOrObjectManager + + + objectClass + The class of the route to stub. + + method + The method of the route to stub. + + pathPattern + The path pattern to return instead in place of the current route's value. + + nilOrObjectManager + The object manager to stub the route on. If nil, the shared object manager be be used. + + + The new stubbed route object that was added to the route set of the target object manager. + //api/name/stubRouteForClass:method:withPathPattern:onObjectManager: + + + + //apple_ref/occ/clm/RKTestHelpers/stubRouteNamed:withPathPattern:onObjectManager: + Stubs the route with the given name with a given path pattern. + RKTestHelpers.h + + + (RKRoute *)stubRouteNamed:(NSString *)routeName withPathPattern:(NSString *)pathPattern onObjectManager:(RKObjectManager *)nilOrObjectManager + + + routeName + The name of the route to stub. + + pathPattern + The path pattern to return instead in place of the current route's value. + + nilOrObjectManager + The object manager to stub the route on. If nil, the shared object manager be be used. + + + The new stubbed route object that was added to the route set of the target object manager. + //api/name/stubRouteNamed:withPathPattern:onObjectManager: + + + + //apple_ref/occ/clm/RKTestHelpers/stubRouteForRelationship:ofClass:pathPattern:onObjectManager: + Stubs the relationship route for a given class with a given path pattern. + RKTestHelpers.h + + + (RKRoute *)stubRouteForRelationship:(NSString *)relationshipName ofClass:(Class)objectClass pathPattern:(NSString *)pathPattern onObjectManager:(RKObjectManager *)nilOrObjectManager + + + relationshipName + The name of the relationship to stub the route of. + + objectClass + The class of the route to stub. + + pathPattern + The path pattern to return instead in place of the current route's value. + + nilOrObjectManager + The object manager to stub the route on. If nil, the shared object manager be be used. + + + The new stubbed route object that was added to the route set of the target object manager. + //api/name/stubRouteForRelationship:ofClass:pathPattern:onObjectManager: + + + + //apple_ref/occ/clm/RKTestHelpers/copyFetchRequestBlocksMatchingPathPattern:toBlocksMatchingRelativeString:onObjectManager: + Finds all registered fetch request blocks matching the given path pattern and adds a new fetch request block that returns the same value as the origin block that matches the given relative string portion of a URL object. + RKTestHelpers.h + + + (void)copyFetchRequestBlocksMatchingPathPattern:(NSString *)pathPattern toBlocksMatchingRelativeString:(NSString *)relativeString onObjectManager:(RKObjectManager *)nilOrObjectManager + + + pathPattern + The path pattern that matches the fetch request blocks to be copied. + + relativeString + The relative string portion of the NSURL objects that the new blocks will match exactly. + + nilOrObjectManager + The object manager to stub the route on. If nil, the shared object manager be be used. + + + + //api/name/copyFetchRequestBlocksMatchingPathPattern:toBlocksMatchingRelativeString:onObjectManager: + + + + //apple_ref/occ/clm/RKTestHelpers/disableCaching + Disables caching by setting a new [NSURLCache sharedURLCache] instance in which the memory and disk limits have been set to zero. + RKTestHelpers.h + + + (void)disableCaching + + + //api/name/disableCaching + + + + //apple_ref/occ/clm/RKTestHelpers/cacheResponseForRequest:withResponseData: + Creates, stores, and returns a NSCachedURLResponse object containing an NSHTTPURLResponse for the given request with a 200 (OK) status code. + RKTestHelpers.h + + + (NSCachedURLResponse *)cacheResponseForRequest:(NSURLRequest *)request withResponseData:(NSData *)responseData + + + request + The request to cache the response for. + + responseData + The response data to be stored in the cache. + + + The cached URL response that was stored to the cache. + //api/name/cacheResponseForRequest:withResponseData: + + + + //apple_ref/occ/clm/RKTestHelpers/cacheResponseForURL:HTTPMethod:headers:withData: + Creates, stores, and returns a NSCachedURLResponse object containing an NSHTTPURLResponse for the given URL and HTTP method with the given response data and a 200 (OK) status code. + RKTestHelpers.h + + + (NSCachedURLResponse *)cacheResponseForURL:(NSURL *)URL HTTPMethod:(NSString *)HTTPMethod headers:(NSDictionary *)requestHeaders withData:(NSData *)responseData + + + URL + The URL to cache the response for. + + HTTPMethod + The HTTP method of the request (i.e. 'GET', 'POST', 'PUT', 'PATCH', or 'DELETE'). + + responseData + The response data to be stored in the cache. + + + The cached URL response that was stored to the cache. + //api/name/cacheResponseForURL:HTTPMethod:headers:withData: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens53.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens53.xml new file mode 100644 index 00000000..7ef0f781 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens53.xml @@ -0,0 +1,195 @@ + + + + + + //apple_ref/occ/cl/RKTestNotificationObserver + An RKTestNotificationObserver object provides support for awaiting a notification +to be posted as the result of an asynchronous operation by spinning the run loop. This +enables a straight-forward unit testing workflow by blocking execution of the test until +a notification is posted. + RKTestNotificationObserver.h + + + + + + + //apple_ref/occ/instm/RKTestNotificationObserver/setName: + The name of the notification the receiver is awaiting. + RKTestNotificationObserver.h + + @property (nonatomic, copy) NSString *name + + + //api/name/name + + + + //apple_ref/occ/instp/RKTestNotificationObserver/name + The name of the notification the receiver is awaiting. + RKTestNotificationObserver.h + + @property (nonatomic, copy) NSString *name + + + //api/name/name + + + + //apple_ref/occ/instm/RKTestNotificationObserver/setObject: + The object expected to post the notification the receiver is awaiting. + RKTestNotificationObserver.h + + @property (nonatomic, weak) id object + + + //api/name/object + + + + //apple_ref/occ/instp/RKTestNotificationObserver/object + The object expected to post the notification the receiver is awaiting. + RKTestNotificationObserver.h + + @property (nonatomic, weak) id object + + + //api/name/object + + + + //apple_ref/occ/instm/RKTestNotificationObserver/setTimeout: + The timeout interval, in seconds, to wait for the notification to be posted. + RKTestNotificationObserver.h + + @property (nonatomic, assign) NSTimeInterval timeout + + + //api/name/timeout + + + + //apple_ref/occ/instp/RKTestNotificationObserver/timeout + The timeout interval, in seconds, to wait for the notification to be posted. + RKTestNotificationObserver.h + + @property (nonatomic, assign) NSTimeInterval timeout + + + //api/name/timeout + + + + //apple_ref/occ/clm/RKTestNotificationObserver/notificationObserver + Creates and initializes a notification obsercer object. + RKTestNotificationObserver.h + + + (RKTestNotificationObserver *)notificationObserver + + The newly created notification observer. + //api/name/notificationObserver + + + + //apple_ref/occ/clm/RKTestNotificationObserver/notificationObserverForName:object: + Instantiate a notification observer for the given notification name and object + RKTestNotificationObserver.h + + + (RKTestNotificationObserver *)notificationObserverForName:(NSString *)notificationName object:(id)notificationSender + + + notificationName + The name of the NSNotification we want to watch for + + notificationSender + The source object of the NSNotification we want to watch for + + + The newly created notification observer initialized with notificationName and notificationSender. + //api/name/notificationObserverForName:object: + + + + //apple_ref/occ/clm/RKTestNotificationObserver/notificationObserverForName: + Instantiate a notification observer for the given notification name + RKTestNotificationObserver.h + + + (RKTestNotificationObserver *)notificationObserverForName:(NSString *)notificationName + + + notificationName + The name of the NSNotification we want to watch for + + + + //api/name/notificationObserverForName: + + + + //apple_ref/occ/instm/RKTestNotificationObserver/addObserver + Adds the receiver as an observer for the notification name and object under test. + RKTestNotificationObserver.h + + - (void)addObserver + + + //api/name/addObserver + + + + //apple_ref/occ/instm/RKTestNotificationObserver/waitForNotification + Wait for a notification matching the name and source object we are observing to be posted. + RKTestNotificationObserver.h + + - (void)waitForNotification + + + //api/name/waitForNotification + + + + //apple_ref/occ/clm/RKTestNotificationObserver/waitForNotificationWithName:object:usingBlock: + Configures a notification observer to wait for the a notification with the given name to be posted +by the source object during execution of the block. + RKTestNotificationObserver.h + + + (void)waitForNotificationWithName:(NSString *)name object:(id)notificationSender usingBlock:(void ( ^ ) ( ))block + + + name + The name of the notification we are waiting for + + notificationSender + The object we are waiting to post the notification + + block + A block to invoke to trigger the notification activity + + + + //api/name/waitForNotificationWithName:object:usingBlock: + + + + //apple_ref/occ/clm/RKTestNotificationObserver/waitForNotificationWithName:usingBlock: + Configures a notification observer to wait for the a notification with the given name to be posted +during execution of the block. + RKTestNotificationObserver.h + + + (void)waitForNotificationWithName:(NSString *)name usingBlock:(void ( ^ ) ( ))block + + + name + The name of the notification we are waiting for + + block + A block to invoke to trigger the notification activity + + + + //api/name/waitForNotificationWithName:usingBlock: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens54.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens54.xml new file mode 100644 index 00000000..4099789c --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens54.xml @@ -0,0 +1,15 @@ + + + + + + //apple_ref/occ/cl/RKURLEncodedSerialization + The RKURLEncodedSerialization class conforms to the RKSerialization protocol and provides support for the serialization and deserialization of URL encoded data. URL encoding is used to replace certain characters in a string with equivalent percent escape sequences. The list of characters replaced by the implementation are designed as illegal URL characters by RFC 3986. URL encoded data is used for the submission of HTML forms with the MIME Type application/x-www-form-urlencoded. + RKURLEncodedSerialization.h + + + + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens55.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens55.xml new file mode 100644 index 00000000..9670200b --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens55.xml @@ -0,0 +1,15 @@ + + + + + + //apple_ref/occ/cl/RK_FIX_CATEGORY_BUG + + RKMacros.h + + + + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens56.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens56.xml new file mode 100644 index 00000000..342bf599 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens56.xml @@ -0,0 +1,37 @@ + + + + + + //apple_ref/occ/cat/AFHTTPClient() + + RKHTTPRequestOperation.h + + + + + + + //apple_ref/occ/intfm/AFHTTPClient()/setDefaultHeaders: + + RKHTTPRequestOperation.h + + @property (readonly, nonatomic) NSDictionary *defaultHeaders + + + //api/name/defaultHeaders + + + + //apple_ref/occ/intfp/AFHTTPClient()/defaultHeaders + + RKHTTPRequestOperation.h + + @property (readonly, nonatomic) NSDictionary *defaultHeaders + + + //api/name/defaultHeaders + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens57.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens57.xml new file mode 100644 index 00000000..b028ed42 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens57.xml @@ -0,0 +1,95 @@ + + + + + + //apple_ref/occ/cat/NSBundle(RKAdditions) + Provides convenience methods for accessing data in resources within an NSBundle. + NSBundle+RKAdditions.h + + + + + + + //apple_ref/occ/intfm/NSBundle(RKAdditions)/MIMETypeForResource:withExtension: + Returns the MIME Type for the resource identified by the specified name and file extension. + NSBundle+RKAdditions.h + + - (NSString *)MIMETypeForResource:(NSString *)name withExtension:(NSString *)extension + + + name + The name of the resource file. + + extension + If extension is an empty string or nil, the extension is assumed not to exist and the file is the first file encountered that exactly matches name. + + + The MIME Type for the resource file or nil if the file could not be located. + //api/name/MIMETypeForResource:withExtension: + + + + //apple_ref/occ/intfm/NSBundle(RKAdditions)/dataWithContentsOfResource:withExtension: + Creates and returns a data object by reading every byte from the resource identified by the specified name and file extension. + NSBundle+RKAdditions.h + + - (NSData *)dataWithContentsOfResource:(NSString *)name withExtension:(NSString *)extension + + + name + The name of the resource file. + + extension + If extension is an empty string or nil, the extension is assumed not to exist and the file is the first file encountered that exactly matches name. + + + A data object by reading every byte from the resource file. + //api/name/dataWithContentsOfResource:withExtension: + + + + //apple_ref/occ/intfm/NSBundle(RKAdditions)/stringWithContentsOfResource:withExtension:encoding: + Creates and returns a string object by reading data from the resource identified by the specified name and file extension using a given encoding. + NSBundle+RKAdditions.h + + - (NSString *)stringWithContentsOfResource:(NSString *)name withExtension:(NSString *)extension encoding:(NSStringEncoding)encoding + + + name + The name of the resource file. + + extension + If extension is an empty string or nil, the extension is assumed not to exist and the file is the first file encountered that exactly matches name. + + encoding + The encoding of the resource file. + + + A string created by reading data from the resource file using the encoding. + //api/name/stringWithContentsOfResource:withExtension:encoding: + + + + //apple_ref/occ/intfm/NSBundle(RKAdditions)/parsedObjectWithContentsOfResource:withExtension: + Creates and returns an object representation of the data from the resource identified by the specified name and file extension by reading the +data as a string and parsing it using a parser appropriate for the MIME Type of the file. + NSBundle+RKAdditions.h + + - (id)parsedObjectWithContentsOfResource:(NSString *)name withExtension:(NSString *)extension + + + name + The name of the resource file. + + extension + If extension is an empty string or nil, the extension is assumed not to exist and the file is the first file encountered that exactly matches name. + + + A new image object for the specified file, or nil if the method could not initialize the image from the specified file. + //api/name/parsedObjectWithContentsOfResource:withExtension: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens58.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens58.xml new file mode 100644 index 00000000..c8855224 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens58.xml @@ -0,0 +1,130 @@ + + + + + + //apple_ref/occ/cat/NSEntityDescription(RKAdditions) + Provides extensions to NSEntityDescription for various common tasks. + NSEntityDescription+RKAdditions.h + + + + + + + //apple_ref/occ/intfm/NSEntityDescription(RKAdditions)/setPrimaryKeyAttributeName: + The name of the attribute that acts as the primary key for the receiver. + NSEntityDescription+RKAdditions.h + + @property (nonatomic, retain) NSString *primaryKeyAttributeName + + + //api/name/primaryKeyAttributeName + + + + //apple_ref/occ/intfp/NSEntityDescription(RKAdditions)/primaryKeyAttributeName + The name of the attribute that acts as the primary key for the receiver. + NSEntityDescription+RKAdditions.h + + @property (nonatomic, retain) NSString *primaryKeyAttributeName + + + //api/name/primaryKeyAttributeName + + + + //apple_ref/occ/intfm/NSEntityDescription(RKAdditions)/setPrimaryKeyAttribute: + The attribute description object for the attribute designated as the primary key for the receiver. + NSEntityDescription+RKAdditions.h + + @property (nonatomic, readonly) NSAttributeDescription *primaryKeyAttribute + + + //api/name/primaryKeyAttribute + + + + //apple_ref/occ/intfp/NSEntityDescription(RKAdditions)/primaryKeyAttribute + The attribute description object for the attribute designated as the primary key for the receiver. + NSEntityDescription+RKAdditions.h + + @property (nonatomic, readonly) NSAttributeDescription *primaryKeyAttribute + + + //api/name/primaryKeyAttribute + + + + //apple_ref/occ/intfm/NSEntityDescription(RKAdditions)/setPrimaryKeyAttributeClass: + The class representing the value of the attribute designated as the primary key for the receiver. + NSEntityDescription+RKAdditions.h + + @property (nonatomic, readonly) Class primaryKeyAttributeClass + + + //api/name/primaryKeyAttributeClass + + + + //apple_ref/occ/intfp/NSEntityDescription(RKAdditions)/primaryKeyAttributeClass + The class representing the value of the attribute designated as the primary key for the receiver. + NSEntityDescription+RKAdditions.h + + @property (nonatomic, readonly) Class primaryKeyAttributeClass + + + //api/name/primaryKeyAttributeClass + + + + //apple_ref/occ/intfm/NSEntityDescription(RKAdditions)/predicateForPrimaryKeyAttribute + Returns a cached predicate specifying that the primary key attribute is equal to the $PRIMARYKEYVALUE +substitution variable. + NSEntityDescription+RKAdditions.h + + - (NSPredicate *)predicateForPrimaryKeyAttribute + + A cached predicate specifying the value of the primary key attribute is equal to the $PRIMARYKEYVALUE +substitution variable. + //api/name/predicateForPrimaryKeyAttribute + + + + //apple_ref/occ/intfm/NSEntityDescription(RKAdditions)/predicateForPrimaryKeyAttributeWithValue: + Returns a predicate specifying that the value of the primary key attribute is equal to a given +value. This predicate is constructed by evaluating the cached predicate returned by the +predicateForPrimaryKeyAttribute with a dictionary of substitution variables specifying that +$PRIMARYKEYVALUE is equal to the given value. + NSEntityDescription+RKAdditions.h + + - (NSPredicate *)predicateForPrimaryKeyAttributeWithValue:(id)value + + + value + The primary key value with which to create the predicate. + + + A predicate speciying that the value of the primary key attribute is equal to a given value. + //api/name/predicateForPrimaryKeyAttributeWithValue: + + + + //apple_ref/occ/intfm/NSEntityDescription(RKAdditions)/coerceValueForPrimaryKey: + Coerces the given value into the class representing the primary key. Currently support NSString +and NSNumber coercsions. + NSEntityDescription+RKAdditions.h + + - (id)coerceValueForPrimaryKey:(id)primaryKeyValue + + + primaryKeyValue + The value of the primary that is to be coerced. + + + + //api/name/coerceValueForPrimaryKey: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens59.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens59.xml new file mode 100644 index 00000000..a384ff8c --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens59.xml @@ -0,0 +1,38 @@ + + + + + + //apple_ref/occ/cat/NSManagedObject(RKAdditions) + Provides extensions to NSManagedObject for various common tasks. + NSManagedObject+RKAdditions.h + + + + + + + //apple_ref/occ/intfm/NSManagedObject(RKAdditions)/hasBeenDeleted + Determines if the receiver has been deleted from the persistent store +and removed from the object graph. + NSManagedObject+RKAdditions.h + + - (BOOL)hasBeenDeleted + + YES if the object has been deleted from the persistent store, else NO. + //api/name/hasBeenDeleted + + + + //apple_ref/occ/intfm/NSManagedObject(RKAdditions)/isNew + Returns YES when an object has not been saved to the managed object context yet + NSManagedObject+RKAdditions.h + + - (BOOL)isNew + + + //api/name/isNew + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens6.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens6.xml new file mode 100644 index 00000000..ad25aa7f --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens6.xml @@ -0,0 +1,310 @@ + + + + + + //apple_ref/occ/cl/RKEntityByAttributeCache + The RKEntityByAttributeCache class provides an in-memory caching mechanism for managed objects instances of an entity in a managed object context with the value of one of the object's attributes acting as the cache key. When loaded, the cache will retrieve all instances of an entity from the store and build a dictionary mapping values for the given cache key attribute to the managed object ID for all objects matching the value. The cache can then be used to quickly retrieve objects by attribute value for the cache key without executing another fetch request against the managed object context. This can provide a large performance improvement when a large number of objects are being retrieved using a particular attribute as the key. + RKEntityByAttributeCache.h + + + + + + + //apple_ref/occ/instm/RKEntityByAttributeCache/initWithEntity:attribute:managedObjectContext: + Initializes the receiver with a given entity, attribute, and managed object context. + RKEntityByAttributeCache.h + + - (id)initWithEntity:(NSEntityDescription *)entity attribute:(NSString *)attributeName managedObjectContext:(NSManagedObjectContext *)context + + + entity + The Core Data entity description for the managed objects being cached. + + attributeName + The name of an attribute within the cached entity that acts as the cache key. + + context + The managed object context the cache retrieves the cached + objects from + + + The receiver, initialized with the given entity, attribute, and managed object + context. + //api/name/initWithEntity:attribute:managedObjectContext: + + + + //apple_ref/occ/instm/RKEntityByAttributeCache/setEntity: + The Core Data entity description for the managed objects being cached. + RKEntityByAttributeCache.h + + @property (nonatomic, readonly) NSEntityDescription *entity + + + //api/name/entity + + + + //apple_ref/occ/instp/RKEntityByAttributeCache/entity + The Core Data entity description for the managed objects being cached. + RKEntityByAttributeCache.h + + @property (nonatomic, readonly) NSEntityDescription *entity + + + //api/name/entity + + + + //apple_ref/occ/instm/RKEntityByAttributeCache/setAttribute: + An attribute that is part of the cached entity that acts as the cache key. + RKEntityByAttributeCache.h + + @property (nonatomic, readonly) NSString *attribute + + + //api/name/attribute + + + + //apple_ref/occ/instp/RKEntityByAttributeCache/attribute + An attribute that is part of the cached entity that acts as the cache key. + RKEntityByAttributeCache.h + + @property (nonatomic, readonly) NSString *attribute + + + //api/name/attribute + + + + //apple_ref/occ/instm/RKEntityByAttributeCache/setManagedObjectContext: + The managed object context the receiver fetches cached objects from. + RKEntityByAttributeCache.h + + @property (nonatomic, readonly) NSManagedObjectContext *managedObjectContext + + + //api/name/managedObjectContext + + + + //apple_ref/occ/instp/RKEntityByAttributeCache/managedObjectContext + The managed object context the receiver fetches cached objects from. + RKEntityByAttributeCache.h + + @property (nonatomic, readonly) NSManagedObjectContext *managedObjectContext + + + //api/name/managedObjectContext + + + + //apple_ref/occ/instm/RKEntityByAttributeCache/setMonitorsContextForChanges: + A Boolean value determining if the receiever monitors the managed object context +for changes and updates the cache entries using the notifications emitted. + RKEntityByAttributeCache.h + + @property (nonatomic, assign) BOOL monitorsContextForChanges + + + //api/name/monitorsContextForChanges + + + + //apple_ref/occ/instp/RKEntityByAttributeCache/monitorsContextForChanges + A Boolean value determining if the receiever monitors the managed object context +for changes and updates the cache entries using the notifications emitted. + RKEntityByAttributeCache.h + + @property (nonatomic, assign) BOOL monitorsContextForChanges + + + //api/name/monitorsContextForChanges + + + + //apple_ref/occ/instm/RKEntityByAttributeCache/load + Loads the cache by finding all instances of the configured entity and building +an association between the value of the cached attribute's value and the +managed object ID for the object. + RKEntityByAttributeCache.h + + - (void)load + + + //api/name/load + + + + //apple_ref/occ/instm/RKEntityByAttributeCache/flush + Flushes the cache by releasing all cache attribute value to managed object ID +associations. + RKEntityByAttributeCache.h + + - (void)flush + + + //api/name/flush + + + + //apple_ref/occ/instm/RKEntityByAttributeCache/isLoaded + A Boolean value indicating if the cache has loaded associations between cache attribute values and managed object ID's. + RKEntityByAttributeCache.h + + - (BOOL)isLoaded + + + //api/name/isLoaded + + + + //apple_ref/occ/instm/RKEntityByAttributeCache/count + Returns a count of the total number of cached objects. + RKEntityByAttributeCache.h + + - (NSUInteger)count + + + //api/name/count + + + + //apple_ref/occ/instm/RKEntityByAttributeCache/countWithAttributeValue: + Returns the total number of cached objects with a given value for the attribute acting as the cache key. + RKEntityByAttributeCache.h + + - (NSUInteger)countWithAttributeValue:(id)attributeValue + + + attributeValue + The value for the cache key attribute to retrieve + a count of the objects with a matching value. + + + The number of objects in the cache with the given value for the cache + attribute of the receiver. + //api/name/countWithAttributeValue: + + + + //apple_ref/occ/instm/RKEntityByAttributeCache/countOfAttributeValues + Returns the number of unique attribute values contained within the receiver. + RKEntityByAttributeCache.h + + - (NSUInteger)countOfAttributeValues + + The number of unique attribute values within the receiver. + //api/name/countOfAttributeValues + + + + //apple_ref/occ/instm/RKEntityByAttributeCache/containsObject: + Returns a Boolean value that indicates whether a given object is present +in the cache. + RKEntityByAttributeCache.h + + - (BOOL)containsObject:(NSManagedObject *)object + + + object + An object. + + + YES if object is present in the cache, otherwise NO. + //api/name/containsObject: + + + + //apple_ref/occ/instm/RKEntityByAttributeCache/containsObjectWithAttributeValue: + Returns a Boolean value that indicates whether one of more objects is present +in the cache with a given value of the cache key attribute. + RKEntityByAttributeCache.h + + - (BOOL)containsObjectWithAttributeValue:(id)attributeValue + + + attributeValue + The value with which to check the cache for objects with a matching value. + + + YES if one or more objects with the given value for the cache key attribute is present in the cache, otherwise NO. + //api/name/containsObjectWithAttributeValue: + + + + //apple_ref/occ/instm/RKEntityByAttributeCache/objectWithAttributeValue:inContext: + Returns the first object with a matching value for the cache key attribute +in a given managed object context. + RKEntityByAttributeCache.h + + - (NSManagedObject *)objectWithAttributeValue:(id)attributeValue inContext:(NSManagedObjectContext *)context + + + attributeValue + A value for the cache key attribute. + + context + The managed object context to retrieve the object from. + + + An object with the value of attribute matching attributeValue or nil. + //api/name/objectWithAttributeValue:inContext: + + + + //apple_ref/occ/instm/RKEntityByAttributeCache/objectsWithAttributeValue:inContext: + Returns the collection of objects with a matching value for the cache key attribute in a given managed object context. + RKEntityByAttributeCache.h + + - (NSArray *)objectsWithAttributeValue:(id)attributeValue inContext:(NSManagedObjectContext *)context + + + attributeValue + A value for the cache key attribute. + + context + The managed object context to retrieve the objects from. + + + An array of objects with the value of attribute matching attributeValue or an empty array. + //api/name/objectsWithAttributeValue:inContext: + + + + //apple_ref/occ/instm/RKEntityByAttributeCache/addObject: + Adds a managed object to the cache. + RKEntityByAttributeCache.h + + - (void)addObject:(NSManagedObject *)object + + + object + The managed object to add to the cache. + + + + //api/name/addObject: + + + + //apple_ref/occ/instm/RKEntityByAttributeCache/removeObject: + Removes a managed object from the cache. + RKEntityByAttributeCache.h + + - (void)removeObject:(NSManagedObject *)object + + + object + The managed object to remove from the cache. + + + + //api/name/removeObject: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens60.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens60.xml new file mode 100644 index 00000000..84c2052f --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens60.xml @@ -0,0 +1,107 @@ + + + + + + //apple_ref/occ/cat/NSManagedObjectContext(RKAdditions) + Provides extensions to NSManagedObjectContext for various common tasks. + NSManagedObjectContext+RKAdditions.h + + + + + + + //apple_ref/occ/intfm/NSManagedObjectContext(RKAdditions)/insertNewObjectForEntityForName: + Inserts a new managed object for the entity for the given name. + NSManagedObjectContext+RKAdditions.h + + - (id)insertNewObjectForEntityForName:(NSString *)entityName + + + entityName + The name of an entity. + + + A new, autoreleased, fully configured instance of the class for the entity named entityName. The instance has its entity description set and is inserted into the receiver. + //api/name/insertNewObjectForEntityForName: + + + + //apple_ref/occ/intfm/NSManagedObjectContext(RKAdditions)/countForEntityForName:predicate:error: + Convenience method for performing a count of the number of instances of an entity with the given name. + NSManagedObjectContext+RKAdditions.h + + - (NSUInteger)countForEntityForName:(NSString *)entityName predicate:(NSPredicate *)predicate error:(NSError **)error + + + entityName + The name of an entity. + + predicate + A predicate to limit the search. May be nil. + + error + If there is a problem executing the fetch, upon return contains an instance of NSError that describes the problem. + + + The number of objects a fetch request for the given entity name with the given predicate would have returned if it had been passed to executeFetchRequest:error:, or NSNotFound if an error occurs. + //api/name/countForEntityForName:predicate:error: + + + + //apple_ref/occ/intfm/NSManagedObjectContext(RKAdditions)/fetchObjectForEntity:withValueForPrimaryKeyAttribute: + Fetches a single managed object for the given entity with the given value for the primary key attribute in the receiver. + NSManagedObjectContext+RKAdditions.h + + - (id)fetchObjectForEntity:(NSEntityDescription *)entity withValueForPrimaryKeyAttribute:(id)primaryKeyValue + + + entity + The entity of the managed object to be retrieved by primary key. + + primaryKeyValue + The value for the entity's primary key attribute. + + + The managed object with the primary key attribute equal to the given value or nil if none was found. + //api/name/fetchObjectForEntity:withValueForPrimaryKeyAttribute: + + + + //apple_ref/occ/intfm/NSManagedObjectContext(RKAdditions)/fetchObjectForEntityForName:withValueForPrimaryKeyAttribute: + Fetches a single managed object for the entity for the given name with the given value for the primary key attribute in the receiver. + NSManagedObjectContext+RKAdditions.h + + - (id)fetchObjectForEntityForName:(NSString *)entityName withValueForPrimaryKeyAttribute:(id)primaryKeyValue + + + entityName + The name of the entity of the managed object to be retrieved by primary key. + + primaryKeyValue + The value for the receiving entity's primary key attribute. + + + The managed object with the primary key attribute equal to the given value or nil if none was found. + //api/name/fetchObjectForEntityForName:withValueForPrimaryKeyAttribute: + + + + //apple_ref/occ/intfm/NSManagedObjectContext(RKAdditions)/saveToPersistentStore: + Saves the receiver and then traverses up the parent context chain until a parent managed object context with a nil parent is found. If the final ancestor context does not have a reference to the persistent store coordinator, then a warning is generated and the method returns NO. + NSManagedObjectContext+RKAdditions.h + + - (BOOL)saveToPersistentStore:(NSError **)error + + + error + If there is a problem saving the receiver or any of its ancestor contexts, upon return contains an pointer to an instance of NSError that describes the problem. + + + YES if the save to the persistent store was successful, else NO. + //api/name/saveToPersistentStore: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens61.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens61.xml new file mode 100644 index 00000000..6758e188 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens61.xml @@ -0,0 +1,120 @@ + + + + + + //apple_ref/occ/intf/RKManagedObjectCaching + Objects implementing the RKManagedObjectCaching protocol can act as the cache +strategy for RestKit managed object stores. The managed object cache is consulted +when objects are retrieved from Core Data during object mapping operations and provide +an opportunity to accelerate the mapping process by trading memory for speed. + RKManagedObjectCaching.h + + + + + + + //apple_ref/occ/intfm/RKManagedObjectCaching/findInstanceOfEntity:withPrimaryKeyAttribute:value:inManagedObjectContext: + Retrieves a model object from the object store given a Core Data entity and +the primary key attribute and value for the desired object. + RKManagedObjectCaching.h + + - (NSManagedObject *)findInstanceOfEntity:(NSEntityDescription *)entity withPrimaryKeyAttribute:(NSString *)primaryKeyAttribute value:(id)primaryKeyValue inManagedObjectContext:(NSManagedObjectContext *)managedObjectContext + + + entity + The Core Data entity for the type of object to be retrieved from the cache. + + primaryKeyAttribute + The name of the attribute that acts as the primary key for the entity. + + primaryKeyValue + The value for the primary key attribute of the object to be retrieved from the cache. + + managedObjectContext + The managed object context to be searched for a matching instance. + + + A managed object that is an instance of the given entity with a primary key and value matching +the specified parameters, or nil if no object was found. + //api/name/findInstanceOfEntity:withPrimaryKeyAttribute:value:inManagedObjectContext: + + + + //apple_ref/occ/intfm/RKManagedObjectCaching/findInstancesOfEntity:withPrimaryKeyAttribute:value:inManagedObjectContext: + Retrieves an array of model objects from the object store given a Core Data entity and +the primary key attribute and value for the desired object. + RKManagedObjectCaching.h + + - (NSArray *)findInstancesOfEntity:(NSEntityDescription *)entity withPrimaryKeyAttribute:(NSString *)primaryKeyAttribute value:(id)primaryKeyValue inManagedObjectContext:(NSManagedObjectContext *)managedObjectContext + + + entity + The Core Data entity for the type of object to be retrieved from the cache. + + primaryKeyAttribute + The name of the attribute that acts as the primary key for the entity. + + primaryKeyValue + The value for the primary key attribute of the object to be retrieved from the cache. + + managedObjectContext + The managed object context to be searched for a matching instance. + + + An array of managed objects that are instances of the given entity with a primary key and value matching +the specified parameters, or nil if no object was found. + //api/name/findInstancesOfEntity:withPrimaryKeyAttribute:value:inManagedObjectContext: + + + + //apple_ref/occ/intfm/RKManagedObjectCaching/didFetchObject: + Invoked to inform the receiver that an object was fetched and should be added to the cache. + RKManagedObjectCaching.h + + - (void)didFetchObject:(NSManagedObject *)object + + + object + The object that was fetched from a managed object context. + + + + //api/name/didFetchObject: + + + + //apple_ref/occ/intfm/RKManagedObjectCaching/didCreateObject: + Invoked to inform the receiver that an object was created and should be added to the cache. + RKManagedObjectCaching.h + + - (void)didCreateObject:(NSManagedObject *)object + + + object + The object that was created in a managed object context. + + + + //api/name/didCreateObject: + + + + //apple_ref/occ/intfm/RKManagedObjectCaching/didDeleteObject: + Invoked to inform the receiver that an object was deleted and should be removed to the cache. + RKManagedObjectCaching.h + + - (void)didDeleteObject:(NSManagedObject *)object + + + object + The object that was deleted from a managed object context. + + + + //api/name/didDeleteObject: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens62.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens62.xml new file mode 100644 index 00000000..28dee9b4 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens62.xml @@ -0,0 +1,173 @@ + + + + + + //apple_ref/occ/intf/RKMapperOperationDelegate + Objects wishing to act as the delegate for RKMapperOperation objects must adopt the RKMapperOperationDelegate protocol. The protocol provides a rich set of optional callback methods that provides insight into the lifecycle of a mapper operation. + RKMapperOperation.h + + + + + + + //apple_ref/occ/intfm/RKMapperOperationDelegate/mapperWillStartMapping: + Tells the delegate that the mapper operation is about to start mapping. + RKMapperOperation.h + + - (void)mapperWillStartMapping:(RKMapperOperation *)mapper + + + mapper + The mapper operation that is about to start mapping. + + + + //api/name/mapperWillStartMapping: + + + + //apple_ref/occ/intfm/RKMapperOperationDelegate/mapperDidFinishMapping: + Tells the delegate that the mapper has finished. + RKMapperOperation.h + + - (void)mapperDidFinishMapping:(RKMapperOperation *)mapper + + + mapper + The mapper operation that has finished mapping. + + + + //api/name/mapperDidFinishMapping: + + + + //apple_ref/occ/intfm/RKMapperOperationDelegate/mapperDidCancelMapping: + Tells the delegate that the mapper has been cancelled. + RKMapperOperation.h + + - (void)mapperDidCancelMapping:(RKMapperOperation *)mapper + + + mapper + The mapper operation that was cancelled. + + + + //api/name/mapperDidCancelMapping: + + + + //apple_ref/occ/intfm/RKMapperOperationDelegate/mapper:didFindRepresentationOrArrayOfRepresentations:atKeyPath: + Tells the delegate that the mapper has found one or more mappable object representations at a key path specified in the mappingsDictionary. + RKMapperOperation.h + + - (void)mapper:(RKMapperOperation *)mapper didFindRepresentationOrArrayOfRepresentations:(id)dictionaryOrArrayOfDictionaries atKeyPath:(NSString *)keyPath + + + mapper + The mapper operation performing the mapping. + + dictionaryOrArrayOfDictionaries + The NSDictictionary or NSArray of NSDictionary object representations that was found at the keyPath. + + keyPath + The key path that the representation was read from in the sourceObject. If the keyPath was [NSNull null] in the mappingsDictionary, it will be given as nil to the delegate. + + + + //api/name/mapper:didFindRepresentationOrArrayOfRepresentations:atKeyPath: + + + + //apple_ref/occ/intfm/RKMapperOperationDelegate/mapper:didNotFindRepresentationOrArrayOfRepresentationsAtKeyPath: + Tells the delegate that the mapper failed to find any mappable object representations at a key path specified in the mappingsDictionary. + RKMapperOperation.h + + - (void)mapper:(RKMapperOperation *)mapper didNotFindRepresentationOrArrayOfRepresentationsAtKeyPath:(NSString *)keyPath + + + mapper + The mapper operation performing the mapping. + + keyPath + The key path that was searched for a mappable object representation. + + + + //api/name/mapper:didNotFindRepresentationOrArrayOfRepresentationsAtKeyPath: + + + + //apple_ref/occ/intfm/RKMapperOperationDelegate/mapper:willStartMappingOperation:forKeyPath: + Tells the delegate that the mapper is about to start a mapping operation to map a representation found in the sourceObject. + RKMapperOperation.h + + - (void)mapper:(RKMapperOperation *)mapper willStartMappingOperation:(RKMappingOperation *)mappingOperation forKeyPath:(NSString *)keyPath + + + mapper + The mapper operation performing the mapping. + + mappingOperation + The mapping operation that is about to be started. + + keyPath + The key path that was mapped. A nil key path indicates that the mapping matched the entire sourceObject. + + + + //api/name/mapper:willStartMappingOperation:forKeyPath: + + + + //apple_ref/occ/intfm/RKMapperOperationDelegate/mapper:didFinishMappingOperation:forKeyPath: + Tells the delegate that a mapping operation that was started by the mapper has finished executing. + RKMapperOperation.h + + - (void)mapper:(RKMapperOperation *)mapper didFinishMappingOperation:(RKMappingOperation *)mappingOperation forKeyPath:(NSString *)keyPath + + + mapper + The mapper operation performing the mapping. + + mappingOperation + The mapping operation that has finished. + + keyPath + The key path that was mapped. A nil key path indicates that the mapping matched the entire sourceObject. + + + + //api/name/mapper:didFinishMappingOperation:forKeyPath: + + + + //apple_ref/occ/intfm/RKMapperOperationDelegate/mapper:didFailMappingOperation:forKeyPath:withError: + Tells the delegate that a mapping operation that was started by the mapper has failed with an error. + RKMapperOperation.h + + - (void)mapper:(RKMapperOperation *)mapper didFailMappingOperation:(RKMappingOperation *)mappingOperation forKeyPath:(NSString *)keyPath withError:(NSError *)error + + + mapper + The mapper operation performing the mapping. + + mappingOperation + The mapping operation that has failed. + + keyPath + The key path that was mapped. A nil key path indicates that the mapping matched the entire sourceObject. + + error + The error that occurred during the execution of the mapping operation. + + + + //api/name/mapper:didFailMappingOperation:forKeyPath:withError: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens63.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens63.xml new file mode 100644 index 00000000..278b7137 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens63.xml @@ -0,0 +1,56 @@ + + + + + + //apple_ref/occ/intf/RKMappingOperationDataSource + An object that adopts the RKMappingOperationDataSource protocol is responsible for the retrieval or creation of target objects within an RKMapperOperation or RKMappingOperation. A data source is responsible for meeting the requirements of the underlying data store implementation and must return a key-value coding compliant object instance that can be used as the target object of a mapping operation. It is also responsible for commiting any changes necessary to the underlying data store once a mapping operation has completed its work. + RKMappingOperationDataSource.h + + + + + + + //apple_ref/occ/intfm/RKMappingOperationDataSource/mappingOperation:targetObjectForRepresentation:withMapping: + Asks the data source for the target object for an object mapping operation given an NSDictionary representation of the object's properties and the mapping object that will be used to perform the mapping. + RKMappingOperationDataSource.h + + - (id)mappingOperation:(RKMappingOperation *)mappingOperation targetObjectForRepresentation:(NSDictionary *)representation withMapping:(RKObjectMapping *)mapping + + + mappingOperation + The mapping operation requesting the target object. + + representation + A dictionary representation of the properties to be mapped onto the retrieved target object. + + mapping + The object mapping to be used to perform a mapping from the representation to the target object. + + + A key-value coding compliant object to perform the mapping on to. + //api/name/mappingOperation:targetObjectForRepresentation:withMapping: + + + + //apple_ref/occ/intfm/RKMappingOperationDataSource/commitChangesForMappingOperation:error: + Tells the data source to commit any changes to the underlying data store. + RKMappingOperationDataSource.h + + - (BOOL)commitChangesForMappingOperation:(RKMappingOperation *)mappingOperation error:(NSError **)error + + + mappingOperation + The mapping operation that has completed its work. + + error + A pointer to an error to be set in the event that the mapping operation could not be committed. + + + A Boolean value indicating if the changes for the mapping operation were committed successfully. + //api/name/commitChangesForMappingOperation:error: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens64.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens64.xml new file mode 100644 index 00000000..22ca7e53 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens64.xml @@ -0,0 +1,175 @@ + + + + + + //apple_ref/occ/intf/RKMappingOperationDelegate + Objects acting as the delegate for RKMappingOperation objects must adopt the RKMappingOperationDelegate protocol. These methods enable the delegate to be notified of events such as the application of attribute and relationship mappings during a mapping operation. + RKMappingOperation.h + + + + + + + //apple_ref/occ/intfm/RKMappingOperationDelegate/mappingOperation:didFindValue:forKeyPath:mapping: + Tells the delegate that an attribute or relationship mapping was found for a given key path within the data being mapped. + RKMappingOperation.h + + - (void)mappingOperation:(RKMappingOperation *)operation didFindValue:(id)value forKeyPath:(NSString *)keyPath mapping:(RKPropertyMapping *)propertyMapping + + + operation + The object mapping operation being performed. + + value + The value that was found at the given key path in the source object representation. + + keyPath + The key path in the source object for which the mapping is to be applied. + + propertyMapping + The RKAttributeMapping or RKRelationshipMapping for which the mappable value was found within the source object representation. + + + + //api/name/mappingOperation:didFindValue:forKeyPath:mapping: + + + + //apple_ref/occ/intfm/RKMappingOperationDelegate/mappingOperation:didNotFindValueForKeyPath:mapping: + Tells the delegate that no attribute or relationships mapping was found for a given key path within the data being mapped. + RKMappingOperation.h + + - (void)mappingOperation:(RKMappingOperation *)operation didNotFindValueForKeyPath:(NSString *)keyPath mapping:(RKPropertyMapping *)propertyMapping + + + operation + The object mapping operation being performed. + + keyPath + The key path in the source object for which no mappable value was found. + + propertyMapping + The RKAttributeMapping or RKRelationshipMapping for which no mappable value could be found within the source object representation. + + + + //api/name/mappingOperation:didNotFindValueForKeyPath:mapping: + + + + //apple_ref/occ/intfm/RKMappingOperationDelegate/mappingOperation:didSetValue:forKeyPath:usingMapping: + Tells the delegate that the mapping operation has set a value for a given key path with an attribute or relationship mapping. + RKMappingOperation.h + + - (void)mappingOperation:(RKMappingOperation *)operation didSetValue:(id)value forKeyPath:(NSString *)keyPath usingMapping:(RKPropertyMapping *)propertyMapping + + + operation + The object mapping operation being performed. + + value + A new value that was set on the destination object. + + keyPath + The key path in the destination object for which a new value has been set. + + propertyMapping + The RKAttributeMapping or RKRelationshipMapping found for the key path. + + + + //api/name/mappingOperation:didSetValue:forKeyPath:usingMapping: + + + + //apple_ref/occ/intfm/RKMappingOperationDelegate/mappingOperation:didNotSetUnchangedValue:forKeyPath:usingMapping: + Tells the delegate that the mapping operation has declined to set a value for a given key path because the value has not changed. + RKMappingOperation.h + + - (void)mappingOperation:(RKMappingOperation *)operation didNotSetUnchangedValue:(id)value forKeyPath:(NSString *)keyPath usingMapping:(RKPropertyMapping *)propertyMapping + + + operation + The object mapping operation being performed. + + value + A unchanged value for the key path in the destination object. + + keyPath + The key path in the destination object for which a unchanged value was not set. + + propertyMapping + The RKAttributeMapping or RKRelationshipMapping found for the key path. + + + + //api/name/mappingOperation:didNotSetUnchangedValue:forKeyPath:usingMapping: + + + + //apple_ref/occ/intfm/RKMappingOperationDelegate/mappingOperation:didFailWithError: + Tells the delegate that the mapping operation has failed due to an error. + RKMappingOperation.h + + - (void)mappingOperation:(RKMappingOperation *)operation didFailWithError:(NSError *)error + + + operation + The object mapping operation that has failed. + + error + An error object indicating the reason for the failure. + + + + //api/name/mappingOperation:didFailWithError: + + + + //apple_ref/occ/intfm/RKMappingOperationDelegate/mappingOperation:didSelectObjectMapping:forDynamicMapping: + Tells the delegate that the mapping operation has selected a concrete object mapping with which to map the source object. + RKMappingOperation.h + + - (void)mappingOperation:(RKMappingOperation *)operation didSelectObjectMapping:(RKObjectMapping *)objectMapping forDynamicMapping:(RKDynamicMapping *)dynamicMapping + + + operation + The mapping operation. + + objectMapping + The concrete object mapping with which to perform the mapping. + + dynamicMapping + The dynamic source mapping from which the object mapping was determined. + + + + //api/name/mappingOperation:didSelectObjectMapping:forDynamicMapping: + + + + //apple_ref/occ/intfm/RKMappingOperationDelegate/mappingOperation:didConnectRelationship:usingMapping: + Tells the delegate that the mapping operation has connected a relationship. + RKMappingOperation.h + + - (void)mappingOperation:(RKMappingOperation *)operation didConnectRelationship:(NSRelationshipDescription *)relationship usingMapping:(RKConnectionMapping *)connectionMapping + + + operation + The mapping operation. + + relationship + The relationship that was connected. + + connectionMapping + The mappings that was used to connect the relationship. + + + + //api/name/mappingOperation:didConnectRelationship:usingMapping: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens65.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens65.xml new file mode 100644 index 00000000..fea9407a --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens65.xml @@ -0,0 +1,56 @@ + + + + + + //apple_ref/occ/intf/RKSerialization + The RKSerialization protocol declares two methods that a class must implement so that it can provide support for serializing objects to and deserializing objects from UTF-8 encoded data representations of a serialization format such as JSON or XML. Serialization implementations typically handle data in a given MIME Type (i.e. application/json) and may be registered with the RKMIMETypeSerialization class. + RKSerialization.h + + + + + + + //apple_ref/occ/intfm/RKSerialization/objectFromData:error: + Deserializes and returns the given data in the format supported by the receiver (i.e. JSON, XML, etc) as a Foundation object representation. + RKSerialization.h + + + (id)objectFromData:(NSData *)data error:(NSError **)error + + + data + The UTF-8 encoded data representation of the object to be deserialized. + + error + A pointer to an NSError object. + + + A Foundation object from the serialized data in data, or nil if an error occurs. + //api/name/objectFromData:error: + + + + //apple_ref/occ/intfm/RKSerialization/dataFromObject:error: + Serializes and returns a UTF-8 encoded data representation of the given Foundation object in the format supported by the receiver (i.e. JSON, XML, etc). + RKSerialization.h + + + (NSData *)dataFromObject:(id)object error:(NSError **)error + + + object + The object to be serialized. + + error + A pointer to an NSError object. + + A + pointer to an NSError object. + + + A data representation of the given object in UTF-8 encoding, or nil if an error occurred. + //api/name/dataFromObject:error: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens66.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens66.xml new file mode 100644 index 00000000..b7237b7e --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens66.xml @@ -0,0 +1,48 @@ + + + + + + //apple_ref/occ/intf/RKTestFactoryCallbacks + Defines optional callback methods for extending the functionality of the factory. Implementation can be provided via a category. + RKTestFactory.h + + + + + + + //apple_ref/occ/intfm/RKTestFactoryCallbacks/didInitialize + Application specific initialization point for the factory. + RKTestFactory.h + + + (void)didInitialize + + + //api/name/didInitialize + + + + //apple_ref/occ/intfm/RKTestFactoryCallbacks/didSetUp + Application specific customization point for the factory. + RKTestFactory.h + + + (void)didSetUp + + + //api/name/didSetUp + + + + //apple_ref/occ/intfm/RKTestFactoryCallbacks/didTearDown + Application specific customization point for the factory. + RKTestFactory.h + + + (void)didTearDown + + + //api/name/didTearDown + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens7.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens7.xml new file mode 100644 index 00000000..074d74aa --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens7.xml @@ -0,0 +1,235 @@ + + + + + + //apple_ref/occ/cl/RKEntityCache + Instances of RKInMemoryEntityCache provide an in-memory caching mechanism for +objects in a Core Data managed object context. Managed objects can be cached by +attribute for fast retrieval without repeatedly hitting the Core Data persistent store. +This can provide a substantial speed advantage over issuing fetch requests +in cases where repeated look-ups of the same data are performed using a small set +of attributes as the query key. Internally, the cache entries are maintained as +references to the NSManagedObjectID of corresponding cached objects. + RKEntityCache.h + + + + + + + //apple_ref/occ/instm/RKEntityCache/initWithManagedObjectContext: + Initializes the receiver with a managed object context containing the entity instances to be cached. + RKEntityCache.h + + - (id)initWithManagedObjectContext:(NSManagedObjectContext *)context + + + context + The managed object context containing objects to be cached. + + + self, initialized with context. + //api/name/initWithManagedObjectContext: + + + + //apple_ref/occ/instm/RKEntityCache/setManagedObjectContext: + The managed object context with which the receiver is associated. + RKEntityCache.h + + @property (nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext + + + //api/name/managedObjectContext + + + + //apple_ref/occ/instp/RKEntityCache/managedObjectContext + The managed object context with which the receiver is associated. + RKEntityCache.h + + @property (nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext + + + //api/name/managedObjectContext + + + + //apple_ref/occ/instm/RKEntityCache/cacheObjectsForEntity:byAttribute: + Caches all instances of an entity using the value for an attribute as the cache key. + RKEntityCache.h + + - (void)cacheObjectsForEntity:(NSEntityDescription *)entity byAttribute:(NSString *)attributeName + + + entity + The entity to cache all instances of. + + attributeName + The attribute to cache the instances by. + + + + //api/name/cacheObjectsForEntity:byAttribute: + + + + //apple_ref/occ/instm/RKEntityCache/isEntity:cachedByAttribute: + Returns a Boolean value indicating if all instances of an entity have been cached by a given attribute name. + RKEntityCache.h + + - (BOOL)isEntity:(NSEntityDescription *)entity cachedByAttribute:(NSString *)attributeName + + + entity + The entity to check the cache status of. + + attributeName + The attribute to check the cache status with. + + + YES if the cache has been loaded with instances with the given attribute, else NO. + //api/name/isEntity:cachedByAttribute: + + + + //apple_ref/occ/instm/RKEntityCache/objectForEntity:withAttribute:value:inContext: + Retrieves the first cached instance of a given entity where the specified attribute matches the given value. + RKEntityCache.h + + - (NSManagedObject *)objectForEntity:(NSEntityDescription *)entity withAttribute:(NSString *)attributeName value:(id)attributeValue inContext:(NSManagedObjectContext *)context + + + entity + The entity to search the cache for instances of. + + attributeName + The attribute to search the cache for matches with. + + attributeValue + The value of the attribute to return a match for. + + context + The managed object from which to retrieve the cached results. + + + A matching managed object instance or nil. +@raise NSInvalidArgumentException Raised if instances of the entity and attribute have not been cached. + //api/name/objectForEntity:withAttribute:value:inContext: + + + + //apple_ref/occ/instm/RKEntityCache/objectsForEntity:withAttribute:value:inContext: + Retrieves all cached instances of a given entity where the specified attribute matches the given value. + RKEntityCache.h + + - (NSArray *)objectsForEntity:(NSEntityDescription *)entity withAttribute:(NSString *)attributeName value:(id)attributeValue inContext:(NSManagedObjectContext *)context + + + entity + The entity to search the cache for instances of. + + attributeName + The attribute to search the cache for matches with. + + attributeValue + The value of the attribute to return a match for. + + context + The managed object from which to retrieve the cached results. + + + All matching managed object instances or nil. +@raise NSInvalidArgumentException Raised if instances of the entity and attribute have not been cached. + //api/name/objectsForEntity:withAttribute:value:inContext: + + + + //apple_ref/occ/instm/RKEntityCache/attributeCacheForEntity:attribute: + Retrieves the underlying entity attribute cache for a given entity and attribute. + RKEntityCache.h + + - (RKEntityByAttributeCache *)attributeCacheForEntity:(NSEntityDescription *)entity attribute:(NSString *)attributeName + + + entity + The entity to retrieve the entity attribute cache object for. + + attributeName + The attribute to retrieve the entity attribute cache object for. + + + The entity attribute cache for the given entity and attribute, or nil if none was found. + //api/name/attributeCacheForEntity:attribute: + + + + //apple_ref/occ/instm/RKEntityCache/attributeCachesForEntity: + Retrieves all entity attributes caches for a given entity. + RKEntityCache.h + + - (NSArray *)attributeCachesForEntity:(NSEntityDescription *)entity + + + entity + The entity to retrieve the collection of entity attribute caches for. + + + An array of entity attribute cache objects for the given entity or an empty array if none were found. + //api/name/attributeCachesForEntity: + + + + //apple_ref/occ/instm/RKEntityCache/flush + Flushes the entity cache by sending a flush message to each entity attribute cache +contained within the receiver. + RKEntityCache.h + + + //apple_ref/occ/instm/RKEntityByAttributeCache/flush + + + + - (void)flush + + + //api/name/flush + + + + //apple_ref/occ/instm/RKEntityCache/addObject: + Adds a given object to all entity attribute caches for the object's entity contained +within the receiver. + RKEntityCache.h + + - (void)addObject:(NSManagedObject *)object + + + object + The object to add to the appropriate entity attribute caches. + + + + //api/name/addObject: + + + + //apple_ref/occ/instm/RKEntityCache/removeObject: + Removed a given object from all entity attribute caches for the object's entity contained +within the receiver. + RKEntityCache.h + + - (void)removeObject:(NSManagedObject *)object + + + object + The object to remove from the appropriate entity attribute caches. + + + + //api/name/removeObject: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens8.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens8.xml new file mode 100644 index 00000000..da70b445 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens8.xml @@ -0,0 +1,189 @@ + + + + + + //apple_ref/occ/cl/RKEntityMapping + RKEntityMapping objects model an object mapping with a Core Data destination entity. + RKEntityMapping.h + + + + + + + //apple_ref/occ/instm/RKEntityMapping/initWithEntity: + Initializes the receiver with a given entity. + RKEntityMapping.h + + - (id)initWithEntity:(NSEntityDescription *)entity + + + entity + An entity with which to initialize the receiver. + + + The receiver, initialized with the given entity. + //api/name/initWithEntity: + + + + //apple_ref/occ/clm/RKEntityMapping/mappingForEntityForName:inManagedObjectStore: + A convenience initializer that creates and returns an entity mapping for the entity with the given name in +the managed object model of the given managed object store. + RKEntityMapping.h + + + (id)mappingForEntityForName:(NSString *)entityName inManagedObjectStore:(RKManagedObjectStore *)managedObjectStore + + + entityName + The name of the entity in the managed object model for which an entity mapping is to be created. + + managedObjectStore + A managed object store containing the managed object model in which an entity with the given name is defined. + + + A new entity mapping for the entity with the given name in the managed object model of the given managed object store. + //api/name/mappingForEntityForName:inManagedObjectStore: + + + + //apple_ref/occ/instm/RKEntityMapping/setEntity: + The Core Data entity description used for this object mapping + RKEntityMapping.h + + @property (nonatomic, strong) NSEntityDescription *entity + + + //api/name/entity + + + + //apple_ref/occ/instp/RKEntityMapping/entity + The Core Data entity description used for this object mapping + RKEntityMapping.h + + @property (nonatomic, strong) NSEntityDescription *entity + + + //api/name/entity + + + + //apple_ref/occ/instm/RKEntityMapping/setPrimaryKeyAttribute: + The name of the attribute on the destination entity that acts as the primary key for instances +of the entity in the remote backend system. Used to uniquely identify objects within the store +so that existing objects are updated rather than creating new ones. + RKEntityMapping.h + + @property (nonatomic, strong) NSString *primaryKeyAttribute + + + //api/name/primaryKeyAttribute + + + + //apple_ref/occ/instp/RKEntityMapping/primaryKeyAttribute + The name of the attribute on the destination entity that acts as the primary key for instances +of the entity in the remote backend system. Used to uniquely identify objects within the store +so that existing objects are updated rather than creating new ones. + RKEntityMapping.h + + @property (nonatomic, strong) NSString *primaryKeyAttribute + + + //api/name/primaryKeyAttribute + + + + //apple_ref/occ/instm/RKEntityMapping/setConnectionMappings: + Retrieves an array of RKConnectionMapping objects for connecting the receiver's relationships +by primary key. + RKEntityMapping.h + + @property (weak, nonatomic, readonly) NSArray *connectionMappings + + + //api/name/connectionMappings + + + + //apple_ref/occ/instp/RKEntityMapping/connectionMappings + Retrieves an array of RKConnectionMapping objects for connecting the receiver's relationships +by primary key. + RKEntityMapping.h + + @property (weak, nonatomic, readonly) NSArray *connectionMappings + + + //api/name/connectionMappings + + + + //apple_ref/occ/instm/RKEntityMapping/addConnectionMapping: + Adds a connection mapping to the receiver. + RKEntityMapping.h + + - (void)addConnectionMapping:(RKConnectionMapping *)connectionMapping + + + connectionMapping + The connection mapping to be added. + + + + //api/name/addConnectionMapping: + + + + //apple_ref/occ/instm/RKEntityMapping/addConnectionMappingsFromArray: + + RKEntityMapping.h + + - (void)addConnectionMappingsFromArray:(NSArray *)arrayOfConnectionMappings + + + //api/name/addConnectionMappingsFromArray: + + + + //apple_ref/occ/instm/RKEntityMapping/addConnectionMappingForRelationshipForName:fromSourceKeyPath:toKeyPath:matcher: + + RKEntityMapping.h + + - (RKConnectionMapping *)addConnectionMappingForRelationshipForName:(NSString *)relationshipName fromSourceKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath matcher:(RKDynamicMappingMatcher *)matcher + + + //api/name/addConnectionMappingForRelationshipForName:fromSourceKeyPath:toKeyPath:matcher: + + + + //apple_ref/occ/instm/RKEntityMapping/removeConnectionMapping: + Removes a connection mapping from the receiver. + RKEntityMapping.h + + - (void)removeConnectionMapping:(RKConnectionMapping *)connectionMapping + + + connectionMapping + The connection mapping to be added. + + + + //api/name/removeConnectionMapping: + + + + //apple_ref/occ/instm/RKEntityMapping/defaultValueForMissingAttribute: + Returns the default value for the specified attribute as expressed in the Core Data entity definition. This value will +be assigned if the object mapping is applied and a value for a missing attribute is not present in the payload. + RKEntityMapping.h + + - (id)defaultValueForMissingAttribute:(NSString *)attributeName + + + //api/name/defaultValueForMissingAttribute: + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens9.xml b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens9.xml new file mode 100644 index 00000000..7fe62600 --- /dev/null +++ b/Pods/Documentation/RestKit/docset/Contents/Resources/Tokens9.xml @@ -0,0 +1,59 @@ + + + + + + //apple_ref/occ/cl/RKErrorMessage + The RKErrorMessage is a simple class used for representing error messages returned by a remote backend system with which the client application is communicating. Error messages are typically returned in a response body in the Client Error class (status code 4xx range). + RKErrorMessage.h + + + + + + + //apple_ref/occ/instm/RKErrorMessage/setErrorMessage: + The error message to be presented to the user. + RKErrorMessage.h + + @property (nonatomic, copy) NSString *errorMessage + + + //api/name/errorMessage + + + + //apple_ref/occ/instp/RKErrorMessage/errorMessage + The error message to be presented to the user. + RKErrorMessage.h + + @property (nonatomic, copy) NSString *errorMessage + + + //api/name/errorMessage + + + + //apple_ref/occ/instm/RKErrorMessage/setUserInfo: + A dictionary of application specific information that accompanies the error message. + RKErrorMessage.h + + @property (nonatomic, copy) NSDictionary *userInfo + + + //api/name/userInfo + + + + //apple_ref/occ/instp/RKErrorMessage/userInfo + A dictionary of application specific information that accompanies the error message. + RKErrorMessage.h + + @property (nonatomic, copy) NSDictionary *userInfo + + + //api/name/userInfo + + + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/docSet.dsidx b/Pods/Documentation/RestKit/docset/Contents/Resources/docSet.dsidx new file mode 100644 index 00000000..b135d10d Binary files /dev/null and b/Pods/Documentation/RestKit/docset/Contents/Resources/docSet.dsidx differ diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/docSet.mom b/Pods/Documentation/RestKit/docset/Contents/Resources/docSet.mom new file mode 100644 index 00000000..8e38182c Binary files /dev/null and b/Pods/Documentation/RestKit/docset/Contents/Resources/docSet.mom differ diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/docSet.skidx b/Pods/Documentation/RestKit/docset/Contents/Resources/docSet.skidx new file mode 100644 index 00000000..28353695 Binary files /dev/null and b/Pods/Documentation/RestKit/docset/Contents/Resources/docSet.skidx differ diff --git a/Pods/Documentation/RestKit/docset/Contents/Resources/docSet.toc b/Pods/Documentation/RestKit/docset/Contents/Resources/docSet.toc new file mode 100644 index 00000000..c95e7e2f Binary files /dev/null and b/Pods/Documentation/RestKit/docset/Contents/Resources/docSet.toc differ diff --git a/Pods/Documentation/RestKit/html/Categories/AFHTTPClient+.html b/Pods/Documentation/RestKit/html/Categories/AFHTTPClient+.html new file mode 100644 index 00000000..0e8a50b2 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Categories/AFHTTPClient+.html @@ -0,0 +1,265 @@ + + + + + AFHTTPClient() Category Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + +
Declared inRKHTTPRequestOperation.h
+ + + + + + +
+ +

Tasks

+ + + + + + + +
+ + + + + +
+ +

Properties

+ +
+ +

defaultHeaders

+ + + +
@property (readonly, nonatomic) NSDictionary *defaultHeaders
+ + +
+ +
+ + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Categories/NSBundle+RKAdditions.html b/Pods/Documentation/RestKit/html/Categories/NSBundle+RKAdditions.html new file mode 100644 index 00000000..c0817c40 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Categories/NSBundle+RKAdditions.html @@ -0,0 +1,551 @@ + + + + + NSBundle(RKAdditions) Category Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + +
Declared inNSBundle+RKAdditions.h
+ + + + +
+ +

Overview

+

Provides convenience methods for accessing data in resources within an NSBundle.

+
+ + + + + +
+ +

Tasks

+ + + + + + + +
+ + + + + + + + + +
+ +

Instance Methods

+ +
+ +

MIMETypeForResource:withExtension:

+ + + +
+

Returns the MIME Type for the resource identified by the specified name and file extension.

+
+ + + +
- (NSString *)MIMETypeForResource:(NSString *)name withExtension:(NSString *)extension
+ + + +
+

Parameters

+ +
+
name
+

The name of the resource file.

+
+ +
+
extension
+

If extension is an empty string or nil, the extension is assumed not to exist and the file is the first file encountered that exactly matches name.

+
+ +
+ + + +
+

Return Value

+

The MIME Type for the resource file or nil if the file could not be located.

+
+ + + + + +
+

Discussion

+

Returns the MIME Type for the resource identified by the specified name and file extension.

+
+ + + + + + + +
+

Declared In

+ NSBundle+RKAdditions.h
+
+ + +
+ +
+ +

dataWithContentsOfResource:withExtension:

+ + + +
+

Creates and returns a data object by reading every byte from the resource identified by the specified name and file extension.

+
+ + + +
- (NSData *)dataWithContentsOfResource:(NSString *)name withExtension:(NSString *)extension
+ + + +
+

Parameters

+ +
+
name
+

The name of the resource file.

+
+ +
+
extension
+

If extension is an empty string or nil, the extension is assumed not to exist and the file is the first file encountered that exactly matches name.

+
+ +
+ + + +
+

Return Value

+

A data object by reading every byte from the resource file.

+
+ + + + + +
+

Discussion

+

Creates and returns a data object by reading every byte from the resource identified by the specified name and file extension.

+
+ + + + + + + +
+

Declared In

+ NSBundle+RKAdditions.h
+
+ + +
+ +
+ +

parsedObjectWithContentsOfResource:withExtension:

+ + + +
+

Creates and returns an object representation of the data from the resource identified by the specified name and file extension by reading the +data as a string and parsing it using a parser appropriate for the MIME Type of the file.

+
+ + + +
- (id)parsedObjectWithContentsOfResource:(NSString *)name withExtension:(NSString *)extension
+ + + +
+

Parameters

+ +
+
name
+

The name of the resource file.

+
+ +
+
extension
+

If extension is an empty string or nil, the extension is assumed not to exist and the file is the first file encountered that exactly matches name.

+
+ +
+ + + +
+

Return Value

+

A new image object for the specified file, or nil if the method could not initialize the image from the specified file.

+
+ + + + + +
+

Discussion

+

Creates and returns an object representation of the data from the resource identified by the specified name and file extension by reading the +data as a string and parsing it using a parser appropriate for the MIME Type of the file.

+
+ + + + + + + +
+

Declared In

+ NSBundle+RKAdditions.h
+
+ + +
+ +
+ +

stringWithContentsOfResource:withExtension:encoding:

+ + + +
+

Creates and returns a string object by reading data from the resource identified by the specified name and file extension using a given encoding.

+
+ + + +
- (NSString *)stringWithContentsOfResource:(NSString *)name withExtension:(NSString *)extension encoding:(NSStringEncoding)encoding
+ + + +
+

Parameters

+ +
+
name
+

The name of the resource file.

+
+ +
+
extension
+

If extension is an empty string or nil, the extension is assumed not to exist and the file is the first file encountered that exactly matches name.

+
+ +
+
encoding
+

The encoding of the resource file.

+
+ +
+ + + +
+

Return Value

+

A string created by reading data from the resource file using the encoding.

+
+ + + + + +
+

Discussion

+

Creates and returns a string object by reading data from the resource identified by the specified name and file extension using a given encoding.

+
+ + + + + + + +
+

Declared In

+ NSBundle+RKAdditions.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Categories/NSEntityDescription+RKAdditions.html b/Pods/Documentation/RestKit/html/Categories/NSEntityDescription+RKAdditions.html new file mode 100644 index 00000000..e1d577d3 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Categories/NSEntityDescription+RKAdditions.html @@ -0,0 +1,660 @@ + + + + + NSEntityDescription(RKAdditions) Category Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + +
Declared inNSEntityDescription+RKAdditions.h
+ + + + +
+ +

Overview

+

Provides extensions to NSEntityDescription for various common tasks.

+
+ + + + + +
+ +

Tasks

+ + + + + +
    +
  • + +   primaryKeyAttributeName +

    The name of the attribute that acts as the primary key for the receiver.

    +
    + property + +
  • + +   primaryKeyAttribute +

    The attribute description object for the attribute designated as the primary key for the receiver.

    +
    + property + +
  • + +   primaryKeyAttributeClass +

    The class representing the value of the attribute designated as the primary key for the receiver.

    +
    + property + +
  • + + – predicateForPrimaryKeyAttribute +

    Returns a cached predicate specifying that the primary key attribute is equal to the $PRIMARY_KEY_VALUE +substitution variable.

    +
    + + +
  • + + – predicateForPrimaryKeyAttributeWithValue: +

    Returns a predicate specifying that the value of the primary key attribute is equal to a given +value. This predicate is constructed by evaluating the cached predicate returned by the +predicateForPrimaryKeyAttribute with a dictionary of substitution variables specifying that +$PRIMARY_KEY_VALUE is equal to the given value.

    +
    + + +
  • + + – coerceValueForPrimaryKey: +

    Coerces the given value into the class representing the primary key. Currently support NSString +and NSNumber coercsions.

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

primaryKeyAttribute

+ + + +
+

The attribute description object for the attribute designated as the primary key for the receiver.

+
+ + + +
@property (nonatomic, readonly) NSAttributeDescription *primaryKeyAttribute
+ + + + + + + + + +
+

Discussion

+

The attribute description object for the attribute designated as the primary key for the receiver.

+
+ + + + + + + +
+

Declared In

+ NSEntityDescription+RKAdditions.h
+
+ + +
+ +
+ +

primaryKeyAttributeClass

+ + + +
+

The class representing the value of the attribute designated as the primary key for the receiver.

+
+ + + +
@property (nonatomic, readonly) Class primaryKeyAttributeClass
+ + + + + + + + + +
+

Discussion

+

The class representing the value of the attribute designated as the primary key for the receiver.

+
+ + + + + + + +
+

Declared In

+ NSEntityDescription+RKAdditions.h
+
+ + +
+ +
+ +

primaryKeyAttributeName

+ + + +
+

The name of the attribute that acts as the primary key for the receiver.

+
+ + + +
@property (nonatomic, retain) NSString *primaryKeyAttributeName
+ + + + + + + + + +
+

Discussion

+

The name of the attribute that acts as the primary key for the receiver.

+ +

The primary key attribute can be configured in two ways:

+ +
1. From within the Xcode Core Data editing view by
+
+ +

adding the desired attribute’s name as the value for the +key primaryKeyAttribute to the user info dictionary.

+ +
1. Programmatically, by retrieving the NSEntityDescription instance and
+
+ +

setting the property’s value.

+ +

Configuring the primary key attribute programmatically is a convenience interface +for directly manipulating the user info dictionary of the receiver. As such, the entity +must exist within a mutable managed object model. By default, models are returned in +an immutable state and must be sent the mutableCopy message to retrieve an mutable copy. Managed +object models are rendered immutable once used to create a persistent store coordinator, therefore +the developer must configure primary key attributes programmatically before creating a PSC during +Core Data initialization.

+
+ + + + + + + +
+

Declared In

+ NSEntityDescription+RKAdditions.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

coerceValueForPrimaryKey:

+ + + +
+

Coerces the given value into the class representing the primary key. Currently support NSString +and NSNumber coercsions.

+
+ + + +
- (id)coerceValueForPrimaryKey:(id)primaryKeyValue
+ + + +
+

Parameters

+ +
+
primaryKeyValue
+

The value of the primary that is to be coerced.

+
+ +
+ + + + + +
+

Availability

+

0.10.1

+
+ + + +
+

Discussion

+

Coerces the given value into the class representing the primary key. Currently support NSString +and NSNumber coercsions.

Bug: NOTE This API is temporary and will be deprecated and replaced.

+
+ + + + + + + +
+

Declared In

+ NSEntityDescription+RKAdditions.h
+
+ + +
+ +
+ +

predicateForPrimaryKeyAttribute

+ + + +
+

Returns a cached predicate specifying that the primary key attribute is equal to the $PRIMARY_KEY_VALUE +substitution variable.

+
+ + + +
- (NSPredicate *)predicateForPrimaryKeyAttribute
+ + + + + +
+

Return Value

+

A cached predicate specifying the value of the primary key attribute is equal to the $PRIMARY_KEY_VALUE +substitution variable.

+
+ + + + + +
+

Discussion

+

Returns a cached predicate specifying that the primary key attribute is equal to the $PRIMARY_KEY_VALUE +substitution variable.

+ +

This predicate is cached to avoid parsing overhead during object mapping operations +and must be evaluated using [NSPredicate predicateWithSubstitutionVariables:]

+
+ + + + + + + +
+

Declared In

+ NSEntityDescription+RKAdditions.h
+
+ + +
+ +
+ +

predicateForPrimaryKeyAttributeWithValue:

+ + + +
+

Returns a predicate specifying that the value of the primary key attribute is equal to a given +value. This predicate is constructed by evaluating the cached predicate returned by the +predicateForPrimaryKeyAttribute with a dictionary of substitution variables specifying that +$PRIMARY_KEY_VALUE is equal to the given value.

+
+ + + +
- (NSPredicate *)predicateForPrimaryKeyAttributeWithValue:(id)value
+ + + +
+

Parameters

+ +
+
value
+

The primary key value with which to create the predicate.

+
+ +
+ + + +
+

Return Value

+

A predicate speciying that the value of the primary key attribute is equal to a given value.

+
+ + + + + +
+

Discussion

+

Returns a predicate specifying that the value of the primary key attribute is equal to a given +value. This predicate is constructed by evaluating the cached predicate returned by the +predicateForPrimaryKeyAttribute with a dictionary of substitution variables specifying that +$PRIMARY_KEY_VALUE is equal to the given value.

+ +

NOTE: This method considers the type of the receiver’s primary key attribute when constructing +the predicate. It will coerce the given value into either an NSString or an NSNumber as +appropriate. This behavior is a convenience to avoid annoying issues related to Core Data’s +handling of predicates for NSString and NSNumber types that were not appropriately casted.

+
+ + + + + + + +
+

Declared In

+ NSEntityDescription+RKAdditions.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Categories/NSManagedObject+RKAdditions.html b/Pods/Documentation/RestKit/html/Categories/NSManagedObject+RKAdditions.html new file mode 100644 index 00000000..6878dda6 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Categories/NSManagedObject+RKAdditions.html @@ -0,0 +1,372 @@ + + + + + NSManagedObject(RKAdditions) Category Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + +
Declared inNSManagedObject+RKAdditions.h
+ + + + +
+ +

Overview

+

Provides extensions to NSManagedObject for various common tasks.

+
+ + + + + +
+ +

Tasks

+ + + + +

Inspecting Managed Object State

+
    +
  • + + – hasBeenDeleted +

    Determines if the receiver has been deleted from the persistent store +and removed from the object graph.

    +
    + + +
  • + + – isNew +

    Returns YES when an object has not been saved to the managed object context yet

    +
    + + +
  • +
+ +
+ + + + + + + + + +
+ +

Instance Methods

+ +
+ +

hasBeenDeleted

+ + + +
+

Determines if the receiver has been deleted from the persistent store +and removed from the object graph.

+
+ + + +
- (BOOL)hasBeenDeleted
+ + + + + +
+

Return Value

+

YES if the object has been deleted from the persistent store, else NO.

+
+ + + + + +
+

Discussion

+

Determines if the receiver has been deleted from the persistent store +and removed from the object graph.

+ +

Unlike isDeleted, will return YES after a save event or if the managed object was deleted +in another managed object context that was then merged to the persistent store.

+
+ + + + + + + +
+

Declared In

+ NSManagedObject+RKAdditions.h
+
+ + +
+ +
+ +

isNew

+ + + +
+

Returns YES when an object has not been saved to the managed object context yet

+
+ + + +
- (BOOL)isNew
+ + + + + + + + + +
+

Discussion

+

Returns YES when an object has not been saved to the managed object context yet

+
+ + + + + + + +
+

Declared In

+ NSManagedObject+RKAdditions.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Categories/NSManagedObjectContext+RKAdditions.html b/Pods/Documentation/RestKit/html/Categories/NSManagedObjectContext+RKAdditions.html new file mode 100644 index 00000000..5df060e7 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Categories/NSManagedObjectContext+RKAdditions.html @@ -0,0 +1,655 @@ + + + + + NSManagedObjectContext(RKAdditions) Category Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + +
Declared inNSManagedObjectContext+RKAdditions.h
+ + + + +
+ +

Overview

+

Provides extensions to NSManagedObjectContext for various common tasks.

+
+ + + + + +
+ +

Tasks

+ + + +

Inserting a Managed Object

+ + + + + +

Counting Managed Objects

+ + + + + +

Fetching Managed Objects by Primary Key

+ + + + + +

Saving the Context to the Persistent Store

+ +
    +
  • + + – saveToPersistentStore: +

    Saves the receiver and then traverses up the parent context chain until a parent managed object context with a nil parent is found. If the final ancestor context does not have a reference to the persistent store coordinator, then a warning is generated and the method returns NO.

    +
    + + +
  • +
+ +
+ + + + + + + + + +
+ +

Instance Methods

+ +
+ +

countForEntityForName:predicate:error:

+ + + +
+

Convenience method for performing a count of the number of instances of an entity with the given name.

+
+ + + +
- (NSUInteger)countForEntityForName:(NSString *)entityName predicate:(NSPredicate *)predicate error:(NSError **)error
+ + + +
+

Parameters

+ +
+
entityName
+

The name of an entity.

+
+ +
+
predicate
+

A predicate to limit the search. May be nil.

+
+ +
+
error
+

If there is a problem executing the fetch, upon return contains an instance of NSError that describes the problem.

+
+ +
+ + + +
+

Return Value

+

The number of objects a fetch request for the given entity name with the given predicate would have returned if it had been passed to executeFetchRequest:error:, or NSNotFound if an error occurs.

+
+ + + + + +
+

Discussion

+

Convenience method for performing a count of the number of instances of an entity with the given name.

+ +

This method is functionally equivalent to the following code example.

+ +
NSError *error;
+NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:entityName];
+fetchRequest.predicate = predicate;
+NSUInteger count = [managedObjectContext countForFetchRequest:fetchRequest error:&error];
+
+
+ + + + + + + +
+

Declared In

+ NSManagedObjectContext+RKAdditions.h
+
+ + +
+ +
+ +

fetchObjectForEntity:withValueForPrimaryKeyAttribute:

+ + + +
+

Fetches a single managed object for the given entity with the given value for the primary key attribute in the receiver.

+
+ + + +
- (id)fetchObjectForEntity:(NSEntityDescription *)entity withValueForPrimaryKeyAttribute:(id)primaryKeyValue
+ + + +
+

Parameters

+ +
+
entity
+

The entity of the managed object to be retrieved by primary key.

+
+ +
+
primaryKeyValue
+

The value for the entity’s primary key attribute.

+
+ +
+ + + +
+

Return Value

+

The managed object with the primary key attribute equal to the given value or nil if none was found.

+
+ + + + + +
+

Discussion

+

Fetches a single managed object for the given entity with the given value for the primary key attribute in the receiver.

+
+ + + + + + + +
+

Declared In

+ NSManagedObjectContext+RKAdditions.h
+
+ + +
+ +
+ +

fetchObjectForEntityForName:withValueForPrimaryKeyAttribute:

+ + + +
+

Fetches a single managed object for the entity for the given name with the given value for the primary key attribute in the receiver.

+
+ + + +
- (id)fetchObjectForEntityForName:(NSString *)entityName withValueForPrimaryKeyAttribute:(id)primaryKeyValue
+ + + +
+

Parameters

+ +
+
entityName
+

The name of the entity of the managed object to be retrieved by primary key.

+
+ +
+
primaryKeyValue
+

The value for the receiving entity’s primary key attribute.

+
+ +
+ + + +
+

Return Value

+

The managed object with the primary key attribute equal to the given value or nil if none was found.

+
+ + + + + +
+

Discussion

+

Fetches a single managed object for the entity for the given name with the given value for the primary key attribute in the receiver.

+
+ + + + + + + +
+

Declared In

+ NSManagedObjectContext+RKAdditions.h
+
+ + +
+ +
+ +

insertNewObjectForEntityForName:

+ + + +
+

Inserts a new managed object for the entity for the given name.

+
+ + + +
- (id)insertNewObjectForEntityForName:(NSString *)entityName
+ + + +
+

Parameters

+ +
+
entityName
+

The name of an entity.

+
+ +
+ + + +
+

Return Value

+

A new, autoreleased, fully configured instance of the class for the entity named entityName. The instance has its entity description set and is inserted into the receiver.

+
+ + + + + +
+

Discussion

+

Inserts a new managed object for the entity for the given name.

+ +

This method is functionally equivalent to the follow code example.

+ +
[NSEntityDescription insertNewObjectForEntityForName:entityName inManagedObjectContext:self];
+
+
+ + + + + + + +
+

Declared In

+ NSManagedObjectContext+RKAdditions.h
+
+ + +
+ +
+ +

saveToPersistentStore:

+ + + +
+

Saves the receiver and then traverses up the parent context chain until a parent managed object context with a nil parent is found. If the final ancestor context does not have a reference to the persistent store coordinator, then a warning is generated and the method returns NO.

+
+ + + +
- (BOOL)saveToPersistentStore:(NSError **)error
+ + + +
+

Parameters

+ +
+
error
+

If there is a problem saving the receiver or any of its ancestor contexts, upon return contains an pointer to an instance of NSError that describes the problem.

+
+ +
+ + + +
+

Return Value

+

YES if the save to the persistent store was successful, else NO.

+
+ + + + + +
+

Discussion

+

Saves the receiver and then traverses up the parent context chain until a parent managed object context with a nil parent is found. If the final ancestor context does not have a reference to the persistent store coordinator, then a warning is generated and the method returns NO.

+
+ + + + + + + +
+

Declared In

+ NSManagedObjectContext+RKAdditions.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKAttributeMapping.html b/Pods/Documentation/RestKit/html/Classes/RKAttributeMapping.html new file mode 100644 index 00000000..a42d0ac2 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKAttributeMapping.html @@ -0,0 +1,355 @@ + + + + + RKAttributeMapping Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromRKPropertyMapping : NSObject
Declared inRKAttributeMapping.h
+ + + + +
+ +

Overview

+

Instances of RKAttributeMapping define a transformation of data between an attribute value on source object and an attribute value on a destination object within an object mapping.

+
+ + + + + +
+ +

Tasks

+ + + + + +
    +
  • + + + attributeMappingFromKeyPath:toKeyPath: +

    Creates and returns a new attribute mapping specifying that data is to be read from a given key path on a source object +and set to a given key path on a destination object.

    +
    + + +
  • +
+ +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

attributeMappingFromKeyPath:toKeyPath:

+ + + +
+

Creates and returns a new attribute mapping specifying that data is to be read from a given key path on a source object +and set to a given key path on a destination object.

+
+ + + +
+ (RKAttributeMapping *)attributeMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath
+ + + +
+

Parameters

+ +
+
sourceKeyPath
+

The key path on the source object from which to read the data being mapped.

+
+ +
+
destinationKeyPath
+

The key path on the destination object on which to set the mapped data.

+
+ +
+ + + +
+

Return Value

+

A newly created attribute mapping object that is ready to be added to an object mapping.

+
+ + + + + +
+

Discussion

+

Creates and returns a new attribute mapping specifying that data is to be read from a given key path on a source object +and set to a given key path on a destination object.

+ +

Attribute mappings define transformation between key paths in the source and destination object beings mapped. In the simplest +case, an attribute mapping may simply specify that data from one object is to be copied to another. A common example of this +type of transformation is copying the name key from a JSON payload onto a local object. In this case, the source and +destination key paths are identical, as are the source and destination types (NSString), so a simple get and set operation +has been defined.

+ +

The next most common use-case is the transformation of identical data between two different key paths in the +source and destination objects. This is typically encountered when you wish to transform inbound data to conform with the naming +conventions of the platform or the data model of your application. An example of this type of transformation would be from the +source key path of first_name to the destination key path of firstName. In this transformation, the key paths have diverged +but both sides of the mapping correspond to NSString properties.

+ +

The final type of transformation to be specified via an attribute mapping involves the transformation between types in the mapping. +By far, the most common example of this use-case is the transformation of a inbound string or numeric property into a date on +the target object. For example, consider a backend system that returns the creation date of a piece of content in a JSON payload. +This data might be returned in JSON as {"created_on": "2012-08-27"}. In a given application, the developer may wish to model this +data as an NSDate createdOn property on the target object. An attribute mapping to support this mapping would specify a source +key path of created_on and a destination key path of createdOn. On the destination object, the createdOn property would be defined +as @property (nonatomic, strong) NSDate *createdOn;. At mapping time, the mapping operation inspects the type of the content being +mapped and attempts to transform the source content into the type of the desination property specified by the mapping. In this case, +an NSDateFormatter object would be used to process the inbound NSString into an outbound NSDate object.

+
+ + + + + + + +
+

Declared In

+ RKAttributeMapping.h
+
+ + +
+ +
+ + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKConnectionMapping.html b/Pods/Documentation/RestKit/html/Classes/RKConnectionMapping.html new file mode 100644 index 00000000..cc4479bf --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKConnectionMapping.html @@ -0,0 +1,425 @@ + + + + + RKConnectionMapping Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromRKPropertyMapping : NSObject
Declared inRKConnectionMapping.h
+ + + + +
+ +

Overview

+

Conditionally connect a relationship of the object being mapped when the object being mapped has +block evaluate to YES. This variant is useful in cases where you want to execute an arbitrary +block to determine whether or not to connect a relationship.

+ +

For example, given a Project object associated with a User, where the ‘admin’ relationship is +specified by a adminID property on the managed object:

+ +

[mapping connectRelationship:@“admin” fromKeyPath:@“adminId” toKeyPath:@“adminID” withMapping:userMapping usingEvaluationBlock:^(id data) { +return [User isAuthenticated]; +}];

+ +

Will hydrate the ‘admin’ association on the managed object with the object +in the local object graph having the primary key specified in the managed object’s +userID property. Note that this connection will only occur when the provided block evalutes to YES. +In cases where no match occurs, the relationship connection is skipped.

+
+ + + + + +
+ +

Tasks

+ + + + + + + +
+ + + + + +
+ +

Properties

+ +
+ +

matcher

+ + + +
@property (nonatomic, strong, readonly) RKDynamicMappingMatcher *matcher
+ + +
+ +
+ +

relationship

+ + + +
@property (nonatomic, strong, readonly) NSRelationshipDescription *relationship
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

initWithRelationship:sourceKeyPath:destinationKeyPath:matcher:

+ + + +
+

**

+
+ + + +
- (id)initWithRelationship:(NSRelationshipDescription *)relationship sourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath matcher:(RKDynamicMappingMatcher *)matcher
+ + + + + + + + + +
+

Discussion

+

**

+
+ + + + + + + +
+

Declared In

+ RKConnectionMapping.h
+
+ + +
+ +
+ +

isForeignKeyConnection

+ + + +
- (BOOL)isForeignKeyConnection
+ + +
+ +
+ +

isKeyPathConnection

+ + + +
- (BOOL)isKeyPathConnection
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKDotNetDateFormatter.html b/Pods/Documentation/RestKit/html/Classes/RKDotNetDateFormatter.html new file mode 100644 index 00000000..61d95a03 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKDotNetDateFormatter.html @@ -0,0 +1,488 @@ + + + + + RKDotNetDateFormatter Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSDateFormatter
Declared inRKDotNetDateFormatter.h
+ + + + +
+ +

Overview

+

A subclass of NSDateFormatter that serves as translator between ASP.NET date serializations in JSON strings and NSDate objects. This is useful for properly mapping these dates from an ASP.NET driven backend.

Warning: DO NOT attempt to use setDateFormat: on this class. It will return invalid results.

+
+ + + + + +
+ +

Tasks

+ + + + + +
    +
  • + + + dotNetDateFormatterWithTimeZone: +

    Instantiates an autoreleased RKDotNetDateFormatter object with the timezone set to the given value. The default time zone is UTC.

    +
    + + +
  • + + – dateFromString: +

    Returns an NSDate object from an ASP.NET style date string respresentation, as seen in JSON.

    +
    + + +
  • + + – stringFromDate: +

    Returns an ASP.NET style date string from an NSDate, such as /Date(1112715000000+0000)/ Where 1112715000000 is the number of milliseconds since January 1, 1970 00:00 GMT/UTC, and +0000 is the timezone offset from GMT in 24-hour time.

    +
    + + +
  • +
+ +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

dotNetDateFormatterWithTimeZone:

+ + + +
+

Instantiates an autoreleased RKDotNetDateFormatter object with the timezone set to the given value. The default time zone is UTC.

+
+ + + +
+ (RKDotNetDateFormatter *)dotNetDateFormatterWithTimeZone:(NSTimeZone *)timeZone
+ + + +
+

Parameters

+ +
+
timeZone
+

An NSTimeZone object. A nil value sets the timezone to the default value of UTC.

+
+ +
+ + + +
+

Return Value

+

An autoreleased RKDotNetDateFormatter object

+
+ + + + + +
+

Discussion

+

Instantiates an autoreleased RKDotNetDateFormatter object with the timezone set to the given value. The default time zone is UTC.

+ +

The supplied timeZone, such as one produced with [NSTimeZone timeZoneWithName:@"UTC"], +is only used during calls to stringFromDate:, for a detailed explanation seedateFromString:`

+
+ + + + + + + +
+

Declared In

+ RKDotNetDateFormatter.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

dateFromString:

+ + + +
+

Returns an NSDate object from an ASP.NET style date string respresentation, as seen in JSON.

+
+ + + +
- (NSDate *)dateFromString:(NSString *)string
+ + + +
+

Parameters

+ +
+
string
+

The ASP.NET style string, /Date(1112715000000-0500)/

+
+ +
+ + + +
+

Return Value

+

An NSDate object.

+
+ + + + + +
+

Discussion

+

Returns an NSDate object from an ASP.NET style date string respresentation, as seen in JSON.

+ +

Acceptable examples are:

+ +
/Date(1112715000000-0500)/
+/Date(1112715000000)/
+/Date(-1112715000000)/
+
+ +

Where 1112715000000 is the number of milliseconds since January 1, 1970 00:00 GMT/UTC, and -0500 represents the timezone offset from GMT in 24-hour time. Negatives milliseconds are treated as dates before January 1, 1970.

+ +

NOTE NSDate objects do not have timezones, and you should never change an actual date value based on a timezone offset. However, timezones are important when presenting dates to the user. Therefore, If an offset is present in the ASP.NET string (it should be), we actually ignore the offset portion because we want to store the actual date value in its raw form, without any pollution of timezone information. If, on the other hand, there is no offset in the ASP.NET string, we assume GMT (+0000) anyway. In summation, for this class setTimeZone: is ignored except when using stringFromDate:

+
+ + + + + + + +
+

Declared In

+ RKDotNetDateFormatter.h
+
+ + +
+ +
+ +

stringFromDate:

+ + + +
+

Returns an ASP.NET style date string from an NSDate, such as /Date(1112715000000+0000)/ Where 1112715000000 is the number of milliseconds since January 1, 1970 00:00 GMT/UTC, and +0000 is the timezone offset from GMT in 24-hour time.

+
+ + + +
- (NSString *)stringFromDate:(NSDate *)date
+ + + +
+

Parameters

+ +
+
date
+

An NSDate object from which to return a string value.

+
+ +
+ + + +
+

Return Value

+

The ASP.NET style string, /Date(1112715000000-0500)/

+
+ + + + + +
+

Discussion

+

Returns an ASP.NET style date string from an NSDate, such as /Date(1112715000000+0000)/ Where 1112715000000 is the number of milliseconds since January 1, 1970 00:00 GMT/UTC, and +0000 is the timezone offset from GMT in 24-hour time.

+ +

NOTE GMT (+0000) is assumed otherwise specified via setTimeZone:

+
+ + + + + + + +
+

Declared In

+ RKDotNetDateFormatter.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKDynamicMapping.html b/Pods/Documentation/RestKit/html/Classes/RKDynamicMapping.html new file mode 100644 index 00000000..d520b403 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKDynamicMapping.html @@ -0,0 +1,548 @@ + + + + + RKDynamicMapping Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromRKMapping : NSObject
Declared inRKDynamicMapping.h
+ + + + +
+ +

Overview

+

Defines a dynamic object mapping that determines the appropriate concrete object mapping to apply at mapping time. This allows you to map very similar payloads differently depending on the type of data contained therein.

+
+ + + + + +
+ +

Tasks

+ + + +

Configuring Mapping Selection

+ + + + + +

Retrieving the Object Mapping for an Object Representation

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

objectMappings

+ + + +
+

Returns an array of object mappings that have been registered with the receiver.

+
+ + + +
@property (nonatomic, readonly) NSArray *objectMappings
+ + + + + +
+

Return Value

+

An array of RKObjectMapping objects registered with the receiver.

+
+ + + + + +
+

Discussion

+

Returns an array of object mappings that have been registered with the receiver.

+
+ + + + + + + +
+

Declared In

+ RKDynamicMapping.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

objectMappingForRepresentation:

+ + + +
+

Invoked by the RKMapperOperation and RKMappingOperation to determine the appropriate RKObjectMapping to use when mapping the given object representation.

+
+ + + +
- (RKObjectMapping *)objectMappingForRepresentation:(id)representation
+ + + +
+

Parameters

+ +
+
representation
+

The object representation that being mapped dynamically for which to determine the appropriate concrete mapping.

+
+ +
+ + + +
+

Return Value

+

The object mapping to be used to map the given object representation.

+
+ + + + + +
+

Discussion

+

Invoked by the RKMapperOperation and RKMappingOperation to determine the appropriate RKObjectMapping to use when mapping the given object representation.

+
+ + + + + + + +
+

Declared In

+ RKDynamicMapping.h
+
+ + +
+ +
+ +

setObjectMapping:whenValueOfKeyPath:isEqualTo:

+ + + +
+

Defines a dynamic mapping rule stating that when the value of the key property matches the specified value, the given mapping should be used to map the representation.

+
+ + + +
- (void)setObjectMapping:(RKObjectMapping *)objectMapping whenValueOfKeyPath:(NSString *)keyPath isEqualTo:(id)value
+ + + +
+

Parameters

+ +
+
objectMapping
+

The mapping to be used when the value at the given key path is equal to the given value.

+
+ +
+
keyPath
+

The key path to retrieve the comparison value from in the object representation being mapped.

+
+ +
+
value
+

The value to be compared with the value at keyPath. If they are equal, the objectMapping will be used to map the representation.

+
+ +
+ + + + + + + +
+

Discussion

+

Defines a dynamic mapping rule stating that when the value of the key property matches the specified value, the given mapping should be used to map the representation.

+ +

For example, suppose that we have a JSON fragment for a person that we want to map differently based on the gender of the person. When the gender is ‘male’, we want to use the Boy class and when then the gender is ‘female’ we want to use the Girl class. We might define our dynamic mapping like so:

+ +
RKDynamicMapping *mapping = [RKDynamicMapping new];
+[mapping setObjectMapping:boyMapping whenValueOfKeyPath:@"gender" isEqualTo:@"male"];
+[mapping setObjectMapping:boyMapping whenValueOfKeyPath:@"gender" isEqualTo:@"female"];
+
+
+ + + + + + + +
+

Declared In

+ RKDynamicMapping.h
+
+ + +
+ +
+ +

setObjectMappingForRepresentationBlock:

+ + + +
+

Sets a block to be invoked to determine the appropriate concrete object mapping with which to map an object representation.

+
+ + + +
- (void)setObjectMappingForRepresentationBlock:(RKDynamicMappingDelegateBlock)block
+ + + +
+

Parameters

+ +
+
block
+

The block object to invoke to select the object mapping with which to map the given object representation.

+
+ +
+ + + + + + + +
+

Discussion

+

Sets a block to be invoked to determine the appropriate concrete object mapping with which to map an object representation.

+
+ + + + + + + +
+

Declared In

+ RKDynamicMapping.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKDynamicMappingMatcher.html b/Pods/Documentation/RestKit/html/Classes/RKDynamicMappingMatcher.html new file mode 100644 index 00000000..3c890e94 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKDynamicMappingMatcher.html @@ -0,0 +1,585 @@ + + + + + RKDynamicMappingMatcher Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKDynamicMappingMatcher.h
+ + + + +
+ +

Overview

+

The RKDynamicMappingMatcher class provides an interface for encapsulating the selection of an object mapping based on the runtime value of a property at a given key path. A matcher object is initialized with a key path, an expected value to be read from the key path, and an object mapping that is to be applied if the match evaluates to YES. When evaluating the match, the matcher invokes valueForKeyPath: on the object being matched and compares the value returned with the expectedValue via the RKObjectIsEqualToObject function.

+
+ + + + + +
+ +

Tasks

+ + + +

Initializing a Matcher

+ + + + + +

Evaluating a Match

+ +
    +
  • + + – matches: +

    Returns a Boolean value that indicates if the given object matches the expectations of the receiver.

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

expectedValue

+ + + +
+

The value that is expected to be read from keyPath if there is a match.

+
+ + + +
@property (nonatomic, strong, readonly) id expectedValue
+ + + + + + + + + +
+

Discussion

+

The value that is expected to be read from keyPath if there is a match.

+
+ + + + + + + +
+

Declared In

+ RKDynamicMappingMatcher.h
+
+ + +
+ +
+ +

keyPath

+ + + +
+

The key path to obtain the comparison value from the object being matched via valueForKeyPath:.

+
+ + + +
@property (nonatomic, copy, readonly) NSString *keyPath
+ + + + + + + + + +
+

Discussion

+

The key path to obtain the comparison value from the object being matched via valueForKeyPath:.

+
+ + + + + + + +
+

Declared In

+ RKDynamicMappingMatcher.h
+
+ + +
+ +
+ +

objectMapping

+ + + +
+

The object mapping object that applies if the comparison value read from keyPath is equal to the expectedValue.

+
+ + + +
@property (nonatomic, strong, readonly) RKObjectMapping *objectMapping
+ + + + + + + + + +
+

Discussion

+

The object mapping object that applies if the comparison value read from keyPath is equal to the expectedValue.

+
+ + + + + + + +
+

Declared In

+ RKDynamicMappingMatcher.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

initWithKeyPath:expectedValue:objectMapping:

+ + + +
+

Initializes the receiver with a given key path, expected value, and an object mapping that applies in the event of a positive match.

+
+ + + +
- (id)initWithKeyPath:(NSString *)keyPath expectedValue:(id)expectedValue objectMapping:(RKObjectMapping *)objectMapping
+ + + +
+

Parameters

+ +
+
keyPath
+

The key path to obtain the comparison value from the object being matched via valueForKeyPath:.

+
+ +
+
expectedValue
+

The value that is expected to be read from keyPath if there is a match.

+
+ +
+
objectMapping
+

The object mapping object that applies if the comparison value is equal to the expected value.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given key path, expected value, and object mapping.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a given key path, expected value, and an object mapping that applies in the event of a positive match.

+
+ + + + + + + +
+

Declared In

+ RKDynamicMappingMatcher.h
+
+ + +
+ +
+ +

matches:

+ + + +
+

Returns a Boolean value that indicates if the given object matches the expectations of the receiver.

+
+ + + +
- (BOOL)matches:(id)object
+ + + +
+

Parameters

+ +
+
object
+

The object to be evaluated.

+
+ +
+ + + +
+

Return Value

+

YES if the object matches the expectations of the receiver, else NO.

+
+ + + + + +
+

Discussion

+

Returns a Boolean value that indicates if the given object matches the expectations of the receiver.

+ +

The match is evaluated by invoking valueForKeyPath: on the give object with the value of the keyPath property and comparing the returned value with the expectedValue using the RKObjectIsEqualToObject function.

+
+ + + + + + + +
+

Declared In

+ RKDynamicMappingMatcher.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKEntityByAttributeCache.html b/Pods/Documentation/RestKit/html/Classes/RKEntityByAttributeCache.html new file mode 100644 index 00000000..7a0034e7 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKEntityByAttributeCache.html @@ -0,0 +1,1373 @@ + + + + + RKEntityByAttributeCache Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKEntityByAttributeCache.h
+ + + + +
+ +

Overview

+

The RKEntityByAttributeCache class provides an in-memory caching mechanism for managed objects instances of an entity in a managed object context with the value of one of the object’s attributes acting as the cache key. When loaded, the cache will retrieve all instances of an entity from the store and build a dictionary mapping values for the given cache key attribute to the managed object ID for all objects matching the value. The cache can then be used to quickly retrieve objects by attribute value for the cache key without executing another fetch request against the managed object context. This can provide a large performance improvement when a large number of objects are being retrieved using a particular attribute as the key.

+ +

RKEntityByAttributeCache instances are used by the RKEntityCache to provide caching for multiple entities at once.

Bug: Please note that the RKEntityByAttribute cache is implemented using a NSFetchRequest with a result type of NSDictionaryResultType. This means that the cache cannot load pending object instances via a fetch from the load method. Pending objects must be manually added to the cache via addObject: if it is desirable for the pending objects to be retrieved by subsequent invocations of objectWithAttributeValue:inContext: and objectsWithAttributeValue:inContext: prior to a save.

+ +

This is a limitation imposed by Core Data. The dictionary result type implementation is leveraged instead a normal fetch request because it offers very large performance and memory utilization improvements by avoiding construction of managed object instances and faulting.

+
+ + + + + +
+ +

Tasks

+ + + +

Creating a Cache

+ + + + + +

Getting Cache Identity

+ +
    +
  • + +   entity +

    The Core Data entity description for the managed objects being cached.

    +
    + property + +
  • + +   attribute +

    An attribute that is part of the cached entity that acts as the cache key.

    +
    + property + +
  • + +   managedObjectContext +

    The managed object context the receiver fetches cached objects from.

    +
    + property + +
  • + +   monitorsContextForChanges +

    A Boolean value determining if the receiever monitors the managed object context +for changes and updates the cache entries using the notifications emitted.

    +
    + property + +
  • +
+ + + +

Loading and Flushing the Cache

+ +
    +
  • + + – load +

    Loads the cache by finding all instances of the configured entity and building +an association between the value of the cached attribute’s value and the +managed object ID for the object.

    +
    + + +
  • + + – flush +

    Flushes the cache by releasing all cache attribute value to managed object ID +associations.

    +
    + + +
  • +
+ + + +

Inspecting Cache State

+ + + + + +

Managing Cached Objects

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

attribute

+ + + +
+

An attribute that is part of the cached entity that acts as the cache key.

+
+ + + +
@property (nonatomic, readonly) NSString *attribute
+ + + + + + + + + +
+

Discussion

+

An attribute that is part of the cached entity that acts as the cache key.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

entity

+ + + +
+

The Core Data entity description for the managed objects being cached.

+
+ + + +
@property (nonatomic, readonly) NSEntityDescription *entity
+ + + + + + + + + +
+

Discussion

+

The Core Data entity description for the managed objects being cached.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

managedObjectContext

+ + + +
+

The managed object context the receiver fetches cached objects from.

+
+ + + +
@property (nonatomic, readonly) NSManagedObjectContext *managedObjectContext
+ + + + + + + + + +
+

Discussion

+

The managed object context the receiver fetches cached objects from.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

monitorsContextForChanges

+ + + +
+

A Boolean value determining if the receiever monitors the managed object context +for changes and updates the cache entries using the notifications emitted.

+
+ + + +
@property (nonatomic, assign) BOOL monitorsContextForChanges
+ + + + + + + + + +
+

Discussion

+

A Boolean value determining if the receiever monitors the managed object context +for changes and updates the cache entries using the notifications emitted.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

addObject:

+ + + +
+

Adds a managed object to the cache.

+
+ + + +
- (void)addObject:(NSManagedObject *)object
+ + + +
+

Parameters

+ +
+
object
+

The managed object to add to the cache.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds a managed object to the cache.

+ +

The object must be an instance of the cached entity.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

containsObject:

+ + + +
+

Returns a Boolean value that indicates whether a given object is present +in the cache.

+
+ + + +
- (BOOL)containsObject:(NSManagedObject *)object
+ + + +
+

Parameters

+ +
+
object
+

An object.

+
+ +
+ + + +
+

Return Value

+

YES if object is present in the cache, otherwise NO.

+
+ + + + + +
+

Discussion

+

Returns a Boolean value that indicates whether a given object is present +in the cache.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

containsObjectWithAttributeValue:

+ + + +
+

Returns a Boolean value that indicates whether one of more objects is present +in the cache with a given value of the cache key attribute.

+
+ + + +
- (BOOL)containsObjectWithAttributeValue:(id)attributeValue
+ + + +
+

Parameters

+ +
+
attributeValue
+

The value with which to check the cache for objects with a matching value.

+
+ +
+ + + +
+

Return Value

+

YES if one or more objects with the given value for the cache key attribute is present in the cache, otherwise NO.

+
+ + + + + +
+

Discussion

+

Returns a Boolean value that indicates whether one of more objects is present +in the cache with a given value of the cache key attribute.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

count

+ + + +
+

Returns a count of the total number of cached objects.

+
+ + + +
- (NSUInteger)count
+ + + + + + + + + +
+

Discussion

+

Returns a count of the total number of cached objects.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

countOfAttributeValues

+ + + +
+

Returns the number of unique attribute values contained within the receiver.

+
+ + + +
- (NSUInteger)countOfAttributeValues
+ + + + + +
+

Return Value

+

The number of unique attribute values within the receiver.

+
+ + + + + +
+

Discussion

+

Returns the number of unique attribute values contained within the receiver.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

countWithAttributeValue:

+ + + +
+

Returns the total number of cached objects with a given value for the attribute acting as the cache key.

+
+ + + +
- (NSUInteger)countWithAttributeValue:(id)attributeValue
+ + + +
+

Parameters

+ +
+
attributeValue
+

The value for the cache key attribute to retrieve

+ +
a count of the objects with a matching value.
+
+
+ +
+ + + +
+

Return Value

+

The number of objects in the cache with the given value for the cache

+ +
attribute of the receiver.
+
+
+ + + + + +
+

Discussion

+

Returns the total number of cached objects with a given value for the attribute acting as the cache key.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

flush

+ + + +
+

Flushes the cache by releasing all cache attribute value to managed object ID +associations.

+
+ + + +
- (void)flush
+ + + + + + + + + +
+

Discussion

+

Flushes the cache by releasing all cache attribute value to managed object ID +associations.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

initWithEntity:attribute:managedObjectContext:

+ + + +
+

Initializes the receiver with a given entity, attribute, and managed object context.

+
+ + + +
- (id)initWithEntity:(NSEntityDescription *)entity attribute:(NSString *)attributeName managedObjectContext:(NSManagedObjectContext *)context
+ + + +
+

Parameters

+ +
+
entity
+

The Core Data entity description for the managed objects being cached.

+
+ +
+
attributeName
+

The name of an attribute within the cached entity that acts as the cache key.

+
+ +
+
context
+

The managed object context the cache retrieves the cached

+ +
objects from
+
+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given entity, attribute, and managed object

+ +
context.
+
+
+ + + + + +
+

Discussion

+

Initializes the receiver with a given entity, attribute, and managed object context.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

isLoaded

+ + + +
+

A Boolean value indicating if the cache has loaded associations between cache attribute values and managed object ID’s.

+
+ + + +
- (BOOL)isLoaded
+ + + + + + + + + +
+

Discussion

+

A Boolean value indicating if the cache has loaded associations between cache attribute values and managed object ID’s.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

load

+ + + +
+

Loads the cache by finding all instances of the configured entity and building +an association between the value of the cached attribute’s value and the +managed object ID for the object.

+
+ + + +
- (void)load
+ + + + + + + + + +
+

Discussion

+

Loads the cache by finding all instances of the configured entity and building +an association between the value of the cached attribute’s value and the +managed object ID for the object.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

objectWithAttributeValue:inContext:

+ + + +
+

Returns the first object with a matching value for the cache key attribute +in a given managed object context.

+
+ + + +
- (NSManagedObject *)objectWithAttributeValue:(id)attributeValue inContext:(NSManagedObjectContext *)context
+ + + +
+

Parameters

+ +
+
attributeValue
+

A value for the cache key attribute.

+
+ +
+
context
+

The managed object context to retrieve the object from.

+
+ +
+ + + +
+

Return Value

+

An object with the value of attribute matching attributeValue or nil.

+
+ + + + + +
+

Discussion

+

Returns the first object with a matching value for the cache key attribute +in a given managed object context.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

objectsWithAttributeValue:inContext:

+ + + +
+

Returns the collection of objects with a matching value for the cache key attribute in a given managed object context.

+
+ + + +
- (NSArray *)objectsWithAttributeValue:(id)attributeValue inContext:(NSManagedObjectContext *)context
+ + + +
+

Parameters

+ +
+
attributeValue
+

A value for the cache key attribute.

+
+ +
+
context
+

The managed object context to retrieve the objects from.

+
+ +
+ + + +
+

Return Value

+

An array of objects with the value of attribute matching attributeValue or an empty array.

+
+ + + + + +
+

Discussion

+

Returns the collection of objects with a matching value for the cache key attribute in a given managed object context.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ +

removeObject:

+ + + +
+

Removes a managed object from the cache.

+
+ + + +
- (void)removeObject:(NSManagedObject *)object
+ + + +
+

Parameters

+ +
+
object
+

The managed object to remove from the cache.

+
+ +
+ + + + + + + +
+

Discussion

+

Removes a managed object from the cache.

+ +

The object must be an instance of the cached entity.

+
+ + + + + + + +
+

Declared In

+ RKEntityByAttributeCache.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKEntityCache.html b/Pods/Documentation/RestKit/html/Classes/RKEntityCache.html new file mode 100644 index 00000000..1f30bc41 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKEntityCache.html @@ -0,0 +1,1046 @@ + + + + + RKEntityCache Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKEntityCache.h
+ + + + +
+ +

Overview

+

Instances of RKInMemoryEntityCache provide an in-memory caching mechanism for +objects in a Core Data managed object context. Managed objects can be cached by +attribute for fast retrieval without repeatedly hitting the Core Data persistent store. +This can provide a substantial speed advantage over issuing fetch requests +in cases where repeated look-ups of the same data are performed using a small set +of attributes as the query key. Internally, the cache entries are maintained as +references to the NSManagedObjectID of corresponding cached objects.

+
+ + + + + +
+ +

Tasks

+ + + +

Initializing the Cache

+ + + + + +

Caching Objects by Attribute

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

managedObjectContext

+ + + +
+

The managed object context with which the receiver is associated.

+
+ + + +
@property (nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext
+ + + + + + + + + +
+

Discussion

+

The managed object context with which the receiver is associated.

+
+ + + + + + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

addObject:

+ + + +
+

Adds a given object to all entity attribute caches for the object’s entity contained +within the receiver.

+
+ + + +
- (void)addObject:(NSManagedObject *)object
+ + + +
+

Parameters

+ +
+
object
+

The object to add to the appropriate entity attribute caches.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds a given object to all entity attribute caches for the object’s entity contained +within the receiver.

+
+ + + + + + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ +

attributeCacheForEntity:attribute:

+ + + +
+

Retrieves the underlying entity attribute cache for a given entity and attribute.

+
+ + + +
- (RKEntityByAttributeCache *)attributeCacheForEntity:(NSEntityDescription *)entity attribute:(NSString *)attributeName
+ + + +
+

Parameters

+ +
+
entity
+

The entity to retrieve the entity attribute cache object for.

+
+ +
+
attributeName
+

The attribute to retrieve the entity attribute cache object for.

+
+ +
+ + + +
+

Return Value

+

The entity attribute cache for the given entity and attribute, or nil if none was found.

+
+ + + + + +
+

Discussion

+

Retrieves the underlying entity attribute cache for a given entity and attribute.

+
+ + + + + + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ +

attributeCachesForEntity:

+ + + +
+

Retrieves all entity attributes caches for a given entity.

+
+ + + +
- (NSArray *)attributeCachesForEntity:(NSEntityDescription *)entity
+ + + +
+

Parameters

+ +
+
entity
+

The entity to retrieve the collection of entity attribute caches for.

+
+ +
+ + + +
+

Return Value

+

An array of entity attribute cache objects for the given entity or an empty array if none were found.

+
+ + + + + +
+

Discussion

+

Retrieves all entity attributes caches for a given entity.

+
+ + + + + + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ +

cacheObjectsForEntity:byAttribute:

+ + + +
+

Caches all instances of an entity using the value for an attribute as the cache key.

+
+ + + +
- (void)cacheObjectsForEntity:(NSEntityDescription *)entity byAttribute:(NSString *)attributeName
+ + + +
+

Parameters

+ +
+
entity
+

The entity to cache all instances of.

+
+ +
+
attributeName
+

The attribute to cache the instances by.

+
+ +
+ + + + + + + +
+

Discussion

+

Caches all instances of an entity using the value for an attribute as the cache key.

+
+ + + + + + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ +

flush

+ + + +
+

Flushes the entity cache by sending a flush message to each entity attribute cache +contained within the receiver.

+
+ + + +
- (void)flush
+ + + + + + + + + +
+

Discussion

+

Flushes the entity cache by sending a flush message to each entity attribute cache +contained within the receiver.

+
+ + + + + +
+

See Also

+ +
+ + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ +

initWithManagedObjectContext:

+ + + +
+

Initializes the receiver with a managed object context containing the entity instances to be cached.

+
+ + + +
- (id)initWithManagedObjectContext:(NSManagedObjectContext *)context
+ + + +
+

Parameters

+ +
+
context
+

The managed object context containing objects to be cached.

+
+ +
+ + + +
+

Return Value

+

self, initialized with context.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a managed object context containing the entity instances to be cached.

+
+ + + + + + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ +

isEntity:cachedByAttribute:

+ + + +
+

Returns a Boolean value indicating if all instances of an entity have been cached by a given attribute name.

+
+ + + +
- (BOOL)isEntity:(NSEntityDescription *)entity cachedByAttribute:(NSString *)attributeName
+ + + +
+

Parameters

+ +
+
entity
+

The entity to check the cache status of.

+
+ +
+
attributeName
+

The attribute to check the cache status with.

+
+ +
+ + + +
+

Return Value

+

YES if the cache has been loaded with instances with the given attribute, else NO.

+
+ + + + + +
+

Discussion

+

Returns a Boolean value indicating if all instances of an entity have been cached by a given attribute name.

+
+ + + + + + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ +

objectForEntity:withAttribute:value:inContext:

+ + + +
+

Retrieves the first cached instance of a given entity where the specified attribute matches the given value.

+
+ + + +
- (NSManagedObject *)objectForEntity:(NSEntityDescription *)entity withAttribute:(NSString *)attributeName value:(id)attributeValue inContext:(NSManagedObjectContext *)context
+ + + +
+

Parameters

+ +
+
entity
+

The entity to search the cache for instances of.

+
+ +
+
attributeName
+

The attribute to search the cache for matches with.

+
+ +
+
attributeValue
+

The value of the attribute to return a match for.

+
+ +
+
context
+

The managed object from which to retrieve the cached results.

+
+ +
+ + + +
+

Return Value

+

A matching managed object instance or nil. +@raise NSInvalidArgumentException Raised if instances of the entity and attribute have not been cached.

+
+ + + + + +
+

Discussion

+

Retrieves the first cached instance of a given entity where the specified attribute matches the given value.

+
+ + + + + + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ +

objectsForEntity:withAttribute:value:inContext:

+ + + +
+

Retrieves all cached instances of a given entity where the specified attribute matches the given value.

+
+ + + +
- (NSArray *)objectsForEntity:(NSEntityDescription *)entity withAttribute:(NSString *)attributeName value:(id)attributeValue inContext:(NSManagedObjectContext *)context
+ + + +
+

Parameters

+ +
+
entity
+

The entity to search the cache for instances of.

+
+ +
+
attributeName
+

The attribute to search the cache for matches with.

+
+ +
+
attributeValue
+

The value of the attribute to return a match for.

+
+ +
+
context
+

The managed object from which to retrieve the cached results.

+
+ +
+ + + +
+

Return Value

+

All matching managed object instances or nil. +@raise NSInvalidArgumentException Raised if instances of the entity and attribute have not been cached.

+
+ + + + + +
+

Discussion

+

Retrieves all cached instances of a given entity where the specified attribute matches the given value.

+
+ + + + + + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ +

removeObject:

+ + + +
+

Removed a given object from all entity attribute caches for the object’s entity contained +within the receiver.

+
+ + + +
- (void)removeObject:(NSManagedObject *)object
+ + + +
+

Parameters

+ +
+
object
+

The object to remove from the appropriate entity attribute caches.

+
+ +
+ + + + + + + +
+

Discussion

+

Removed a given object from all entity attribute caches for the object’s entity contained +within the receiver.

+
+ + + + + + + +
+

Declared In

+ RKEntityCache.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKEntityMapping.html b/Pods/Documentation/RestKit/html/Classes/RKEntityMapping.html new file mode 100644 index 00000000..8388956e --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKEntityMapping.html @@ -0,0 +1,829 @@ + + + + + RKEntityMapping Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromRKObjectMapping : RKMapping : NSObject
Declared inRKEntityMapping.h
+ + + + +
+ +

Overview

+

RKEntityMapping objects model an object mapping with a Core Data destination entity.

+
+ + + + + +
+ +

Tasks

+ + + + +

Initializing an Entity Mapping

+ + +
+ + + + + +
+ +

Properties

+ +
+ +

connectionMappings

+ + + +
+

Retrieves an array of RKConnectionMapping objects for connecting the receiver’s relationships +by primary key.

+
+ + + +
@property (weak, nonatomic, readonly) NSArray *connectionMappings
+ + + + + + + + + +
+

Discussion

+

Retrieves an array of RKConnectionMapping objects for connecting the receiver’s relationships +by primary key.

+
+ + + + + + + +
+

Declared In

+ RKEntityMapping.h
+
+ + +
+ +
+ +

entity

+ + + +
+

The Core Data entity description used for this object mapping

+
+ + + +
@property (nonatomic, strong) NSEntityDescription *entity
+ + + + + + + + + +
+

Discussion

+

The Core Data entity description used for this object mapping

+
+ + + + + + + +
+

Declared In

+ RKEntityMapping.h
+
+ + +
+ +
+ +

primaryKeyAttribute

+ + + +
+

The name of the attribute on the destination entity that acts as the primary key for instances +of the entity in the remote backend system. Used to uniquely identify objects within the store +so that existing objects are updated rather than creating new ones.

+
+ + + +
@property (nonatomic, strong) NSString *primaryKeyAttribute
+ + + + + + + + + +
+

Discussion

+

The name of the attribute on the destination entity that acts as the primary key for instances +of the entity in the remote backend system. Used to uniquely identify objects within the store +so that existing objects are updated rather than creating new ones.

Warning: Note that primaryKeyAttribute defaults to the primaryKeyAttribute configured +on the NSEntityDescription for the entity targetted by the receiving mapping. This provides +flexibility in cases where a single entity is the target of many mappings with differing +primary key definitions.

+ +

If the primaryKeyAttribute is set on an RKEntityMapping that targets an entity with a +nil primaryKeyAttribute, then the primaryKeyAttribute will be set on the entity as well for +convenience and backwards compatibility. This may change in the future.

+
+ + + + + + + +
+

Declared In

+ RKEntityMapping.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

mappingForEntityForName:inManagedObjectStore:

+ + + +
+

A convenience initializer that creates and returns an entity mapping for the entity with the given name in +the managed object model of the given managed object store.

+
+ + + +
+ (id)mappingForEntityForName:(NSString *)entityName inManagedObjectStore:(RKManagedObjectStore *)managedObjectStore
+ + + +
+

Parameters

+ +
+
entityName
+

The name of the entity in the managed object model for which an entity mapping is to be created.

+
+ +
+
managedObjectStore
+

A managed object store containing the managed object model in which an entity with the given name is defined.

+
+ +
+ + + +
+

Return Value

+

A new entity mapping for the entity with the given name in the managed object model of the given managed object store.

+
+ + + + + +
+

Discussion

+

A convenience initializer that creates and returns an entity mapping for the entity with the given name in +the managed object model of the given managed object store.

+ +

This method is functionally equivalent to the following example code:

+ +
 NSEntityDescription *entity = [[managedObjectStore.managedObjectModel entitiesByName] objectForKey:entityName];
+ return [RKEntityMapping mappingForEntity:entity];
+
+
+ + + + + + + +
+

Declared In

+ RKEntityMapping.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

addConnectionMapping:

+ + + +
+

Adds a connection mapping to the receiver.

+
+ + + +
- (void)addConnectionMapping:(RKConnectionMapping *)connectionMapping
+ + + +
+

Parameters

+ +
+
connectionMapping
+

The connection mapping to be added.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds a connection mapping to the receiver.

+
+ + + + + + + +
+

Declared In

+ RKEntityMapping.h
+
+ + +
+ +
+ +

addConnectionMappingForRelationshipForName:fromSourceKeyPath:toKeyPath:matcher:

+ + + +
- (RKConnectionMapping *)addConnectionMappingForRelationshipForName:(NSString *)relationshipName fromSourceKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath matcher:(RKDynamicMappingMatcher *)matcher
+ + +
+ +
+ +

addConnectionMappingsFromArray:

+ + + +
- (void)addConnectionMappingsFromArray:(NSArray *)arrayOfConnectionMappings
+ + +
+ +
+ +

defaultValueForMissingAttribute:

+ + + +
+

Returns the default value for the specified attribute as expressed in the Core Data entity definition. This value will +be assigned if the object mapping is applied and a value for a missing attribute is not present in the payload.

+
+ + + +
- (id)defaultValueForMissingAttribute:(NSString *)attributeName
+ + + + + + + + + +
+

Discussion

+

Returns the default value for the specified attribute as expressed in the Core Data entity definition. This value will +be assigned if the object mapping is applied and a value for a missing attribute is not present in the payload.

+
+ + + + + + + +
+

Declared In

+ RKEntityMapping.h
+
+ + +
+ +
+ +

initWithEntity:

+ + + +
+

Initializes the receiver with a given entity.

+
+ + + +
- (id)initWithEntity:(NSEntityDescription *)entity
+ + + +
+

Parameters

+ +
+
entity
+

An entity with which to initialize the receiver.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given entity.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a given entity.

+
+ + + + + + + +
+

Declared In

+ RKEntityMapping.h
+
+ + +
+ +
+ +

removeConnectionMapping:

+ + + +
+

Removes a connection mapping from the receiver.

+
+ + + +
- (void)removeConnectionMapping:(RKConnectionMapping *)connectionMapping
+ + + +
+

Parameters

+ +
+
connectionMapping
+

The connection mapping to be added.

+
+ +
+ + + + + + + +
+

Discussion

+

Removes a connection mapping from the receiver.

+
+ + + + + + + +
+

Declared In

+ RKEntityMapping.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKErrorMessage.html b/Pods/Documentation/RestKit/html/Classes/RKErrorMessage.html new file mode 100644 index 00000000..fddf2f3e --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKErrorMessage.html @@ -0,0 +1,368 @@ + + + + + RKErrorMessage Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKErrorMessage.h
+ + + + +
+ +

Overview

+

The RKErrorMessage is a simple class used for representing error messages returned by a remote backend system with which the client application is communicating. Error messages are typically returned in a response body in the Client Error class (status code 4xx range).

+ +

Error Message Informal Protocol

+ +

The errorMessage property method is the sole method of an informal protocol that must be adopted by objects wishing to represent error messages within RestKit. This protocol is by the RKErrorFromMappingResult function when constructing NSError messages from a mapped response body.

+
+ + + + + +
+ +

Tasks

+ + + + +

Accessing Errror Information

+
    +
  • + +   errorMessage +

    The error message to be presented to the user.

    +
    + property + +
  • + +   userInfo +

    A dictionary of application specific information that accompanies the error message.

    +
    + property + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

errorMessage

+ + + +
+

The error message to be presented to the user.

+
+ + + +
@property (nonatomic, copy) NSString *errorMessage
+ + + + + + + + + +
+

Discussion

+

The error message to be presented to the user.

+
+ + + + + + + +
+

Declared In

+ RKErrorMessage.h
+
+ + +
+ +
+ +

userInfo

+ + + +
+

A dictionary of application specific information that accompanies the error message.

+
+ + + +
@property (nonatomic, copy) NSDictionary *userInfo
+ + + + + + + + + +
+

Discussion

+

A dictionary of application specific information that accompanies the error message.

+
+ + + + + + + +
+

Declared In

+ RKErrorMessage.h
+
+ + +
+ +
+ + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKFetchRequestManagedObjectCache.html b/Pods/Documentation/RestKit/html/Classes/RKFetchRequestManagedObjectCache.html new file mode 100644 index 00000000..12dc50fe --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKFetchRequestManagedObjectCache.html @@ -0,0 +1,231 @@ + + + + + RKFetchRequestManagedObjectCache Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + + + + +
Inherits fromNSObject
Conforms toRKManagedObjectCaching
Declared inRKFetchRequestManagedObjectCache.h
+ + + + +
+ +

Overview

+

Provides a simple managed object cache strategy in which every request for an object +is satisfied by dispatching an NSFetchRequest against the Core Data persistent store. +Performance can be disappointing for data sets with a large amount of redundant data +being mapped and connected together, but the memory footprint stays flat.

+
+ + + + + + + + + + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKHTTPRequestOperation.html b/Pods/Documentation/RestKit/html/Classes/RKHTTPRequestOperation.html new file mode 100644 index 00000000..1d4ba998 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKHTTPRequestOperation.html @@ -0,0 +1,424 @@ + + + + + RKHTTPRequestOperation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromAFHTTPRequestOperation
Declared inRKHTTPRequestOperation.h
+ + + + +
+ +

Overview

+

The RKHTTPRequestOperation class is a subclass of AFHTTPRequestOperation for HTTP or HTTPS requests made by RestKit. It provides per-instance configuration of the acceptable status codes and content types and integrates with the RKLog system to provide detailed requested and response logging. Instances of RKHTTPRequest are created by RKObjectRequestOperation and its subclasses to HTTP requests that will be object mapped. When used to make standalone HTTP requests, RKHTTPRequestOperation instance behave identically to AFHTTPRequestOperation with the exception of emitting logging information.

+
+ + + + + +
+ +

Tasks

+ + + + +

Configuring Acceptable Status Codes and Content Types

+
    +
  • + +   acceptableStatusCodes +

    The set of status codes which the operation considers successful.

    +
    + property + +
  • + +   acceptableContentTypes +

    The set of content types which the operation considers successful.

    +
    + property + +
  • + +   wasNotModified +

    Whether the response received a 304 response, whether via the initial request, or by virtue of cache revalidation occurring from NSURLCache.

    +
    + property + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

acceptableContentTypes

+ + + +
+

The set of content types which the operation considers successful.

+
+ + + +
@property (nonatomic, strong) NSSet *acceptableContentTypes
+ + + + + + + + + +
+

Discussion

+

The set of content types which the operation considers successful.

+ +

The set may contain NSString or NSRegularExpression objects. When nil, the acceptability of content types is deferred to the superclass implementation.

+ +

Default: nil

+
+ + + + + + + +
+

Declared In

+ RKHTTPRequestOperation.h
+
+ + +
+ +
+ +

acceptableStatusCodes

+ + + +
+

The set of status codes which the operation considers successful.

+
+ + + +
@property (nonatomic, strong) NSIndexSet *acceptableStatusCodes
+ + + + + + + + + +
+

Discussion

+

The set of status codes which the operation considers successful.

+ +

When nil, the acceptability of status codes is deferred to the superclass implementation.

+ +

Default: nil

+
+ + + + + + + +
+

Declared In

+ RKHTTPRequestOperation.h
+
+ + +
+ +
+ +

wasNotModified

+ + + +
+

Whether the response received a 304 response, whether via the initial request, or by virtue of cache revalidation occurring from NSURLCache.

+
+ + + +
@property (nonatomic, readonly) BOOL wasNotModified
+ + + + + + + + + +
+

Discussion

+

Whether the response received a 304 response, whether via the initial request, or by virtue of cache revalidation occurring from NSURLCache.

+
+ + + + + + + +
+

Declared In

+ RKHTTPRequestOperation.h
+
+ + +
+ +
+ + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKISO8601DateFormatter.html b/Pods/Documentation/RestKit/html/Classes/RKISO8601DateFormatter.html new file mode 100644 index 00000000..5ae60d16 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKISO8601DateFormatter.html @@ -0,0 +1,580 @@ + + + + + RKISO8601DateFormatter Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSFormatter
Declared inRKISO8601DateFormatter.h
+ + + + + + +
+ +

Tasks

+ + + + + + + +
+ + + + + +
+ +

Properties

+ +
+ +

defaultTimeZone

+ + + +
@property (nonatomic, retain) NSTimeZone *defaultTimeZone
+ + +
+ +
+ +

format

+ + + +
@property RKISO8601DateFormat format
+ + +
+ +
+ +

includeTime

+ + + +
@property BOOL includeTime
+ + +
+ +
+ +

parsesStrictly

+ + + +
@property BOOL parsesStrictly
+ + +
+ +
+ +

timeSeparator

+ + + +
@property unichar timeSeparator
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

purgeGlobalCaches

+ + + +
+ (void)purgeGlobalCaches
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

dateComponentsFromString:

+ + + +
- (NSDateComponents *)dateComponentsFromString:(NSString *)string
+ + +
+ +
+ +

dateComponentsFromString:timeZone:

+ + + +
- (NSDateComponents *)dateComponentsFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone
+ + +
+ +
+ +

dateComponentsFromString:timeZone:range:

+ + + +
- (NSDateComponents *)dateComponentsFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone range:(out NSRange *)outRange
+ + +
+ +
+ +

dateFromString:

+ + + +
- (NSDate *)dateFromString:(NSString *)string
+ + +
+ +
+ +

dateFromString:timeZone:

+ + + +
- (NSDate *)dateFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone
+ + +
+ +
+ +

dateFromString:timeZone:range:

+ + + +
- (NSDate *)dateFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone range:(out NSRange *)outRange
+ + +
+ +
+ +

stringFromDate:

+ + + +
- (NSString *)stringFromDate:(NSDate *)date
+ + +
+ +
+ +

stringFromDate:timeZone:

+ + + +
- (NSString *)stringFromDate:(NSDate *)date timeZone:(NSTimeZone *)timeZone
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKInMemoryManagedObjectCache.html b/Pods/Documentation/RestKit/html/Classes/RKInMemoryManagedObjectCache.html new file mode 100644 index 00000000..58fb09d2 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKInMemoryManagedObjectCache.html @@ -0,0 +1,330 @@ + + + + + RKInMemoryManagedObjectCache Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + + + + +
Inherits fromNSObject
Conforms toRKManagedObjectCaching
Declared inRKInMemoryManagedObjectCache.h
+ + + + +
+ +

Overview

+

Provides a fast managed object cache where-in object instances are retained in memory to avoid hitting the Core Data persistent store. Performance is greatly increased over fetch request based strategy at the expense of memory consumption.

+
+ + + + + +
+ +

Tasks

+ + + + +

Initializing a Cache

+
    +
  • + + – initWithManagedObjectContext: +

    Initializes the receiver with a managed object context that is to be observed and used to populate the in memory cache. The receiver may then be used to fulfill cache requests for child contexts of the given managed object context.

    +
    + + +
  • +
+ +
+ + + + + + + + + +
+ +

Instance Methods

+ +
+ +

initWithManagedObjectContext:

+ + + +
+

Initializes the receiver with a managed object context that is to be observed and used to populate the in memory cache. The receiver may then be used to fulfill cache requests for child contexts of the given managed object context.

+
+ + + +
- (id)initWithManagedObjectContext:(NSManagedObjectContext *)managedObjectContext
+ + + +
+

Parameters

+ +
+
managedObjectContext
+

The managed object context with which to initialize the receiver.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given managed object context.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a managed object context that is to be observed and used to populate the in memory cache. The receiver may then be used to fulfill cache requests for child contexts of the given managed object context.

+
+ + + + + + + +
+

Declared In

+ RKInMemoryManagedObjectCache.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKMIMETypeSerialization.html b/Pods/Documentation/RestKit/html/Classes/RKMIMETypeSerialization.html new file mode 100644 index 00000000..218074c6 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKMIMETypeSerialization.html @@ -0,0 +1,687 @@ + + + + + RKMIMETypeSerialization Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKMIMETypeSerialization.h
+ + + + +
+ +

Overview

+

The RKMIMETypeSerialization class provides support for the registration of classes conforming to the RKSerialization protocol by MIME Type and the serialization and deserialization of content by MIME Type. Serialization implementations may be registered by an exact string match (i.e. ‘application/json’ for a JSON serialization implementation) or by regular expression to match MIME Type by pattern.

+
+ + + + + +
+ +

Tasks

+ + + +

Managing MIME Type Registrations

+ +
    +
  • + + + registerClass:forMIMEType: +

    Registers the given serialization class to handle content for the given MIME Type identifier.

    +
    + + +
  • + + + unregisterClass: +

    Unregisters the given serialization class from handling any MIME Types.

    +
    + + +
  • + + + serializationClassForMIMEType: +

    Returns the serialization class registered to handle the given MIME Type.

    +
    + + +
  • + + + registeredMIMETypes +

    Returns a set containing the string values for all MIME Types for which a serialization implementation has been registered.

    +
    + + +
  • +
+ + + +

Serializing and Deserializing Content by MIME Type

+ +
    +
  • + + + objectFromData:MIMEType:error: +

    Deserializes and returns a Foundation object representation of the given UTF-8 encoded data in the serialization format for the given MIME Type.

    +
    + + +
  • + + + dataFromObject:MIMEType:error: +

    Serializes and returns a UTF-8 encoded data representation of the given Foundation object in the serialization format for the given MIME Type.

    +
    + + +
  • +
+ +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

dataFromObject:MIMEType:error:

+ + + +
+

Serializes and returns a UTF-8 encoded data representation of the given Foundation object in the serialization format for the given MIME Type.

+
+ + + +
+ (NSData *)dataFromObject:(id)object MIMEType:(NSString *)MIMEType error:(NSError **)error
+ + + +
+

Parameters

+ +
+
object
+

The Foundation object to serialized.

+
+ +
+
MIMEType
+

The MIME Type of the serialization format the data is in.

+
+ +
+
error
+

A pointer to an NSError object.

+
+ +
+ + + +
+

Return Value

+

A Foundation object from the serialized data in data, or nil if an error occurs.

+
+ + + + + +
+

Discussion

+

Serializes and returns a UTF-8 encoded data representation of the given Foundation object in the serialization format for the given MIME Type.

+ +

On invocation, searches the registrations by invoking serializationClassForMIMEType: with the given MIME Type and then invokes objectFromData:error: on the RKSerialization conformant class returned. If no serialization implementation is found to handle the given MIME Type, nil is returned and the given error pointer will be set to an NSError object with the RKMissingSerializationForMIMETypeError code.

+
+ + + + + + + +
+

Declared In

+ RKMIMETypeSerialization.h
+
+ + +
+ +
+ +

objectFromData:MIMEType:error:

+ + + +
+

Deserializes and returns a Foundation object representation of the given UTF-8 encoded data in the serialization format for the given MIME Type.

+
+ + + +
+ (id)objectFromData:(NSData *)data MIMEType:(NSString *)MIMEType error:(NSError **)error
+ + + +
+

Parameters

+ +
+
data
+

The UTF-8 encoded data representation of the object to be deserialized.

+
+ +
+
MIMEType
+

The MIME Type of the serialization format the data is in.

+
+ +
+
error
+

A pointer to an NSError object.

+
+ +
+ + + +
+

Return Value

+

A Foundation object from the serialized data in data, or nil if an error occurs.

+
+ + + + + +
+

Discussion

+

Deserializes and returns a Foundation object representation of the given UTF-8 encoded data in the serialization format for the given MIME Type.

+ +

On invocation, searches the registrations by invoking serializationClassForMIMEType: with the given MIME Type and then invokes objectFromData:error: on the RKSerialization conformant class returned. If no serialization implementation is found to handle the given MIME Type, nil is returned and the given error pointer will be set to an NSError object with the RKMissingSerializationForMIMETypeError code.

+
+ + + + + + + +
+

Declared In

+ RKMIMETypeSerialization.h
+
+ + +
+ +
+ +

registerClass:forMIMEType:

+ + + +
+

Registers the given serialization class to handle content for the given MIME Type identifier.

+
+ + + +
+ (void)registerClass:(Class<RKSerialization>)serializationClass forMIMEType:(id)MIMETypeStringOrRegularExpression
+ + + +
+

Parameters

+ +
+
serializationClass
+

The class conforming to the RKSerialization protocol to be registered as handling the given MIME Type.

+
+ +
+
MIMETypeStringOrRegularExpression
+

A string or regular expression specifying the MIME Type(s) that given serialization implementation is to be registered as handling.

+
+ +
+ + + + + + + +
+

Discussion

+

Registers the given serialization class to handle content for the given MIME Type identifier.

+ +

MIME Types may be given as either a string or as a regular expression that matches the MIME Types for which the given serialization should handle. Serializations are searched in the reverse order of their registration. If a registration is made for an already registered MIME Type, the new registration will take precedence.

+
+ + + + + + + +
+

Declared In

+ RKMIMETypeSerialization.h
+
+ + +
+ +
+ +

registeredMIMETypes

+ + + +
+

Returns a set containing the string values for all MIME Types for which a serialization implementation has been registered.

+
+ + + +
+ (NSSet *)registeredMIMETypes
+ + + + + +
+

Return Value

+

An NSSet object whose elements are NSString values enumerating the registered MIME Types.

+
+ + + + + +
+

Discussion

+

Returns a set containing the string values for all MIME Types for which a serialization implementation has been registered.

+
+ + + + + + + +
+

Declared In

+ RKMIMETypeSerialization.h
+
+ + +
+ +
+ +

serializationClassForMIMEType:

+ + + +
+

Returns the serialization class registered to handle the given MIME Type.

+
+ + + +
+ (Class<RKSerialization>)serializationClassForMIMEType:(NSString *)MIMEType
+ + + +
+

Parameters

+ +
+
MIMEType
+

The MIME Type for which to return the registered RKSerialization conformant class.

+
+ +
+ + + +
+

Return Value

+

A class conforming to the RKSerialization protocol registered for the given MIME Type or nil if none was found.

+
+ + + + + +
+

Discussion

+

Returns the serialization class registered to handle the given MIME Type.

+ +

Searches the registrations in reverse order for the first serialization implementation registered to handle the given MIME Type. Matches are determined by doing a lowercase string comparison if the MIME Type was registered with a string identifier or by evaluating a regular expression match against the given MIME Type if registered with a regular expression.

+
+ + + + + + + +
+

Declared In

+ RKMIMETypeSerialization.h
+
+ + +
+ +
+ +

unregisterClass:

+ + + +
+

Unregisters the given serialization class from handling any MIME Types.

+
+ + + +
+ (void)unregisterClass:(Class<RKSerialization>)serializationClass
+ + + +
+

Parameters

+ +
+
serializationClass
+

The class conforming to the RKSerialization protocol to be unregistered.

+
+ +
+ + + + + + + +
+

Discussion

+

Unregisters the given serialization class from handling any MIME Types.

+ +

After this method is invoked, invocations of serializationForMIMEType: will no longer return the unregistered serialization class.

+
+ + + + + + + +
+

Declared In

+ RKMIMETypeSerialization.h
+
+ + +
+ +
+ + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKManagedObjectImporter.html b/Pods/Documentation/RestKit/html/Classes/RKManagedObjectImporter.html new file mode 100644 index 00000000..f91f8e65 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKManagedObjectImporter.html @@ -0,0 +1,961 @@ + + + + + RKManagedObjectImporter Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKManagedObjectImporter.h
+ + + + +
+ +

Overview

+

Instances of RKManagedObjectImporter perform bulk imports of managed objects into a persistent store from +source files (typically in JSON or XML format) using object mappings. The importer provides functionality +for updating an existing persistent store or creating a seed database that can be used to bootstrap a new +persistent store with an initial data set.

+ +

The importer requires that the source files have a MIME type that is identifiable by file extension and be +parsable using a parser registered with the shared parser registry.

+
+ + + + + +
+ +

Tasks

+ + + +

Initializing an Importer

+ +
    +
  • + + – initWithManagedObjectModel:storePath: +

    Initializes the receiver with a given managed object model and a path at which a SQLite persistent store +should be created to persist imported managed objects.

    +
    + + +
  • + + – initWithPersistentStore: +

    Initializes the receiver with a given persistent store in which to persist imported managed objects.

    +
    + + +
  • + +   resetsStoreBeforeImporting +

    A Boolean value indicating whether existing managed objects in the persistent store should +be deleted before import.

    +
    + property + +
  • +
+ + + +

Accessing Core Data Details

+ +
    +
  • + +   persistentStore +

    The persistent store in which imported managed objects will be persisted.

    +
    + property + +
  • + +   managedObjectModel +

    The managed object model containing entities that may be imported by the receiver.

    +
    + property + +
  • + +   managedObjectContext +

    A managed object context with the NSPrivateQueueConcurrencyType concurrency type +used to perform the import.

    +
    + property + +
  • + +   storePath +

    A convenience accessor for retrieving the complete filesystem path to the persistent +store in which the receiver will persist imported managed objects.

    +
    + property + +
  • +
+ + + +

Importing Managed Objects

+ + + + + +

Obtaining Seeding Info

+ +
    +
  • + + – logSeedingInfo +

    Logs information about where on the filesystem to access the SQLite database for the persistent +store in which the imported managed objects were persisted.

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

managedObjectContext

+ + + +
+

A managed object context with the NSPrivateQueueConcurrencyType concurrency type +used to perform the import.

+
+ + + +
@property (nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext
+ + + + + + + + + +
+

Discussion

+

A managed object context with the NSPrivateQueueConcurrencyType concurrency type +used to perform the import.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectImporter.h
+
+ + +
+ +
+ +

managedObjectModel

+ + + +
+

The managed object model containing entities that may be imported by the receiver.

+
+ + + +
@property (nonatomic, strong, readonly) NSManagedObjectModel *managedObjectModel
+ + + + + + + + + +
+

Discussion

+

The managed object model containing entities that may be imported by the receiver.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectImporter.h
+
+ + +
+ +
+ +

persistentStore

+ + + +
+

The persistent store in which imported managed objects will be persisted.

+
+ + + +
@property (nonatomic, strong, readonly) NSPersistentStore *persistentStore
+ + + + + + + + + +
+

Discussion

+

The persistent store in which imported managed objects will be persisted.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectImporter.h
+
+ + +
+ +
+ +

resetsStoreBeforeImporting

+ + + +
+

A Boolean value indicating whether existing managed objects in the persistent store should +be deleted before import.

+
+ + + +
@property (nonatomic, assign) BOOL resetsStoreBeforeImporting
+ + + + + + + + + +
+

Discussion

+

A Boolean value indicating whether existing managed objects in the persistent store should +be deleted before import.

+ +

The default value of this property is YES if the receiver was initialized with a +managed object model and store path, else NO.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectImporter.h
+
+ + +
+ +
+ +

storePath

+ + + +
+

A convenience accessor for retrieving the complete filesystem path to the persistent +store in which the receiver will persist imported managed objects.

+
+ + + +
@property (nonatomic, strong, readonly) NSString *storePath
+ + + + + + + + + +
+

Discussion

+

A convenience accessor for retrieving the complete filesystem path to the persistent +store in which the receiver will persist imported managed objects.

+ +

Equivalent to executing the following example code:

+ +
NSURL *URL = [importer.persistentStore.persistentStoreCoordinator URLForPersistentStore:importer.persistentStore];
+return [URL path];
+
+
+ + + + + + + +
+

Declared In

+ RKManagedObjectImporter.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

finishImporting:

+ + + +
+

Finishes the import process by saving the managed object context to the persistent store, ensuring all +imported managed objects are written to disk.

+
+ + + +
- (BOOL)finishImporting:(NSError **)error
+ + + +
+

Parameters

+ +
+
error
+

On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing +the error information. You may specify nil for this parameter if you do not want the error information.

+
+ +
+ + + +
+

Return Value

+

YES if the save to the persistent store was successful, else NO.

+
+ + + + + +
+

Discussion

+

Finishes the import process by saving the managed object context to the persistent store, ensuring all +imported managed objects are written to disk.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectImporter.h
+
+ + +
+ +
+ +

importObjectsFromItemAtPath:withMapping:keyPath:error:

+ + + +
+

Imports managed objects from the file or directory at the given path.

+
+ + + +
- (NSUInteger)importObjectsFromItemAtPath:(NSString *)path withMapping:(RKMapping *)mapping keyPath:(NSString *)keyPath error:(NSError **)error
+ + + +
+

Parameters

+ +
+
path
+

The path to the file or directory you wish to import. This parameter must not be nil.

+
+ +
+
mapping
+

The entity or dynamic mapping you wish to use for importing content at the given path.

+
+ +
+
keyPath
+

An optional key path to be evaluated against the results of parsing the content read at the given path. If the

+ +
mappable content is not contained in a nesting attribute, the key path should be specified as nil.
+
+
+ +
+
error
+

On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing

+ +
the error information. You may specify nil for this parameter if you do not want the error information.
+
+
+ +
+ + + +
+

Return Value

+

A count of the number of managed object imported from the given path or NSNotFound if an error occurred during import.

+
+ + + + + +
+

Discussion

+

Imports managed objects from the file or directory at the given path.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectImporter.h
+
+ + +
+ +
+ +

initWithManagedObjectModel:storePath:

+ + + +
+

Initializes the receiver with a given managed object model and a path at which a SQLite persistent store +should be created to persist imported managed objects.

+
+ + + +
- (id)initWithManagedObjectModel:(NSManagedObjectModel *)managedObjectModel storePath:(NSString *)storePath
+ + + +
+

Parameters

+ +
+
managedObjectModel
+

A Core Data manage object model with which to initialize the receiver.

+
+ +
+
storePath
+

The path at which to create a SQLite persistent store to persist the imported managed objects.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given managed object model and a complete Core Data persistence

+ +
stack with a SQLite persistent store at the given store path.
+
+
+ + + + + +
+

Discussion

+

Initializes the receiver with a given managed object model and a path at which a SQLite persistent store +should be created to persist imported managed objects.

+ +

When initialized with a managed object model and store path, the receiver will construct an internal +persistent store coordinator, SQLite persistent store, and managed object context with the private queue +concurrency type with which to perform the importing.

Warning: As this initialization code path is typical for generating seed databases, the value of

+ +
`resetsStoreBeforeImporting` is initialized to **YES**.
+
+
+ + + + + + + +
+

Declared In

+ RKManagedObjectImporter.h
+
+ + +
+ +
+ +

initWithPersistentStore:

+ + + +
+

Initializes the receiver with a given persistent store in which to persist imported managed objects.

+
+ + + +
- (id)initWithPersistentStore:(NSPersistentStore *)persistentStore
+ + + +
+

Parameters

+ +
+
persistentStore
+

A Core Data persistent store with which to initialize the receiver.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given persistent store. The persistent store coordinator and

+ +
managed object model are determined from the given persistent store and a new managed object context with
+the private queue concurrency type is constructed.
+
+
+ + + + + +
+

Discussion

+

Initializes the receiver with a given persistent store in which to persist imported managed objects.

+ +

When initialized with a persistent store, the receiver will construct a managed object context with the +private queue concurrency type and the persistent store coordinator of the given persistent store. This +prepares the receiver for importing content into an existing Core Data persistence stack.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectImporter.h
+
+ + +
+ +
+ +

logSeedingInfo

+ + + +
+

Logs information about where on the filesystem to access the SQLite database for the persistent +store in which the imported managed objects were persisted.

+
+ + + +
- (void)logSeedingInfo
+ + + + + + + + + +
+

Discussion

+

Logs information about where on the filesystem to access the SQLite database for the persistent +store in which the imported managed objects were persisted.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectImporter.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKManagedObjectMappingOperationDataSource.html b/Pods/Documentation/RestKit/html/Classes/RKManagedObjectMappingOperationDataSource.html new file mode 100644 index 00000000..dd150399 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKManagedObjectMappingOperationDataSource.html @@ -0,0 +1,582 @@ + + + + + RKManagedObjectMappingOperationDataSource Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + + + + +
Inherits fromNSObject
Conforms toRKMappingOperationDataSource
Declared inRKManagedObjectMappingOperationDataSource.h
+ + + + +
+ +

Overview

+

The RKManagedObjectMappingOperationDataSource class provides support for performing object mapping operations where the mapped objects exist within a Core Data managed object context. The class is responsible for finding exist managed object instances by primary key, instantiating new managed objects, and connecting relationships for mapped objects.

+
+ + + + + +
+ +

Tasks

+ + + +

Initializing a Managed Object Mapping Operation Data Source

+ + + + + +

Accessing the Managed Object Context and Cache

+ +
    +
  • + +   managedObjectContext +

    The managed object context with which the receiver is associated.

    +
    + property + +
  • + +   managedObjectCache +

    The managed object cache utilized by the receiver to find existing managed object instances by primary key. A nil managed object cache will result in the insertion of new managed objects for all mapped content.

    +
    + property + +
  • +
+ + + +

Configuring Relationship Connection Queueing

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

managedObjectCache

+ + + +
+

The managed object cache utilized by the receiver to find existing managed object instances by primary key. A nil managed object cache will result in the insertion of new managed objects for all mapped content.

+
+ + + +
@property (nonatomic, strong, readonly) id<RKManagedObjectCaching> managedObjectCache
+ + + + + + + + + +
+

Discussion

+

The managed object cache utilized by the receiver to find existing managed object instances by primary key. A nil managed object cache will result in the insertion of new managed objects for all mapped content.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectMappingOperationDataSource.h
+
+ + +
+ +
+ +

managedObjectContext

+ + + +
+

The managed object context with which the receiver is associated.

+
+ + + +
@property (nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext
+ + + + + + + + + +
+

Discussion

+

The managed object context with which the receiver is associated.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectMappingOperationDataSource.h
+
+ + +
+ +
+ +

operationQueue

+ + + +
+

The operation queue in which instances of RKRelationshipConnectionOperation will be enqueued to connect the relationships of mapped objects.

+
+ + + +
@property (nonatomic, strong) NSOperationQueue *operationQueue
+ + + + + + + + + +
+

Discussion

+

The operation queue in which instances of RKRelationshipConnectionOperation will be enqueued to connect the relationships of mapped objects.

+ +

If nil, then current operation queue as returned from [NSOperationQueue currentQueue] will be used.

+ +

Please see the documentation for parentOperation for a discussion of this property’s function.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectMappingOperationDataSource.h
+
+ + +
+ +
+ +

parentOperation

+ + + +
+

The parent operation upon which instances of RKRelationshipConnectionOperation created by the data source are dependent upon.

+
+ + + +
@property (nonatomic, weak) NSOperation *parentOperation
+ + + + + + + + + +
+

Discussion

+

The parent operation upon which instances of RKRelationshipConnectionOperation created by the data source are dependent upon.

+ +

When connecting relationships as part of a managed object mapping operation, it is possible that the mapping operation itself will create managed objects that should be used to satisfy the connections mappings of representations being mapped. To support such cases, is is desirable to defer the execution of connection operations until the execution of the aggregate mapping operation is complete. The parentOperation property provides support for deferring the execution of the enqueued relationship connection operations by establishing a dependency between the connection operations and a parent operation, such as an instance of RKMapperOperation such that they will not be executed by the operationQueue until the parent operation has finished executing.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectMappingOperationDataSource.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

initWithManagedObjectContext:cache:

+ + + +
+

Initializes the receiver with a given managed object context and managed object cache.

+
+ + + +
- (id)initWithManagedObjectContext:(NSManagedObjectContext *)managedObjectContext cache:(id<RKManagedObjectCaching>)managedObjectCache
+ + + +
+

Parameters

+ +
+
managedObjectContext
+

The managed object context with which to associate the receiver. Cannot be nil.

+
+ +
+
managedObjectCache
+

The managed object cache used by the receiver to find existing object instances by primary key.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given managed object context and managed objet cache.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a given managed object context and managed object cache.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectMappingOperationDataSource.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKManagedObjectRequestOperation.html b/Pods/Documentation/RestKit/html/Classes/RKManagedObjectRequestOperation.html new file mode 100644 index 00000000..6818fa8e --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKManagedObjectRequestOperation.html @@ -0,0 +1,623 @@ + + + + + RKManagedObjectRequestOperation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromRKObjectRequestOperation : NSOperation
Declared inRKManagedObjectRequestOperation.h
+ + + + +
+ +

Overview

+

RKManagedObjectRequestOperation is a subclass of RKObjectRequestOperation that implements object mapping on the response body of an NSHTTPResponse loaded via an RKHTTPRequestOperation in which the mapping targets NSManagedObject objects managed by Core Data.

+ +

The RKManagedObjectRequestOperation class extends the basic behavior of an RKObjectRequestOperation to meet the constraints imposed by Core Data. In particular, managed object request operations observe the threading requirements by making use of NSManagedObjectContext concurrency types, leverage the support for parent/child contexts, and handle obtaining a permanent NSManagedObjectID for objects being mapped so that they are addressable across contexts. Object mapping is internally performed within a block provided to the target context via performBlockAndWait:, ensuring execution on the appropriate queue.

+ +

Aside from providing the basic infrastructure for successful object mapping into Core Data, a number of additional Core Data specific features are provided by the RKManagedObjectRequestOperation class that warrant discussion in detail.

+ +

Parent Context

+ +

Every RKManagedObjectRequestOperation object must be assigned an NSManagedObjectContext in which to persist the results of the underlying object mapping operation. This context is used as the parent context for a new, private NSManagedObjectContext with a concurrency type of NSPrivateQueueConcurrencyType in which the object mapping is actually performed. The use of this parent context has a number of benefits:

+ +
    +
  1. If the context that was assigned to the managed object request operation has a concurrency type of NSMainQueueConcurrencyType, then directly mapping into the context would block the execution of the main thread for the duration of the mapping process. The use of the private child context isolates the mapping process from the main thread entirely.
  2. +
  3. In the event of an error, the private context can be discarded, leaving the state of the parent context unchanged. On successful completion, the private context is saved and ‘pushes’ its changes up one level into the parent context.
  4. +
+ + +

Permanent Managed Object IDs

+ +

One of the confounding factors when working with asycnhronous processes interacting with Core Data is the addressability of managed objects that have not been saved to the persistent store across contexts. Unpersisted NSManagedObject instances have an objectID that is temporary and unsuitable for use in uniquely addressing a given object across two managed object contexts, even if they have common ancestry and share a persistent store coordinator. To mitigate this addressability issue without requiring objects to be saved to the persistent store, managed object request operations invoke obtainPermanentIDsForObjects: on the operation’s target object (if any) and all managed objects that were inserted into the context during the mapping process. By the time the operation finishes, all managed objects in the mapping result can be referenced by objectID across contexts with no further action.

+ +

Primary Keys & Managed Object Caching

+ +

When object mapping managed objects it is necessary to differentiate between objects that already exist in the local store and those that are being created as part of the mapping process. This ensures that the local store does not become populated with duplicate records. To make this differentiation, RestKit requires that each NSEntityDescription be configured with a primary key attribute. The primary key must correspond to a static attribute assigned by the remote backend system. During mapping, this key is used to search the managed object context for an existing managed object. If one is found, the object is updated else a new object is created. Primary keys are configured at the entity level and additional discussion accompanies the NSEntityDescription (RKAdditions) category.

+ +

Primary key attributes are used in conjunction with the RKManagedObjectCaching protocol. Each managed object request operation is associated with an object conforming to the RKManagedObjectCaching protocol via the managedObjectCache proeprty. This cache is consulted during mapping to find existing objects and when establishing relationships between entities by primary key. Please see the documentation accompanying RKManagedObjectCaching and RKConnectionMapping for more information.

+ +

Fetching Result Objects

+ +

When a completionBlock is configured for an instance of RKManagedObjectRequestOperation additional work is performed before the mapping result is returned to the caller. Because mapping internally occurs on a private managed object context with the NSPrivateQueueConcurrencyType concurrency type, attempts to directly access the NSManagedObject instances contained within the RKMappingResult would violate the threading constraints imposed by Core Data. As such, before the mapping result is returned to the caller in a completion block the objects are re-fetched from the managedObjectContext. Please see RKManagedObjectThreadSafeInvocation for details about the implementation.

+ +

TODO: Is this necessary?

+ +

Deleting Managed Objects for DELETE requests

+ +

RKManagedObjectRequestOperation adds special behavior to DELETE requests. Upon retrieving a successful (2xx status code) response for a DELETE, the operation will invoke deleteObject: with the operations targetObject on the managed object context. This will delete the target object from the local store in conjunction the successfully deleted remote representation.

+ +

Fetch Request Blocks and Deleting Orphaned Objects

+ +

A common problem when accessing remote resources representing collections of objects is the problem of deletion of remote objects. The RKManagedObjectRequestOperation class provides support for the cleanup of such orphaned objects. In order to utilize the functionality, the operation must be able to compare a set of reference objects to the retrieved payload in order to determine which objects exist in the local store, but are no longer being returned by the server. This reference set of objects is built by executing an NSFetchRequest that corresponds to the URL being loaded. Configuration of this fetch request is done via an RKFetchRequestBlock block object. This block takes a single NSURL argument and returns an NSFetchRequest objects. An array of these blocks can be provided to the managed object request operation and the array will be searched in reverse order until a non-nil value is returned by a block. Any block that cannot build a fetch request for the given URL is expected to return nil to indicate that it does not match the given URL. Processing of the URL is typically performed using an RKPathMatcher object against the value returned from the relativePath or relativeString methods of NSURL.

+ +

To illustrate this concept, please consider the following real-world example which builds a fetch request for retrieving the Terminals that exist in an Airport:

+ +
RKObjectManager *manager = [RKObjectManager managerWithBaseURL:@"http://restkit.org"]http://restkit.org"];
+[manager addFetchRequestBlock:^NSFetchRequest *(NSURL *URL) {
+    RKPathMatcher *pathMatcher = [RKPathMatcher pathMatcherWithPattern:@"/airports/:airport_id/terminals.json"];
+
+    NSDictionary *argsDict = nil;
+    BOOL match = [pathMatcher matchesPath:[URL relativePath] tokenizeQueryStrings:NO parsedArguments:&argsDict];
+    NSString *airportID;
+    if (match) {
+        airportID = [argsDict objectForKey:@"airport_id"];
+        NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:@"GGTerminal"];
+        NSEntityDescription *entity = [NSEntityDescription entityForName:@"GGAirport" inManagedObjectContext:managedObjectStore.persistentStoreManagedObjectContext];
+        fetchRequest.predicate = [entity predicateForPrimaryKeyAttributeWithValue:airportID];
+        fetchRequest.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"name" ascending:YES]];
+        return fetchRequest;
+    }
+
+    return nil;
+}];
+
+ +

The above example code defines an RKFetchRequestBlock block object that will match an NSURL with a relative path matching the pattern @"/airports/:airport_id/terminals.json". If a match is found, the block extracts the airport_id key from the matched arguments and uses it to construct an NSPredicate for the primary key attribute of GGAirport entity. It then constructs an NSFetchRequest for the GGTerminal entity that will retrieve all the managed objects with an airport ID attribute whose value is equal to airport_id encoded within the URL’s path.

+ +

In more concrete terms, given the URL http://restkit.org/airports/1234/terminals.json the block would return an NSFetchRequest equal to:

+ +
NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:@"GGTerminal"];
+fetchRequest.predicate = [NSPredicate predicateWithFormat:@"airportID = 1234"];
+fetchRequest.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"name" ascending:YES]];
+
+ +

Once configured and registered with the object manager, any RKManagedObjectRequestOperation created through the manager will automatically consult the fetch request blocks and perform orphaned object cleanup. No cleanup is performed if no block in the fetchRequestBlocks property is found to match the URL of the request.

+ +

Managed Object Context Save Behaviors

+ +

The results of the operation can either be ‘pushed’ to the parent context or saved to the persistent store. Configuration is available via the savesToPersistentStore property. If an error is encountered while saving the managed object context, then the operation is considered to have failed and the error property will be set to the NSError object returned by the failed save.

+ +

Limitations and Caveats

Warning: RKManagedObjectRequestOperation does NOT support object mapping that targets an NSManagedObjectContext with a concurrencyType of NSConfinementConcurrencyType.

+
+ + + + + +
+ +

Tasks

+ + + +

Configuring Core Data Integration

+ +
    +
  • + +   managedObjectContext +

    The managed object context associated with the managed object request operation.

    +
    + property + +
  • + +   managedObjectCache +

    The managed object cache associated with the managed object request operation.

    +
    + property + +
  • + +   fetchRequestBlocks +

    An array of RKFetchRequestBlock block objects used to map NSURL objects into corresponding NSFetchRequest objects.

    +
    + property + +
  • +
+ + + +

Managing Completion Behaviors

+ +
    +
  • + +   deletesOrphanedObjects +

    A Boolean value that determines if the receiver will delete orphaned objects upon completion of the operation.

    +
    + property + +
  • + +   savesToPersistentStore +

    A Boolean value that determines if the operation saves the mapping results to the persistent store upon successful completion. If the network transport or mapping portions of the operation fail the operation then this option has no effect.

    +
    + property + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

deletesOrphanedObjects

+ + + +
+

A Boolean value that determines if the receiver will delete orphaned objects upon completion of the operation.

+
+ + + +
@property (nonatomic, assign) BOOL deletesOrphanedObjects
+ + + + + + + + + +
+

Discussion

+

A Boolean value that determines if the receiver will delete orphaned objects upon completion of the operation.

+ +

Please see the above discussion of ‘Deleting Managed Objects for DELETE requests’ for more details.

+ +

Default: NO

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectRequestOperation.h
+
+ + +
+ +
+ +

fetchRequestBlocks

+ + + +
+

An array of RKFetchRequestBlock block objects used to map NSURL objects into corresponding NSFetchRequest objects.

+
+ + + +
@property (nonatomic, copy) NSArray *fetchRequestBlocks
+ + + + + + + + + +
+

Discussion

+

An array of RKFetchRequestBlock block objects used to map NSURL objects into corresponding NSFetchRequest objects.

+ +

Fetch requests corresponding to URL’s are used when deleting orphaned objects and completing object request operations in which avoidsNetworkAccess has been set to YES. Please see the above discussion of ‘Fetch Request Blocks’ for more details.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectRequestOperation.h
+
+ + +
+ +
+ +

managedObjectCache

+ + + +
+

The managed object cache associated with the managed object request operation.

+
+ + + +
@property (nonatomic, weak) id<RKManagedObjectCaching> managedObjectCache
+ + + + + + + + + +
+

Discussion

+

The managed object cache associated with the managed object request operation.

+ +

The cache is used to look up existing objects by primary key to prevent the creation of duplicate objects during mapping. Please see the above discussion of ‘Managed Object Caching’ for more details.

Warning: A nil value for the managedObjectCache property is valid, but may result in the creation of duplicate objects.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectRequestOperation.h
+
+ + +
+ +
+ +

managedObjectContext

+ + + +
+

The managed object context associated with the managed object request operation.

+
+ + + +
@property (nonatomic, strong) NSManagedObjectContext *managedObjectContext
+ + + + + + + + + +
+

Discussion

+

The managed object context associated with the managed object request operation.

+ +

This context acts as the parent context for a private managed object context in which the object mapping is performed and changes will be saved to this context upon successful completion of the operation.

+ +

Please see the above discussion about ‘Parent Context’ for details.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectRequestOperation.h
+
+ + +
+ +
+ +

savesToPersistentStore

+ + + +
+

A Boolean value that determines if the operation saves the mapping results to the persistent store upon successful completion. If the network transport or mapping portions of the operation fail the operation then this option has no effect.

+
+ + + +
@property (nonatomic, assign) BOOL savesToPersistentStore
+ + + + + + + + + +
+

Discussion

+

A Boolean value that determines if the operation saves the mapping results to the persistent store upon successful completion. If the network transport or mapping portions of the operation fail the operation then this option has no effect.

+ +

When YES, the receiver will invoke saveToPersistentStore: on its private managed object context to persist the mapping results all the way back to the persistent store coordinator. If NO, the private mapping context will be saved causing the mapped objects to be ‘pushed’ to the parent context as represented by the managedObjectContext property.

+ +

Default: YES

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectRequestOperation.h
+
+ + +
+ +
+ + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKManagedObjectResponseMapperOperation.html b/Pods/Documentation/RestKit/html/Classes/RKManagedObjectResponseMapperOperation.html new file mode 100644 index 00000000..7fc5a61f --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKManagedObjectResponseMapperOperation.html @@ -0,0 +1,426 @@ + + + + + RKManagedObjectResponseMapperOperation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromRKResponseMapperOperation : NSOperation
Declared inRKResponseMapperOperation.h
+ + + + +
+ +

Overview

+

RKManagedObjectResponseMapperOperation is an RKResponseMapperOperation subclass that provides support for performing object mapping using RKEntityMapping objects that target NSManagedObject derived classes. It requires an NSManagedObjectContext and a configured RKManagedObjectMappingOperationDataSource data source to execute successfully.

+ +

Performing response mapping that targets Core Data managed objects imposes some additional constraints on the process that the developer should understand thoroughly:

+ +
    +
  1. Permanent Managed Object IDs: When using managed object contexts in a parent-child configuration, it is important to obtain a permanent NSManagedObjectID for any existing objects that are to be mapped. Mapping that occur against objecs with temporary managedObjectID’s cannot be retrieved across contexts by ID. If executing an RKManagedObjectResponseMapperOperation against a NSManagedObject targetObject with a temporary ID.
  2. +
  3. Persisting Mapped Objects: Instances of RKManagedObjectResponseMapperOperation do NOT perform any persistence on the NSManagedObject in which the mapping occurs. This is by design and ensures that the operation can be used to compose higher level components that handle persistence. It is the developer’s responsibility to ensure that the mapped managed objects are eventually persisted.
  4. +
+ +
+ + + + + +
+ +

Tasks

+ + + + +

Configuring Core Data

+
    +
  • + +   managedObjectContext +

    The managed object context in which the mapping will be performed.

    +
    + property + +
  • + +   managedObjectCache +

    An object implementing the RKManagedObjectCaching protocol to be used for retrieving existing NSManagedObject instances by primary key. If nil, existing object cannot be retrieved and new objects will be created for all mappable content within the response data, likely resulting in the creation of duplicate objects.

    +
    + property + +
  • + +   targetObjectID +

    The permanent NSManagedObjectID for the target object of the mapping operation. During mapping, an instance local to the managedObjectContext is fetched and used to perform the mapping operation.

    +
    + property + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

managedObjectCache

+ + + +
+

An object implementing the RKManagedObjectCaching protocol to be used for retrieving existing NSManagedObject instances by primary key. If nil, existing object cannot be retrieved and new objects will be created for all mappable content within the response data, likely resulting in the creation of duplicate objects.

+
+ + + +
@property (nonatomic, weak) id<RKManagedObjectCaching> managedObjectCache
+ + + + + + + + + +
+

Discussion

+

An object implementing the RKManagedObjectCaching protocol to be used for retrieving existing NSManagedObject instances by primary key. If nil, existing object cannot be retrieved and new objects will be created for all mappable content within the response data, likely resulting in the creation of duplicate objects.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ +

managedObjectContext

+ + + +
+

The managed object context in which the mapping will be performed.

+
+ + + +
@property (nonatomic, strong) NSManagedObjectContext *managedObjectContext
+ + + + + + + + + +
+

Discussion

+

The managed object context in which the mapping will be performed.

Warning: The NSManagedObjectContext given must have a concurrencyType of either NSPrivateQueueConcurrencyType or NSMainQueueConcurrencyType. Thread confined contexts are not supported.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ +

targetObjectID

+ + + +
+

The permanent NSManagedObjectID for the target object of the mapping operation. During mapping, an instance local to the managedObjectContext is fetched and used to perform the mapping operation.

+
+ + + +
@property (nonatomic, copy) NSManagedObjectID *targetObjectID
+ + + + + + + + + +
+

Discussion

+

The permanent NSManagedObjectID for the target object of the mapping operation. During mapping, an instance local to the managedObjectContext is fetched and used to perform the mapping operation.

+ +

If nil and the targetObject is a managed object, the objectID of the target object will be used.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKManagedObjectStore.html b/Pods/Documentation/RestKit/html/Classes/RKManagedObjectStore.html new file mode 100644 index 00000000..983abd72 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKManagedObjectStore.html @@ -0,0 +1,1559 @@ + + + + + RKManagedObjectStore Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKManagedObjectStore.h
+ + + + +
+ +

Overview

+

The RKManagedObjectStore class encapsulates a Core Data stack including a managed object model, a persistent store coordinator, and a set of managed object contexts. The managed object store simplifies the task of properly setting up a Core Data stack and provides some additional functionality, such as the use of a seed database to initialize a SQLite backed persistent store and a simple code path for resetting the store by destroying and recreating the persistent stores.

+ +

Initialization

+ +

The managed object store is designed to easily initialize a Core Data stack in a recommended configuration. A store object must always be initialized with a managed object model, but this managed object model can be directly provided, inferred from an already configured persistent store coordinator, or read from the currently available bundles within the application. Note that several features provided by the framework rely on the store being initialized with a mutable managed object model. Please refer to the documentation in the initWithManagedObjectModel: for details.

+ +

Managed Object Contexts

+ +

The managed object store provides the application developer with a pair of managed objects with which to work with Core Data. The store configures a primary managed object context with the NSPrivateQueueConcurrencyType that is associated with the persistent store coordinator for handling Core Data persistence. A second context is also created with the NSMainQueueConcurrencyType that is a child of the primary managed object context for doing work on the main queue. Additional child contexts can be created directly or via a convenience method interface provided by the store (see newChildManagedObjectContextWithConcurrencyType:).

+ +

The managed object context hierarchy is designed to isolate the main thread from disk I/O and avoid deadlocks. Because the primary context manages its own private queue, saving the main queue context will not result in the objects being saved to the persistent store. The primary context must be saved as well for objects to be persisted to disk.

+ +

It is also worth noting that because of the parent/child context hierarchy, objects created on the main thread will not obtain permanent managed object ID’s even after the primary context has been saved. If you need to refer to the permanent representations of objects created on the main thread after a save, you may ask the main queue context to obtain permanent managed objects for your objects via obtainPermanentIDsForObjects:error:. Be warned that when obtaining permanent managed object ID’s, you must include all newly created objects that are reachable from the object you are concerned with in the set of objects provided to obtainPermanentIDsForObjects:error:. This means any newly created object in a one-to-one or one-to-many relationship must be provided or you will face a crash from the managed object context. This is due to a bug in Core Data still present in iOS5, but fixed in iOS6 (see Open Radar http://openradar.appspot.com/11478919)..)

+
+ + + + + +
+ +

Tasks

+ + + +

Accessing the Default Object Store

+ +
    +
  • + + + defaultStore +

    Returns the default managed object store for the application.

    +
    + + +
  • + + + setDefaultStore: +

    Sets the default managed object store for the application.

    +
    + + +
  • +
+ + + +

Initializing an Object Store

+ +
    +
  • + + – initWithManagedObjectModel: +

    Initializes the receiver with a given managed object model. This is the designated initializer for RKManagedObjectStore.

    +
    + + +
  • + + – initWithPersistentStoreCoordinator: +

    Initializes the receiver with an existing persistent store coordinator.

    +
    + + +
  • + + – init +

    Initializes the receiver with a managed object model obtained by merging the models from all of the application’s non-framework bundles.

    +
    + + +
  • +
+ + + +

Configuring Persistent Stores

+ +
    +
  • + + – createPersistentStoreCoordinator +

    Creates a persistent store coordinator with the receiver’s managed object model. After invocation, the persistentStoreCoordinator property will no longer be nil.

    +
    + + +
  • + + – addInMemoryPersistentStore: +

    Adds a new in memory persistent store to the persistent store coordinator of the receiver.

    +
    + + +
  • + + – addSQLitePersistentStoreAtPath:fromSeedDatabaseAtPath:error: +

    Adds a new SQLite persistent store, optionally initialized with a seed database, to the persistent store coordinator of the receiver.

    +
    + + +
  • + + – resetPersistentStores: +

    Resets the persistent stores in the receiver’s persistent store coordinator and recreates them. If a store being reset is backed by a file on disk (such as a SQLite file), the file will be removed prior to recreating the store. If the store was originally created using a seed database, the seed will be recopied to reset the store to its seeded state.

    +
    + + +
  • +
+ + + +

Retrieving Details about the Store

+ + + + + +

Working with Managed Object Contexts

+ + + + + +

RKSearchAdditions Methods

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

mainQueueManagedObjectContext

+ + + +
+

The main queue managed object context of the receiver.

+
+ + + +
@property (nonatomic, strong, readonly) NSManagedObjectContext *mainQueueManagedObjectContext
+ + + + + + + + + +
+

Discussion

+

The main queue managed object context of the receiver.

+ +

The main queue context is available for usage on the main queue to drive user interface needs. The context is created with the NSMainQueueConcurrencyType and as such may be messaged directly from the main thread. The context is a child context of the persistentStoreManagedObjectContext and can persist changes up to the parent via a save.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

managedObjectCache

+ + + +
+

The managed object cache associated with the receiver.

+
+ + + +
@property (nonatomic, strong) id<RKManagedObjectCaching> managedObjectCache
+ + + + + + + + + +
+

Discussion

+

The managed object cache associated with the receiver.

+ +

The managed object cache is used to accelerate intensive Core Data operations by caching managed objects by their primary key value.

+ +

Default: An instance of RKFetchRequestManagedObjectCache.

Warning: A nil managed object cache will result in a store that is unable to uniquely identify existing objects by primary key attribute value and may result in the creation of duplicate objects within the store.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

managedObjectModel

+ + + +
+

Returns the managed object model of the receiver.

+
+ + + +
@property (nonatomic, strong, readonly) NSManagedObjectModel *managedObjectModel
+ + + + + +
+

Return Value

+

The managed object model of the receiver.

+
+ + + + + +
+

Discussion

+

Returns the managed object model of the receiver.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

persistentStoreCoordinator

+ + + +
+

Returns the persistent store coordinator of the receiver.

+
+ + + +
@property (nonatomic, strong, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator
+ + + + + +
+

Return Value

+

The persistent store coordinator of the receiver.

+
+ + + + + +
+

Discussion

+

Returns the persistent store coordinator of the receiver.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

persistentStoreManagedObjectContext

+ + + +
+

Returns the managed object context of the receiver that is associated with the persistent store coordinator and is responsible for managing persistence.

+
+ + + +
@property (nonatomic, strong, readonly) NSManagedObjectContext *persistentStoreManagedObjectContext
+ + + + + + + + + +
+

Discussion

+

Returns the managed object context of the receiver that is associated with the persistent store coordinator and is responsible for managing persistence.

+ +

The persistent store context is created with the NSPrivateQueueConcurrencyType and as such must be interacted with using [NSManagedObjectContext performBlock:] or [NSManagedObjectContext performBlockAndWait:]. This context typically serves as the parent context for scratch contexts or main queue contexts for interacting with the user interface. Created by the invocation of createManagedObjectContexts.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

searchIndexer

+ + + +
+

The search indexer for the receiver’s primary managed object context.

+
+ + + +
@property (nonatomic, readonly) RKSearchIndexer *searchIndexer
+ + + + + + + + + +
+

Discussion

+

The search indexer for the receiver’s primary managed object context.

+ +

A search indexer is instantiated when search indexing is added to an entity in the receiver’s managed object model.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore+RKSearchAdditions.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

defaultStore

+ + + +
+

Returns the default managed object store for the application.

+
+ + + +
+ (RKManagedObjectStore *)defaultStore
+ + + + + +
+

Return Value

+

The default managed object store.

+
+ + + + + +
+

Discussion

+

Returns the default managed object store for the application.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

setDefaultStore:

+ + + +
+

Sets the default managed object store for the application.

+
+ + + +
+ (void)setDefaultStore:(RKManagedObjectStore *)managedObjectStore
+ + + +
+

Parameters

+ +
+
managedObjectStore
+

The new default managed object store.

+
+ +
+ + + + + + + +
+

Discussion

+

Sets the default managed object store for the application.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

addInMemoryPersistentStore:

+ + + +
+

Adds a new in memory persistent store to the persistent store coordinator of the receiver.

+
+ + + +
- (NSPersistentStore *)addInMemoryPersistentStore:(NSError **)error
+ + + +
+

Parameters

+ +
+
error
+

On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information.

+
+ +
+ + + +
+

Return Value

+

The new persistent store, or nil in the event of an error.

+
+ + + + + +
+

Discussion

+

Adds a new in memory persistent store to the persistent store coordinator of the receiver.

+ +

This method will invoke createPersistentStore if a persistent store coordinator has not yet been created.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

addSQLitePersistentStoreAtPath:fromSeedDatabaseAtPath:error:

+ + + +
+

Adds a new SQLite persistent store, optionally initialized with a seed database, to the persistent store coordinator of the receiver.

+
+ + + +
- (NSPersistentStore *)addSQLitePersistentStoreAtPath:(NSString *)storePath fromSeedDatabaseAtPath:(NSString *)seedPath error:(NSError **)error
+ + + +
+

Parameters

+ +
+
storePath
+

The path at which to save the persistent store on disk.

+
+ +
+
seedPath
+

An optional path to a seed database to copy to the given storePath in the event that a store does not yet exist.

+
+ +
+
error
+

On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds a new SQLite persistent store, optionally initialized with a seed database, to the persistent store coordinator of the receiver.

Warning: If the seed database at the given path was created with an incompatible managed object model an application error may be raised.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

addSearchIndexingToEntityForName:onAttributes:

+ + + +
+

Adds search indexing to the entity for the given name in the receiver’s managed object model.

+
+ + + +
- (void)addSearchIndexingToEntityForName:(NSString *)entityName onAttributes:(NSArray *)attributes
+ + + +
+

Parameters

+ +
+
entityName
+

The name of the entity in the receiver’s managed object model that should be made searchable.

+
+ +
+
attributes
+

An array of NSAttributeDescription objects or NSString attribute names specifying the NSStringAttributeType attributes that are to be indexed for searching.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds search indexing to the entity for the given name in the receiver’s managed object model.

+ +

Invocation of this method will result in the entity for the given name being updated to include a new to-many relationship with the name searchWords. The receiver’s search indexer will also be instructed to begin monitoring changes to the specified entity’s searchable attributes to maintain the collection of search words. If no search indexer exists, a new

Warning: Must be invoked before adding persistent stores as the managed object model will become immutable once the persistent store coordinator is created.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore+RKSearchAdditions.h
+
+ + +
+ +
+ +

createManagedObjectContexts

+ + + +
+

Creates the persistent store and main queue managed object contexts for the receiver.

+
+ + + +
- (void)createManagedObjectContexts
+ + + + + + + + + +
+

Discussion

+

Creates the persistent store and main queue managed object contexts for the receiver.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

createPersistentStoreCoordinator

+ + + +
+

Creates a persistent store coordinator with the receiver’s managed object model. After invocation, the persistentStoreCoordinator property will no longer be nil.

+
+ + + +
- (void)createPersistentStoreCoordinator
+ + + + + + + + + +
+

Discussion

+

Creates a persistent store coordinator with the receiver’s managed object model. After invocation, the persistentStoreCoordinator property will no longer be nil.

Warning: Creating the persistent store coordinator will render the managed object model immutable. Attempts to use functionality that requires a mutable managed object model after the persistent store coordinator has been created will raise an application error.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

init

+ + + +
+

Initializes the receiver with a managed object model obtained by merging the models from all of the application’s non-framework bundles.

+
+ + + +
- (id)init
+ + + + + + + + + +
+

Discussion

+

Initializes the receiver with a managed object model obtained by merging the models from all of the application’s non-framework bundles.

Warning: Obtaining a managed object model by merging all bundles may result in an application error if versioned object models are in use.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

initWithManagedObjectModel:

+ + + +
+

Initializes the receiver with a given managed object model. This is the designated initializer for RKManagedObjectStore.

+
+ + + +
- (id)initWithManagedObjectModel:(NSManagedObjectModel *)managedObjectModel
+ + + +
+

Parameters

+ +
+
managedObjectModel
+

The managed object model with which to initialize the receiver.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given managed object model.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a given managed object model. This is the designated initializer for RKManagedObjectStore.

Bug: Several features require that the managed object model used to initialize the store be mutable so that entities may be changed before the persistent store coordinator is created. Since iOS 5, managed object models initialized via initWithContentsOfURL: return an immutable model. The application developer must send the returned managed object model a mutable copy message to ensure that it is mutable before initializing the managed object store. The recommended approach for initializing a managed object store is as follows:

+ +
NSURL *modelURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"MyApplication" ofType:@"momd"]];
+// NOTE: Due to an iOS 5 bug, the managed object model returned is immutable.
+NSManagedObjectModel *managedObjectModel = [[[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL] mutableCopy];
+RKManagedObjectStore *managedObjectStore = [[RKManagedObjectStore alloc] initWithManagedObjectModel:managedObjectModel];
+
+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

initWithPersistentStoreCoordinator:

+ + + +
+

Initializes the receiver with an existing persistent store coordinator.

+
+ + + +
- (id)initWithPersistentStoreCoordinator:(NSPersistentStoreCoordinator *)persistentStoreCoordinator
+ + + +
+

Parameters

+ +
+
persistentStoreCoordinator
+

The persistent store coordinator with which to initialize the receiver.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the managed object model of the given persistent store coordinator and the persistent store coordinator.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with an existing persistent store coordinator.

+ +

The managed object model from the persistent store coordinator will be used to initialize the receiver and the given persistent store coordinator will be configured as the persistent store coordinator for the managed object store.

+ +

This initialization method provides for easy integration with an existing Core Data stack.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

newChildManagedObjectContextWithConcurrencyType:

+ + + +
+

Creates a new child managed object context of the persistent store managed object context with a given concurrency type.

+
+ + + +
- (NSManagedObjectContext *)newChildManagedObjectContextWithConcurrencyType:(NSManagedObjectContextConcurrencyType)concurrencyType
+ + + +
+

Parameters

+ +
+
concurrencyType
+

The desired concurrency type for the new context.

+
+ +
+ + + +
+

Return Value

+

A newly created managed object context with the given concurrency type whose parent is the persistentStoreManagedObjectContext.

+
+ + + + + +
+

Discussion

+

Creates a new child managed object context of the persistent store managed object context with a given concurrency type.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

resetPersistentStores:

+ + + +
+

Resets the persistent stores in the receiver’s persistent store coordinator and recreates them. If a store being reset is backed by a file on disk (such as a SQLite file), the file will be removed prior to recreating the store. If the store was originally created using a seed database, the seed will be recopied to reset the store to its seeded state.

+
+ + + +
- (BOOL)resetPersistentStores:(NSError **)error
+ + + +
+

Parameters

+ +
+
error
+

On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information.

+
+ +
+ + + +
+

Return Value

+

A Boolean value indicating if the reset was successful.

+
+ + + + + +
+

Discussion

+

Resets the persistent stores in the receiver’s persistent store coordinator and recreates them. If a store being reset is backed by a file on disk (such as a SQLite file), the file will be removed prior to recreating the store. If the store was originally created using a seed database, the seed will be recopied to reset the store to its seeded state.

Warning: This method will implictly result in the managed object contexts associated with the receiver to be discarded and recreated. Any managed objects or additional child contexts associated with the store will need to be discarded or else exceptions may be raised (i.e. NSObjectInaccessibleException).

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore.h
+
+ + +
+ +
+ +

startIndexingPersistentStoreManagedObjectContext

+ + + +
+

Tells the search indexer to begin observing the persistent store managed object context for changes to searchable entities and updating the search words.

+
+ + + +
- (void)startIndexingPersistentStoreManagedObjectContext
+ + + + + + + + + +
+

Discussion

+

Tells the search indexer to begin observing the persistent store managed object context for changes to searchable entities and updating the search words.

+ +

This is a convenience method that is equivalent to the following example code:

+ +
RKSearchIndexer *searchIndexer = managedObjectStore.searchIndexer;
+[searchIndexer startObservingManagedObjectContext:managedObjectStore.persistentStoreManagedObjectContext];
+
+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore+RKSearchAdditions.h
+
+ + +
+ +
+ +

stopIndexingPersistentStoreManagedObjectContext

+ + + +
+

Tells the search indexer to stop observing the persistent store managed object context for changes to searchable entities.

+
+ + + +
- (void)stopIndexingPersistentStoreManagedObjectContext
+ + + + + + + + + +
+

Discussion

+

Tells the search indexer to stop observing the persistent store managed object context for changes to searchable entities.

+ +

This is a convenience method that is equivalent to the following example code:

+ +
RKSearchIndexer *searchIndexer = managedObjectStore.searchIndexer;
+[searchIndexer stopObservingManagedObjectContext:managedObjectStore.persistentStoreManagedObjectContext];
+
+
+ + + + + + + +
+

Declared In

+ RKManagedObjectStore+RKSearchAdditions.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKManagedObjectThreadSafeInvocation.html b/Pods/Documentation/RestKit/html/Classes/RKManagedObjectThreadSafeInvocation.html new file mode 100644 index 00000000..aff8c6bc --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKManagedObjectThreadSafeInvocation.html @@ -0,0 +1,382 @@ + + + + + RKManagedObjectThreadSafeInvocation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSInvocation
Declared inRKManagedObjectThreadSafeInvocation.h
+ + + + + + +
+ +

Tasks

+ + + + + + + +
+ + + + + +
+ +

Properties

+ +
+ +

mainQueueManagedObjectContext

+ + + +
@property (nonatomic, strong) NSManagedObjectContext *mainQueueManagedObjectContext
+ + +
+ +
+ +

privateQueueManagedObjectContext

+ + + +
@property (nonatomic, strong) NSManagedObjectContext *privateQueueManagedObjectContext
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

invocationWithMethodSignature:

+ + + +
+ (RKManagedObjectThreadSafeInvocation *)invocationWithMethodSignature:(NSMethodSignature *)methodSignature
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

invokeOnMainThread

+ + + +
- (void)invokeOnMainThread
+ + +
+ +
+ +

setManagedObjectKeyPaths:forArgument:

+ + + +
- (void)setManagedObjectKeyPaths:(NSSet *)keyPaths forArgument:(NSInteger)index
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKMapperOperation.html b/Pods/Documentation/RestKit/html/Classes/RKMapperOperation.html new file mode 100644 index 00000000..ee7fba49 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKMapperOperation.html @@ -0,0 +1,870 @@ + + + + + RKMapperOperation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSOperation
Declared inRKMapperOperation.h
+ + + + +
+ +

Overview

+

RKMapperOperation is an NSOperation subclass that implements object mapping for opaque object representations. Given a dictionary or an array of dictionaries that represent objects and a dictionary describing how to map the representations, the mapper will transform the source representations into NSObject or NSManagedObject instances. Mapper operations are used to map object representations from Foundation object representations, such as those deserialized from a JSON or XML document or loaded from a file. Not all the mappings specified in the mappings dictionary are required to match content in the source object for the operation to succeed. However, if none of the mappable key paths in the mappings dictionary match the source object then the operation will fail and the error property will be set to an NSError object in the RKErrorDomain domain with an error code value of RKMappingErrorNotFound.

+ +

RKMapperOperation does not actually perform any mapping work. Instead, it instantiates and starts RKMappingOperation objects to process the mappable object representations it encounters.

+ +

RKMapperOperation is a non-concurrent operation. Execution will occur synchronously on the calling thread unless the operation is enqueued onto an NSOperationQueue.

+ +

Mappings Dictionary

+ +

The mappings dictionary describes how to object map the source object. The keys of the dictionary are key paths into the sourceObject and the values are RKMapping objects describing how to map the representations at the corresponding key path. This dictionary based approach enables a single document to contain an arbitrary number of object representations that can be mapped independently. Consider the following example JSON structure:

+ +
{ "tags": [ "hacking", "phreaking" ], "authors": [ "Captain Crunch", "Emmanuel Goldstein" ], "magazine": { "title": "2600 The Hacker Quarterly" } }
+
+ +

Each key in the document could be mapped independently by providing a mapping for the key paths:

+ +
RKObjectMapping *tagMapping = [RKObjectMapping mappingForClass:[Tag class]];
+RKObjectMapping *authorMapping = [RKObjectMapping mappingForClass:[Author class]];
+RKObjectMapping *magazineMapping = [RKObjectMapping mappingForClass:[Magazine class]];
+NSDictionary *mappingsDictionary = @{ @"tag": tagMapping, @"author": authorMapping, @"magazine": magazine };
+
+ +

Note that the keys of the dictionary are key paths. Deeply nested content can be mapped by specifying the full key path as the key of the mappings dictionary.

+ +

The NSNull Key

+ +

A mapping set for the key [NSNull null] value has special significance to the mapper operation. When a mapping is encountered with the a null key, the entire sourceObject is processed using the given mapping. This provides support for mapping content that does not have an outer nesting attribute.

+ +

Data Source

+ +

The data source is used to instantiate new objects or find existing objects to be updated during the mapping process. The object set as the mappingOperationDataSource will be set as the dataSource for the RKMappingOperation objects created by the mapper.

+ +

Target Object

+ +

If a targetObject is configured on the mapper operation, all mapping work on the sourceObject will target the specified object. For transient NSObject mappings, this ensures that the properties of an existing object are updated rather than an new object being created for the mapped representation. If an array of representations is being processed and a targetObject is provided, it must be a mutable collection object else an exception will be raised.

+ +

Core Data

+ +

RKMapperOperation supports mapping to Core Data target entities. To do so, it must be configured with an RKManagedObjectMappingOperationDataSource object as the data source.

+
+ + + + + +
+ +

Tasks

+ + + +

Initializing a Mapper Operation

+ + + + + +

Accessing Mapping Result and Errors

+ +
    +
  • + +   error +

    The error, if any, that occurred during the mapping process.

    +
    + property + +
  • + +   mappingResult +

    The result of the mapping process. A nil value indicates that no mappable object representations were found and no mapping was performed.

    +
    + property + +
  • +
+ + + +

Managing Mapping Configuration

+ +
    +
  • + +   sourceObject +

    The source object representation against which the mapping is performed.

    +
    + property + +
  • + +   mappingsDictionary +

    A dictionary of key paths to RKMapping objects specifying how object representations in the sourceObject are to be mapped.

    +
    + property + +
  • + +   targetObject +

    The target object of the mapper. When configured, all object mapping will target the specified object.

    +
    + property + +
  • + +   mappingOperationDataSource +

    The data source for the underlying RKMappingOperation objects that perform the mapping work configured by the mapper.

    +
    + property + +
  • + +   delegate +

    The delegate for the mapper operation.

    +
    + property + +
  • +
+ + + +

Private Methods

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

delegate

+ + + +
+

The delegate for the mapper operation.

+
+ + + +
@property (nonatomic, weak) id<RKMapperOperationDelegate> delegate
+ + + + + + + + + +
+

Discussion

+

The delegate for the mapper operation.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

error

+ + + +
+

The error, if any, that occurred during the mapping process.

+
+ + + +
@property (nonatomic, strong, readonly) NSError *error
+ + + + + + + + + +
+

Discussion

+

The error, if any, that occurred during the mapping process.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mappingOperationDataSource

+ + + +
+

The data source for the underlying RKMappingOperation objects that perform the mapping work configured by the mapper.

+
+ + + +
@property (nonatomic, strong) id<RKMappingOperationDataSource> mappingOperationDataSource
+ + + + + + + + + +
+

Discussion

+

The data source for the underlying RKMappingOperation objects that perform the mapping work configured by the mapper.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mappingResult

+ + + +
+

The result of the mapping process. A nil value indicates that no mappable object representations were found and no mapping was performed.

+
+ + + +
@property (nonatomic, strong, readonly) RKMappingResult *mappingResult
+ + + + + + + + + +
+

Discussion

+

The result of the mapping process. A nil value indicates that no mappable object representations were found and no mapping was performed.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mappingsDictionary

+ + + +
+

A dictionary of key paths to RKMapping objects specifying how object representations in the sourceObject are to be mapped.

+
+ + + +
@property (nonatomic, strong, readonly) NSDictionary *mappingsDictionary
+ + + + + + + + + +
+

Discussion

+

A dictionary of key paths to RKMapping objects specifying how object representations in the sourceObject are to be mapped.

+ +

Please see the above discussion for in-depth details about the mappings dictionary.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

sourceObject

+ + + +
+

The source object representation against which the mapping is performed.

+
+ + + +
@property (nonatomic, strong, readonly) id sourceObject
+ + + + + + + + + +
+

Discussion

+

The source object representation against which the mapping is performed.

+ +

Either an NSDictionary or an NSArray of NSDictionary objects.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

targetObject

+ + + +
+

The target object of the mapper. When configured, all object mapping will target the specified object.

+
+ + + +
@property (nonatomic, weak) id targetObject
+ + + + + + + + + +
+

Discussion

+

The target object of the mapper. When configured, all object mapping will target the specified object.

+ +

Please see the above discussion for details about target objects.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

initWithObject:mappingsDictionary:

+ + + +
+

Initializes the operation with a source object and a mappings dictionary.

+
+ + + +
- (id)initWithObject:(id)object mappingsDictionary:(NSDictionary *)mappingsDictionary
+ + + +
+

Parameters

+ +
+
object
+

An NSDictionary or NSArray of NSDictionary object representations to be mapped into local domain objects.

+
+ +
+
mappingsDictionary
+

An NSDictionary wherein the keys are mappable key paths in object and the values are RKMapping objects specifying how the representations at its key path are to be mapped.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given object and and dictionary of key paths to mappings.

+
+ + + + + +
+

Discussion

+

Initializes the operation with a source object and a mappings dictionary.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mapCollection:atKeyPath:usingMapping:

+ + + +
- (NSArray *)mapCollection:(NSArray *)mappableObjects atKeyPath:(NSString *)keyPath usingMapping:(RKMapping *)mapping
+ + +
+ +
+ +

mapFromObject:toObject:atKeyPath:usingMapping:

+ + + +
- (BOOL)mapFromObject:(id)mappableObject toObject:(id)destinationObject atKeyPath:(NSString *)keyPath usingMapping:(RKMapping *)mapping
+ + +
+ +
+ +

mapObject:atKeyPath:usingMapping:

+ + + +
- (id)mapObject:(id)mappableObject atKeyPath:(NSString *)keyPath usingMapping:(RKMapping *)mapping
+ + +
+ +
+ +

objectWithMapping:andData:

+ + + +
- (id)objectWithMapping:(RKMapping *)objectMapping andData:(id)mappableData
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKMapping.html b/Pods/Documentation/RestKit/html/Classes/RKMapping.html new file mode 100644 index 00000000..03abd45e --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKMapping.html @@ -0,0 +1,402 @@ + + + + + RKMapping Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKMapping.h
+ + + + +
+ +

Overview

+

RKMapping is an abstract class for objects defining RestKit object mappings. Its interface is common to all object mapping classes, including its concrete subclasses RKObjectMapping and RKDynamicMapping.

+
+ + + + + +
+ +

Tasks

+ + + +

Forcing Collection Mapping

+ +
    +
  • + +   forceCollectionMapping +

    Forces the mapper to treat the mapped keyPath as a collection even if it does not return an array or a set of objects. This permits mapping where a dictionary identifies a collection of objects.

    +
    + property + +
  • +
+ + + +

Comparing Mappings

+ +
    +
  • + + – isEqualToMapping: +

    Returns YES if the receiver and the specified mapping are considered equivalent.

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

forceCollectionMapping

+ + + +
+

Forces the mapper to treat the mapped keyPath as a collection even if it does not return an array or a set of objects. This permits mapping where a dictionary identifies a collection of objects.

+
+ + + +
@property (nonatomic, assign) BOOL forceCollectionMapping
+ + + + + + + + + +
+

Discussion

+

Forces the mapper to treat the mapped keyPath as a collection even if it does not return an array or a set of objects. This permits mapping where a dictionary identifies a collection of objects.

+ +

When enabled, each key/value pair in the resolved dictionary will be mapped as a separate entity. This is useful when you have a JSON structure similar to:

+ +
 { "users": {
+    "blake": { "id": 1234, "email": "blake@restkit.org" },
+    "rachit": { "id": 5678", "email": "rachit@restkit.org" }
+    }
+ }
+
+ +

By enabling forceCollectionMapping, RestKit will map “blake” => attributes and “rachit” => attributes as independent objects. This can be combined with mapKeyOfNestedDictionaryToAttribute: to properly map these sorts of structures.

+ +

@default NO

+
+ + + + + + + +
+

Declared In

+ RKMapping.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

isEqualToMapping:

+ + + +
+

Returns YES if the receiver and the specified mapping are considered equivalent.

+
+ + + +
- (BOOL)isEqualToMapping:(RKMapping *)otherMapping
+ + + + + + + + + +
+

Discussion

+

Returns YES if the receiver and the specified mapping are considered equivalent.

+ +

NOTE: Must be implemented in subclass.

+
+ + + + + + + +
+

Declared In

+ RKMapping.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKMappingOperation.html b/Pods/Documentation/RestKit/html/Classes/RKMappingOperation.html new file mode 100644 index 00000000..98c59bcc --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKMappingOperation.html @@ -0,0 +1,817 @@ + + + + + RKMappingOperation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSOperation
Declared inRKMappingOperation.h
+ + + + +
+ +

Overview

+

Instances of RKMappingOperation perform transformation between object representations according to the rules expressed in RKObjectMapping objects. Mapping operations provide the foundation for the RestKit object mapping engine and perform the work of inspecting the attributes and relationships of a source object and determining how to map them into new representations on a destination object.

+
+ + + + + +
+ +

Tasks

+ + + +

Initializing a Mapping Operation

+ + + + + +

Accessing Mapping Configuration

+ +
    +
  • + +   sourceObject +

    A dictionary of mappable elements containing simple values or nested object structures.

    +
    + property + +
  • + +   destinationObject +

    The target object for this operation. Mappable values in the source object will be applied to the destination object using key-value coding.

    +
    + property + +
  • + +   mapping +

    The mapping defining how values contained in the source object should be transformed to the destination object via key-value coding.

    +
    + property + +
  • + +   objectMapping +

    The concrete object mapping for the operation.

    +
    + property + +
  • +
+ + + +

Configuring Delegate and Data Source

+ +
    +
  • + +   delegate +

    The delegate to inform of interesting events during the mapping operation lifecycle.

    +
    + property + +
  • + +   dataSource +

    The data source is responsible for providing the mapping operation with an appropriate target object for mapping when the destinationObject is nil.

    +
    + property + +
  • + +   error +

    The error, if any, that occurred during the execution of the mapping operation.

    +
    + property + +
  • +
+ + + +

Performing Mapping

+ +
    +
  • + + – performMapping: +

    Process all mappable values from the mappable dictionary and assign them to the target object according to the rules expressed in the object mapping definition

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

dataSource

+ + + +
+

The data source is responsible for providing the mapping operation with an appropriate target object for mapping when the destinationObject is nil.

+
+ + + +
@property (nonatomic, weak) id<RKMappingOperationDataSource> dataSource
+ + + + + + + + + +
+

Discussion

+

The data source is responsible for providing the mapping operation with an appropriate target object for mapping when the destinationObject is nil.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

delegate

+ + + +
+

The delegate to inform of interesting events during the mapping operation lifecycle.

+
+ + + +
@property (nonatomic, weak) id<RKMappingOperationDelegate> delegate
+ + + + + + + + + +
+

Discussion

+

The delegate to inform of interesting events during the mapping operation lifecycle.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

destinationObject

+ + + +
+

The target object for this operation. Mappable values in the source object will be applied to the destination object using key-value coding.

+
+ + + +
@property (nonatomic, strong, readonly) id destinationObject
+ + + + + + + + + +
+

Discussion

+

The target object for this operation. Mappable values in the source object will be applied to the destination object using key-value coding.

+ +

If initialized with a nil destination object, the mapping operation will attempt to find or create a destination object via the data source and will populate the value of the destinationObject property.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

error

+ + + +
+

The error, if any, that occurred during the execution of the mapping operation.

+
+ + + +
@property (nonatomic, strong, readonly) NSError *error
+ + + + + + + + + +
+

Discussion

+

The error, if any, that occurred during the execution of the mapping operation.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

mapping

+ + + +
+

The mapping defining how values contained in the source object should be transformed to the destination object via key-value coding.

+
+ + + +
@property (nonatomic, strong, readonly) RKMapping *mapping
+ + + + + + + + + +
+

Discussion

+

The mapping defining how values contained in the source object should be transformed to the destination object via key-value coding.

+ +

Will either be an instance of RKObjectMapping or RKDynamicMapping.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

objectMapping

+ + + +
+

The concrete object mapping for the operation.

+
+ + + +
@property (nonatomic, strong, readonly) RKObjectMapping *objectMapping
+ + + + + + + + + +
+

Discussion

+

The concrete object mapping for the operation.

+ +

If the value of mapping is an RKObjectMapping, returns the same value as mapping. If mapping is an RKDynamicMapping, then returns the concrete RKObjectMapping object selected for mapping sourceObject.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

sourceObject

+ + + +
+

A dictionary of mappable elements containing simple values or nested object structures.

+
+ + + +
@property (nonatomic, strong, readonly) id sourceObject
+ + + + + + + + + +
+

Discussion

+

A dictionary of mappable elements containing simple values or nested object structures.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

initWithSourceObject:destinationObject:mapping:

+ + + +
+

Initializes the receiver with a source object, a destination object and an object mapping with which to perform an object mapping.

+
+ + + +
- (id)initWithSourceObject:(id)sourceObject destinationObject:(id)destinationObject mapping:(RKMapping *)objectOrDynamicMapping
+ + + +
+

Parameters

+ +
+
sourceObject
+

The source object to be mapped. Cannot be nil.

+
+ +
+
destinationObject
+

The destination object the results are to be mapped onto. May be nil, in which case a new object target object will be obtained from the dataSource.

+
+ +
+
objectOrDynamicMapping
+

An instance of RKObjectMapping or RKDynamicMapping defining how the mapping is to be performed.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with a source object, a destination object, and a mapping.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a source object, a destination object and an object mapping with which to perform an object mapping.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

performMapping:

+ + + +
+

Process all mappable values from the mappable dictionary and assign them to the target object according to the rules expressed in the object mapping definition

+
+ + + +
- (BOOL)performMapping:(NSError **)error
+ + + +
+

Parameters

+ +
+
error
+

A pointer to an NSError reference to capture any error that occurs during the mapping. May be nil.

+
+ +
+ + + +
+

Return Value

+

A Boolean value indicating if the mapping operation was successful.

+
+ + + + + +
+

Discussion

+

Process all mappable values from the mappable dictionary and assign them to the target object according to the rules expressed in the object mapping definition

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKMappingResult.html b/Pods/Documentation/RestKit/html/Classes/RKMappingResult.html new file mode 100644 index 00000000..bcdde220 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKMappingResult.html @@ -0,0 +1,640 @@ + + + + + RKMappingResult Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKMappingResult.h
+ + + + +
+ +

Overview

+

The RKMappingResult class represents the aggregate object mapping results returned by an RKMapperOperation object. The mapping result provides a thin interface on top of an NSDictionary and provides convenient interfaces for accessing the mapping results in various representations.

+
+ + + + + +
+ +

Tasks

+ + + +

Creating a Mapping Result

+ + + + + +

Retrieving Result Representations

+ +
    +
  • + + – dictionary +

    Returns a representation of the mapping result as a dictionary.

    +
    + + +
  • + + – firstObject +

    Returns a representation of the mapping result as a single object by returning the first mapped value from the aggregate array of mapped objects.

    +
    + + +
  • + + – array +

    Returns a representation of the mapping result as an array of objects.

    +
    + + +
  • + + – set +

    Returns a representation of the mapping result as a set of objects.

    +
    + + +
  • +
+ + + +

Counting Entries

+ +
    +
  • + + – count +

    Returns a count of the number of objects contained in the mapping result. This is an aggregate count of all objects across all mapped key paths in the result.

    +
    + + +
  • +
+ +
+ + + + + + + + + +
+ +

Instance Methods

+ +
+ +

array

+ + + +
+

Returns a representation of the mapping result as an array of objects.

+
+ + + +
- (NSArray *)array
+ + + + + +
+

Return Value

+

An array containing the objects contained in the mapping result.

+
+ + + + + +
+

Discussion

+

Returns a representation of the mapping result as an array of objects.

+ +

The array returned is a flattened collection of all mapped object values contained in the underlying dictionary result representation. No guarantee is made as to the ordering of objects within the returned collection when more than one key path was mapped, as NSDictionary objects are unordered,

+
+ + + + + + + +
+

Declared In

+ RKMappingResult.h
+
+ + +
+ +
+ +

count

+ + + +
+

Returns a count of the number of objects contained in the mapping result. This is an aggregate count of all objects across all mapped key paths in the result.

+
+ + + +
- (NSUInteger)count
+ + + + + +
+

Return Value

+

A count of the number of mapped objects in the mapping result.

+
+ + + + + +
+

Discussion

+

Returns a count of the number of objects contained in the mapping result. This is an aggregate count of all objects across all mapped key paths in the result.

+
+ + + + + + + +
+

Declared In

+ RKMappingResult.h
+
+ + +
+ +
+ +

dictionary

+ + + +
+

Returns a representation of the mapping result as a dictionary.

+
+ + + +
- (NSDictionary *)dictionary
+ + + + + +
+

Return Value

+

A dictionary containing the mapping results.

+
+ + + + + +
+

Discussion

+

Returns a representation of the mapping result as a dictionary.

+ +

The keys of the returned dictionary will correspond to the mapped key paths in the source object representation and the values will be the mapped objects. The returned value is a copy of the dictionary that was used to initialize the mapping result.

+
+ + + + + + + +
+

Declared In

+ RKMappingResult.h
+
+ + +
+ +
+ +

firstObject

+ + + +
+

Returns a representation of the mapping result as a single object by returning the first mapped value from the aggregate array of mapped objects.

+
+ + + +
- (id)firstObject
+ + + + + +
+

Return Value

+

The first object contained in the mapping result.

+
+ + + + + +
+

Discussion

+

Returns a representation of the mapping result as a single object by returning the first mapped value from the aggregate array of mapped objects.

+ +

The mapping result is coerced into a single object by retrieving all mapped objects and returning the first object. If the mapping result is empty, nil is returned.

+
+ + + + + + + +
+

Declared In

+ RKMappingResult.h
+
+ + +
+ +
+ +

initWithDictionary:

+ + + +
+

Initializes the receiver with a dictionary of mapped key paths and object values.

+
+ + + +
- (id)initWithDictionary:(NSDictionary *)dictionary
+ + + +
+

Parameters

+ +
+
dictionary
+

A dictionary wherein the keys represent mapped key paths and the values represent the objects mapped at those key paths. Cannot be nil.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given dictionary.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a dictionary of mapped key paths and object values.

+
+ + + + + + + +
+

Declared In

+ RKMappingResult.h
+
+ + +
+ +
+ +

set

+ + + +
+

Returns a representation of the mapping result as a set of objects.

+
+ + + +
- (NSSet *)set
+ + + + + +
+

Return Value

+

A set containing the objects contained in the mapping result.

+
+ + + + + +
+

Discussion

+

Returns a representation of the mapping result as a set of objects.

+ +

The set returned is a flattened collection of all mapped object values contained in the underlying dictionary result representation.

+
+ + + + + + + +
+

Declared In

+ RKMappingResult.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKMappingTest.html b/Pods/Documentation/RestKit/html/Classes/RKMappingTest.html new file mode 100644 index 00000000..f62605ba --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKMappingTest.html @@ -0,0 +1,1515 @@ + + + + + RKMappingTest Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKMappingTest.h
+ + + + +
+ +

Overview

+

An RKMappingTest object provides support for unit testing a RestKit object mapping operation by evaluation expectations against events recorded during an object mapping operation.

+
+ + + + + +
+ +

Tasks

+ + + +

Creating Tests

+ + + + + +

Setting Expectations

+ + + + + +

Verifying Results

+ +
    +
  • + + – performMapping +

    Performs the object mapping operation and records any mapping events that occur. The mapping events can be verified against expectation through a subsequent call to verify.

    +
    + + +
  • + + – verify +

    Verifies that the mapping is configured correctly by performing an object mapping operation and ensuring that all expectations are met.

    +
    + + +
  • + + – evaluate +

    Evaluates the expectations and returns a Boolean value indicating if all expectations are satisfied.

    +
    + + +
  • + + – evaluateExpectation:error: +

    Evaluates the given expectation against the mapping test and returns a Boolean value indicating if the expectation is met by the receiver.

    +
    + + +
  • +
+ + + +

Test Configuration

+ + + + + +

Core Data Integration

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

destinationObject

+ + + +
+

The destionation object being mapped to.

+
+ + + +
@property (nonatomic, strong, readonly) id destinationObject
+ + + + + + + + + +
+

Discussion

+

The destionation object being mapped to.

+ +

If nil, the mapping test will instantiate a destination object to perform the mapping by invoking [self.mappingOperationDataSource objectForMappableContent:self.sourceObject mapping:self.mapping] to obtain a new object from the data source and then assign the object as the value for the destinationObject property.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

managedObjectCache

+ + + +
+

The managed object cache to use when performing a mapping test.

+
+ + + +
@property (nonatomic, strong) id<RKManagedObjectCaching> managedObjectCache
+ + + + + + + + + +
+

Discussion

+

The managed object cache to use when performing a mapping test.

+ +

If the value of this property is nil and the test targets an entity mapping, an instance of RKFetchRequestManagedObjectCache will be constructed and used as the cache for the purposes of testing.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

managedObjectContext

+ + + +
+

The managed object context within which to perform the mapping test. Required if testing an RKEntityMapping object and an appropriate mappingOperationDataSource has not been configured.

+
+ + + +
@property (nonatomic, strong) NSManagedObjectContext *managedObjectContext
+ + + + + + + + + +
+

Discussion

+

The managed object context within which to perform the mapping test. Required if testing an RKEntityMapping object and an appropriate mappingOperationDataSource has not been configured.

+ +

When the mappingOperationDataSource property is nil and the test targets an entity mapping, this context is used to configure an RKManagedObjectMappingOperationDataSource object for the purpose of executing the test.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

mapping

+ + + +
+

The mapping under test. Can be either an RKObjectMapping or RKDynamicMapping object.

+
+ + + +
@property (nonatomic, strong, readonly) RKMapping *mapping
+ + + + + + + + + +
+

Discussion

+

The mapping under test. Can be either an RKObjectMapping or RKDynamicMapping object.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

mappingOperationDataSource

+ + + +
+

A data source for the mapping operation.

+
+ + + +
@property (nonatomic, strong) id<RKMappingOperationDataSource> mappingOperationDataSource
+ + + + + + + + + +
+

Discussion

+

A data source for the mapping operation.

+ +

If nil, an appropriate data source will be constructed for you using the available configuration of the receiver.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

rootKeyPath

+ + + +
+

A key path to apply to the source object to specify the location of the root of the data under test. Useful when testing subsets of a larger payload or object graph.

+
+ + + +
@property (nonatomic, copy) NSString *rootKeyPath
+ + + + + + + + + +
+

Discussion

+

A key path to apply to the source object to specify the location of the root of the data under test. Useful when testing subsets of a larger payload or object graph.

+ +

Default: nil

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

sourceObject

+ + + +
+

The source object being mapped from.

+
+ + + +
@property (nonatomic, strong, readonly) id sourceObject
+ + + + + + + + + +
+

Discussion

+

The source object being mapped from.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

verifiesOnExpect

+ + + +
+

A Boolean value that determines if expectations should be verified immediately when added to the receiver.

+
+ + + +
@property (nonatomic, assign) BOOL verifiesOnExpect
+ + + + + + + + + +
+

Discussion

+

A Boolean value that determines if expectations should be verified immediately when added to the receiver.

+ +

Default: NO

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

testForMapping:sourceObject:destinationObject:

+ + + +
+

Creates and returns a new test for a given object mapping, source object and destination +object.

+
+ + + +
+ (RKMappingTest *)testForMapping:(RKMapping *)mapping sourceObject:(id)sourceObject destinationObject:(id)destinationObject
+ + + +
+

Parameters

+ +
+
mapping
+

The mapping being tested.

+
+ +
+
sourceObject
+

The source object being mapped from.

+
+ +
+
destinationObject
+

The destionation object being to.

+
+ +
+ + + +
+

Return Value

+

A new mapping test object for a mapping, a source object and a destination object.

+
+ + + + + +
+

Discussion

+

Creates and returns a new test for a given object mapping, source object and destination +object.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

addExpectation:

+ + + +
+

Adds an expectation to the receiver to be evaluated during verification.

+
+ + + +
- (void)addExpectation:(RKMappingTestExpectation *)expectation
+ + + +
+

Parameters

+ +
+
expectation
+

An expectation object to evaluate during test verification.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds an expectation to the receiver to be evaluated during verification.

+ +

If the receiver has been configured with verifiesOnExpect = YES, the mapping operation is performed immediately and the expectation is evaluated.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

evaluate

+ + + +
+

Evaluates the expectations and returns a Boolean value indicating if all expectations are satisfied.

+
+ + + +
- (BOOL)evaluate
+ + + + + +
+

Return Value

+

YES if all expectations were met, else NO.

+
+ + + + + +
+

Discussion

+

Evaluates the expectations and returns a Boolean value indicating if all expectations are satisfied.

+ +

Invocation of this method will implicitly invoke performMapping if the mapping has not yet been performed.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

evaluateExpectation:error:

+ + + +
+

Evaluates the given expectation against the mapping test and returns a Boolean value indicating if the expectation is met by the receiver.

+
+ + + +
- (BOOL)evaluateExpectation:(RKMappingTestExpectation *)expectation error:(NSError **)error
+ + + +
+

Parameters

+ +
+
expectation
+

The expectation to evaluate against the receiver.

+
+ +
+
error
+

A pointer to an NSError object to be set describing the failure in the event that the expectation is not met.

+
+ +
+ + + +
+

Return Value

+

YES if the expectation is met, else NO.

+
+ + + + + +
+

Discussion

+

Evaluates the given expectation against the mapping test and returns a Boolean value indicating if the expectation is met by the receiver.

+ +

Invocation of this method will implicitly invoke performMapping if the mapping has not yet been performed.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

expectMappingFromKeyPath:toKeyPath:

+ + + +
+

Creates and adds an expectation that a key path on the source object will be mapped to a new key path on the destination object.

+
+ + + +
- (void)expectMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath
+ + + +
+

Parameters

+ +
+
sourceKeyPath
+

A key path on the sourceObject that should be mapped from.

+
+ +
+
destinationKeyPath
+

A key path on the destinationObject that should be mapped to.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates and adds an expectation that a key path on the source object will be mapped to a new key path on the destination object.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

expectMappingFromKeyPath:toKeyPath:passingTest:

+ + + +
+

Creates and adds an expectation that a key path on the source object will be mapped to a new key path on the destination object with a value that passes a given test block.

+
+ + + +
- (void)expectMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath passingTest:(RKMappingTestExpectationEvaluationBlock)evaluationBlock
+ + + +
+

Parameters

+ +
+
sourceKeyPath
+

A key path on the sourceObject that should be mapped from.

+
+ +
+
destinationKeyPath
+

A key path on the destinationObject that should be mapped to.

+
+ +
+
evaluationBlock
+

A block with which to evaluate the success of the mapping.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates and adds an expectation that a key path on the source object will be mapped to a new key path on the destination object with a value that passes a given test block.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

expectMappingFromKeyPath:toKeyPath:usingMapping:

+ + + +
+

Creates and adds an expectation that a key path on the source object will be mapped to a new key path on the destination object using the given object mapping.

+
+ + + +
- (void)expectMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath usingMapping:(RKMapping *)mapping
+ + + +
+

Parameters

+ +
+
sourceKeyPath
+

A key path on the sourceObject that should be mapped from.

+
+ +
+
destinationKeyPath
+

A key path on the destinationObject that should be mapped to.

+
+ +
+
mapping
+

An object mapping that should be used for mapping the source key path.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates and adds an expectation that a key path on the source object will be mapped to a new key path on the destination object using the given object mapping.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

expectMappingFromKeyPath:toKeyPath:withValue:

+ + + +
+

Creates and adds an expectation that a key path on the source object will be mapped to a new key path on the destination object with a given value.

+
+ + + +
- (void)expectMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath withValue:(id)value
+ + + +
+

Parameters

+ +
+
sourceKeyPath
+

A key path on the sourceObject that should be mapped from.

+
+ +
+
destinationKeyPath
+

A key path on the destinationObject that should be mapped from.

+
+ +
+
value
+

A value that is expected to be assigned to destinationKeyPath on the destinationObject.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates and adds an expectation that a key path on the source object will be mapped to a new key path on the destination object with a given value.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

initWithMapping:sourceObject:destinationObject:

+ + + +
+

Initializes the receiver with a given object mapping, source object, and destination object.

+
+ + + +
- (id)initWithMapping:(RKMapping *)mapping sourceObject:(id)sourceObject destinationObject:(id)destinationObject
+ + + +
+

Parameters

+ +
+
mapping
+

The mapping being tested.

+
+ +
+
sourceObject
+

The source object being mapped from.

+
+ +
+
destinationObject
+

The destionation object being to.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with mapping, sourceObject and destinationObject.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a given object mapping, source object, and destination object.

+
+ + + + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

performMapping

+ + + +
+

Performs the object mapping operation and records any mapping events that occur. The mapping events can be verified against expectation through a subsequent call to verify.

+
+ + + +
- (void)performMapping
+ + + + + + + + + +
+

Discussion

+

Performs the object mapping operation and records any mapping events that occur. The mapping events can be verified against expectation through a subsequent call to verify.

+
+ + + +
+

Exceptions

+ +
+
NSInternalInconsistencyException
+

Raises an NSInternalInconsistencyException if mapping fails.

+
+ +
+ + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ +

verify

+ + + +
+

Verifies that the mapping is configured correctly by performing an object mapping operation and ensuring that all expectations are met.

+
+ + + +
- (void)verify
+ + + + + + + + + +
+

Discussion

+

Verifies that the mapping is configured correctly by performing an object mapping operation and ensuring that all expectations are met.

+
+ + + +
+

Exceptions

+ +
+
RKMappingTestVerificationFailureException
+

Raises an RKMappingTestVerificationFailureException exception if mapping fails or any expectation is not satisfied.

+
+ +
+ + + + + +
+

Declared In

+ RKMappingTest.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKMappingTestExpectation.html b/Pods/Documentation/RestKit/html/Classes/RKMappingTestExpectation.html new file mode 100644 index 00000000..51d5f7dd --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKMappingTestExpectation.html @@ -0,0 +1,918 @@ + + + + + RKMappingTestExpectation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKMappingTestExpectation.h
+ + + + +
+ +

Overview

+

An RKMappingTestExpectation object defines an expected mapping event that should occur during the execution of a RKMappingTest.

+
+ + + + + +
+ +

Tasks

+ + + +

Creating Expectations

+ + + + + +

Expectation Values

+ +
    +
  • + +   sourceKeyPath +

    Returns a keyPath on the source object that a value should be mapped from.

    +
    + property + +
  • + +   destinationKeyPath +

    Returns a keyPath on the destination object that a value should be mapped to.

    +
    + property + +
  • + +   value +

    Returns the expected value that should be set to the destinationKeyPath of the destination object.

    +
    + property + +
  • + +   evaluationBlock +

    A block used to evaluate if the expectation has been satisfied.

    +
    + property + +
  • + +   mapping +

    Returns the expected object mapping to be used for mapping a nested relationship.

    +
    + property + +
  • + + – mappingDescription +

    Returns a string summary of the expected keyPath mapping within the expectation

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

destinationKeyPath

+ + + +
+

Returns a keyPath on the destination object that a value should be mapped to.

+
+ + + +
@property (nonatomic, copy, readonly) NSString *destinationKeyPath
+ + + + + + + + + +
+

Discussion

+

Returns a keyPath on the destination object that a value should be mapped to.

+
+ + + + + + + +
+

Declared In

+ RKMappingTestExpectation.h
+
+ + +
+ +
+ +

evaluationBlock

+ + + +
+

A block used to evaluate if the expectation has been satisfied.

+
+ + + +
@property (nonatomic, copy, readonly) RKMappingTestExpectationEvaluationBlock evaluationBlock
+ + + + + + + + + +
+

Discussion

+

A block used to evaluate if the expectation has been satisfied.

+ +

The block accepts three arguments, an RKPropertyMapping object denoting the attribute or relationship that was mapped, the mapped value, and a pointer to an error object that is to be set if the block evaluates negatively, and returns a Boolean value indicating if the mapping satisfies the expectations of the block.

+
+ + + + + + + +
+

Declared In

+ RKMappingTestExpectation.h
+
+ + +
+ +
+ +

mapping

+ + + +
+

Returns the expected object mapping to be used for mapping a nested relationship.

+
+ + + +
@property (nonatomic, strong, readonly) RKMapping *mapping
+ + + + + + + + + +
+

Discussion

+

Returns the expected object mapping to be used for mapping a nested relationship.

+
+ + + + + + + +
+

Declared In

+ RKMappingTestExpectation.h
+
+ + +
+ +
+ +

sourceKeyPath

+ + + +
+

Returns a keyPath on the source object that a value should be mapped from.

+
+ + + +
@property (nonatomic, copy, readonly) NSString *sourceKeyPath
+ + + + + + + + + +
+

Discussion

+

Returns a keyPath on the source object that a value should be mapped from.

+
+ + + + + + + +
+

Declared In

+ RKMappingTestExpectation.h
+
+ + +
+ +
+ +

value

+ + + +
+

Returns the expected value that should be set to the destinationKeyPath of the destination object.

+
+ + + +
@property (nonatomic, strong, readonly) id value
+ + + + + + + + + +
+

Discussion

+

Returns the expected value that should be set to the destinationKeyPath of the destination object.

+
+ + + + + + + +
+

Declared In

+ RKMappingTestExpectation.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

expectationWithSourceKeyPath:destinationKeyPath:

+ + + +
+

Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destination object. The value mapped is not evaluated.

+
+ + + +
+ (RKMappingTestExpectation *)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath
+ + + +
+

Parameters

+ +
+
sourceKeyPath
+

A key path on the source object that should be mapped.

+
+ +
+
destinationKeyPath
+

A key path on the destination object that should be mapped onto.

+
+ +
+ + + +
+

Return Value

+

An expectation specifying that sourceKeyPath should be mapped to destinationKeyPath.

+
+ + + + + +
+

Discussion

+

Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destination object. The value mapped is not evaluated.

+
+ + + + + + + +
+

Declared In

+ RKMappingTestExpectation.h
+
+ + +
+ +
+ +

expectationWithSourceKeyPath:destinationKeyPath:evaluationBlock:

+ + + +
+

Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destinaton object and that the attribute mapping and value should evaluate to true with a given block.

+
+ + + +
+ (RKMappingTestExpectation *)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath evaluationBlock:(RKMappingTestExpectationEvaluationBlock)evaluationBlock
+ + + +
+

Parameters

+ +
+
sourceKeyPath
+

A key path on the source object that should be mapped.

+
+ +
+
destinationKeyPath
+

A key path on the destination object that should be mapped onto.

+
+ +
+
evaluationBlock
+

A block with which to evaluate the success of the mapping.

+
+ +
+ + + +
+

Return Value

+

An expectation specifying that sourceKeyPath should be mapped to destinationKeyPath with value.

+
+ + + + + +
+

Discussion

+

Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destinaton object and that the attribute mapping and value should evaluate to true with a given block.

+
+ + + + + + + +
+

Declared In

+ RKMappingTestExpectation.h
+
+ + +
+ +
+ +

expectationWithSourceKeyPath:destinationKeyPath:mapping:

+ + + +
+

Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destinaton object using a specific object mapping for the relationship.

+
+ + + +
+ (RKMappingTestExpectation *)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath mapping:(RKMapping *)mapping
+ + + +
+

Parameters

+ +
+
sourceKeyPath
+

A key path on the source object that should be mapped.

+
+ +
+
destinationKeyPath
+

A key path on the destination object that should be mapped onto.

+
+ +
+
mapping
+

An object mapping that is expected to be used for mapping the nested relationship.

+
+ +
+ + + +
+

Return Value

+

An expectation specifying that sourceKeyPath should be mapped to destinationKeyPath using a specific object mapping.

+
+ + + + + +
+

Discussion

+

Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destinaton object using a specific object mapping for the relationship.

+
+ + + + + + + +
+

Declared In

+ RKMappingTestExpectation.h
+
+ + +
+ +
+ +

expectationWithSourceKeyPath:destinationKeyPath:value:

+ + + +
+

Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destination object with a given value.

+
+ + + +
+ (RKMappingTestExpectation *)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath value:(id)value
+ + + +
+

Parameters

+ +
+
sourceKeyPath
+

A key path on the source object that should be mapped.

+
+ +
+
destinationKeyPath
+

A key path on the destination object that should be mapped onto.

+
+ +
+
value
+

The value that is expected to be assigned to the destination object at destinationKeyPath.

+
+ +
+ + + +
+

Return Value

+

An expectation specifying that sourceKeyPath should be mapped to destinationKeyPath with value.

+
+ + + + + +
+

Discussion

+

Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destination object with a given value.

+
+ + + + + + + +
+

Declared In

+ RKMappingTestExpectation.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

mappingDescription

+ + + +
+

Returns a string summary of the expected keyPath mapping within the expectation

+
+ + + +
- (NSString *)mappingDescription
+ + + + + +
+

Return Value

+

A string describing the expected sourceKeyPath to destinationKeyPath mapping.

+
+ + + + + +
+

Discussion

+

Returns a string summary of the expected keyPath mapping within the expectation

+
+ + + + + + + +
+

Declared In

+ RKMappingTestExpectation.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKNSJSONSerialization.html b/Pods/Documentation/RestKit/html/Classes/RKNSJSONSerialization.html new file mode 100644 index 00000000..cc30585c --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKNSJSONSerialization.html @@ -0,0 +1,228 @@ + + + + + RKNSJSONSerialization Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + + + + +
Inherits fromNSObject
Conforms toRKSerialization
Declared inRKNSJSONSerialization.h
+ + + + +
+ +

Overview

+

The RKNSJSONSerialization class conforms to the RKSerialization protocol and provides support for the serialization and deserialization of data in the JSON format using the Apple provided NSJSONSerialization class. This is the default JSON implementation for RestKit.

+
+ + + + + + + + + + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKObjectManager.html b/Pods/Documentation/RestKit/html/Classes/RKObjectManager.html new file mode 100644 index 00000000..9f75733e --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKObjectManager.html @@ -0,0 +1,3608 @@ + + + + + RKObjectManager Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKObjectManager.h
+ + + + +
+ +

Overview

+

The RKObjectManager class provides a centralized interface for performing object mapping based HTTP request and response operations. It encapsulates common configuration such as request/response descriptors and routing, provides for the creation of NSURLRequest and RKObjectRequestOperation objects, and one-line methods to enqueue object request operations for the basic HTTP request methods (GET, POST, PUT, DELETE, etc).

+ +

Object Request Operations

+ +

Object request operations model the lifecycle of an object mapped HTTP request from start to finish. They are initialized with a fully configured NSURLRequest object and a set of RKResponseDescriptor objects that specify how an HTTP response is to be mapped into local domain objects. Object request operations may be constructed as standalone objects, but are often constructed through an RKObjectManager object. The object request operation encapsulates the functionality of two underlying operations that perform the bulk of the work. The HTTP request and response loading is handled by an RKHTTPRequestOperation, which is responsible for the HTTP transport details. Once a response has been successfully loaded, the object request operation starts an RKResponseMapperOperation that is responsible for handling the mapping of the response body. When working with Core Data, the RKManagedObjectRequestOperation class is used. The object manager encapsulates the Core Data configuration details and provides an interface that will return the appropriate object request operation for a request through the appropriateObjectRequestOperationWithObject:method:path:parameters: method.

+ +

The Base URL and Path Patterns

+ +

Each object manager is configured with a base URL that defines the URL that all request sent through the manager will be relative to. The base URL is configured directly through the managerWithBaseURL: method or is inherited from an AFNetworking AFHTTPClient object if the manager is initialized via the initWithHTTPClient: method. The base URL can point directly at the root of a URL or may include a path.

+ +

Path patterns are a common unit of abstraction in RestKit for describing the path portion of URL’s. When working with API’s, there is typically one or more dynamic portions of the URL that correspond to primary keys or other identifying resource attributes. For example, a blogging application may represent articles in a URL structure such as ‘/articles/1234’ and comments about an article might appear at ‘/articles/1234/comments’. These path structures could be represented as the path patterns ‘/articles/:articleID’ and ‘/articles/:articleID/comments’, substituing the dynamic key ‘:articleID’ in place of the primary key of in the path. These keys can be used to interpolate a path with an object’s property values using key-value coding or be used to match a string.

+ +

Path patterns appear throughout RestKit, but the most fundamental uses are for the dynamic generation of URL paths from objects and the matching of request and response URLs for mapping configuration. When generating a URL, a path pattern is interpolated with the value of an object. Consider this example:

+ +
// Set object attributes
+RKArticle *article = [RKArticle new];
+article.articleID = @12345;
+
+// Interpolate with the object
+NSString *path = RKPathFromPatternWithObject(@"/articles/:articleID", article);
+NSLog(@"The path is %@", path); // prints /articles/12345
+
+ +

This may at first glance appear to provide only a small syntactic improvement over using [NSString stringWithFormat:], but it becomes more interesting once you consider that the dynamic key can include key path:

+ +
RKCategory *category = [RKCategory new];
+comment.name = @"RestKit;
+article.category = category;
+
+NSString *path = RKPathFromPatternWithObject(@"/categories/:comment.name/articles/:articleID/comments/", article);
+NSLog(@"The path is %@", path); // prints /categories/RestKit/articles/12345
+
+ +

These path patterns can then be registered with the manager via an RKRoute object (discussed in detail below), enabling one to perform object request operations like so:

+ +
RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://restkit.org"]http://restkit.org"]];
+[manager.router.routeSet addRoute:[RKRoute routeWithClass:[RKArticle class] pathPattern:@"/categories/:comment.name/articles/:articleID/comments/" method:RKRequestMethodGET]];
+
+// Now GET our article object... sending a GET to '/categories/RestKit/articles/12345'
+[manager getObject:article path:nil parameters:nil success:^(RKObjectRequestOperation *operation, RKMappingResult *result) {
+    NSLog(@"Loading mapping result: %@", result);
+} failure:nil];
+
+ +

Once a path pattern has been registered via the routing system, the manager can automatically build full request URL’s when given nothing but the object to be sent.

+ +

The second use case of path patterns is in the matching of path into a dictionary of attributes. In this case, the path pattern is evaluatd against a string and used to construct an NSDictionary object containing the matched key paths, optionally including the values of a query string. This functionality is provided via the RKPathMatcher class and is discussed in detail in the accompanying documentation.

+ +

Request and Response Descriptors

+ +

RestKit centralizes configuration for object mapping configurations into the object manager through RKRequestDescriptor and RKResponseDescriptor objects. A collection of each of these object types are maintained by the manager and used to initialize all RKObjectRequestOperation objects created by the manager.

+ +

Request descriptors describe how NSURLRequest objects constructed by the manager will be built by specifying how the attributes and relationships for a given class will be object mapped to construct request parameters and what, if any, root key path the parameters will be nested under. Request descriptor objects can also be used with the RKObjectParameterization class to map an object into an NSDictionary representation that is suitable for use as the parameters of a request.

+ +

Response descriptors describe how NSHTTPURLResponse objects loaded by object request operations sent by the manager are to be object mapped into local domain objects. Response descriptors are matched against a given response via URL path matching, parsed content key path matching, or both. The RKMapping object associated from a matched RKResponseDescriptor is given to an instance of RKMapperOperation with the parsed response body to perform object mapping on the response.

+ +

To better illustrate these concepts, consider the following example for an imaginary Wiki client application:

+ +
@interface RKWikiPage : NSObject
+@property (nonatomic, copy) NSString *title;
+@property (nonatomic, copy) NSString *body;
+@end     
+
+// Construct a request mapping for our class
+RKObjectMapping *requestMapping = [RKObjectMapping requestMapping];
+[requestMapping addAttributeMappingsFromDictionary:@{ @"title": @"title", @"body": @"body" }];
+
+// We wish to generate parameters of the format: 
+// @{ @"page": @{ @"title": @"An Example Page", @"body": @"Some example content" } }
+RKRequestDescriptor *requestDescriptor = [RKRequestDescriptor requestDescriptorWithMapping:mapping
+                                                                               objectClass:[RKWikiPage class]
+                                                                               rootKeyPath:@"page"];
+
+// Construct an object mapping for the response
+// We are expecting JSON in the format:
+// {"page": {"title": "<title value>", "body": "<body value>"}
+RKObjectMapping *responseMapping = [RKObjectMapping mappingForClass:[RKWikiPage class]];
+[responseMapping addAttributeMappingsFromArray:@[ @"title", @"body" ]];
+
+// Construct a response descriptor that matches any URL (the pathPattern is nil), when the response payload
+// contains content nested under the `@"page"` key path, if the response status code is 200 (OK)
+RKResponseDescriptor *responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:responseMapping
+                                                                                   pathPattern:nil
+                                                                                       keyPath:@"page"
+                                                                                   statusCodes:[NSIndexSet indexSetWithIndex:200]];
+
+// Register our descriptors with a manager
+RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://restkit.org/"]http://restkit.org/"]];
+[manager addRequestDescriptor:requestDescriptor];
+[manager addResponseDescriptor:responseDescriptor];
+
+// Work with the object
+RKWikiPage *page = [RKWikiPage new];
+page.title = @"An Example Page";
+page.body  = @"Some example content";
+
+// POST the parameterized representation of the `page` object to `/posts` and map the response
+[manager postObject:page path:@"/pages" parameters:nil success:^(RKObjectRequestOperation *operation, RKMappingResult *result) {
+    NSLog(@"We object mapped the response with the following result: %@", result);
+} failure:nil];
+
+ +

In the above example, request and response mapping configurations were described for a simple data model and then used to perform a basic POST operation and map the results. An arbitrary number of request and response descriptors may be added to the manager to accommodate your application’s needs.

+ +

MIME Types

+ +

MIME Types serve an important function to the object manager. They are used to identify how content is to be serialized when constructing request bodies and also used to set the ‘Accept’ header for content negotiation. RestKit aspires to be content type agnostic by leveraging the pluggable RKMIMESerialization class to handle content serialization and deserialization.

+ +

Routing

+ +

Routing is the process of generating an NSURL appropriate for a particular HTTP server request interaction. Using routing instead of hard-coding paths enables centralization of configuration and allows the developer to focus on what they want done rather than the details of how to do it. Changes to the URL structure in the application can be made in one place. Routes can also be useful in testing, as they permit for the changing of paths at run-time.

+ +

Routing interfaces are provided by the RKRouter class. Each object manager is in initialized with an RKRouter object with a baseURL equal to the baseURL of the underlying AFHTTPClient object. Each RKRouter instance maintains an RKRouteSet object that manages a collection of RKRoute objects. Routes are defined in terms of a path pattern.

+ +

There are three types of routes currently supported:

+ +
    +
  1. Class Routes. Class routes are configured to target a given object class and HTTP request method. For example, we might route the HTTP GET for a User class to the path pattern @"/users/:userID".
  2. +
  3. Relationship Routes. Relationship routes identify the path appropriate for performing a request for an object that is related to another object. For example, each User may have many friends. This might be routed as a relationship route for the User class with the name @"friends" to the path pattern @"/users/:userID/friends".
  4. +
  5. Named Routes. Names routes bind an arbitrary name to a path. For example, there might be an action to follow another user that could be added as a named route with the name @"follow_user" that generates a POST to the path pattern @"/users/:userID/follow".
  6. +
+ + +

To better understand these concepts, please consider the following example code for configuring the above routing examples:

+ +
RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://restkit.org"]http://restkit.org"]];
+
+// Class Route
+[manager.router.routeSet addRoute:[RKRoute routeWithClass:[User class] pathPattern:@"/users/:userID" method:RKRequestMethodGET]];
+
+// Relationship Route
+[manager.router.routeSet addRoute:[RKRoute routeWithRelationshipName:@"friends" objectClass:[User class] pathPattern:@"/users/:userID/friends" method:RKRequestMethodGET]];
+
+// Named Route
+[manager.router.routeSet addRoute:[RKRoute routeWithName:@"follow_user" pathPattern:@"/users/:userID/follow" method:RKRequestMethodPOST]];
+
+ +

Once configured, routes will be consulted by the object manager whenever the path parameter provided to a method is given as nil. For example, invoking the following code would result in a GET to the path @"/users/1234":

+ +
User *user = [User new];
+user.userID = 1234;
+[manager getObject:user path:nil parameters:nil success:^(RKObjectRequestOperation *operation, RKMappingResult *result) {
+    // Request 
+} failure:nil];
+
+ +

Routes can also be explicitly used to construct NSMutableURLRequest objects and are referenced explicitly in a few object request operation methods:

+ +
    +
  1. requestWithObject:method:path:parameters: – Consults routing when path is nil.
  2. +
  3. multipartFormRequestWithObject:method:path:parameters:constructingBodyWithBlock: – Consults routing when path is nil.
  4. +
  5. requestWithPathForRouteNamed:object:parameters: – Explicitly retrieves the route with the given name.
  6. +
  7. getObjectsAtPathForRelationship:ofObject:parameters:success:failure: – Explicitly retrieves the route for the given name and object class.
  8. +
  9. getObjectsAtPathForRouteNamed:object:parameters:success:failure: – Explicitly retrieves the route for the given name.
  10. +
+ + +

Please see the documentation for RKRouter, RKRouteSet, and RKRoute for more details about the routing classes.

+ +

Core Data

+ +

RestKit features deep integration with Apple’s Core Data persistence framework. The object manager provides access to this integration by creating RKManagedObjectRequestOperation objects when an attempt is made to interact with a resource that has been mapped using an RKEntityMapping. To utilize the Core Data integration, the object manager must be provided with a fully configured RKManagedObjectStore object. The RKManagedObjectStore provides access to the NSManagedObjectModel and NSManagedObjectContext objects required to peform object mapping that targets a Core Data entity.

+ +

Please see the documentation for RKManagedObjectStore, RKEntityMapping, and RKManagedObjectRequestOperation for in depth information about Core Data in RestKit.

+ +

Subclassing Notes

+ +

The object manager is designed to support subclassing. The default behaviors can be altered and tailored to the specific needs of your application easily by manipulating a few core methods:

+ + + + +

Also note that the behavior of the lower level HTTP details can also be altered by subclassing AFHTTPClient and using an instance of your subclassed client to initialize the manager.

Warning: Note that when subclassing AFHTTPClient to change object manager behaviors it is not possible to alter the paramters of requests that are constructed on behalf of the manager. This is because the object manager handles its own serialization and construction of the request body, but defers to the AFHTTPClient for all other details (such as default HTTP headers, etc).

+
+ + + + + +
+ +

Tasks

+ + + +

Configuring the Shared Manager Instance

+ + + + + +

Initializing an Object Manager

+ +
    +
  • + + + managerWithBaseURL: +

    Creates and returns a new RKObjectManager object initialized with a new AFHTTPClient object that was in turn initialized with the given base URL. The RestKit defaults are applied to the object manager.

    +
    + + +
  • + + – initWithHTTPClient: +

    Initializes the receiver with the given AFNetworking HTTP client object, adopting the network configuration from the client.

    +
    + + +
  • +
+ + + +

Accessing Object Manager Properties

+ +
    +
  • + +   HTTPClient +

    The AFNetworking HTTP client with which the receiver makes requests.

    +
    + property + +
  • + +   baseURL +

    The base URL of the underlying HTTP client.

    +
    + property + +
  • + +   defaultHeaders +

    The default HTTP headers for all NSURLRequest objects constructed by the object manager.

    +
    + property + +
  • + +   operationQueue +

    The operation queue which manages operations enqueued by the object manager.

    +
    + property + +
  • + +   router +

    The router used to generate URL objects for routable requests created by the manager.

    +
    + property + +
  • +
+ + + +

Configuring Request and Response MIME Types

+ + + + + +

Creating Request Objects

+ + + + + +

Creating Object Request Operations

+ + + + + +

Managing Enqueued Object Request Operations

+ + + + + +

Batching Object Request Operations

+ + + + + +

Making Object Requests by Path

+ + + + + +

Making Object Requests for an Object

+ + + + + +

Managing Request and Response Descriptors

+ + + + + +

Configuring Core Data Integration

+ +
    +
  • + +   managedObjectStore +

    A Core Data backed object store for persisting objects that have been fetched from the Web

    +
    + property + +
  • + +   fetchRequestBlocks +

    An array of RKFetchRequestBlock blocks used to map NSURL objects into corresponding NSFetchRequest objects.

    +
    + property + +
  • + + – addFetchRequestBlock: +

    Adds the given RKFetchRequestBlock block to the manager.

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

HTTPClient

+ + + +
+

The AFNetworking HTTP client with which the receiver makes requests.

+
+ + + +
@property (nonatomic, strong, readonly) AFHTTPClient *HTTPClient
+ + + + + + + + + +
+

Discussion

+

The AFNetworking HTTP client with which the receiver makes requests.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

baseURL

+ + + +
+

The base URL of the underlying HTTP client.

+
+ + + +
@property (nonatomic, readonly) NSURL *baseURL
+ + + + + + + + + +
+

Discussion

+

The base URL of the underlying HTTP client.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

defaultHeaders

+ + + +
+

The default HTTP headers for all NSURLRequest objects constructed by the object manager.

+
+ + + +
@property (nonatomic, readonly) NSDictionary *defaultHeaders
+ + + + + + + + + +
+

Discussion

+

The default HTTP headers for all NSURLRequest objects constructed by the object manager.

+ +

The returned dictionary contains all of the default headers set on the underlying AFHTTPClient object and the value of the ‘Accept’ header set on the object manager, if any.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

fetchRequestBlocks

+ + + +
+

An array of RKFetchRequestBlock blocks used to map NSURL objects into corresponding NSFetchRequest objects.

+
+ + + +
@property (nonatomic, readonly) NSArray *fetchRequestBlocks
+ + + + + + + + + +
+

Discussion

+

An array of RKFetchRequestBlock blocks used to map NSURL objects into corresponding NSFetchRequest objects.

+ +

When searched, the blocks are iterated in the reverse-order of their registration and the first block with a non-nil return value halts the search.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

managedObjectStore

+ + + +
+

A Core Data backed object store for persisting objects that have been fetched from the Web

+
+ + + +
@property (nonatomic, strong) RKManagedObjectStore *managedObjectStore
+ + + + + + + + + +
+

Discussion

+

A Core Data backed object store for persisting objects that have been fetched from the Web

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

operationQueue

+ + + +
+

The operation queue which manages operations enqueued by the object manager.

+
+ + + +
@property (nonatomic, strong) NSOperationQueue *operationQueue
+ + + + + + + + + +
+

Discussion

+

The operation queue which manages operations enqueued by the object manager.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

requestDescriptors

+ + + +
+

Returns an array containing the RKRequestDescriptor objects added to the manager.

+
+ + + +
@property (nonatomic, readonly) NSArray *requestDescriptors
+ + + + + +
+

Return Value

+

An array containing the request descriptors of the receiver. The elements of the array are instances of RKRequestDescriptor.

+
+ + + + + +
+

Discussion

+

Returns an array containing the RKRequestDescriptor objects added to the manager.

+
+ + + + + +
+

See Also

+ +
+ + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

requestSerializationMIMEType

+ + + +
+

The MIME Type to serialize request parameters into when constructing request objects.

+
+ + + +
@property (nonatomic, strong) NSString *requestSerializationMIMEType
+ + + + + + + + + +
+

Discussion

+

The MIME Type to serialize request parameters into when constructing request objects.

+ +

The value of the requestSerializationMIMEType is used to obtain an appropriate RKSerialization conforming class from the RKMIMESerialization interface. Parameterized objects and dictionaries of parameters are then serialized for transport using the class registered for the MIME Type. By default, the value is RKMIMETypeFormURLEncoded which means that the request body of all POST, PUT, and PATCH requests will be sent in the URL encoded format. This is analagous to submitting an HTML form via a web browser. Other common formats include RKMIMETypeJSON, which will cause request bodies to be encoded as JSON.

+ +

The value given for the requestSerializationMIMEType must correspond to a MIME Type registered via [RKMIMETypeSerialization registerClass:forMIMEType:]. Implementations are provided by default for RKMIMETypeFormURLEncoded and RKMIMETypeJSON.

+ +

Default: RKMIMETypeFormURLEncoded or the value of the parameter encoding for the underlying AFHTTPClient.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

responseDescriptors

+ + + +
+

Returns an array containing the RKResponseDescriptor objects added to the manager.

+
+ + + +
@property (nonatomic, readonly) NSArray *responseDescriptors
+ + + + + +
+

Return Value

+

An array containing the request descriptors of the receiver. The elements of the array are instances of RKRequestDescriptor.

+
+ + + + + +
+

Discussion

+

Returns an array containing the RKResponseDescriptor objects added to the manager.

+
+ + + + + +
+

See Also

+ +
+ + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

router

+ + + +
+

The router used to generate URL objects for routable requests created by the manager.

+
+ + + +
@property (nonatomic, strong) RKRouter *router
+ + + + + + + + + +
+

Discussion

+

The router used to generate URL objects for routable requests created by the manager.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

managerWithBaseURL:

+ + + +
+

Creates and returns a new RKObjectManager object initialized with a new AFHTTPClient object that was in turn initialized with the given base URL. The RestKit defaults are applied to the object manager.

+
+ + + +
+ (id)managerWithBaseURL:(NSURL *)baseURL
+ + + +
+

Parameters

+ +
+
baseURL
+

The base URL with which to initialize the AFHTTPClient object

+
+ +
+ + + +
+

Return Value

+

A new RKObjectManager initialized with an AFHTTPClient that was initialized with the given baseURL.

+
+ + + + + +
+

Discussion

+

Creates and returns a new RKObjectManager object initialized with a new AFHTTPClient object that was in turn initialized with the given base URL. The RestKit defaults are applied to the object manager.

+ +

When initialized with a base URL, the returned object manager will have a requestSerializationMIMEType with the value of RKMIMETypeFormURLEncoded and a default value for the ‘Accept’ header set to RKMIMETypeJSON.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

setSharedManager:

+ + + +
+

Set the shared instance of the object manager

+
+ + + +
+ (void)setSharedManager:(RKObjectManager *)manager
+ + + +
+

Parameters

+ +
+
manager
+

The new shared manager instance.

+
+ +
+ + + + + + + +
+

Discussion

+

Set the shared instance of the object manager

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

sharedManager

+ + + +
+

Return the shared instance of the object manager

+
+ + + +
+ (RKObjectManager *)sharedManager
+ + + + + +
+

Return Value

+

The shared manager instance.

+
+ + + + + +
+

Discussion

+

Return the shared instance of the object manager

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

addFetchRequestBlock:

+ + + +
+

Adds the given RKFetchRequestBlock block to the manager.

+
+ + + +
- (void)addFetchRequestBlock:(RKFetchRequestBlock)block
+ + + +
+

Parameters

+ +
+
A
+

block object to be executed when constructing an NSFetchRequest object from a given NSURL. The block has a return type of NSFetchRequest and accepts a single NSURL argument.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds the given RKFetchRequestBlock block to the manager.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

addRequestDescriptor:

+ + + +
+

Adds a request descriptor to the manager.

+
+ + + +
- (void)addRequestDescriptor:(RKRequestDescriptor *)requestDescriptor
+ + + +
+

Parameters

+ +
+
requestDescriptor
+

The request descriptor object to the be added to the manager.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds a request descriptor to the manager.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

addRequestDescriptorsFromArray:

+ + + +
+

Adds the RKRequestDescriptor objects contained in a given array to the manager.

+
+ + + +
- (void)addRequestDescriptorsFromArray:(NSArray *)requestDescriptors
+ + + +
+

Parameters

+ +
+
requestDescriptors
+

An array of RKRequestDescriptor objects to be added to the manager.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds the RKRequestDescriptor objects contained in a given array to the manager.

+
+ + + +
+

Exceptions

+ +
+
NSInvalidArgumentException
+

Raised if any element of the given array is not an RKRequestDescriptor object.

+
+ +
+ + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

addResponseDescriptor:

+ + + +
+

Adds a response descriptor to the manager.

+
+ + + +
- (void)addResponseDescriptor:(RKResponseDescriptor *)responseDescriptor
+ + + +
+

Parameters

+ +
+
responseDescriptor
+

The response descriptor object to the be added to the manager.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds a response descriptor to the manager.

+ +

Adding a response descriptor to the manager sets the baseURL of the descriptor to the baseURL of the manager, causing it to evaluate URL objects relatively.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

addResponseDescriptorsFromArray:

+ + + +
+

Adds the RKResponseDescriptor objects contained in a given array to the manager.

+
+ + + +
- (void)addResponseDescriptorsFromArray:(NSArray *)responseDescriptors
+ + + +
+

Parameters

+ +
+
responseDescriptors
+

An array of RKResponseDescriptor objects to be added to the manager.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds the RKResponseDescriptor objects contained in a given array to the manager.

+
+ + + +
+

Exceptions

+ +
+
NSInvalidArgumentException
+

Raised if any element of the given array is not an RKResponseDescriptor object.

+
+ +
+ + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

appropriateObjectRequestOperationWithObject:method:path:parameters:

+ + + +
+

Creates and returns an object request operation of the appropriate type for the given object, request method, path, and parameters.

+
+ + + +
- (id)appropriateObjectRequestOperationWithObject:(id)object method:(RKRequestMethod)method path:(NSString *)path parameters:(NSDictionary *)parameters
+ + + +
+

Parameters

+ +
+
object
+

The object with which to construct the object request operation. May be nil.

+
+ +
+
method
+

The request method for the request.

+
+ +
+
path
+

The path to be appended to the HTTP client’s baseURL and set as the URL of the request. If nil, the router is consulted.

+
+ +
+
parameters
+

The parameters to be either set as a query string for GET requests, or reverse merged with the parameterization of the object and set as the request HTTP body.

+
+ +
+ + + +
+

Return Value

+

A newly created RKObjectRequestOperation or RKManagedObjectRequest operation as deemed appropriate by the manager for the given parameters.

+
+ + + + + +
+

Discussion

+

Creates and returns an object request operation of the appropriate type for the given object, request method, path, and parameters.

+ +

The type of object request operation created is determined by evaluating the type of the object given and examining the list of RKResponseDescriptor objects added to the manager.

+ +

If the given object is non-nil and inherits from NSManagedObject, then an instance of RKManagedObjectRequestOperation is returned.

+ +

If the given object is nil, then the RKResponseDescriptor objects added to the manager are evaluated to determine the type of operation created. In this case, the path of the operation is used to filter the set of RKResponseDescriptor objects to those that may be used to map the response. If the path is nil, the router is consulted to determine an appropriate path with which to perform the matching. If the filtered array of matching response descriptors defines a mapping configuration with an RKEntityMapping object, then an RKManagedObjectRequestOperation is returned; otherwise an RKObjectRequestOperation is returned.

+ +

If an RKManagedObjectRequestOperation operation is created, the managed object context used will be the mainQueueManagedObjectContext of the manager’s managedObjectStore.

Warning: The given object must be a single object instance. Collections are not yet supported.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

cancelAllObjectRequestOperationsWithMethod:matchingPathPattern:

+ + + +
+

Cancels all operations in the object manager’s operation queue whose requests match the specified HTTP method and path pattern.

+
+ + + +
- (void)cancelAllObjectRequestOperationsWithMethod:(RKRequestMethod)method matchingPathPattern:(NSString *)pathPattern
+ + + +
+

Parameters

+ +
+
method
+

The HTTP method to match for the cancelled requests, such as RKRequestMethodGET, RKRequestMethodPOST, RKRequestMethodPUT, RKRequestMethodPatch, or RKRequestMethodDELETE. If RKRequestMethodAny, all object request operations with URLs matching the given path pattern will be cancelled.

+
+ +
+
pathPattern
+

The pattern to match against the path of the request URL for executing object request operations considered for cancellation.

+
+ +
+ + + + + + + +
+

Discussion

+

Cancels all operations in the object manager’s operation queue whose requests match the specified HTTP method and path pattern.

+ +

Paths are matches against the path of the NSURL of the NSURLRequest of each RKObjectRequestOperation contained in the receiver’s operation queue using a RKPathMatcher object.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

deleteObject:path:parameters:success:failure:

+ + + +
+

Creates an RKObjectRequestOperation with a DELETE request for the given object, and enqueues it to the manager’s operation queue.

+
+ + + +
- (void)deleteObject:(id)object path:(NSString *)path parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
object
+

The object with which to construct the object request operation. Cannot be nil.

+
+ +
+
path
+

The path to be appended to the HTTP client’s base URL and used as the request URL. If nil, the request URL will be obtained by consulting the router for a route registered for the given object’s class and the RKRequestMethodDELETE request method.

+
+ +
+
parameters
+

The parameters to be encoded and appended as the query string for the request URL.

+
+ +
+
success
+

A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request.

+
+ +
+
failure
+

A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates an RKObjectRequestOperation with a DELETE request for the given object, and enqueues it to the manager’s operation queue.

+ +

The type of object request operation created is determined by invoking appropriateObjectRequestOperationWithObject:method:path:parameters:.

+
+ + + + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

enqueueBatchOfObjectRequestOperations:progress:completion:

+ + + +
+

Enqueues a set of RKObjectRequestOperation to the object manager’s operation queue.

+
+ + + +
- (void)enqueueBatchOfObjectRequestOperations:(NSArray *)operations progress:(void ( ^ ) ( NSUInteger numberOfFinishedOperations , NSUInteger totalNumberOfOperations ))progress completion:(void ( ^ ) ( NSArray *operations ))completion
+ + + +
+

Parameters

+ +
+
operations
+

The set of object request operations to be enqueued.

+
+ +
+
progress
+

A block object to be executed when an object request operation completes. This block has no return value and takes two arguments: the number of finished operations and the total number of operations initially executed.

+
+ +
+
completion
+

A block object to be executed when the object request operations complete. This block has no return value and takes one argument: the list of operations executed.

+
+ +
+ + + + + + + +
+

Discussion

+

Enqueues a set of RKObjectRequestOperation to the object manager’s operation queue.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

enqueueBatchOfObjectRequestOperationsWithRoute:objects:progress:completion:

+ + + +
+

Creates and enqueues an RKObjectRequestOperation to the object manager’s operation queue for each specified object into a batch. Each object request operation is built by evaluating the object against the given route to construct a request path and then invoking appropriateObjectRequestOperationWithObject:method:path:parameters:. When each object request operation finishes, the specified progress block is executed, until all of the request operations have finished, at which point the completion block also executes.

+
+ + + +
- (void)enqueueBatchOfObjectRequestOperationsWithRoute:(RKRoute *)route objects:(NSArray *)objects progress:(void ( ^ ) ( NSUInteger numberOfFinishedOperations , NSUInteger totalNumberOfOperations ))progress completion:(void ( ^ ) ( NSArray *operations ))completion
+ + + +
+

Parameters

+ +
+
route
+

The route specifying the request method and the path pattern with which to construct the request for each object object request operation in the batch.

+
+ +
+
objects
+

The set of objects for which to enqueue a batch of object request operations.

+
+ +
+
progress
+

A block object to be executed when an object request operation completes. This block has no return value and takes two arguments: the number of finished operations and the total number of operations initially executed.

+
+ +
+
completion
+

A block object to be executed when the object request operations complete. This block has no return value and takes one argument: the list of operations executed.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates and enqueues an RKObjectRequestOperation to the object manager’s operation queue for each specified object into a batch. Each object request operation is built by evaluating the object against the given route to construct a request path and then invoking appropriateObjectRequestOperationWithObject:method:path:parameters:. When each object request operation finishes, the specified progress block is executed, until all of the request operations have finished, at which point the completion block also executes.

Warning: Note that the route type is significant in how that the object request operation is constructed. If the given route is a class route, then the targetObject of the operation will be set to the object for which the operation is being constructed. For named routes and relationship routes, the target object is nil.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

enqueueObjectRequestOperation:

+ + + +
+

Enqueues an RKObjectRequestOperation to the object manager’s operation queue.

+
+ + + +
- (void)enqueueObjectRequestOperation:(RKObjectRequestOperation *)objectRequestOperation
+ + + +
+

Parameters

+ +
+
objectRequestOperation
+

The object request operation to be enqueued.

+
+ +
+ + + + + + + +
+

Discussion

+

Enqueues an RKObjectRequestOperation to the object manager’s operation queue.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

getObject:path:parameters:success:failure:

+ + + +
+

Creates an RKObjectRequestOperation with a GET request for the given object, and enqueues it to the manager’s operation queue.

+
+ + + +
- (void)getObject:(id)object path:(NSString *)path parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
object
+

The object with which to construct the object request operation. Cannot be nil.

+
+ +
+
path
+

The path to be appended to the HTTP client’s base URL and used as the request URL. If nil, the request URL will be obtained by consulting the router for a route registered for the given object’s class and the RKRequestMethodGET request method.

+
+ +
+
parameters
+

The parameters to be encoded and appended as the query string for the request URL.

+
+ +
+
success
+

A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request.

+
+ +
+
failure
+

A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates an RKObjectRequestOperation with a GET request for the given object, and enqueues it to the manager’s operation queue.

+ +

The type of object request operation created is determined by invoking appropriateObjectRequestOperationWithObject:method:path:parameters:.

+
+ + + + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

getObjectsAtPath:parameters:success:failure:

+ + + +
+

Creates an RKObjectRequestOperation with a GET request with a URL for the given path, and enqueues it to the manager’s operation queue.

+
+ + + +
- (void)getObjectsAtPath:(NSString *)path parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
path
+

The path to be appended to the HTTP client’s base URL and used as the request URL.

+
+ +
+
parameters
+

The parameters to be encoded and appended as the query string for the request URL.

+
+ +
+
success
+

A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request.

+
+ +
+
failure
+

A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates an RKObjectRequestOperation with a GET request with a URL for the given path, and enqueues it to the manager’s operation queue.

+ +

The type of object request operation created is determined by invoking appropriateObjectRequestOperationWithObject:method:path:parameters:.

+
+ + + + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

getObjectsAtPathForRelationship:ofObject:parameters:success:failure:

+ + + +
+

Creates an RKObjectRequestOperation with a GET request for the relationship with the given name of the given object, and enqueues it to the manager’s operation queue.

+
+ + + +
- (void)getObjectsAtPathForRelationship:(NSString *)relationshipName ofObject:(id)object parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
relationshipName
+

The name of the relationship being loaded. Used to retrieve the RKRoute object from the router for the given object’s class and the relationship name. Cannot be nil.

+
+ +
+
object
+

The object for which related objects are being loaded. Evaluated against the RKRoute for the relationship for the object’s class with the given name to compute the path. Cannot be nil.

+
+ +
+
parameters
+

The parameters to be encoded and appended as the query string for the request URL. May be nil.

+
+ +
+
success
+

A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the mapped result created from object mapping the response data of request.

+
+ +
+
failure
+

A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred.

+ +

@raises NSInvalidArgumentException Raised if no route is configured for a relationship of the given object’s class with the given name.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates an RKObjectRequestOperation with a GET request for the relationship with the given name of the given object, and enqueues it to the manager’s operation queue.

+ +

The type of object request operation created is determined by invoking appropriateObjectRequestOperationWithObject:method:path:parameters:.

+
+ + + + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

getObjectsAtPathForRouteNamed:object:parameters:success:failure:

+ + + +
+

Creates an RKObjectRequestOperation with a GET request for the URL returned by the router for the given route name, and enqueues it to the manager’s operation queue.

+
+ + + +
- (void)getObjectsAtPathForRouteNamed:(NSString *)routeName object:(id)object parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
routeName
+

The name of the route being loaded. Used to retrieve the RKRoute object from the router with the given name. Cannot be nil.

+
+ +
+
object
+

The object to be interpolated against the path pattern of the RKRoute object retrieved with the given name. Used to compute the path to be appended to the HTTP client’s base URL and used as the request URL. May be nil.

+
+ +
+
parameters
+

The parameters to be encoded and appended as the query string for the request URL. May be nil.

+
+ +
+
success
+

A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the mapped result created from object mapping the response data of request.

+
+ +
+
failure
+

A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred.

+ +

@raises NSInvalidArgumentException Raised if no route is configured with the given name or the route returned specifies an HTTP method other than GET.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates an RKObjectRequestOperation with a GET request for the URL returned by the router for the given route name, and enqueues it to the manager’s operation queue.

+ +

The type of object request operation created is determined by invoking appropriateObjectRequestOperationWithObject:method:path:parameters:.

+
+ + + + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

initWithHTTPClient:

+ + + +
+

Initializes the receiver with the given AFNetworking HTTP client object, adopting the network configuration from the client.

+
+ + + +
- (id)initWithHTTPClient:(AFHTTPClient *)client
+ + + +
+

Parameters

+ +
+
client
+

The AFNetworking HTTP client with which to initialize the receiver.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given client.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with the given AFNetworking HTTP client object, adopting the network configuration from the client.

+ +

This is the designated initializer. If the sharedManager instance is nil, the receiver will be set as the sharedManager. The default headers and parameter encoding of the given HTTP client are adopted by the receiver to initialize the values of the defaultHeaders and requestSerializationMIMEType properties.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

managedObjectRequestOperationWithRequest:managedObjectContext:success:failure:

+ + + +
+

Creates an RKManagedObjectRequestOperation operation with the given request and managed object context, and sets the completion block with the given success and failure blocks.

+
+ + + +
- (RKManagedObjectRequestOperation *)managedObjectRequestOperationWithRequest:(NSURLRequest *)request managedObjectContext:(NSManagedObjectContext *)managedObjectContext success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
request
+

The request object to be loaded asynchronously during execution of the operation.

+
+ +
+
managedObjectContext
+

The managed object context with which to associate the operation. This context will be used as the parent context of a new operation local NSManagedObjectContext with the NSPrivateQueueConcurrencyType concurrency type. Upon success, the private context will be saved and changes resulting from the object mapping will be ‘pushed’ to the given context.

+
+ +
+
success
+

A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request.

+
+ +
+
failure
+

A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred.

+
+ +
+ + + +
+

Return Value

+

An RKObjectRequestOperation object that is ready to be sent.

+
+ + + + + +
+

Discussion

+

Creates an RKManagedObjectRequestOperation operation with the given request and managed object context, and sets the completion block with the given success and failure blocks.

+ +

The given managed object context given will be used as the parent context of the private managed context in which the response is mapped and will be used to fetch the results upon invocation of the success completion block.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

multipartFormRequestWithObject:method:path:parameters:constructingBodyWithBlock:

+ + + +
+

Creates an NSMutableURLRequest object with the specified HTTP method and path, and constructs a multipart/form-data HTTP body, using the specified parameters and multipart form data block. See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2

+
+ + + +
- (NSMutableURLRequest *)multipartFormRequestWithObject:(id)object method:(RKRequestMethod)method path:(NSString *)path parameters:(NSDictionary *)parameters constructingBodyWithBlock:(void ( ^ ) ( id<AFMultipartFormData> formData ))block
+ + + +
+

Parameters

+ +
+
object
+

The object with which to construct the request. For the POST, PUT, and PATCH request methods, the object will parameterized using the RKRequestDescriptor for the object.

+
+ +
+
method
+

The HTTP method for the request, such as GET, POST, PUT, or DELETE.

+
+ +
+
path
+

The path to be appended to the HTTP client’s base URL and used as the request URL. If nil, the router is consulted.

+
+ +
+
parameters
+

The parameters to be either set as a query string for GET requests, or reverse merged with the parameterization of the object and set as the request HTTP body.

+
+ +
+
block
+

A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the AFMultipartFormData protocol. This can be used to upload files, encode HTTP body as JSON or XML, or specify multiple values for the same parameter, as one might for array values.

+
+ +
+ + + +
+

Return Value

+

An NSMutableURLRequest object.

+
+ + + + + +
+

Discussion

+

Creates an NSMutableURLRequest object with the specified HTTP method and path, and constructs a multipart/form-data HTTP body, using the specified parameters and multipart form data block. See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2

+ +

This method wraps the underlying AFHTTPClient method multipartFormRequestWithMethod:path:parameters:constructingBodyWithBlock and adds routing and object parameterization.

Warning: An exception will be raised if the specified method is not POST, PUT or DELETE.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

objectRequestOperationWithRequest:success:failure:

+ + + +
+

Creates an RKObjectRequestOperation operation with the given request and sets the completion block with the given success and failure blocks.

+
+ + + +
- (RKObjectRequestOperation *)objectRequestOperationWithRequest:(NSURLRequest *)request success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
request
+

The request object to be loaded asynchronously during execution of the operation.

+
+ +
+
success
+

A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request.

+
+ +
+
failure
+

A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred.

+
+ +
+ + + +
+

Return Value

+

An RKObjectRequestOperation object that is ready to be sent.

+
+ + + + + +
+

Discussion

+

Creates an RKObjectRequestOperation operation with the given request and sets the completion block with the given success and failure blocks.

Warning: Instances of RKObjectRequestOperation are not capable of mapping the loaded NSHTTPURLResponse into a Core Data entity. Use an instance of RKManagedObjectRequestOperation if the response is to be mapped using an RKEntityMapping.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

patchObject:path:parameters:success:failure:

+ + + +
+

Creates an RKObjectRequestOperation with a PATCH request for the given object, and enqueues it to the manager’s operation queue.

+
+ + + +
- (void)patchObject:(id)object path:(NSString *)path parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
object
+

The object with which to construct the object request operation. Cannot be nil.

+
+ +
+
path
+

The path to be appended to the HTTP client’s base URL and used as the request URL. If nil, the request URL will be obtained by consulting the router for a route registered for the given object’s class and the RKRequestMethodPATCH method.

+
+ +
+
parameters
+

The parameters to be reverse merged with the parameterization of the given object and set as the request body.

+
+ +
+
success
+

A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request.

+
+ +
+
failure
+

A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates an RKObjectRequestOperation with a PATCH request for the given object, and enqueues it to the manager’s operation queue.

+
+ + + + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

postObject:path:parameters:success:failure:

+ + + +
+

Creates an RKObjectRequestOperation with a POST request for the given object, and enqueues it to the manager’s operation queue.

+
+ + + +
- (void)postObject:(id)object path:(NSString *)path parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
object
+

The object with which to construct the object request operation. Cannot be nil.

+
+ +
+
path
+

The path to be appended to the HTTP client’s base URL and used as the request URL. If nil, the request URL will be obtained by consulting the router for a route registered for the given object’s class and the RKRequestMethodPOST method.

+
+ +
+
parameters
+

The parameters to be reverse merged with the parameterization of the given object and set as the request body.

+
+ +
+
success
+

A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request.

+
+ +
+
failure
+

A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates an RKObjectRequestOperation with a POST request for the given object, and enqueues it to the manager’s operation queue.

+
+ + + + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

putObject:path:parameters:success:failure:

+ + + +
+

Creates an RKObjectRequestOperation with a PUT request for the given object, and enqueues it to the manager’s operation queue.

+
+ + + +
- (void)putObject:(id)object path:(NSString *)path parameters:(NSDictionary *)parameters success:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
object
+

The object with which to construct the object request operation. Cannot be nil.

+
+ +
+
path
+

The path to be appended to the HTTP client’s base URL and used as the request URL. If nil, the request URL will be obtained by consulting the router for a route registered for the given object’s class and the RKRequestMethodPUT method.

+
+ +
+
parameters
+

The parameters to be reverse merged with the parameterization of the given object and set as the request body.

+
+ +
+
success
+

A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the RKMappingResult object created by object mapping the response data of request.

+
+ +
+
failure
+

A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the NSError object describing the network or parsing error that occurred.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates an RKObjectRequestOperation with a PUT request for the given object, and enqueues it to the manager’s operation queue.

+
+ + + + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

removeRequestDescriptor:

+ + + +
+

Removes a given request descriptor from the manager.

+
+ + + +
- (void)removeRequestDescriptor:(RKRequestDescriptor *)requestDescriptor
+ + + +
+

Parameters

+ +
+
requestDescriptor
+

An RKRequestDescriptor object to be removed from the manager.

+
+ +
+ + + + + + + +
+

Discussion

+

Removes a given request descriptor from the manager.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

removeResponseDescriptor:

+ + + +
+

Removes a given response descriptor from the manager.

+
+ + + +
- (void)removeResponseDescriptor:(RKResponseDescriptor *)responseDescriptor
+ + + +
+

Parameters

+ +
+
responseDescriptor
+

An RKResponseDescriptor object to be removed from the manager.

+
+ +
+ + + + + + + +
+

Discussion

+

Removes a given response descriptor from the manager.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

requestWithObject:method:path:parameters:

+ + + +
+

Creates and returns an NSMutableURLRequest object with a given object, method, path, and parameters.

+
+ + + +
- (NSMutableURLRequest *)requestWithObject:(id)object method:(RKRequestMethod)method path:(NSString *)path parameters:(NSDictionary *)parameters
+ + + +
+

Parameters

+ +
+
object
+

The object with which to construct the request. For the POST, PUT, and PATCH request methods, the object will parameterized using the RKRequestDescriptor for the object.

+
+ +
+
method
+

The HTTP method for the request, such as GET, POST, PUT, or DELETE.

+
+ +
+
path
+

The path to be appended to the HTTP client’s base URL and used as the request URL. If nil, the router is consulted.

+
+ +
+
parameters
+

The parameters to be either set as a query string for GET requests, or reverse merged with the parameterization of the object and set as the request HTTP body.

+
+ +
+ + + +
+

Return Value

+

An NSMutableURLRequest object.

+
+ + + + + +
+

Discussion

+

Creates and returns an NSMutableURLRequest object with a given object, method, path, and parameters.

+ +

The manager is searched for an RKRequestDescriptor object with an objectClass that matches the class of the given object. If found, the matching request descriptor and object are used to build a parameterization of the object’s attributes using the RKObjectParameterization class if the request method is a POST, PUT, or PATCH. The parameterized representation of the object is reverse merged with the given parameters dictionary, if any, and then serialized and set as the request body. If the HTTP method is GET or DELETE, the object will not be parameterized and the given parameters, if any, will be used to construct a url-encoded query string that is appended to the request’s URL.

+ +

If the given path is nil, the router is searched for a class route with the class of the object andthe method. The path pattern of the retrieved route is interpolated with the object and the resulting path is appended to the HTTP client’s base URL and used as the request URL.

+
+ + + + + +
+

See Also

+ +
+ + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

requestWithPathForRelationship:ofObject:method:parameters:

+ + + +
+

Creates an NSMutableURLRequest object with the NSURL returned by the router for the relationship of the given object and the given parameters.

+
+ + + +
- (NSMutableURLRequest *)requestWithPathForRelationship:(NSString *)relationship ofObject:(id)object method:(RKRequestMethod)method parameters:(NSDictionary *)parameters
+ + + +
+

Parameters

+ +
+
object
+

The object for which related objects are being loaded. Evaluated against the RKRoute for the relationship for the object’s class with the given name to compute the path. Cannot be nil.

+
+ +
+
method
+

The HTTP method for the request.

+
+ +
+
parameters
+

The parameters to be encoded and appended as the query string for the request URL, or parameterized and set as the request body. May be nil.

+
+ +
+
relationshipName
+

The name of the relationship being loaded. Used to retrieve the RKRoute object from the router for the given object’s class and the relationship name. Cannot be nil.

+
+ +
+ + + +
+

Return Value

+

An NSMutableURLRequest object for the specified relationship.

+ +

@raises NSInvalidArgumentException Raised if no route is configured for a relationship of the given object’s class with the given name.

+
+ + + + + +
+

Discussion

+

Creates an NSMutableURLRequest object with the NSURL returned by the router for the relationship of the given object and the given parameters.

+ +

The implementation invokes requestWithObject:method:path:parameters: after constructing the path with the given route.

+ +

Creates an RKObjectRequestOperation with a GET request for the relationship with the given name of the given object, and enqueues it to the manager’s operation queue.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

requestWithPathForRouteNamed:object:parameters:

+ + + +
+

Creates an NSMutableURLRequest object with the NSURL returned by the router for the given route name and object and the given parameters.

+
+ + + +
- (NSMutableURLRequest *)requestWithPathForRouteNamed:(NSString *)routeName object:(id)object parameters:(NSDictionary *)parameters
+ + + +
+

Parameters

+ +
+
routeName
+

The name of the route object containing the path pattern which is to be interpolated against the given object, appended to the HTTP client’s base URL and used as the request URL.

+
+ +
+
object
+

The object with which to interpolate the path pattern of the named route. Can be nil.

+
+ +
+
parameters
+

The parameters to be either set as a query string for GET requests, or the request HTTP body.

+
+ +
+ + + +
+

Return Value

+

An NSMutableRequest object.

+
+ + + + + +
+

Discussion

+

Creates an NSMutableURLRequest object with the NSURL returned by the router for the given route name and object and the given parameters.

+ +

The implementation invokes requestWithObject:method:path:parameters: after constructing the path with the given route.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

setAcceptHeaderWithMIMEType:

+ + + +
+

The value for the HTTP “Accept” header to specify the preferred serialization format for retrieved data.

+
+ + + +
- (void)setAcceptHeaderWithMIMEType:(NSString *)MIMEType
+ + + +
+

Parameters

+ +
+
MIMEType
+

The MIME Type to set as the value for the HTTP “Accept” header.

+
+ +
+ + + + + + + +
+

Discussion

+

The value for the HTTP “Accept” header to specify the preferred serialization format for retrieved data.

+ +

If the receiver was initialized with an AFHTTPClient, then the value of the ‘Accept’ header is deferred to the client. If initialized directly with a baseURL, the default value is RKMIMETypeJSON, which is equal to the string @"application/json". A value of nil will prevent the object manager from explicitly setting a value for the “Accept” header.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ +

setHTTPOperationClass:

+ + + +
+

Sets the RKHTTPRequestOperation subclass to be used when constructing HTTP request operations for requests dispatched through the manager.

+
+ + + +
- (void)setHTTPOperationClass:(Class)operationClass
+ + + +
+

Parameters

+ +
+
operationClass
+

A class object inheriting from RKHTTPRequestOperation to be used for HTTP requests dispatched through the manager. +@raises NSInvalidArgumentException Raised if the given class does not inherit from RKHTTPRequestOperation.

+
+ +
+ + + + + + + +
+

Discussion

+

Sets the RKHTTPRequestOperation subclass to be used when constructing HTTP request operations for requests dispatched through the manager.

+ +

When set, an instance of the given class will be initialized via initWithRequest: each time that the receiver constructs an HTTP request operation. HTTP request operations are used to initialize instances of RKObjectRequestOperation and are responsible for managing the HTTP request/response lifecycle of a request whose response is destined to be object mapped. Providing a subclass implementation of RKHTTPRequestOperation allows the behavior of all requests sent through the manager to be changed.

Warning: The given class must inherit from RKHTTPRequestOperation, else an exception will be raised.

+
+ + + + + + + +
+

Declared In

+ RKObjectManager.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKObjectMapping.html b/Pods/Documentation/RestKit/html/Classes/RKObjectMapping.html new file mode 100644 index 00000000..fd04ae52 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKObjectMapping.html @@ -0,0 +1,2299 @@ + + + + + RKObjectMapping Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + + + + +
Inherits fromRKMapping : NSObject
Conforms toNSCopying
Declared inRKObjectMapping.h
+ + + + +
+ +

Overview

+

An RKObjectMapping object describes a transformation between object represenations using key-value coding and run-time type introspection. The mapping is defined in terms of a source object class and a collection of RKPropertyMapping objects describing how key paths in the source representation should be transformed into attributes and relationships on the target object. Object mappings are provided to instances of RKMapperOperation and RKMappingOperation to perform the transformations they describe.

+ +

Object mappings are containers of property mappings that describe the actual key path transformations. There are two types of property mappings:

+ +
    +
  1. RKAttributeMapping: An attribute mapping describes a transformation between a single value from a source key path to a destination key path. The value to be mapped is read from the source object representation using valueForKeyPath: and then set to the destination key path using setValueForKeyPath:. Before the value is set, the RKObjecMappingOperation performing the mapping performs runtime introspection on the destination property to determine what, if any, type transformation is to be performed. Typical type transformations include reading an NSString value representation and mapping it to an NSDecimalNumber destination key path or reading an NSString and transforming it into an NSDate value before assigning to the destination.
  2. +
  3. RKRelationshipMapping: A relationship mapping describes a transformation between a nested child object or objects from a source key path to a destination key path using another RKObjectMapping. The child objects to be mapped are read from the source object representation using valueForKeyPath:, then mapped recursively using the object mapping associated with the relationship mapping, and then finally assigned to the destination key path. Before assignment to the destination key path runtime type introspection is performed to determine if any type transformation is necessary. For relationship mappings, common type transformations include transforming a single object value in an NSArray or transforming an NSArray of object values into an NSSet.
  4. +
+ + +

All type transformations available are discussed in detail in the documentation for RKObjectMappingOperation.

+
+ + + + + +
+ +

Tasks

+ + + +

Creating an Object Mapping

+ +
    +
  • + + + mappingForClass: +

    Returns an object mapping for the specified class that is ready for configuration

    +
    + + +
  • + + – initWithClass: +

    Initializes the receiver with a given object class. This is the designated initializer.

    +
    + + +
  • + + + requestMapping +

    Returns an object mapping with an objectClass of NSMutableDictionary.

    +
    + + +
  • +
+ + + +

Managing Property Mappings

+ + + + + +

Mapping Nested Dictionaries

+ + + + + +

Configuring Mapping Options

+ +
    +
  • + +   objectClass +

    The target class that the receiver describes a mapping for.

    +
    + property + +
  • + +   setDefaultValueForMissingAttributes +

    When YES, any attributes that have mappings defined but are not present within the source object will be set to nil, clearing any existing value.

    +
    + property + +
  • + +   setNilForMissingRelationships +

    When YES, any relationships that have mappings defined but are not present within the source object will be set to nil, clearing any existing value.

    +
    + property + +
  • + +   performKeyValueValidation +

    When YES, key-value validation will be invoked at object mapping time.

    +
    + property + +
  • + +   ignoreUnknownKeyPaths +

    When YES, the mapping operation will check that the object being mapped is key-value coding compliant for the mapped key. If it is not, the attribute/relationship mapping will be ignored and mapping will continue. When NO, property mappings for unknown key paths will trigger NSUnknownKeyException exceptions for the unknown keyPath.

    +
    + property + +
  • + + – defaultValueForMissingAttribute: +

    Returns the default value to be assigned to the specified attribute when it is missing from a mappable payload.

    +
    + + +
  • +
+ + + +

Configuring Date Formatters

+ +
    +
  • + +   dateFormatters +

    An array of NSFormatter objects to use when mapping string values into NSDate attributes on the target objectClass. Each date formatter will be invoked with the string value being mapped until one of the date formatters does not return nil.

    +
    + property + +
  • + +   preferredDateFormatter +

    The NSFormatter object for your application’s preferred date and time configuration. This date formatter will be used when generating string representations of NSDate attributes (i.e. during serialization to URL form encoded or JSON format).

    +
    + property + +
  • + + – inverseMapping +

    Generates an inverse mapping for the rules specified within this object mapping. This can be used to +quickly generate a corresponding serialization mapping from a configured object mapping. The inverse +mapping will have the source and destination keyPaths swapped for all attribute and relationship mappings.

    +
    + + +
  • +
+ + + +

Obtaining Information About the Target Class

+ + + + + +

DateAndTimeFormatting Methods

+ +
    +
  • + + + defaultDateFormatters +

    Returns the collection of default date formatters that will be used for all object mappings that have not been configured specifically.

    +
    + + +
  • + + + setDefaultDateFormatters: +

    Sets the collection of default date formatters to the specified array. The array should contain configured instances of NSDateFormatter in the order in which you want them applied during object mapping operations.

    +
    + + +
  • + + + addDefaultDateFormatter: +

    Adds a date formatter instance to the default collection

    +
    + + +
  • + + + addDefaultDateFormatterForString:inTimeZone: +

    Convenience method for quickly constructing a date formatter and adding it to the collection of default date formatters. The locale is auto-configured to en_US_POSIX.

    +
    + + +
  • + + + preferredDateFormatter +

    Returns the preferred date formatter to use when generating NSString representations from NSDate attributes. This type of transformation occurs when RestKit is mapping local objects into JSON or form encoded serializations that do not have a native time construct.

    +
    + + +
  • + + + setPreferredDateFormatter: +

    Sets the preferred date formatter to use when generating NSString representations from NSDate attributes. This type of transformation occurs when RestKit is mapping local objects into JSON or form encoded serializations that do not have a native time construct.

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

attributeMappings

+ + + +
+

The collection of attribute mappings within this object mapping.

+
+ + + +
@property (nonatomic, readonly) NSArray *attributeMappings
+ + + + + + + + + +
+

Discussion

+

The collection of attribute mappings within this object mapping.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

dateFormatters

+ + + +
+

An array of NSFormatter objects to use when mapping string values into NSDate attributes on the target objectClass. Each date formatter will be invoked with the string value being mapped until one of the date formatters does not return nil.

+
+ + + +
@property (nonatomic, strong) NSArray *dateFormatters
+ + + + + + + + + +
+

Discussion

+

An array of NSFormatter objects to use when mapping string values into NSDate attributes on the target objectClass. Each date formatter will be invoked with the string value being mapped until one of the date formatters does not return nil.

+ +

Defaults to the application-wide collection of date formatters configured via [RKObjectMapping setDefaultDateFormatters:]

+
+ + + + + +
+

See Also

+
    + +
  • [RKObjectMapping defaultDateFormatters]

  • + +
+
+ + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

ignoreUnknownKeyPaths

+ + + +
+

When YES, the mapping operation will check that the object being mapped is key-value coding compliant for the mapped key. If it is not, the attribute/relationship mapping will be ignored and mapping will continue. When NO, property mappings for unknown key paths will trigger NSUnknownKeyException exceptions for the unknown keyPath.

+
+ + + +
@property (nonatomic, assign) BOOL ignoreUnknownKeyPaths
+ + + + + + + + + +
+

Discussion

+

When YES, the mapping operation will check that the object being mapped is key-value coding compliant for the mapped key. If it is not, the attribute/relationship mapping will be ignored and mapping will continue. When NO, property mappings for unknown key paths will trigger NSUnknownKeyException exceptions for the unknown keyPath.

+ +

Defaults to NO to help the developer catch incorrect mapping configurations during development.

+ +

Default: NO

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

objectClass

+ + + +
+

The target class that the receiver describes a mapping for.

+
+ + + +
@property (nonatomic, weak, readonly) Class objectClass
+ + + + + + + + + +
+

Discussion

+

The target class that the receiver describes a mapping for.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

performKeyValueValidation

+ + + +
+

When YES, key-value validation will be invoked at object mapping time.

+
+ + + +
@property (nonatomic, assign) BOOL performKeyValueValidation
+ + + + + + + + + +
+

Discussion

+

When YES, key-value validation will be invoked at object mapping time.

+ +

Default: YES

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

preferredDateFormatter

+ + + +
+

The NSFormatter object for your application’s preferred date and time configuration. This date formatter will be used when generating string representations of NSDate attributes (i.e. during serialization to URL form encoded or JSON format).

+
+ + + +
@property (nonatomic, strong) NSFormatter *preferredDateFormatter
+ + + + + + + + + +
+

Discussion

+

The NSFormatter object for your application’s preferred date and time configuration. This date formatter will be used when generating string representations of NSDate attributes (i.e. during serialization to URL form encoded or JSON format).

+ +

Defaults to the application-wide preferred date formatter configured via: [RKObjectMapping setPreferredDateFormatter:]

+
+ + + + + +
+

See Also

+
    + +
  • [RKObjectMapping preferredDateFormatter]

  • + +
+
+ + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

propertyMappings

+ + + +
+

The aggregate collection of attribute and relationship mappings within this object mapping.

+
+ + + +
@property (nonatomic, strong, readonly) NSArray *propertyMappings
+ + + + + + + + + +
+

Discussion

+

The aggregate collection of attribute and relationship mappings within this object mapping.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

propertyMappingsByDestinationKeyPath

+ + + +
+

Returns the property mappings of the receiver in a dictionary, where the keys are the destination key paths and the values are instances of RKAttributeMapping or RKRelationshipMapping.

+
+ + + +
@property (nonatomic, readonly) NSDictionary *propertyMappingsByDestinationKeyPath
+ + + + + +
+

Return Value

+

The property mappings of the receiver in a dictionary, where the keys are the destination key paths and the values are instances of RKAttributeMapping or RKRelationshipMapping.

+
+ + + + + +
+

Discussion

+

Returns the property mappings of the receiver in a dictionary, where the keys are the destination key paths and the values are instances of RKAttributeMapping or RKRelationshipMapping.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

propertyMappingsBySourceKeyPath

+ + + +
+

Returns the property mappings of the receiver in a dictionary, where the keys are the source key paths and the values are instances of RKAttributeMapping or RKRelationshipMapping.

+
+ + + +
@property (nonatomic, readonly) NSDictionary *propertyMappingsBySourceKeyPath
+ + + + + +
+

Return Value

+

The property mappings of the receiver in a dictionary, where the keys are the source key paths and the values are instances of RKAttributeMapping or RKRelationshipMapping.

+
+ + + + + +
+

Discussion

+

Returns the property mappings of the receiver in a dictionary, where the keys are the source key paths and the values are instances of RKAttributeMapping or RKRelationshipMapping.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

relationshipMappings

+ + + +
+

The collection of relationship mappings within this object mapping.

+
+ + + +
@property (nonatomic, readonly) NSArray *relationshipMappings
+ + + + + + + + + +
+

Discussion

+

The collection of relationship mappings within this object mapping.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

setDefaultValueForMissingAttributes

+ + + +
+

When YES, any attributes that have mappings defined but are not present within the source object will be set to nil, clearing any existing value.

+
+ + + +
@property (nonatomic, assign, getter=shouldSetDefaultValueForMissingAttributes) BOOL setDefaultValueForMissingAttributes
+ + + + + + + + + +
+

Discussion

+

When YES, any attributes that have mappings defined but are not present within the source object will be set to nil, clearing any existing value.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

setNilForMissingRelationships

+ + + +
+

When YES, any relationships that have mappings defined but are not present within the source object will be set to nil, clearing any existing value.

+
+ + + +
@property (nonatomic, assign) BOOL setNilForMissingRelationships
+ + + + + + + + + +
+

Discussion

+

When YES, any relationships that have mappings defined but are not present within the source object will be set to nil, clearing any existing value.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

addDefaultDateFormatter:

+ + + +
+

Adds a date formatter instance to the default collection

+
+ + + +
+ (void)addDefaultDateFormatter:(NSFormatter *)dateFormatter
+ + + +
+

Parameters

+ +
+
dateFormatter
+

An NSFormatter object to prepend to the default formatters collection

+
+ +
+ + + + + + + +
+

Discussion

+

Adds a date formatter instance to the default collection

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

addDefaultDateFormatterForString:inTimeZone:

+ + + +
+

Convenience method for quickly constructing a date formatter and adding it to the collection of default date formatters. The locale is auto-configured to en_US_POSIX.

+
+ + + +
+ (void)addDefaultDateFormatterForString:(NSString *)dateFormatString inTimeZone:(NSTimeZone *)nilOrTimeZone
+ + + +
+

Parameters

+ +
+
dateFormatString
+

The dateFormat string to assign to the newly constructed NSDateFormatter instance

+
+ +
+
nilOrTimeZone
+

The NSTimeZone object to configure on the NSDateFormatter instance. Defaults to UTC time.

+
+ +
+ + + +
+

Return Value

+

A new NSDateFormatter will be prepended to the defaultDateFormatters with the specified date format and time zone

+
+ + + + + +
+

Discussion

+

Convenience method for quickly constructing a date formatter and adding it to the collection of default date formatters. The locale is auto-configured to en_US_POSIX.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

defaultDateFormatters

+ + + +
+

Returns the collection of default date formatters that will be used for all object mappings that have not been configured specifically.

+
+ + + +
+ (NSArray *)defaultDateFormatters
+ + + + + +
+

Return Value

+

An array of NSFormatter objects used when mapping strings into NSDate attributes

+
+ + + + + +
+

Discussion

+

Returns the collection of default date formatters that will be used for all object mappings that have not been configured specifically.

+ +

Out of the box, RestKit initializes default date formatters for you in the UTC time zone with the following format strings:

+ +
    +
  • yyyy-MM-dd'T'HH:mm:ss'Z'
  • +
  • MM/dd/yyyy
  • +
+ +
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

mappingForClass:

+ + + +
+

Returns an object mapping for the specified class that is ready for configuration

+
+ + + +
+ (id)mappingForClass:(Class)objectClass
+ + + +
+

Parameters

+ +
+
objectClass
+

The class that the mapping targets.

+
+ +
+ + + +
+

Return Value

+

A new mapping object.

+
+ + + + + +
+

Discussion

+

Returns an object mapping for the specified class that is ready for configuration

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

preferredDateFormatter

+ + + +
+

Returns the preferred date formatter to use when generating NSString representations from NSDate attributes. This type of transformation occurs when RestKit is mapping local objects into JSON or form encoded serializations that do not have a native time construct.

+
+ + + +
+ (NSFormatter *)preferredDateFormatter
+ + + + + +
+

Return Value

+

The preferred NSFormatter object to use when serializing dates into strings

+
+ + + + + +
+

Discussion

+

Returns the preferred date formatter to use when generating NSString representations from NSDate attributes. This type of transformation occurs when RestKit is mapping local objects into JSON or form encoded serializations that do not have a native time construct.

+ +

Defaults to a date formatter configured for the UTC Time Zone with a format string of “yyyy-MM-dd HH:mm:ss Z”

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

requestMapping

+ + + +
+

Returns an object mapping with an objectClass of NSMutableDictionary.

+
+ + + +
+ (id)requestMapping
+ + + + + +
+

Return Value

+

An object mapping with an object class of NSMutableDictionary.

+
+ + + + + +
+

Discussion

+

Returns an object mapping with an objectClass of NSMutableDictionary.

+ +

Request mappings are used when configuring mappings that are to be used for transforming local objects into HTTP parameters using the RKObjectParameterization class.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

setDefaultDateFormatters:

+ + + +
+

Sets the collection of default date formatters to the specified array. The array should contain configured instances of NSDateFormatter in the order in which you want them applied during object mapping operations.

+
+ + + +
+ (void)setDefaultDateFormatters:(NSArray *)dateFormatters
+ + + +
+

Parameters

+ +
+
dateFormatters
+

An array of date formatters to replace the existing defaults.

+
+ +
+ + + + + + + +
+

Discussion

+

Sets the collection of default date formatters to the specified array. The array should contain configured instances of NSDateFormatter in the order in which you want them applied during object mapping operations.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

setPreferredDateFormatter:

+ + + +
+

Sets the preferred date formatter to use when generating NSString representations from NSDate attributes. This type of transformation occurs when RestKit is mapping local objects into JSON or form encoded serializations that do not have a native time construct.

+
+ + + +
+ (void)setPreferredDateFormatter:(NSFormatter *)dateFormatter
+ + + +
+

Parameters

+ +
+
dateFormatter
+

The NSFormatter object to designate as the new preferred instance

+
+ +
+ + + + + + + +
+

Discussion

+

Sets the preferred date formatter to use when generating NSString representations from NSDate attributes. This type of transformation occurs when RestKit is mapping local objects into JSON or form encoded serializations that do not have a native time construct.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

addAttributeMappingsFromArray:

+ + + +
+

Adds attribute mappings to the receiver from a given array.

+
+ + + +
- (void)addAttributeMappingsFromArray:(NSArray *)arrayOfAttributeNamesOrMappings
+ + + +
+

Parameters

+ +
+
An
+

array of RKAttributeMapping or NSString values to be added to the receiver’s set of attribute mappings,

+
+ +
+ + + + + + + +
+

Discussion

+

Adds attribute mappings to the receiver from a given array.

+ +

The array can contain RKAttributeMapping objects or NSString values. If an NSString is given, then a new RKAttributeMapping object is instantiated with a sourceKeyPath and destinationKeyPath equal to the string value.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

addAttributeMappingsFromDictionary:

+ + + +
+

Adds attribute mappings from a given dictionary wherein the keys represent the source key path and the values represent the names of the target attributes on the destination object.

+
+ + + +
- (void)addAttributeMappingsFromDictionary:(NSDictionary *)keyPathToAttributeNames
+ + + +
+

Parameters

+ +
+
keyPathToAttributeNames
+

A dictionary keyed by source key to destination attribute name.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds attribute mappings from a given dictionary wherein the keys represent the source key path and the values represent the names of the target attributes on the destination object.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

addPropertyMapping:

+ + + +
+

Adds a property mapping to the receiver.

+
+ + + +
- (void)addPropertyMapping:(RKPropertyMapping *)propertyMapping
+ + + +
+

Parameters

+ +
+
propertyMapping
+

The property mapping to be added to the object mapping.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds a property mapping to the receiver.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

addPropertyMappingsFromArray:

+ + + +
+

Adds an array of RKAttributeMapping or RKRelationshipMapping objects to the receiver.

+
+ + + +
- (void)addPropertyMappingsFromArray:(NSArray *)arrayOfPropertyMappings
+ + + +
+

Parameters

+ +
+
propertyMappings
+

The array of property mappings to be added to the object mapping.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds an array of RKAttributeMapping or RKRelationshipMapping objects to the receiver.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

attributeMappingForKeyOfNestedDictionary

+ + + +
+

Returns the attribute mapping targeting the key of a nested dictionary in the source JSON.

+
+ + + +
- (RKAttributeMapping *)attributeMappingForKeyOfNestedDictionary
+ + + + + +
+

Return Value

+

An attribute mapping for the key of a nested dictionary being mapped or nil

+
+ + + + + +
+

Discussion

+

Returns the attribute mapping targeting the key of a nested dictionary in the source JSON.

+ +

This attribute mapping corresponds to the attributeName configured via mapKeyOfNestedDictionaryToAttribute:

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

classForKeyPath:

+ + + +
+

Returns the class of the attribute or relationship property of the target objectClass at the given key path.

+
+ + + +
- (Class)classForKeyPath:(NSString *)keyPath
+ + + +
+

Parameters

+ +
+
propertyName
+

The name of the property we would like to retrieve the type of.

+
+ +
+ + + +
+

Return Value

+

The class of the property at the given key path.

+
+ + + + + +
+

Discussion

+

Returns the class of the attribute or relationship property of the target objectClass at the given key path.

+ +

Given a key path to a string property, this will return an NSString, etc.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

classForProperty:

+ + + +
+

Returns the class of the attribute or relationship property of the target objectClass with the given name.

+
+ + + +
- (Class)classForProperty:(NSString *)propertyName
+ + + +
+

Parameters

+ +
+
propertyName
+

The name of the property we would like to retrieve the type of.

+
+ +
+ + + +
+

Return Value

+

The class of the property.

+
+ + + + + +
+

Discussion

+

Returns the class of the attribute or relationship property of the target objectClass with the given name.

+ +

Given the name of a string property, this will return an NSString, etc.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

defaultValueForMissingAttribute:

+ + + +
+

Returns the default value to be assigned to the specified attribute when it is missing from a mappable payload.

+
+ + + +
- (id)defaultValueForMissingAttribute:(NSString *)attributeName
+ + + + + + + + + +
+

Discussion

+

Returns the default value to be assigned to the specified attribute when it is missing from a mappable payload.

+ +

The default implementation returns nil for transient object mappings. On an entity mapping, the default value returned from the Entity definition will be used.

+
+ + + + + +
+

See Also

+
    + +
  • [RKEntityMapping defaultValueForMissingAttribute:]

  • + +
+
+ + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

initWithClass:

+ + + +
+

Initializes the receiver with a given object class. This is the designated initializer.

+
+ + + +
- (id)initWithClass:(Class)objectClass
+ + + +
+

Parameters

+ +
+
objectClass
+

The class that the mapping targets. Cannot be nil.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given class.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a given object class. This is the designated initializer.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

inverseMapping

+ + + +
+

Generates an inverse mapping for the rules specified within this object mapping. This can be used to +quickly generate a corresponding serialization mapping from a configured object mapping. The inverse +mapping will have the source and destination keyPaths swapped for all attribute and relationship mappings.

+
+ + + +
- (RKObjectMapping *)inverseMapping
+ + + + + + + + + +
+

Discussion

+

Generates an inverse mapping for the rules specified within this object mapping. This can be used to +quickly generate a corresponding serialization mapping from a configured object mapping. The inverse +mapping will have the source and destination keyPaths swapped for all attribute and relationship mappings.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

mapKeyOfNestedDictionaryToAttribute:

+ + + +
+

Configures a sub-key mapping for cases where JSON has been nested underneath a key named after an attribute.

+
+ + + +
- (void)mapKeyOfNestedDictionaryToAttribute:(NSString *)attributeName
+ + + + + + + + + +
+

Discussion

+

Configures a sub-key mapping for cases where JSON has been nested underneath a key named after an attribute.

+ +

For example, consider the following JSON:

+ +
 { "users":
+     {
+         "blake": { "id": 1234, "email": "blake@restkit.org" },
+         "rachit": { "id": 5678", "email": "rachit@restkit.org" }
+     }
+ }
+
+ +

We can configure our mappings to handle this in the following form:

+ +
 RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[User class]];
+ mapping.forceCollectionMapping = YES; // RestKit cannot infer this is a collection, so we force it
+ [mapping mapKeyOfNestedDictionaryToAttribute:@"firstName"];
+ [mapping mapFromKeyPath:@"(firstName).id" toAttribute:"userID"];
+ [mapping mapFromKeyPath:@"(firstName).email" toAttribute:"email"];
+
+ [[RKObjectManager sharedManager].mappingProvider setObjectMapping:mapping forKeyPath:@"users"];
+
+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ +

removePropertyMapping:

+ + + +
+

Removes an RKAttributeMapping or RKRelationshipMapping from the receiver.

+
+ + + +
- (void)removePropertyMapping:(RKPropertyMapping *)propertyMapping
+ + + +
+

Parameters

+ +
+
propertyMapping
+

The attribute or relationship mapping to remove.

+
+ +
+ + + + + + + +
+

Discussion

+

Removes an RKAttributeMapping or RKRelationshipMapping from the receiver.

+
+ + + + + + + +
+

Declared In

+ RKObjectMapping.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKObjectMappingOperationDataSource.html b/Pods/Documentation/RestKit/html/Classes/RKObjectMappingOperationDataSource.html new file mode 100644 index 00000000..3db1faaa --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKObjectMappingOperationDataSource.html @@ -0,0 +1,228 @@ + + + + + RKObjectMappingOperationDataSource Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + + + + +
Inherits fromNSObject
Conforms toRKMappingOperationDataSource
Declared inRKObjectMappingOperationDataSource.h
+ + + + +
+ +

Overview

+

The RKObjectMappingOperationDataSource class is an implementation of the RKMappingOperationDataSource protocol for use in performing object mappings that target plain old NSObject derived classes (as opposed to NSManagedObject derived persistent entities).

+
+ + + + + + + + + + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKObjectParameterization.html b/Pods/Documentation/RestKit/html/Classes/RKObjectParameterization.html new file mode 100644 index 00000000..f0bdb601 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKObjectParameterization.html @@ -0,0 +1,343 @@ + + + + + RKObjectParameterization Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKObjectParameterization.h
+ + + + +
+ +

Overview

+

The RKObjectParameterization class provides an interface for mapping a local domain object into an NSDictionary representation suitable for use as the parameters of an HTTP request.

+
+ + + + + +
+ +

Tasks

+ + + + +

Parameterizing an Object

+
    +
  • + + + parametersWithObject:requestDescriptor:error: +

    Returns a dictionary representation of the given object by performing object mapping using the mapping +from the given request descriptor. If the request descriptor specifies a root key path, the mapped parameters +will be nested within the dictionary under the specified root key path.

    +
    + + +
  • +
+ +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

parametersWithObject:requestDescriptor:error:

+ + + +
+

Returns a dictionary representation of the given object by performing object mapping using the mapping +from the given request descriptor. If the request descriptor specifies a root key path, the mapped parameters +will be nested within the dictionary under the specified root key path.

+
+ + + +
+ (NSDictionary *)parametersWithObject:(id)object requestDescriptor:(RKRequestDescriptor *)requestDescriptor error:(NSError **)error
+ + + +
+

Parameters

+ +
+
object
+

The object to be parameterized.

+
+ +
+
requestDescriptor
+

The request descriptor describing how the object is to be mapped into an NSDictionary of parameters.

+
+ +
+
error
+

If there is a problem mapping the parameters, upon return contains a pointer to an instance of NSError that describes the problem.

+
+ +
+ + + +
+

Return Value

+

A new dictionary containing the mapped parameters or nil if an error has occurred.

+
+ + + + + +
+

Discussion

+

Returns a dictionary representation of the given object by performing object mapping using the mapping +from the given request descriptor. If the request descriptor specifies a root key path, the mapped parameters +will be nested within the dictionary under the specified root key path.

+
+ + + + + + + +
+

Declared In

+ RKObjectParameterization.h
+
+ + +
+ +
+ + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKObjectRequestOperation.html b/Pods/Documentation/RestKit/html/Classes/RKObjectRequestOperation.html new file mode 100644 index 00000000..83898a87 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKObjectRequestOperation.html @@ -0,0 +1,1141 @@ + + + + + RKObjectRequestOperation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSOperation
Declared inRKObjectRequestOperation.h
+ + + + +
+ +

Overview

+

RKObjectRequestOperation is an NSOperation subclass that implements object mapping on the response body of an NSHTTPResponse loaded via an RKHTTPRequestOperation.

+ +

Object request operations are initialized with a fully configured NSURLRequest object and an array of RKResponseDescriptor objects. RKObjectRequestOperation is internally implemented as an aggregate operation that constructs and starts an RKHTTPRequestOperation to perform the network access and retrieve the mappable data. If an error occurs during HTTP transport, the object request operation is failed with the transport error. Once response data is loaded for the request, the object request operation creates and starts an RKObjectResponseMapperOperation to perform the object mapping on the response body. If the mapping operation fails, then object request operation is failed and the error property is set. If mapping is successful, then the mappingResult property is set and the operation is finished successfully.

+ +

Acceptable Content Types and Status Codes

+ +

Instances of RKObjectRequestOperation determine the acceptability of status codes and content types differently than is typical for AFNetworking derived network opertations. The RKHTTPRequestOperation (which is a subclass of the AFNetworking AFHTTPRequestOperation class) supports the dynamic assigning of acceptable status codes and content types. This facility is utilized during the configuration of the network operation for an object request operation. The set of acceptable content types is determined by consulting the RKMIMETypeSerialization via an invocation of [RKMIMETypeSerialization registeredMIMETypes]. The registeredMIMETypes method returns an NSSet containing either NSString or NSRegularExpression objects that specify the content types for which RKSerialization classes have been registered to handle. The set of acceptable status codes is determined by aggregating the value of the statusCodes property from all registered RKResponseDescriptor objects.

+ +

Error Mapping

+ +

If the HTTP request returned a response in the Client Error (400-499 range) or Server Error (500-599 range) class and an appropriate RKResponseDescriptor is provided to perform mapping on the response, then the object mapping result is considered to contain a server returned error. In this case, an NSError object is created in the RKErrorDomain with an error code of RKMappingErrorFromMappingResult and the object request operation is failed. In the event that an a response is returned in an error class and no RKResponseDescriptor has been provided to the operation to handle it, then an NSError object in the AFNetworkingErrorDomain with an error code of NSURLErrorBadServerResponse will be returned by the underlying RKHTTPRequestOperation indicating that an unexpected status code was returned.

+ +

Prioritization and Cancellation

+ +

Object request operations support prioritization and cancellation of the underlying RKHTTPRequestOperation and RKResponseMapperOperation operations that perform the network transport and object mapping duties on their behalf. The queue priority of the object request operation, as set via the [NSOperation setQueuePriority:] method, is applied to the underlying response mapping operation when it is enqueued onto the responseMappingQueue. If the object request operation is cancelled, then the underlying HTTP request operation and response mapping operation are also cancelled.

+ +

Caching

+ +

Instances of RKObjectRequestOperation support all the HTTP caching facilities available via the NSURLConnection family of API’s. For caching to be enabled, the remote web server that the application is communicating with must emit the appropriate Cache-Control, Expires, and/or ETag headers. When the response headers include the appropriate caching information, the shared NSURLCache instance will manage responses and transparently add conditional GET support to cachable requests. HTTP caching is a deep topic explored in depth across the web and detailed in RFC 2616: http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html

+ +

The RKObjectRequestOperation class also provides support for utilizing the NSURLCache to satisfy requests without hitting the network. This support enables applications to display views presenting data retrieved via a cachable GET request without revalidating with the server and incurring any overhead. The optimization is controlled via avoidsNetworkAccess property. When enabled, the operation will skip the network transport portion of the object request operation and proceed directly to object mapping the cached response data. When the object request operation is an instance of RKManagedObjectRequestOperation, the deserialization and mapping portion of the process can be skipped entirely and the operation will fetch the appropriate object directly from Core Data, falling back to network transport once the cache entry has expired. Please refer to the documentation accompanying RKManagedObjectRequestOperation for more details.

+ +

Core Data

+ +

RKObjectRequestOperation is not able to perform object mapping that targets Core Data destination entities. Please refer to the RKManagedObjectRequestOperation subclass for details regarding performing a Core Data object request operation.

+
+ + + + + +
+ +

Tasks

+ + + +

Initializing an Object Request Operation

+ + + + + +

Configuring Object Mapping

+ + + + + +

Accessing Operation Results

+ + + + + +

Accessing the HTTP Request Operation

+ + + + + +

Setting the Completion Block and Callback Queues

+ +
    +
  • + + – setCompletionBlockWithSuccess:failure: +

    Sets the completionBlock property with a block that executes either the specified success or failure block, depending on the state of the object request on completion. If error returns a value, which can be set during HTTP transport by the underlying HTTPRequestOperation or during object mapping by the RKResponseMapperOperation object, then failure is executed. If the object request operation is cancelled, then neither success nor failure will be executed. Otherwise, success is executed.

    +
    + + +
  • + +   successCallbackQueue +

    The callback dispatch queue on success. If NULL (default), the main queue is used.

    +
    + property + +
  • + +   failureCallbackQueue +

    The callback dispatch queue on failure. If NULL (default), the main queue is used.

    +
    + property + +
  • +
+ + + +

Accessing the Response Mapping Queue

+ +
    +
  • + + + responseMappingQueue +

    Returns the operation queue used by all object request operations when object mapping the body of a response loaded via HTTP.

    +
    + + +
  • +
+ + + +

ForSubclassEyesOnly Methods

+ +
    +
  • + + – performMappingOnResponse: +

    Performs object mapping using the response and responseData properties.

    +
    + + +
  • + + – willFinish +

    Invoked to tell the receiver that the object request operation is finishing its work and is about to transition into the finished state. Used to perform any necessary cleanup before the operation is finished.

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

HTTPRequestOperation

+ + + +
+

The underlying RKHTTPRequestOperation object used to manage the HTTP request/response lifecycle of the object request operation.

+
+ + + +
@property (nonatomic, strong, readonly) RKHTTPRequestOperation *HTTPRequestOperation
+ + + + + + + + + +
+

Discussion

+

The underlying RKHTTPRequestOperation object used to manage the HTTP request/response lifecycle of the object request operation.

+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ +

error

+ + + +
+

The error, if any, that occurred during execution of the operation.

+
+ + + +
@property (nonatomic, strong, readonly) NSError *error
+ + + + + + + + + +
+

Discussion

+

The error, if any, that occurred during execution of the operation.

+ +

Errors may originate during the network transport or object mapping phases of the object request operation. A nil error value indicates that the operation completed successfully.

+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ +

failureCallbackQueue

+ + + +
+

The callback dispatch queue on failure. If NULL (default), the main queue is used.

+
+ + + +
@property (nonatomic, assign) dispatch_queue_t failureCallbackQueue
+ + + + + + + + + +
+

Discussion

+

The callback dispatch queue on failure. If NULL (default), the main queue is used.

+ +

The queue is retained while this operation is living

+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ +

mappingResult

+ + + +
+

The mapping result returned by the underlying RKObjectResponseMapperOperation.

+
+ + + +
@property (nonatomic, strong, readonly) RKMappingResult *mappingResult
+ + + + + + + + + +
+

Discussion

+

The mapping result returned by the underlying RKObjectResponseMapperOperation.

+ +

This property is nil if the operation is failed due to a network transport error.

+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ +

responseDescriptors

+ + + +
+

The array of RKResponseDescriptor objects that specify how the deserialized responseData is to be object mapped.

+
+ + + +
@property (nonatomic, strong, readonly) NSArray *responseDescriptors
+ + + + + + + + + +
+

Discussion

+

The array of RKResponseDescriptor objects that specify how the deserialized responseData is to be object mapped.

+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ +

successCallbackQueue

+ + + +
+

The callback dispatch queue on success. If NULL (default), the main queue is used.

+
+ + + +
@property (nonatomic, assign) dispatch_queue_t successCallbackQueue
+ + + + + + + + + +
+

Discussion

+

The callback dispatch queue on success. If NULL (default), the main queue is used.

+ +

The queue is retained while this operation is living

+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ +

targetObject

+ + + +
+

The target object for the object mapping operation.

+
+ + + +
@property (nonatomic, strong) id targetObject
+ + + + + + + + + +
+

Discussion

+

The target object for the object mapping operation.

+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

responseMappingQueue

+ + + +
+

Returns the operation queue used by all object request operations when object mapping the body of a response loaded via HTTP.

+
+ + + +
+ (NSOperationQueue *)responseMappingQueue
+ + + + + +
+

Return Value

+

The response mapping queue.

+
+ + + + + +
+

Discussion

+

Returns the operation queue used by all object request operations when object mapping the body of a response loaded via HTTP.

+ +

By default, the response mapping queue is configured with a maximum concurrent operation count of 1, ensuring that only one HTTP response is mapped at a time.

+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

initWithHTTPRequestOperation:responseDescriptors:

+ + + +
+

Initializes an object request operation with an HTTP request operation and a set of response descriptors.

+
+ + + +
- (id)initWithHTTPRequestOperation:(RKHTTPRequestOperation *)requestOperation responseDescriptors:(NSArray *)responseDescriptors
+ + + +
+

Parameters

+ +
+
responseDescriptors
+

An array of RKResponseDescriptor objects specifying how object mapping is to be performed on the response loaded by the network operation.

+
+ +
+
request
+

The request object to be used with the underlying network operation.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given request and response descriptors.

+
+ + + + + +
+

Discussion

+

Initializes an object request operation with an HTTP request operation and a set of response descriptors.

+ +

This is the designated initializer.

+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ +

initWithRequest:responseDescriptors:

+ + + +
+

Initializes an object request operation with a request object and a set of response descriptors.

+
+ + + +
- (id)initWithRequest:(NSURLRequest *)request responseDescriptors:(NSArray *)responseDescriptors
+ + + +
+

Parameters

+ +
+
request
+

The request object to be used with the underlying network operation.

+
+ +
+
responseDescriptors
+

An array of RKResponseDescriptor objects specifying how object mapping is to be performed on the response loaded by the network operation.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given request and response descriptors.

+
+ + + + + +
+

Discussion

+

Initializes an object request operation with a request object and a set of response descriptors.

+ +

This method is a convenience initializer for initializing an object request operation from a URL request with the default HTTP operation class RKHTTPRequestOperation. This method is functionally equivalent to the following example code:

+ +
RKHTTPRequestOperation *requestOperation = [[RKHTTPRequestOperation alloc] initWithRequest:request];
+RKObjectRequestOperation *objectRequestOperation = [[RKObjectRequestOperation alloc] initWithHTTPRequestOperation:requestOperation responseDescriptors:responseDescriptors];
+
+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ +

performMappingOnResponse:

+ + + +
+

Performs object mapping using the response and responseData properties.

+
+ + + +
- (RKMappingResult *)performMappingOnResponse:(NSError **)error
+ + + +
+

Parameters

+ +
+
error
+

A pointer to an NSError object to be set in the event that the object mapping process has failed.

+
+ +
+ + + +
+

Return Value

+

A mapping result or nil if an error has occurred.

+
+ + + + + +
+

Discussion

+

Performs object mapping using the response and responseData properties.

+ +

The RKObjectRequestOperation superclass is responsible for the invocation of this method and the subsequent handling of the mapping result or error.

+
+ + + + + + + +
+

Declared In

+ RKRequestOperationSubclass.h
+
+ + +
+ +
+ +

setCompletionBlockWithSuccess:failure:

+ + + +
+

Sets the completionBlock property with a block that executes either the specified success or failure block, depending on the state of the object request on completion. If error returns a value, which can be set during HTTP transport by the underlying HTTPRequestOperation or during object mapping by the RKResponseMapperOperation object, then failure is executed. If the object request operation is cancelled, then neither success nor failure will be executed. Otherwise, success is executed.

+
+ + + +
- (void)setCompletionBlockWithSuccess:(void ( ^ ) ( RKObjectRequestOperation *operation , RKMappingResult *mappingResult ))success failure:(void ( ^ ) ( RKObjectRequestOperation *operation , NSError *error ))failure
+ + + +
+

Parameters

+ +
+
success
+

The block to be executed on the completion of a successful operation. This block has no return value and takes two arguments: the receiver operation and the mapping result from object mapping the response data of the request.

+
+ +
+
failure
+

The block to be executed on the completion of an unsuccessful operation. This block has no return value and takes two arguments: the receiver operation and the error that occurred during the execution of the operation.

+
+ +
+ + + + + + + +
+

Discussion

+

Sets the completionBlock property with a block that executes either the specified success or failure block, depending on the state of the object request on completion. If error returns a value, which can be set during HTTP transport by the underlying HTTPRequestOperation or during object mapping by the RKResponseMapperOperation object, then failure is executed. If the object request operation is cancelled, then neither success nor failure will be executed. Otherwise, success is executed.

+
+ + + + + + + +
+

Declared In

+ RKObjectRequestOperation.h
+
+ + +
+ +
+ +

willFinish

+ + + +
+

Invoked to tell the receiver that the object request operation is finishing its work and is about to transition into the finished state. Used to perform any necessary cleanup before the operation is finished.

+
+ + + +
- (void)willFinish
+ + + + + + + + + +
+

Discussion

+

Invoked to tell the receiver that the object request operation is finishing its work and is about to transition into the finished state. Used to perform any necessary cleanup before the operation is finished.

+
+ + + + + + + +
+

Declared In

+ RKRequestOperationSubclass.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKObjectResponseMapperOperation.html b/Pods/Documentation/RestKit/html/Classes/RKObjectResponseMapperOperation.html new file mode 100644 index 00000000..2f5867a7 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKObjectResponseMapperOperation.html @@ -0,0 +1,225 @@ + + + + + RKObjectResponseMapperOperation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromRKResponseMapperOperation : NSOperation
Declared inRKResponseMapperOperation.h
+ + + + +
+ +

Overview

+

RKObjectResponseMapperOperation is an RKResponseMapperOperation subclass that provides support for performing object mapping for mappings that target NSObject derived classes. It does not require a data source to perform its work.

+
+ + + + + + + + + + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKPathMatcher.html b/Pods/Documentation/RestKit/html/Classes/RKPathMatcher.html new file mode 100644 index 00000000..28230152 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKPathMatcher.html @@ -0,0 +1,795 @@ + + + + + RKPathMatcher Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + + + + +
Inherits fromNSObject
Conforms toNSCopying
Declared inRKPathMatcher.h
+ + + + +
+ +

Overview

+

The RKPathMatcher class performs pattern matching and parameter parsing of strings, typically representing the path portion of an NSURL object. It provides much of the necessary tools to map a given path to local objects (the inverse of RKRouter’s function). This makes it easier to implement the RKManagedObjectCaching protocol and generate NSFetchRequest objects from a given path. There are two means of instantiating and using a matcher object in order to provide more flexibility in implementations, and to improve efficiency by eliminating repetitive and costly pattern initializations.

+
+ + + + + +
+ +

Tasks

+ + + +

Matching Paths to Patterns

+ + + + + +

Matching Patterns to Paths

+ + + + + +

Creating Paths from Objects

+ +
    +
  • + + – pathFromObject: +

    Generates a new path by interpolating the properties of the ‘object’ argument, assuming the existence of a previously specified pattern established via pathMatcherWithPattern:. Otherwise, this method is identical in function to RKPathFromPatternWithObject (in fact it is a shortcut for this method).

    +
    + + +
  • + + – pathFromObject:addingEscapes: +

    Generates a path by interpolating the properties of the ‘object’ argument, assuming the existence of a previously specified pattern established via pathMatcherWithPattern:. Otherwise, this method is identical in function to RKPathFromPatternWithObject (in fact it is a shortcut for this method).

    +
    + + +
  • +
+ + + +

Accessing Tokenized Query Parameters

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

queryParameters

+ + + +
@property (copy, readonly) NSDictionary *queryParameters
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

pathMatcherWithPath:

+ + + +
+

Creates a path match object starting from a path string. This method should be followed by matchesPattern:tokenizeQueryStrings:parsedArguments:

+
+ + + +
+ (RKPathMatcher *)pathMatcherWithPath:(NSString *)pathString
+ + + +
+

Parameters

+ +
+
pathString
+

The string to evaluate and parse, such as /districts/tx/upper/?apikey=GC5512354

+
+ +
+ + + +
+

Return Value

+

An instantiated RKPathMatcher without an established pattern.

+
+ + + + + +
+

Discussion

+

Creates a path match object starting from a path string. This method should be followed by matchesPattern:tokenizeQueryStrings:parsedArguments:

+
+ + + + + + + +
+

Declared In

+ RKPathMatcher.h
+
+ + +
+ +
+ +

pathMatcherWithPattern:

+ + + +
+

Creates a path matcher object starting from a pattern string. This method should be followed by matchesPath:tokenizeQueryStrings:parsedArguments:. Patterns should include encoded parameter keys, delimited by a single colon at the beginning of the key name.

+
+ + + +
+ (RKPathMatcher *)pathMatcherWithPattern:(NSString *)patternString
+ + + +
+

Parameters

+ +
+
patternString
+

The pattern to use for evaluating, such as /:entityName/:stateID/:chamber/

+
+ +
+ + + +
+

Return Value

+

An instantiated RKPathMatcher with an established pattern.

+
+ + + + + +
+

Discussion

+

Creates a path matcher object starting from a pattern string. This method should be followed by matchesPath:tokenizeQueryStrings:parsedArguments:. Patterns should include encoded parameter keys, delimited by a single colon at the beginning of the key name.

+ +

NOTE 1 – Numerous colon-encoded parameter keys can be joined in a long pattern, but each key must be separated by at least one unmapped character. For instance, /:key1:key2:key3/ is invalid, whereas /:key1/:key2/:key3/ is acceptable.

+ +

NOTE 2 – The pattern matcher supports KVM, so :key1.otherKey normally resolves as it would in any other KVM situation, … otherKey is a sub-key on a the object represented by key1. This presents problems in circumstances where you might want to build a pattern like /:filename.json, where the dot isn’t intended as a sub-key on the filename, but rather part of the json static string. In these instances, you need to escape the dot with two backslashes, like so: /:filename\\.json

+
+ + + + + + + +
+

Declared In

+ RKPathMatcher.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

matchesPath:tokenizeQueryStrings:parsedArguments:

+ + + +
+

Determines if the given path string matches a pattern, and yields a dictionary with the resulting matched key/value pairs. Use of this method should be preceded by pathMatcherWithPattern:.

+
+ + + +
- (BOOL)matchesPath:(NSString *)pathString tokenizeQueryStrings:(BOOL)shouldTokenize parsedArguments:(NSDictionary **)arguments
+ + + +
+

Parameters

+ +
+
pathString
+

The string to evaluate and parse, such as /districts/tx/upper/?apikey=GC5512354

+
+ +
+
shouldTokenize
+

If YES, any query parameters will be tokenized and inserted into the parsed argument dictionary.

+
+ +
+
arguments
+

A pointer to a dictionary that contains the key/values from the pattern (and parameter) matching.

+
+ +
+ + + +
+

Return Value

+

A boolean value indicating if the path string successfully matched the pattern.

+
+ + + + + +
+

Discussion

+

Determines if the given path string matches a pattern, and yields a dictionary with the resulting matched key/value pairs. Use of this method should be preceded by pathMatcherWithPattern:.

+
+ + + + + + + +
+

Declared In

+ RKPathMatcher.h
+
+ + +
+ +
+ +

matchesPattern:tokenizeQueryStrings:parsedArguments:

+ + + +
+

Determines if the path string matches the provided pattern, and yields a dictionary with the resulting matched key/value pairs. Use of this method should be preceded by pathMatcherWithPath: Pattern strings should include encoded parameter keys, delimited by a single colon at the beginning of the key name.

+
+ + + +
- (BOOL)matchesPattern:(NSString *)patternString tokenizeQueryStrings:(BOOL)shouldTokenize parsedArguments:(NSDictionary **)arguments
+ + + +
+

Parameters

+ +
+
patternString
+

The pattern to use for evaluating, such as /:entityName/:stateID/:chamber/

+
+ +
+
shouldTokenize
+

If YES, any query parameters will be tokenized and inserted into the parsed argument dictionary.

+
+ +
+
arguments
+

A pointer to a dictionary that contains the key/values from the pattern (and parameter) matching.

+
+ +
+ + + +
+

Return Value

+

A boolean value indicating if the path string successfully matched the pattern.

+
+ + + + + +
+

Discussion

+

Determines if the path string matches the provided pattern, and yields a dictionary with the resulting matched key/value pairs. Use of this method should be preceded by pathMatcherWithPath: Pattern strings should include encoded parameter keys, delimited by a single colon at the beginning of the key name.

+ +

NOTE 1 – Numerous colon-encoded parameter keys can be joined in a long pattern, but each key must be separated by at least one unmapped character. For instance, /:key1:key2:key3/ is invalid, whereas /:key1/:key2/:key3/ is acceptable.

+ +

NOTE 2 – The pattern matcher supports KVM, so :key1.otherKey normally resolves as it would in any other KVM +situation, … otherKey is a sub-key on a the object represented by key1. This presents problems in circumstances where +you might want to build a pattern like /:filename.json, where the dot isn’t intended as a sub-key on the filename, but rather +part of the json static string. In these instances, you need to escape the dot with two backslashes, like so: +/:filename\.json

+
+ + + + + + + +
+

Declared In

+ RKPathMatcher.h
+
+ + +
+ +
+ +

pathFromObject:

+ + + +
+

Generates a new path by interpolating the properties of the ‘object’ argument, assuming the existence of a previously specified pattern established via pathMatcherWithPattern:. Otherwise, this method is identical in function to RKPathFromPatternWithObject (in fact it is a shortcut for this method).

+
+ + + +
- (NSString *)pathFromObject:(id)object
+ + + +
+

Parameters

+ +
+
object
+

The object containing the properties to interpolate.

+
+ +
+ + + +
+

Return Value

+

A string with the object’s interpolated property values inserted into the receiver’s established pattern.

+
+ + + + + +
+

Discussion

+

Generates a new path by interpolating the properties of the ‘object’ argument, assuming the existence of a previously specified pattern established via pathMatcherWithPattern:. Otherwise, this method is identical in function to RKPathFromPatternWithObject (in fact it is a shortcut for this method).

+ +

For example, given an ‘article’ object with an ‘articleID’ property value of 12345 …

+ +

RKPathMatcher matcher = [RKPathMatcher pathMatcherWithPattern:@“/articles/:articleID”]; + NSString path = [matcher pathFromObject:article];

+ +

… will produce a ‘path’ containing the string “/articles/12345”

+
+ + + + + + + +
+

Declared In

+ RKPathMatcher.h
+
+ + +
+ +
+ +

pathFromObject:addingEscapes:

+ + + +
+

Generates a path by interpolating the properties of the ‘object’ argument, assuming the existence of a previously specified pattern established via pathMatcherWithPattern:. Otherwise, this method is identical in function to RKPathFromPatternWithObject (in fact it is a shortcut for this method).

+
+ + + +
- (NSString *)pathFromObject:(id)object addingEscapes:(BOOL)addEscapes
+ + + +
+

Parameters

+ +
+
object
+

The object containing the properties to interpolate.

+
+ +
+
addEscapes
+

Conditionally add percent escapes to the interpolated property values

+
+ +
+ + + +
+

Return Value

+

A string with the object’s interpolated property values inserted into the receiver’s established pattern.

+
+ + + + + +
+

Discussion

+

Generates a path by interpolating the properties of the ‘object’ argument, assuming the existence of a previously specified pattern established via pathMatcherWithPattern:. Otherwise, this method is identical in function to RKPathFromPatternWithObject (in fact it is a shortcut for this method).

+ +

For example, given an ‘article’ object with an ‘articleID’ property value of 12345 and a code of “This/That”…

+ +
 RKPathMatcher *matcher = [RKPathMatcher pathMatcherWithPattern:@"/articles/:articleID/:code"];
+ NSString *path = [matcher pathFromObject:article addingEscapes:YES];
+
+ +

… will produce a ‘path’ containing the string @"/articles/12345/This%2FThat"

+
+ + + + + + + +
+

Declared In

+ RKPathMatcher.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKPropertyInspector.html b/Pods/Documentation/RestKit/html/Classes/RKPropertyInspector.html new file mode 100644 index 00000000..4fb76a0b --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKPropertyInspector.html @@ -0,0 +1,630 @@ + + + + + RKPropertyInspector Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKPropertyInspector.h
+ + + + +
+ +

Overview

+

The RKPropertyInspector class provides an interface for introspecting the properties and attributes of classes using the reflection capabilities of the Objective-C runtime. Once inspected, the properties and types are cached.

+
+ + + + + +
+ +

Tasks

+ + + +

Retrieving the Shared Inspector Instance

+ +
    +
  • + + + sharedInspector +

    Returns the shared property inspector singleton instance.

    +
    + + +
  • +
+ + + +

Retrieving the Properties and Types for a Class

+ + + + + +

CoreData Methods

+ + + +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

propertyTypeFromAttributeString:

+ + + +
+

Returns the name of a property when provided the name of a property obtained via the property_getAttributes reflection API.

+
+ + + +
+ (NSString *)propertyTypeFromAttributeString:(NSString *)attributeString
+ + + +
+

Parameters

+ +
+
attributeString
+

A string object encoding attribute information.

+
+ +
+ + + +
+

Return Value

+

The class name for the property type encoded in the given attribute string or @"NULL" if the property does not have an object type (the declared property is for a primitive type).

+
+ + + + + +
+

Discussion

+

Returns the name of a property when provided the name of a property obtained via the property_getAttributes reflection API.

+
+ + + + + + + +
+

Declared In

+ RKPropertyInspector.h
+
+ + +
+ +
+ +

sharedInspector

+ + + +
+

Returns the shared property inspector singleton instance.

+
+ + + +
+ (RKPropertyInspector *)sharedInspector
+ + + + + +
+

Return Value

+

The shared RKPropertyInspector instance.

+
+ + + + + +
+

Discussion

+

Returns the shared property inspector singleton instance.

+
+ + + + + + + +
+

Declared In

+ RKPropertyInspector.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

propertyNamesAndTypesForClass:

+ + + +
+

Returns a dictionary of names and types for the properties of a given class.

+
+ + + +
- (NSDictionary *)propertyNamesAndTypesForClass:(Class)objectClass
+ + + +
+

Parameters

+ +
+
objectClass
+

The class to retrieve the property name and types for.

+
+ +
+ + + +
+

Return Value

+

A dictionary containing metadata about the properties of the given class, where the keys in the dictionary are the property names and the values are Class objects specifying the type of the property.

+
+ + + + + +
+

Discussion

+

Returns a dictionary of names and types for the properties of a given class.

+
+ + + + + + + +
+

Declared In

+ RKPropertyInspector.h
+
+ + +
+ +
+ +

propertyNamesAndTypesForEntity:

+ + + +
- (NSDictionary *)propertyNamesAndTypesForEntity:(NSEntityDescription *)entity
+ + +
+ +
+ +

typeForProperty:ofClass:

+ + + +
+

Returns the Class object specifying the type of the property with given name on a class.

+
+ + + +
- (Class)typeForProperty:(NSString *)propertyName ofClass:(Class)objectClass
+ + + +
+

Parameters

+ +
+
propertyName
+

The name of the property to retrieve the type of.

+
+ +
+
objectClass
+

The class to retrieve the property from.

+
+ +
+ + + +
+

Return Value

+

A Class object specifying the type of the requested property.

+
+ + + + + +
+

Discussion

+

Returns the Class object specifying the type of the property with given name on a class.

+
+ + + + + + + +
+

Declared In

+ RKPropertyInspector.h
+
+ + +
+ +
+ +

typeForProperty:ofEntity:

+ + + +
+

Returns the Class type of the specified property on the object class

+
+ + + +
- (Class)typeForProperty:(NSString *)propertyName ofEntity:(NSEntityDescription *)entity
+ + + + + + + + + +
+

Discussion

+

Returns the Class type of the specified property on the object class

+
+ + + + + + + +
+

Declared In

+ RKPropertyInspector+CoreData.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKPropertyMapping.html b/Pods/Documentation/RestKit/html/Classes/RKPropertyMapping.html new file mode 100644 index 00000000..455c8e50 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKPropertyMapping.html @@ -0,0 +1,521 @@ + + + + + RKPropertyMapping Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + + + + +
Inherits fromNSObject
Conforms toNSCopying
Declared inRKPropertyMapping.h
+ + + + +
+ +

Overview

+

RKPropertyMapping is an abstract class for describing the properties being mapped within an RKObjectMapping or RKEntityMapping object. It defines the common interface for its concrete subclasses RKAttributeMapping and RKRelationshipMapping. Each property mapping defines a single transformation from a source key path (often in the deserialized representation of a JSON or XML document) to a destination key path (typically on a target object).

+
+ + + + + +
+ +

Tasks

+ + + +

Accessing the Parent Object Mapping

+ +
    +
  • + +   objectMapping +

    Returns the object mapping the receiver is added to.

    +
    + property + +
  • +
+ + + +

Accessing the Source and Destination Key Paths

+ +
    +
  • + +   sourceKeyPath +

    A key path on the source object from which to get information that is to be mapped onto the destination object.

    +
    + property + +
  • + +   destinationKeyPath +

    A key path on the destination object on which to set information that has been mapped from the source object.

    +
    + property + +
  • +
+ + + +

Comparing Property Mappings

+ +
    +
  • + + – isEqualToMapping: +

    Compares the receiving property mapping to another property mapping.

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

destinationKeyPath

+ + + +
+

A key path on the destination object on which to set information that has been mapped from the source object.

+
+ + + +
@property (nonatomic, strong, readonly) NSString *destinationKeyPath
+ + + + + + + + + +
+

Discussion

+

A key path on the destination object on which to set information that has been mapped from the source object.

+
+ + + + + + + +
+

Declared In

+ RKPropertyMapping.h
+
+ + +
+ +
+ +

objectMapping

+ + + +
+

Returns the object mapping the receiver is added to.

+
+ + + +
@property (nonatomic, weak, readonly) RKObjectMapping *objectMapping
+ + + + + + + + + +
+

Discussion

+

Returns the object mapping the receiver is added to.

+
+ + + + + + + +
+

Declared In

+ RKPropertyMapping.h
+
+ + +
+ +
+ +

sourceKeyPath

+ + + +
+

A key path on the source object from which to get information that is to be mapped onto the destination object.

+
+ + + +
@property (nonatomic, strong, readonly) NSString *sourceKeyPath
+ + + + + + + + + +
+

Discussion

+

A key path on the source object from which to get information that is to be mapped onto the destination object.

+
+ + + + + + + +
+

Declared In

+ RKPropertyMapping.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

isEqualToMapping:

+ + + +
+

Compares the receiving property mapping to another property mapping.

+
+ + + +
- (BOOL)isEqualToMapping:(RKPropertyMapping *)otherMapping
+ + + +
+

Parameters

+ +
+
otherMapping
+

The property mapping object with which to compare the receiver.

+
+ +
+ + + +
+

Return Value

+

YES if otherMapping specifies the same mapping as the receiver, otherwise NO.

+
+ + + + + +
+

Discussion

+

Compares the receiving property mapping to another property mapping.

+ +

Two property mappings are equal if they are of the same type (i.e. an RKAttributeMapping or an RKRelatiobshipMapping object) and specify a mapping from the same source key path to the same destination key path.

+
+ + + + + + + +
+

Declared In

+ RKPropertyMapping.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKRelationshipConnectionOperation.html b/Pods/Documentation/RestKit/html/Classes/RKRelationshipConnectionOperation.html new file mode 100644 index 00000000..b513558f --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKRelationshipConnectionOperation.html @@ -0,0 +1,518 @@ + + + + + RKRelationshipConnectionOperation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSOperation
Declared inRKRelationshipConnectionOperation.h
+ + + + +
+ +

Overview

+

The RKRelationshipConnectionOperation class is a subclass of NSOperation that manages the connection of NSManagedObject relationships as described by an RKConnectionMapping object. When executed, the operation will find related objects by searching the associated managed object cache for a matching object whose destination attribute value matches that of the associated managed object’s source attribute.

+ +

For example, given a managed object for the Employee entity with a one-to-one relationship to a Company named company (with an inverse relationship one-to-many relationship named employees) and a connection mapping specifying that the relationship can be connected by finding the Company managed object whose companyID attribute matches the companyID of the Employee, the operation would find the Company that employs the Employee by primary key and set the Core Data relationship to reflect the relationship appropriately.

+
+ + + + + +
+ +

Tasks

+ + + +

Initializing a Relationship Connection Operation

+ + + + + +

Accessing Details About the Operation

+ +
    +
  • + +   managedObject +

    The managed object the receiver will attempt to connect a relationship for.

    +
    + property + +
  • + +   connectionMapping +

    The connection mapping describing the relationship connection the receiver will attempt to connect.

    +
    + property + +
  • + +   managedObjectCache +

    The managed object cache the receiver will use to fetch a related object satisfying the connection mapping.

    +
    + property + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

connectionMapping

+ + + +
+

The connection mapping describing the relationship connection the receiver will attempt to connect.

+
+ + + +
@property (nonatomic, strong, readonly) RKConnectionMapping *connectionMapping
+ + + + + + + + + +
+

Discussion

+

The connection mapping describing the relationship connection the receiver will attempt to connect.

+
+ + + + + + + +
+

Declared In

+ RKRelationshipConnectionOperation.h
+
+ + +
+ +
+ +

managedObject

+ + + +
+

The managed object the receiver will attempt to connect a relationship for.

+
+ + + +
@property (nonatomic, strong, readonly) NSManagedObject *managedObject
+ + + + + + + + + +
+

Discussion

+

The managed object the receiver will attempt to connect a relationship for.

+
+ + + + + + + +
+

Declared In

+ RKRelationshipConnectionOperation.h
+
+ + +
+ +
+ +

managedObjectCache

+ + + +
+

The managed object cache the receiver will use to fetch a related object satisfying the connection mapping.

+
+ + + +
@property (nonatomic, strong, readonly) id<RKManagedObjectCaching> managedObjectCache
+ + + + + + + + + +
+

Discussion

+

The managed object cache the receiver will use to fetch a related object satisfying the connection mapping.

+
+ + + + + + + +
+

Declared In

+ RKRelationshipConnectionOperation.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

initWithManagedObject:connectionMapping:managedObjectCache:

+ + + +
+

Initializes the receiver with a given managed object, connection mapping, and managed object cache.

+
+ + + +
- (id)initWithManagedObject:(NSManagedObject *)managedObject connectionMapping:(RKConnectionMapping *)connectionMapping managedObjectCache:(id<RKManagedObjectCaching>)managedObjectCache
+ + + +
+

Parameters

+ +
+
managedObject
+

The object to attempt to connect a relationship to.

+
+ +
+
connectionMapping
+

A mapping describing the relationship and attributes necessary to perform the connection.

+
+ +
+
managedObjectCache
+

The managed object cache from which to attempt to fetch a matching object to satisfy the connection.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given managed object, connection mapping, and managed object cache.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a given managed object, connection mapping, and managed object cache.

+
+ + + + + + + +
+

Declared In

+ RKRelationshipConnectionOperation.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKRelationshipMapping.html b/Pods/Documentation/RestKit/html/Classes/RKRelationshipMapping.html new file mode 100644 index 00000000..ee2f4667 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKRelationshipMapping.html @@ -0,0 +1,411 @@ + + + + + RKRelationshipMapping Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromRKPropertyMapping : NSObject
Declared inRKRelationshipMapping.h
+ + + + +
+ +

Overview

+

The RKRelationshipMapping class is used to describe relationships of a class in an RKObjectMapping or an entity in an RKEntityMapping object.

+ +

RKRelationshipMapping extends RKPropertyMapping to describe features specific to relationships, including the RKMapping object describing how to map the destination object.

+
+ + + + + +
+ +

Tasks

+ + + +

Creating a Relationship Mapping

+ + + + + +

Accessing the Destination Mapping

+ +
    +
  • + +   mapping +

    An RKMapping object describing how to map the object representation at sourceKeyPath to a new represenation at destinationKeyPath.

    +
    + property + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

mapping

+ + + +
+

An RKMapping object describing how to map the object representation at sourceKeyPath to a new represenation at destinationKeyPath.

+
+ + + +
@property (nonatomic, strong, readonly) RKMapping *mapping
+ + + + + + + + + +
+

Discussion

+

An RKMapping object describing how to map the object representation at sourceKeyPath to a new represenation at destinationKeyPath.

+
+ + + + + + + +
+

Declared In

+ RKRelationshipMapping.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

relationshipMappingFromKeyPath:toKeyPath:withMapping:

+ + + +
+

Creates and returns a new relationship mapping object describing how to transform a related object representation at sourceKeyPath to a new representation at destinationKeyPath using the given mapping.

+
+ + + +
+ (RKRelationshipMapping *)relationshipMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath withMapping:(RKMapping *)mapping
+ + + +
+

Parameters

+ +
+
sourceKeyPath
+

A key path from which to retrieve data in the source object representation that is to be mapped as a relationship.

+
+ +
+
destinationKeyPath
+

The key path on the destination object to set the object mapped results.

+
+ +
+
mapping
+

A mapping object describing how to map the data retrieved from sourceKeyPath that is to be set on destinationKeyPath.

+
+ +
+ + + + + + + +
+

Discussion

+

Creates and returns a new relationship mapping object describing how to transform a related object representation at sourceKeyPath to a new representation at destinationKeyPath using the given mapping.

+ +

The mapping may describe a to-one or a to-many relationship. The appropriate handling of the source representation is deferred until run-time and is determined by performing reflection on the data retrieved from the source object representation by sending a valueForKeyPath: message where the key path is the value given in sourceKeyPath. If an NSArray, NSSet or NSOrderedSet object is returned, the related object representation is processed as a to-many collection. Otherwise the representation is considered to be a to-one.

+
+ + + + + + + +
+

Declared In

+ RKRelationshipMapping.h
+
+ + +
+ +
+ + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKRequestDescriptor.html b/Pods/Documentation/RestKit/html/Classes/RKRequestDescriptor.html new file mode 100644 index 00000000..219e63a0 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKRequestDescriptor.html @@ -0,0 +1,615 @@ + + + + + RKRequestDescriptor Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKRequestDescriptor.h
+ + + + +
+ +

Overview

+

An RKRequestDescriptor object describes an object mapping configuration that is used to construct the parameters of an HTTP request for an object. Request descriptors are defined by specifying the RKMapping object that is to be used when object mapping an object into an NSDictionary of parameters, the class of the type of object for which the mapping is to be applied, and an optional root key path under which the paramters are to be nested. Response descriptors are only utilized when construct parameters for an NSURLRequest with an HTTP method of POST, PUT, or PATCH.

+
+ + + + + +
+ +

Tasks

+ + + +

Creating a Response Descriptor

+ + + + + +

Getting Information About a Request Descriptor

+ +
    +
  • + +   mapping +

    The mapping specifying how the object being parameterized is to be mapped into an NSDictionary representation. The mapping must have an objectClass equal to [NSMutableDictionary class].

    +
    + property + +
  • + +   objectClass +

    The class of objects that the request descriptor is appropriate for use in parameterizing.

    +
    + property + +
  • + +   rootKeyPath +

    The root key path that the paramters for the object are to be nested under. May be nil.

    +
    + property + +
  • +
+ + + +

Using Request Descriptors

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

mapping

+ + + +
+

The mapping specifying how the object being parameterized is to be mapped into an NSDictionary representation. The mapping must have an objectClass equal to [NSMutableDictionary class].

+
+ + + +
@property (nonatomic, strong, readonly) RKMapping *mapping
+ + + + + + + + + +
+

Discussion

+

The mapping specifying how the object being parameterized is to be mapped into an NSDictionary representation. The mapping must have an objectClass equal to [NSMutableDictionary class].

+
+ + + + + + + +
+

Declared In

+ RKRequestDescriptor.h
+
+ + +
+ +
+ +

objectClass

+ + + +
+

The class of objects that the request descriptor is appropriate for use in parameterizing.

+
+ + + +
@property (nonatomic, strong, readonly) Class objectClass
+ + + + + + + + + +
+

Discussion

+

The class of objects that the request descriptor is appropriate for use in parameterizing.

+
+ + + + + + + +
+

Declared In

+ RKRequestDescriptor.h
+
+ + +
+ +
+ +

rootKeyPath

+ + + +
+

The root key path that the paramters for the object are to be nested under. May be nil.

+
+ + + +
@property (nonatomic, copy, readonly) NSString *rootKeyPath
+ + + + + + + + + +
+

Discussion

+

The root key path that the paramters for the object are to be nested under. May be nil.

+
+ + + + + + + +
+

Declared In

+ RKRequestDescriptor.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

requestDescriptorWithMapping:objectClass:rootKeyPath:

+ + + +
+

Creates and returns a new RKRequestDescriptor object.

+
+ + + +
+ (id)requestDescriptorWithMapping:(RKMapping *)mapping objectClass:(Class)objectClass rootKeyPath:(NSString *)rootKeyPath
+ + + +
+

Parameters

+ +
+
mapping
+

The mapping to be used when parameterizing an object using the request descriptor. Cannot be nil and must have an objectClass equal to [NSMutableDictionary class].

+
+ +
+
objectClass
+

The class of objects for which the request descriptor should be used. Cannot be nil.

+
+ +
+
rootKeyPath
+

The root key path under which paramters constructed using the response descriptor will be nested. If nil, the parameters will not be nested and returned as a flat dictionary object.

+
+ +
+ + + +
+

Return Value

+

A new RKRequestDescriptor object.

+
+ + + + + +
+

Discussion

+

Creates and returns a new RKRequestDescriptor object.

Warning: An exception will be raised if the objectClass of the given mapping is not [NSMutableDictionary class].

+
+ + + + + +
+

See Also

+ +
+ + + +
+

Declared In

+ RKRequestDescriptor.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

matchesObject:

+ + + +
+

Returns YES if the given object is instance of objectClass or any class that inherits from objectClass, else NO.

+
+ + + +
- (BOOL)matchesObject:(id)object
+ + + +
+

Parameters

+ +
+
object
+

The object to be matched against the receiver.

+
+ +
+ + + +
+

Return Value

+

YES if the given object matches objectClass, else NO.

+
+ + + + + +
+

Discussion

+

Returns YES if the given object is instance of objectClass or any class that inherits from objectClass, else NO.

+
+ + + + + + + +
+

Declared In

+ RKRequestDescriptor.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKResponseDescriptor.html b/Pods/Documentation/RestKit/html/Classes/RKResponseDescriptor.html new file mode 100644 index 00000000..e3192819 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKResponseDescriptor.html @@ -0,0 +1,876 @@ + + + + + RKResponseDescriptor Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKResponseDescriptor.h
+ + + + +
+ +

Overview

+

An RKResponseDescriptor object describes an object mapping configuration that is applicable to an HTTP response. Response descriptors are defined by specifying the RKMapping object that is to be used when performing object mapping on the deserialized response body and the URL path pattern, key path, and status codes for which the mapping is appropriate. The path pattern is a SOCKit SOCPattern string that will be matched against the URL of the request that loaded the response being mapped. If the path pattern is nil, the response descriptor is considered to be appropriate for a response loaded from any URL. The key path specifies the location of data within the deserialized response body for which the mapping is appropriate. If nil, the mapping is considered to apply to the entire response body. The status codes specify a set of HTTP response status codes for which the mapping is appropriate. It is common to constrain a response descriptor to the HTTP Successful status code class (status codes in the 200-299 range). Object mapping for error responses can be configured by configuring a response descriptor to handle the Client Error status code class (status codes in the 400-499 range). Instances of RKResponseDescriptor are immutable.

+
+ + + + + +
+ +

Tasks

+ + + +

Creating a Response Descriptor

+ + + + + +

Getting Information About a Response Descriptor

+ +
    +
  • + +   mapping +

    The mapping to be used when object mapping the deserialized HTTP response body. Cannot be nil.

    +
    + property + +
  • + +   pathPattern +

    The path pattern to match against the request URL. If nil, the response descriptor matches any URL.

    +
    + property + +
  • + +   keyPath +

    The key path to match against the deserialized response body. If nil, the response descriptor matches the entire response body.

    +
    + property + +
  • + +   statusCodes +

    The set of status codes for which response descriptor matches. If nil, the the response descriptor matches any status code.

    +
    + property + +
  • +
+ + + +

Setting the Base URL

+ + + + + +

Using Response Descriptors

+ +
    +
  • + + – matchesPath: +

    Returns a Boolean value that indicates if the receiver’s path pattern matches the given path.

    +
    + + +
  • + + – matchesURL: +

    Returns a Boolean value that indicates if the given URL object matches the base URL and path pattern of the receiver.

    +
    + + +
  • + + – matchesResponse: +

    Returns a Boolean value that indicates if the given URL response object matches the receiver.

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

baseURL

+ + + +
+

The base URL that the pathPattern is to be evaluated relative to.

+
+ + + +
@property (nonatomic, copy) NSURL *baseURL
+ + + + + + + + + +
+

Discussion

+

The base URL that the pathPattern is to be evaluated relative to.

+ +

The base URL is set to the base URL of the object manager when a response descriptor is added to an object manager.

+
+ + + + + + + +
+

Declared In

+ RKResponseDescriptor.h
+
+ + +
+ +
+ +

keyPath

+ + + +
+

The key path to match against the deserialized response body. If nil, the response descriptor matches the entire response body.

+
+ + + +
@property (nonatomic, copy, readonly) NSString *keyPath
+ + + + + + + + + +
+

Discussion

+

The key path to match against the deserialized response body. If nil, the response descriptor matches the entire response body.

+ +

When evaluating a key path match, the Foundation object parsed from the response body is sent valueForKeyPath: with the keyPath of the receiver. If the value returned is non-nil, object mapping is performed using the response descriptor’s mapping.

+
+ + + + + + + +
+

Declared In

+ RKResponseDescriptor.h
+
+ + +
+ +
+ +

mapping

+ + + +
+

The mapping to be used when object mapping the deserialized HTTP response body. Cannot be nil.

+
+ + + +
@property (nonatomic, strong, readonly) RKMapping *mapping
+ + + + + + + + + +
+

Discussion

+

The mapping to be used when object mapping the deserialized HTTP response body. Cannot be nil.

+
+ + + + + + + +
+

Declared In

+ RKResponseDescriptor.h
+
+ + +
+ +
+ +

pathPattern

+ + + +
+

The path pattern to match against the request URL. If nil, the response descriptor matches any URL.

+
+ + + +
@property (nonatomic, copy, readonly) NSString *pathPattern
+ + + + + + + + + +
+

Discussion

+

The path pattern to match against the request URL. If nil, the response descriptor matches any URL.

+
+ + + + + + + +
+

Declared In

+ RKResponseDescriptor.h
+
+ + +
+ +
+ +

statusCodes

+ + + +
+

The set of status codes for which response descriptor matches. If nil, the the response descriptor matches any status code.

+
+ + + +
@property (nonatomic, copy, readonly) NSIndexSet *statusCodes
+ + + + + + + + + +
+

Discussion

+

The set of status codes for which response descriptor matches. If nil, the the response descriptor matches any status code.

+
+ + + + + + + +
+

Declared In

+ RKResponseDescriptor.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

responseDescriptorWithMapping:pathPattern:keyPath:statusCodes:

+ + + +
+

Creates and returns a new RKResponseDescriptor object.

+
+ + + +
+ (RKResponseDescriptor *)responseDescriptorWithMapping:(RKMapping *)mapping pathPattern:(NSString *)pathPattern keyPath:(NSString *)keyPath statusCodes:(NSIndexSet *)statusCodes
+ + + +
+

Parameters

+ +
+
mapping
+

The mapping for the response descriptor.

+
+ +
+
pathPattern
+

A path pattern that matches against URLs for which the mapping should be used.

+
+ +
+
keyPath
+

A key path specifying the subset of the parsed response for which the mapping is to be used.

+
+ +
+
statusCodes
+

A set of HTTP status codes for which the mapping is to be used.

+
+ +
+ + + +
+

Return Value

+

A new RKResponseDescriptor object.

+
+ + + + + +
+

Discussion

+

Creates and returns a new RKResponseDescriptor object.

+
+ + + + + + + +
+

Declared In

+ RKResponseDescriptor.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

matchesPath:

+ + + +
+

Returns a Boolean value that indicates if the receiver’s path pattern matches the given path.

+
+ + + +
- (BOOL)matchesPath:(NSString *)path
+ + + +
+

Parameters

+ +
+
path
+

The path to compare with the path pattern of the receiver.

+
+ +
+ + + +
+

Return Value

+

YES if the path matches the receiver’s pattern, else NO.

+
+ + + + + +
+

Discussion

+

Returns a Boolean value that indicates if the receiver’s path pattern matches the given path.

+ +

Path matching is performed using an RKPathMatcher object. If the receiver has a nil path pattern or the given path is nil, YES is returned.

+
+ + + + + + + +
+

Declared In

+ RKResponseDescriptor.h
+
+ + +
+ +
+ +

matchesResponse:

+ + + +
+

Returns a Boolean value that indicates if the given URL response object matches the receiver.

+
+ + + +
- (BOOL)matchesResponse:(NSHTTPURLResponse *)response
+ + + +
+

Parameters

+ +
+
response
+

The HTTP response object to compare with the base URL, path pattern, and status codes set of the receiver.

+
+ +
+ + + +
+

Return Value

+

YES if the response matches the base URL, path pattern, and status codes set of the receiver, else NO.

+
+ + + + + +
+

Discussion

+

Returns a Boolean value that indicates if the given URL response object matches the receiver.

+ +

The match is evaluated by checking if the URL of the response matches the base URL and path pattern of the receiver via the matchesURL: method. If the URL is found to match, then the status code of the response is checked for inclusion in the receiver’s set of status codes.

+
+ + + + + + + +
+

Declared In

+ RKResponseDescriptor.h
+
+ + +
+ +
+ +

matchesURL:

+ + + +
+

Returns a Boolean value that indicates if the given URL object matches the base URL and path pattern of the receiver.

+
+ + + +
- (BOOL)matchesURL:(NSURL *)URL
+ + + +
+

Parameters

+ +
+
URL
+

The URL to compare with the base URL and path pattern of the receiver.

+
+ +
+ + + +
+

Return Value

+

YES if the URL matches the base URL and path pattern of the receiver, else NO.

+
+ + + + + +
+

Discussion

+

Returns a Boolean value that indicates if the given URL object matches the base URL and path pattern of the receiver.

+ +

This method considers both the baseURL and pathPattern of the receiver when evaluating the given URL object. The results evaluate in the following ways:

+ +
    +
  1. If the baseURL and pathPattern of the receiver are both nil, then YES is returned.
  2. +
  3. If the baseURL of the receiver is nil, but the path pattern is not, then the entire path and query string of the given URL will be evaluated against the path pattern of the receiver using matchesPath:.
  4. +
  5. If the baseURL and the pathPattern are both non-nil, then the given URL is first checked to verify that it is relative to the base URL using a string prefix comparison. If the absolute string value of the given URL is prefixed with the string value of the base URL, then the URL is considered relative. If the given URL is found not to be relative to the receiver’s baseURL, then NO is returned. If the URL is found to be relative to the base URL, then the path and query string of the URL are evaluated against the path pattern of the receiver using matchesPath:.
  6. +
+ +
+ + + + + + + +
+

Declared In

+ RKResponseDescriptor.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKResponseMapperOperation.html b/Pods/Documentation/RestKit/html/Classes/RKResponseMapperOperation.html new file mode 100644 index 00000000..db72ade9 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKResponseMapperOperation.html @@ -0,0 +1,872 @@ + + + + + RKResponseMapperOperation Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSOperation
Declared inRKResponseMapperOperation.h
+ + + + +
+ +

Overview

+

RKResponseMapperOperation is an NSOperation that provides support for performing object mapping on an NSHTTPURLResponse and its associated response data.

+ +

This is an abstract base class encapsulating the common interface API for its concrete subclasses RKObjectResponseMapperOperation and RKManagedObjectResponseMapperOperation.

+ +

The common behaviors encapsulated within RKResponseMapperOperation include:

+ +
    +
  1. Handling Empty Responses: Empty response data (see note below) requires special handling depending on the status code of the HTTP response. If an empty response is loaded with a status code in 4xx (Client Error) range, an NSError in the RKErrorDomain is created with the NSURLErrorBadServerResponse code to indicate that the response was not processable. If an empty response is loaded with a status code in 2xx (Successful) range, the interpretation of the response is dependent on the value of treatsEmptyResponseAsSuccess. When YES, empty responses result in the successful completion of the operation with an RKMappingResult containing the targetObject of the operation, if any.
  2. +
  3. Deserializing Response Data: When started, the operation attempts to deserialize the response data into a Foundation object representation using the RKMIMETypeSerialization class. This deserialized representation is then made available to subclass implementations that perform the actual object mapping work.
  4. +
+ + +

How ‘Empty’ Responses are Evaluated

+ +

Any nil response or NSData object with a length equal to zero is considered empty. To support a common behavior of the widely deployed Ruby on Rails Framework, RKResponseMapperOperation also considers a response containing a single space character to be empty. This type of response is generated by Rails whe render :nothing => true is invoked.

+
+ + + + + +
+ +

Tasks

+ + + +

Initializing a Response Mapping Operation

+ + + + + +

Accessing Response Data

+ +
    +
  • + +   response +

    The response object that loaded the data that is to be object mapped by the operation. Cannot be nil.

    +
    + property + +
  • + +   data +

    The response data that is to be deserialized and mapped by the operation. May be nil.

    +
    + property + +
  • +
+ + + +

Configuring Object Mapping

+ + + + + +

Accessing Mapping Results

+ +
    +
  • + +   mappingResult +

    The results of performing object mapping on the deserialized response data. In the event that the operation has failed, the value will is nil.

    +
    + property + +
  • + +   error +

    The error, if any, that occured during execution of the operation.

    +
    + property + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

data

+ + + +
+

The response data that is to be deserialized and mapped by the operation. May be nil.

+
+ + + +
@property (nonatomic, strong, readonly) NSData *data
+ + + + + + + + + +
+

Discussion

+

The response data that is to be deserialized and mapped by the operation. May be nil.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ +

error

+ + + +
+

The error, if any, that occured during execution of the operation.

+
+ + + +
@property (nonatomic, strong, readonly) NSError *error
+ + + + + + + + + +
+

Discussion

+

The error, if any, that occured during execution of the operation.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ +

mapperDelegate

+ + + +
+

The delegate for the RKMapperOperation created by the receiver to perform object mapping on the deserialized response data. May be nil.

+
+ + + +
@property (nonatomic, weak) id<RKMapperOperationDelegate> mapperDelegate
+ + + + + + + + + +
+

Discussion

+

The delegate for the RKMapperOperation created by the receiver to perform object mapping on the deserialized response data. May be nil.

+ +

The delegate provides access to the details of the mapping process as it is executing. Be aware that the delegate will be invoked from the thread on which the mapping is executing.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ +

mappingResult

+ + + +
+

The results of performing object mapping on the deserialized response data. In the event that the operation has failed, the value will is nil.

+
+ + + +
@property (nonatomic, strong, readonly) RKMappingResult *mappingResult
+ + + + + + + + + +
+

Discussion

+

The results of performing object mapping on the deserialized response data. In the event that the operation has failed, the value will is nil.

+ +

The keyPath of each RKResponseDescriptor from the responseDescriptors set that was successfully mapped from the response data will appear as an entry in the mapping result.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ +

response

+ + + +
+

The response object that loaded the data that is to be object mapped by the operation. Cannot be nil.

+
+ + + +
@property (nonatomic, strong, readonly) NSHTTPURLResponse *response
+ + + + + + + + + +
+

Discussion

+

The response object that loaded the data that is to be object mapped by the operation. Cannot be nil.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ +

responseDescriptors

+ + + +
+

An array of RKResponseDescriptor objects that specify object mapping configurations that may be applied to the deserialized response data if they are found to match the response.

+
+ + + +
@property (nonatomic, strong, readonly) NSArray *responseDescriptors
+ + + + + + + + + +
+

Discussion

+

An array of RKResponseDescriptor objects that specify object mapping configurations that may be applied to the deserialized response data if they are found to match the response.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ +

responseMappingsDictionary

+ + + +
+

Returns a dictionary of key path to RKMapping objects that are applicable to mapping the response. This is determined by evaluating the URL and status codes of the response against the set of responseDescriptors.

+
+ + + +
@property (nonatomic, strong, readonly) NSDictionary *responseMappingsDictionary
+ + + + + + + + + +
+

Discussion

+

Returns a dictionary of key path to RKMapping objects that are applicable to mapping the response. This is determined by evaluating the URL and status codes of the response against the set of responseDescriptors.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ +

targetObject

+ + + +
+

The target object for the object mapping operation performed on the deserialized response data. May be nil.

+
+ + + +
@property (nonatomic, strong) id targetObject
+ + + + + + + + + +
+

Discussion

+

The target object for the object mapping operation performed on the deserialized response data. May be nil.

+ +

When object mapping is being performed against a known object, the targetObject is set to ensure that the mapping is applied to the appropriate object reference. When nil, the mapping operation will result in the fetching or creation of new objects as necessary to satisfy the mapping configuration.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ +

treatsEmptyResponseAsSuccess

+ + + +
+

A Boolean value that indicates if the receiver should consider empty responses as being successfully mapped even though no mapping is actually performed.

+
+ + + +
@property (nonatomic, assign) BOOL treatsEmptyResponseAsSuccess
+ + + + + + + + + +
+

Discussion

+

A Boolean value that indicates if the receiver should consider empty responses as being successfully mapped even though no mapping is actually performed.

+ +

When YES and the response data is empty (see below), a mapping result will be returned containing the target object (if any). Otherwise, the response data will be pass through to the parser which may generate an error.

+ +

Default: YES

Warning: To support the Ruby on Rails behavior of rendering a single space character on invocation of render :nothing => true, a response body’s containing only a single space is treated as empty.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

initWithResponse:data:responseDescriptors:

+ + + +
+

Initializes and returns a newly created response mapper operation with the given response object, response data, and an array of RKResponseDescriptor objects.

+
+ + + +
- (id)initWithResponse:(NSHTTPURLResponse *)response data:(NSData *)data responseDescriptors:(NSArray *)responseDescriptors
+ + + +
+

Parameters

+ +
+
response
+

The HTTP response object to be used for object mapping.

+
+ +
+
data
+

The data loaded for the response body.

+
+ +
+
responseDescriptors
+

An array whose elements are RKResponseDescriptor objects specifying object mapping configurations that may be applied to the response.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the response, data, and response descriptor objects.

+
+ + + + + +
+

Discussion

+

Initializes and returns a newly created response mapper operation with the given response object, response data, and an array of RKResponseDescriptor objects.

+
+ + + + + + + +
+

Declared In

+ RKResponseMapperOperation.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKRoute.html b/Pods/Documentation/RestKit/html/Classes/RKRoute.html new file mode 100644 index 00000000..becccd9d --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKRoute.html @@ -0,0 +1,994 @@ + + + + + RKRoute Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKRoute.h
+ + + + +
+ +

Overview

+

The RKRoute class models a single routable path pattern in use by the application. A route can be combined with an NSURL base URL and interpolated with an object to produce a new fully hydrated URL object. Routes are always instantiated with a path pattern and metadata to provide for the subsequent identification of the defined route.

+ +

There are three types of routes modeled by the RKRoute class:

+ +
    +
  1. Named Routes: A named route represents a single path and optional request method within the application. The route is not affiliated with any particular class. For example, one might define a route with the name @"airlines_list" as a GET to the path ‘/airlines.json’.
  2. +
  3. Class Routes: An class route represents a single path that is identified by object class and request method for which it is appropriate. For example, one might define a route for the class RKArticle for a POST to the path ‘/articles.json’.
  4. +
  5. Relationship Routes: A relationship route represents a single path through which the relationship of a parent object can be manipulated. For example, given an RKArticle and RKComment class, one might define a relationship route for the RKArticle class’s @"comments" relationship as pointing to a GET to the path `@“/articles/:articleID/comments”.
  6. +
+ + +

The RKRoute class is internally implemented as a class cluster and is not to be directly instantiated via alloc and init.

+
+ + + + + +
+ +

Tasks

+ + + +

Instantiating Routes

+ + + + + +

Accessing Route Attributes

+ +
    +
  • + +   name +

    The name of the receiver.

    +
    + property + +
  • + +   objectClass +

    The object class of the receiver.

    +
    + property + +
  • + +   method +

    The request method of the receiver.

    +
    + property + +
  • + +   pathPattern +

    The path pattern of the receiver.

    +
    + property + +
  • + +   shouldEscapePath +

    A Boolean value that determines if the path pattern should be escaped when evaluated.

    +
    + property + +
  • +
+ + + +

Inspecting Route Types

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

method

+ + + +
+

The request method of the receiver.

+
+ + + +
@property (nonatomic, assign, readonly) RKRequestMethod method
+ + + + + + + + + +
+

Discussion

+

The request method of the receiver.

+ +

Appropriate for all route types. If the route is appropriate for any HTTP request method, then the RKRequestMethodAny value is used.

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ +

name

+ + + +
+

The name of the receiver.

+
+ + + +
@property (nonatomic, strong, readonly) NSString *name
+ + + + + + + + + +
+

Discussion

+

The name of the receiver.

+ +

The name is used to identify named and relationship routes and is always nil for object routes.

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ +

objectClass

+ + + +
+

The object class of the receiver.

+
+ + + +
@property (nonatomic, strong, readonly) Class objectClass
+ + + + + + + + + +
+

Discussion

+

The object class of the receiver.

+ +

Defines the class for which the route is appropriate. Always returns nil for named routes.

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ +

pathPattern

+ + + +
+

The path pattern of the receiver.

+
+ + + +
@property (nonatomic, strong, readonly) NSString *pathPattern
+ + + + + + + + + +
+

Discussion

+

The path pattern of the receiver.

+ +

A SOCKit pattern that describes the format of the path portion of URL’s generated from the receiver. Required and used by all route types.

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ +

shouldEscapePath

+ + + +
+

A Boolean value that determines if the path pattern should be escaped when evaluated.

+
+ + + +
@property (nonatomic, assign) BOOL shouldEscapePath
+ + + + + + + + + +
+

Discussion

+

A Boolean value that determines if the path pattern should be escaped when evaluated.

+ +

Default: NO

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

routeWithClass:pathPattern:method:

+ + + +
+

Creates and returns a new class route object with the given object class, path pattern and method.

+
+ + + +
+ (id)routeWithClass:(Class)objectClass pathPattern:(NSString *)pathPattern method:(RKRequestMethod)method
+ + + +
+

Parameters

+ +
+
objectClass
+

The class that is represented by the route.

+
+ +
+
pathPattern
+

A SOCKit pattern describing the format of URL paths generated from the route.

+
+ +
+
method
+

The request method of the route.

+
+ +
+ + + +
+

Return Value

+

A new class route object with the given object class, path pattern and request method.

+
+ + + + + +
+

Discussion

+

Creates and returns a new class route object with the given object class, path pattern and method.

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ +

routeWithName:pathPattern:method:

+ + + +
+

Creates and returns a new named route object with the given name, path pattern and method.

+
+ + + +
+ (id)routeWithName:(NSString *)name pathPattern:(NSString *)pathPattern method:(RKRequestMethod)method
+ + + +
+

Parameters

+ +
+
name
+

A unique identifying name for the route.

+
+ +
+
pathPattern
+

A SOCKit pattern describing the format of URL paths generated from the route.

+
+ +
+
method
+

The request method of the route.

+
+ +
+ + + +
+

Return Value

+

A new named route object with the given name, path pattern and request method.

+
+ + + + + +
+

Discussion

+

Creates and returns a new named route object with the given name, path pattern and method.

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ +

routeWithRelationshipName:objectClass:pathPattern:method:

+ + + +
+

Creates and returns a new relationship route object with the given relationship name, object class, path pattern and method.

+
+ + + +
+ (id)routeWithRelationshipName:(NSString *)name objectClass:(Class)objectClass pathPattern:(NSString *)pathPattern method:(RKRequestMethod)method
+ + + +
+

Parameters

+ +
+
name
+

The name of the relationship represented by the route.

+
+ +
+
objectClass
+

The class containing the relationship represented by the route.

+
+ +
+
pathPattern
+

A SOCKit pattern describing the format of URL paths generated from the route.

+
+ +
+
method
+

The request method of the route.

+
+ +
+ + + +
+

Return Value

+

A new class route object with the given object class, path pattern and request method.

+
+ + + + + +
+

Discussion

+

Creates and returns a new relationship route object with the given relationship name, object class, path pattern and method.

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

isClassRoute

+ + + +
+

Determines if the receiver is a class route.

+
+ + + +
- (BOOL)isClassRoute
+ + + + + +
+

Return Value

+

YES if the receiver is a class route, else NO.

+
+ + + + + +
+

Discussion

+

Determines if the receiver is a class route.

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ +

isNamedRoute

+ + + +
+

Determines if the receiver is a named route.

+
+ + + +
- (BOOL)isNamedRoute
+ + + + + +
+

Return Value

+

YES if the receiver is a named route, else NO.

+
+ + + + + +
+

Discussion

+

Determines if the receiver is a named route.

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ +

isRelationshipRoute

+ + + +
+

Determines if the receiver is a relationship route.

+
+ + + +
- (BOOL)isRelationshipRoute
+ + + + + +
+

Return Value

+

YES if the receiver is a relationship route, else NO.

+
+ + + + + +
+

Discussion

+

Determines if the receiver is a relationship route.

+
+ + + + + + + +
+

Declared In

+ RKRoute.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKRouteSet.html b/Pods/Documentation/RestKit/html/Classes/RKRouteSet.html new file mode 100644 index 00000000..66ede3c4 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKRouteSet.html @@ -0,0 +1,1166 @@ + + + + + RKRouteSet Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKRouteSet.h
+ + + + +
+ +

Overview

+

The RKRouteSet class provides for the storage and retrieval of RKRoute objects. Route objects are added and removed the route set to manipulate the routing table of the application.

+
+ + + + + +
+ +

Tasks

+ + + +

Adding and Removing Routes

+ + + + + +

Querying a Route Set

+ + + +
+ + + + + + + + + +
+ +

Instance Methods

+ +
+ +

addRoute:

+ + + +
+

Adds a route to the receiver.

+
+ + + +
- (void)addRoute:(RKRoute *)route
+ + + +
+

Parameters

+ +
+
route
+

The route to be added. +@raises NSInvalidArgumentException Raised if the route already exists in the receiver or overlaps an existing name.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds a route to the receiver.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

allRoutes

+ + + +
+

Returns all routes from the receiver in an array.

+
+ + + +
- (NSArray *)allRoutes
+ + + + + +
+

Return Value

+

An array containing all the routes in the receiver.

+
+ + + + + +
+

Discussion

+

Returns all routes from the receiver in an array.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

classRoutes

+ + + +
+

Returns all class routes from the receiver in an array.

+
+ + + +
- (NSArray *)classRoutes
+ + + + + +
+

Return Value

+

An array containing all the class routes in the receiver.

+
+ + + + + +
+

Discussion

+

Returns all class routes from the receiver in an array.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

containsRoute:

+ + + +
+

Determines if a given route exists within the receiver.

+
+ + + +
- (BOOL)containsRoute:(RKRoute *)route
+ + + +
+

Parameters

+ +
+
route
+

The route to be tested for containement.

+
+ +
+ + + +
+

Return Value

+

YES if the route is contained within the route set, else NO.

+
+ + + + + +
+

Discussion

+

Determines if a given route exists within the receiver.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

namedRoutes

+ + + +
+

Returns all named routes from the receiver in an array.

+
+ + + +
- (NSArray *)namedRoutes
+ + + + + +
+

Return Value

+

An array containing all the named routes in the receiver.

+
+ + + + + +
+

Discussion

+

Returns all named routes from the receiver in an array.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

relationshipRoutes

+ + + +
+

Returns all relationship routes from the receiver in an array.

+
+ + + +
- (NSArray *)relationshipRoutes
+ + + + + +
+

Return Value

+

An array containing all the relationship routes in the receiver.

+
+ + + + + +
+

Discussion

+

Returns all relationship routes from the receiver in an array.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

removeRoute:

+ + + +
+

Removes a route from the receiver.

+
+ + + +
- (void)removeRoute:(RKRoute *)route
+ + + +
+

Parameters

+ +
+
route
+

The route to be removed. +@raises NSInvalidArgumentException Raised if the route does not exist in the receiver.

+
+ +
+ + + + + + + +
+

Discussion

+

Removes a route from the receiver.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

routeForClass:method:

+ + + +
+

Retrieves a route for the given object class and request method.

+
+ + + +
- (RKRoute *)routeForClass:(Class)objectClass method:(RKRequestMethod)method
+ + + +
+

Parameters

+ +
+
objectClass
+

The object class of the route to be retrieved.

+
+ +
+
method
+

The request method of the route to be retrieved.

+
+ +
+ + + +
+

Return Value

+

A route with the given object class and method or nil if none was found.

+
+ + + + + +
+

Discussion

+

Retrieves a route for the given object class and request method.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

routeForName:

+ + + +
+

Retrieves a route with the given name.

+
+ + + +
- (RKRoute *)routeForName:(NSString *)name
+ + + +
+

Parameters

+ +
+
name
+

The name of the named route to be found.

+
+ +
+ + + +
+

Return Value

+

A route with the given name or nil if none was found.

+
+ + + + + +
+

Discussion

+

Retrieves a route with the given name.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

routeForObject:method:

+ + + +
+

Retrieves a route for a given object and request method.

+
+ + + +
- (RKRoute *)routeForObject:(id)object method:(RKRequestMethod)method
+ + + + + + + + + +
+

Discussion

+

Retrieves a route for a given object and request method.

+ +

The object routes are first searched for an exact match with the given object’s class and request method. If no exact match is found for the given request method, but a route is found for the RKRequestMethodAny method, it is returned. If neither are found, the search process begins again and traverses up the inheritance hierarchy.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

routeForRelationship:ofClass:method:

+ + + +
+

Retrieves a route for a given relationship of a class with a given request method.

+
+ + + +
- (RKRoute *)routeForRelationship:(NSString *)relationship ofClass:(Class)objectClass method:(RKRequestMethod)method
+ + + +
+

Parameters

+ +
+
relationship
+

The name of the relationship of the route to be retrieved.

+
+ +
+
method
+

The request method of the route to be retrieved.

+
+ +
+ + + +
+

Return Value

+

A route with the given relationship name, object class and method or nil if none was found.

+
+ + + + + +
+

Discussion

+

Retrieves a route for a given relationship of a class with a given request method.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

routesForClass:

+ + + +
+

Retrieves all class routes with a given object class.

+
+ + + +
- (NSArray *)routesForClass:(Class)objectClass
+ + + +
+

Parameters

+ +
+
objectClass
+

The object class of the routes to be retrieved.

+
+ +
+ + + +
+

Return Value

+

An array containing all class routes with the given class.

+
+ + + + + +
+

Discussion

+

Retrieves all class routes with a given object class.

+ +

Class matches are determined by direct comparison of the class objects. The inheritance hierarchy is not consulted.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

routesForObject:

+ + + +
+

Retrieves all object routes for a given object.

+
+ + + +
- (NSArray *)routesForObject:(id)object
+ + + +
+

Parameters

+ +
+
object
+

An object for which all object routes are to be retrieved.

+
+ +
+ + + +
+

Return Value

+

An array containing all object routes where the target class is included in the given object’s class hierarchy.

+
+ + + + + +
+

Discussion

+

Retrieves all object routes for a given object.

+ +

All object routes are searched and returned if they target a class or superclass of the given object (using - [NSObject isKindOfClass:]).

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ +

routesForRelationship:ofClass:

+ + + +
+

Retrieves all routes for a given relationship name and object class.

+
+ + + +
- (NSArray *)routesForRelationship:(NSString *)relationshipName ofClass:(Class)objectClass
+ + + +
+

Parameters

+ +
+
relationshipName
+

The name of the relationship of the routes to be retrieved.

+
+ +
+
objectClass
+

The object class of the routes to be retrieved.

+
+ +
+ + + +
+

Return Value

+

An array containing all relationship routes with the given relationship name and object class.

+
+ + + + + +
+

Discussion

+

Retrieves all routes for a given relationship name and object class.

+
+ + + + + + + +
+

Declared In

+ RKRouteSet.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKRouter.html b/Pods/Documentation/RestKit/html/Classes/RKRouter.html new file mode 100644 index 00000000..d3cd956d --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKRouter.html @@ -0,0 +1,779 @@ + + + + + RKRouter Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKRouter.h
+ + + + +
+ +

Overview

+

An RKRouter instance is responsible for generating NSURL objects with a given base URL and a route set. It is used to centralize the knowledge about the URL’s that are used by the application.

+ +

Route Generation

+ +

URL’s can be generated by the router in three ways:

+ +
    +
  1. By name. Named routes link a symbolic name with a path and an HTTP request method. (see URLForRouteNamed:method:object:)
  2. +
  3. By object. Routes can be defined by class and HTTP request method. When a URL is requested from the router for an object, the router will identify the most appropriate route for the object and instantiate an NSURL with the route’s path pattern and interpolate it against the object. (see URLForObject:method:)
  4. +
  5. By object relationship. Routes can be defined for relationships to other objects. When a URL is requested from the router for a relationship, the router will retrieve the appropriate route for the relationship from the route set and interpolate the route’s path pattern against the source object. (see URLForRelationship:ofObject:method:)
  6. +
+ +
+ + + + + +
+ +

Tasks

+ + + +

Initializing a Router

+ + + + + +

Generating URLs

+ + + + + +

Configuring the Base URL and Route Set

+ +
    +
  • + +   baseURL +

    The base URL that all URLs constructed by the receiver are relative to.

    +
    + property + +
  • + +   routeSet +

    A route set defining all the routes addressable through the receiver.

    +
    + property + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

baseURL

+ + + +
+

The base URL that all URLs constructed by the receiver are relative to.

+
+ + + +
@property (nonatomic, strong, readonly) NSURL *baseURL
+ + + + + + + + + +
+

Discussion

+

The base URL that all URLs constructed by the receiver are relative to.

+
+ + + + + + + +
+

Declared In

+ RKRouter.h
+
+ + +
+ +
+ +

routeSet

+ + + +
+

A route set defining all the routes addressable through the receiver.

+
+ + + +
@property (nonatomic, strong, readonly) RKRouteSet *routeSet
+ + + + + + + + + +
+

Discussion

+

A route set defining all the routes addressable through the receiver.

+
+ + + + + + + +
+

Declared In

+ RKRouter.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

URLForObject:method:

+ + + +
+

Generates a URL for a given object and HTTP method.

+
+ + + +
- (NSURL *)URLForObject:(id)object method:(RKRequestMethod)method
+ + + +
+

Parameters

+ +
+
object
+

The object for which a URL is to be generated.

+
+ +
+
method
+

The HTTP method for which the URL is to be generated.

+
+ +
+ + + +
+

Return Value

+

A new URL object constructed by appending the path pattern of the route for the object an HTTP method to the baseURL of the receiver, interpolated against the routed object; or nil if no route was found for the given object and HTTP method.

+
+ + + + + +
+

Discussion

+

Generates a URL for a given object and HTTP method.

+ +

The route set is searched for a route that matches the HTTP method and class of the object being routed. If there is not an exact match for the object’s class, the inheritance hierarchy is searched until a match is found or all possible routes are exhausted. Exact HTTP request matches are favored over the wildcard method (RKRequestMethodAny). Once the appropriate route is identified, a new NSURL object is instantiated with the baseURL of the receiver and the path pattern of the route, interpolated against the object being routed.

+
+ + + + + + + +
+

Declared In

+ RKRouter.h
+
+ + +
+ +
+ +

URLForRelationship:ofObject:method:

+ + + +
+

Generates a URL for a relationship of a given object with a given HTTP method.

+
+ + + +
- (NSURL *)URLForRelationship:(NSString *)relationshipName ofObject:(id)object method:(RKRequestMethod)method
+ + + +
+

Parameters

+ +
+
relationshipName
+

The name of the relationship for which a URL is to be generated.

+
+ +
+
object
+

The object for which the URL is to be generated.

+
+ +
+
method
+

The HTTP method for which the URL is to be generated.

+
+ +
+ + + +
+

Return Value

+

A new URL object constructed by appending the path pattern of the route for the given object’s relationship and HTTP method to the baseURL of the receiver, interpolated against the routed object; or nil if no route was found for the given relationship, object and HTTP method.

+
+ + + + + +
+

Discussion

+

Generates a URL for a relationship of a given object with a given HTTP method.

+ +

The route set is searched for a route that matches the relationship of the given object’s class and the given HTTP method. If a matching route is found, a new NSURL object is instantiated with the baseURL of the receiver and the path pattern of the route, interpolated against the object being routed.

+
+ + + + + + + +
+

Declared In

+ RKRouter.h
+
+ + +
+ +
+ +

URLForRouteNamed:method:object:

+ + + +
+

Generates a URL for the route with the given name.

+
+ + + +
- (NSURL *)URLForRouteNamed:(NSString *)routeName method:(out RKRequestMethod *)method object:(id)object
+ + + +
+

Parameters

+ +
+
routeName
+

The name of the route for which a URL is to be generated.

+
+ +
+
method
+

A pointer to an RKRequestMethod variable in which to store the HTTP method associated with the named route. May be nil.

+
+ +
+
object
+

An optional object against which to interpolate the path pattern.

+
+ +
+ + + +
+

Return Value

+

A new NSURL object constructed by appending the path pattern to the baseURL of the receiver and interpolating against a given object; or nil if no route was found with the given name.

+
+ + + + + +
+

Discussion

+

Generates a URL for the route with the given name.

+ +

The route set is searched for a route with the given name and a new NSURL object is instantiated with the baseURL of the receiver and the path pattern of the route, optionally interpolated with a given object. If a pointer to an RKRequestMethod variable is provided, the HTTP method for the route will be assigned to the reference.

+
+ + + + + + + +
+

Declared In

+ RKRouter.h
+
+ + +
+ +
+ +

URLWithRoute:object:

+ + + +
+

Generates a URL with a given route and object.

+
+ + + +
- (NSURL *)URLWithRoute:(RKRoute *)route object:(id)object
+ + + +
+

Parameters

+ +
+
route
+

The route to generate the URL with.

+
+ +
+
object
+

The object with which to interpolate the path pattern of the given route.

+
+ +
+ + + +
+

Return Value

+

A new URL object constructed by interpolating the path pattern of the given route with the given object to construct a path and constructing an NSURL object relative to the baseURL of the receiver.

+
+ + + + + +
+

Discussion

+

Generates a URL with a given route and object.

+
+ + + + + + + +
+

Declared In

+ RKRouter.h
+
+ + +
+ +
+ +

initWithBaseURL:

+ + + +
+

Initializes a router with a given base URL.

+
+ + + +
- (id)initWithBaseURL:(NSURL *)baseURL
+ + + +
+

Parameters

+ +
+
baseURL
+

The base URL with which to initialize the receiver.

+
+ +
+ + + +
+

Return Value

+

The receiver, initialized with the given base URL.

+
+ + + + + +
+

Discussion

+

Initializes a router with a given base URL.

+
+ + + + + + + +
+

Declared In

+ RKRouter.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKSearchIndexer.html b/Pods/Documentation/RestKit/html/Classes/RKSearchIndexer.html new file mode 100644 index 00000000..77aa131c --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKSearchIndexer.html @@ -0,0 +1,880 @@ + + + + + RKSearchIndexer Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKSearchIndexer.h
+ + + + +
+ +

Overview

+

The RKSearchIndexer class provides support for adding full text searching to Core Data entities and managing the indexing of managed object instances of searchable entities.

+
+ + + + + +
+ +

Tasks

+ + + +

Adding Indexing to an Entity

+ +
    +
  • + + + addSearchIndexingToEntity:onAttributes: +

    Adds search indexing to the given entity for a given list of attributes identified by name. The entity will have a to-many relationship to the RKSearchWordEntity added and the list of searchable attributes stored into the user info dictionary.

    +
    + + +
  • +
+ + + +

Configuring Indexing

+ +
    +
  • + +   stopWords +

    An optional set of stop words to be removed from the set of tokens used to create the search words for indexed entities.

    +
    + property + +
  • + +   indexingContext +

    An optional NSManagedObjectContext in which to perform indexing operations.

    +
    + property + +
  • +
+ + + +

Indexing Changes in a Managed Object Context

+ + + + + +

Indexing a Managed Object

+ + + + + +

Managing Indexing Operations

+ + + +
+ + + + + +
+ +

Properties

+ +
+ +

indexingContext

+ + + +
+

An optional NSManagedObjectContext in which to perform indexing operations.

+
+ + + +
@property (nonatomic, strong) NSManagedObjectContext *indexingContext
+ + + + + + + + + +
+

Discussion

+

An optional NSManagedObjectContext in which to perform indexing operations.

+ +

Default: nil

Warning: It is recommended that the indexing context be configured with a direct connection to the persistent store coordinator and a merge policy of NSMergeByPropertyObjectTrumpMergePolicy.

+
+ + + + + + + +
+

Declared In

+ RKSearchIndexer.h
+
+ + +
+ +
+ +

stopWords

+ + + +
+

An optional set of stop words to be removed from the set of tokens used to create the search words for indexed entities.

+
+ + + +
@property (nonatomic, strong) NSSet *stopWords
+ + + + + + + + + +
+

Discussion

+

An optional set of stop words to be removed from the set of tokens used to create the search words for indexed entities.

+
+ + + + + + + +
+

Declared In

+ RKSearchIndexer.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

addSearchIndexingToEntity:onAttributes:

+ + + +
+

Adds search indexing to the given entity for a given list of attributes identified by name. The entity will have a to-many relationship to the RKSearchWordEntity added and the list of searchable attributes stored into the user info dictionary.

+
+ + + +
+ (void)addSearchIndexingToEntity:(NSEntityDescription *)entity onAttributes:(NSArray *)attributes
+ + + +
+

Parameters

+ +
+
entity
+

The entity to which search indexing support is to be added.

+
+ +
+
attributes
+

An array of NSAttributeDescription objects or NSString attribute names specifying the NSStringAttributeType attributes that are to be indexed for searching.

+
+ +
+ + + + + + + +
+

Discussion

+

Adds search indexing to the given entity for a given list of attributes identified by name. The entity will have a to-many relationship to the RKSearchWordEntity added and the list of searchable attributes stored into the user info dictionary.

+ +

Managed objects for entities that have had indexing added to them can be indexed by instances of RKSearchIndexer and searched via an RKSearchPredicate used with an NSFetchRequest object.

+ +

The given entity must exist in a mutable managed object model (that is, one that has not been used to create an object graph in a managed object context). The given list of attributes must identify attributes of the given entity with the attribute type of NSStringAttributeType.

+
+ + + + + + + +
+

Declared In

+ RKSearchIndexer.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

cancelAllIndexingOperations

+ + + +
+

Tells the indexer to cancel all indexing operations in progress.

+
+ + + +
- (void)cancelAllIndexingOperations
+ + + + + + + + + +
+

Discussion

+

Tells the indexer to cancel all indexing operations in progress.

+ +

When a managed object context that is being observed is saved, the indexer enqueues an indexing operation for each indexable object that was inserted or updated during the save event. This method provides support for cancelling all in indexing operations that have not yet been processed.

+
+ + + + + + + +
+

Declared In

+ RKSearchIndexer.h
+
+ + +
+ +
+ +

indexChangedObjectsInManagedObjectContext:waitUntilFinished:

+ + + +
+

Tells the receiver to build a list of all inserted or updated managed objects in the given context and index each one. Objects for entities that are not indexed are silently ignored.

+
+ + + +
- (void)indexChangedObjectsInManagedObjectContext:(NSManagedObjectContext *)managedObjectContext waitUntilFinished:(BOOL)wait
+ + + +
+

Parameters

+ +
+
managedObjectContext
+

The managed object context that is to be indexed.

+
+ +
+
wait
+

A Boolean value that determines if the current thread will be blocked until all indexing operations have completed.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the receiver to build a list of all inserted or updated managed objects in the given context and index each one. Objects for entities that are not indexed are silently ignored.

+ +

The value of the wait parameter is significant in the determination of the indexing strategy. When YES, indexing is perform synchronously. When NO, indexing operations are enqueued and the method returns to the caller immediately. Enqueued indexing operations can later be cancelled by invoking cancelAllIndexingOperations.

+ +

This method is called by the indexer in response to a NSManagedObjectContextWillSaveNotification for contexts observed with startObservingManagedObjectContext:.

Warning: Indexing all changed objects in a managed object context does not utilize the indexingContext as unsaved objects in the graph would not be visible to that context.

+ +

Please beware that indexing changed objects in a context with the NSMainQueueConcurrencyType asynchronously (where wait == NO) and then invoking waitUntilAllIndexingOperationsAreFinished will result in a deadlock if called from the main thread. It is highly recommended that indexing be performed in contexts with the NSPrivateQueueConcurrencyType to take advantage of queueing and avoid blocking the main thread.

+
+ + + + + + + +
+

Declared In

+ RKSearchIndexer.h
+
+ + +
+ +
+ +

indexManagedObject:

+ + + +
+

Tells the receiver to index a given managed object instance.

+
+ + + +
- (NSUInteger)indexManagedObject:(NSManagedObject *)managedObject
+ + + +
+

Parameters

+ +
+
managedObject
+

The managed object that is to be indexed.

+
+ +
+ + + +
+

Return Value

+

A count of the number of search words that were indexed from the given object’s searchable attributes. +@raises NSInvalidArgumentException Raised if the given managed object is not for a searchable entity.

+
+ + + + + +
+

Discussion

+

Tells the receiver to index a given managed object instance.

+
+ + + + + + + +
+

Declared In

+ RKSearchIndexer.h
+
+ + +
+ +
+ +

startObservingManagedObjectContext:

+ + + +
+

Tells the receiver to start monitoring the given managed object context for save notifications and to index any changed objects in response to the save.

+
+ + + +
- (void)startObservingManagedObjectContext:(NSManagedObjectContext *)managedObjectContext
+ + + +
+

Parameters

+ +
+
managedObjectContext
+

The managed object context to be monitored for save notifications.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the receiver to start monitoring the given managed object context for save notifications and to index any changed objects in response to the save.

Warning: The behavior of this method changes based on the availability of an indexingContext. When the indexing context is nil, this method will register the receiver as an observer for the NSManagedObjectContextWillSaveNotification. At save time, the indexer will scan the set of changed objects in the save notification and synchronously index each changed object prior to the completion of the save. This is simple, but introduces a performance penalty that may not be unacceptable.

+ +

When an indexing context is provided, invoking startObservingManagedObjectContext: will cause the receiver to register for the NSManagedObjectContextDidSaveNotification instead. After a save completes, the indexer will reset the indexing context and enqueue an indexing operation for each changed object in the notification. Once all the indexing operations have completed, the indexing context will be saved and its contents should be merged into other contexts.

+
+ + + + + + + +
+

Declared In

+ RKSearchIndexer.h
+
+ + +
+ +
+ +

stopObservingManagedObjectContext:

+ + + +
+

Tells the receiver to stop monitoring the given managed object context for save notifications and cease indexing changed objects in response to the save.

+
+ + + +
- (void)stopObservingManagedObjectContext:(NSManagedObjectContext *)managedObjectContext
+ + + +
+

Parameters

+ +
+
managedObjectContext
+

The managed object context that is no longer to be monitored for save notifications.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the receiver to stop monitoring the given managed object context for save notifications and cease indexing changed objects in response to the save.

+
+ + + + + + + +
+

Declared In

+ RKSearchIndexer.h
+
+ + +
+ +
+ +

waitUntilAllIndexingOperationsAreFinished

+ + + +
+

Blocks the current thread until all of the receiver’s queued and executing indexing operations finish executing.

+
+ + + +
- (void)waitUntilAllIndexingOperationsAreFinished
+ + + + + + + + + +
+

Discussion

+

Blocks the current thread until all of the receiver’s queued and executing indexing operations finish executing.

+ +

When called, this method blocks the current thread and waits for the receiver’s current and queued indexing operations to finish executing. While the current thread is blocked, the receiver continues to launch already queued operations and monitor those that are executing. During this time, the current thread cannot add operations to the queue, but other threads may. Once all of the pending operations are finished, this method returns.

+ +

If there are no indexing operations in the queue, this method returns immediately.

Warning: Invoking this method may cause a deadlock if indexing operations have been enqueued for a managed object context with the NSMainQueueConcurrencyType and the method is called from the main thread.

+
+ + + + + + + +
+

Declared In

+ RKSearchIndexer.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKSearchPredicate.html b/Pods/Documentation/RestKit/html/Classes/RKSearchPredicate.html new file mode 100644 index 00000000..b50de652 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKSearchPredicate.html @@ -0,0 +1,419 @@ + + + + + RKSearchPredicate Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSCompoundPredicate
Declared inRKSearchPredicate.h
+ + + + +
+ +

Overview

+

RKSearchPredicate is a suclass of NSCompoundPredicate used to represent textual search operations against entities indexed by an instance of RKSearchIndexer.

+
+ + + + + +
+ +

Tasks

+ + + + +

Creating a Search Predicate

+
    +
  • + + + searchPredicateWithText:type: +

    Creates and returns a new predicate for performing a full text search on an entity indexed by an instance of RKSearchIndexer. The given search text will be tokenized, normalized and used to construct a collection of subpredicates specifying a BEGINSWITH match against the searchWords relationship of the searchable entity.

    +
    + + +
  • + + – initWithSearchText:type: +

    Initializes the receiver with a string of search text and a compound predicate type.

    +
    + + +
  • +
+ +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

searchPredicateWithText:type:

+ + + +
+

Creates and returns a new predicate for performing a full text search on an entity indexed by an instance of RKSearchIndexer. The given search text will be tokenized, normalized and used to construct a collection of subpredicates specifying a BEGINSWITH match against the searchWords relationship of the searchable entity.

+
+ + + +
+ (NSPredicate *)searchPredicateWithText:(NSString *)searchText type:(NSCompoundPredicateType)type
+ + + +
+

Parameters

+ +
+
searchText
+

A string of text with which to construct subpredicates for searching.

+
+ +
+
type
+

The type of the new compound predicate.

+
+ +
+ + + +
+

Return Value

+

A new compound predicate for performing a full text search with the given search text and type.

+
+ + + + + +
+

Discussion

+

Creates and returns a new predicate for performing a full text search on an entity indexed by an instance of RKSearchIndexer. The given search text will be tokenized, normalized and used to construct a collection of subpredicates specifying a BEGINSWITH match against the searchWords relationship of the searchable entity.

+
+ + + + + + + +
+

Declared In

+ RKSearchPredicate.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

initWithSearchText:type:

+ + + +
+

Initializes the receiver with a string of search text and a compound predicate type.

+
+ + + +
- (id)initWithSearchText:(NSString *)searchText type:(NSCompoundPredicateType)type
+ + + +
+

Parameters

+ +
+
searchText
+

A string of text with which to construct subpredicates for searching.

+
+ +
+
type
+

The type of the new compound predicate.

+
+ +
+ + + +
+

Return Value

+

The receiver with its type set to the given type and its subpredicates set to an array of subpredicates for searching for the given text.

+
+ + + + + +
+

Discussion

+

Initializes the receiver with a string of search text and a compound predicate type.

+ +

The search text will be tokenized, normalized and then used to construct an array of subpredicates specifying a BEGINSWITH match against the searchWords relationship of the searchable entity.

+
+ + + + + + + +
+

Declared In

+ RKSearchPredicate.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKSearchTokenizer.html b/Pods/Documentation/RestKit/html/Classes/RKSearchTokenizer.html new file mode 100644 index 00000000..627a7a03 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKSearchTokenizer.html @@ -0,0 +1,404 @@ + + + + + RKSearchTokenizer Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKSearchTokenizer.h
+ + + + +
+ +

Overview

+

The RKSearchTokenizer class provides an interface for tokenizing input text into a set of searchable words. Diacritics are removed and the input text is tokenized case insensitively. A set of stop words can be optionally trimmed from the result token set.

+
+ + + + + +
+ +

Tasks

+ + + +

Configuring Tokenization

+ +
    +
  • + +   stopWords +

    The set of stop words that are to be removed from the token set.

    +
    + property + +
  • +
+ + + +

Tokenizing a String of Text

+ +
    +
  • + + – tokenize: +

    Tokenizes the given string by folding it case and diacritic insensitively and then splitting it apart using the the word unit delimiters for the current locale. If a set of stop words has been provided, the resulting token set will have the stop words subtracted.

    +
    + + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

stopWords

+ + + +
+

The set of stop words that are to be removed from the token set.

+
+ + + +
@property (nonatomic, strong) NSSet *stopWords
+ + + + + + + + + +
+

Discussion

+

The set of stop words that are to be removed from the token set.

+ +

Defaults to nil.

+
+ + + + + + + +
+

Declared In

+ RKSearchTokenizer.h
+
+ + +
+ +
+ + + + + +
+ +

Instance Methods

+ +
+ +

tokenize:

+ + + +
+

Tokenizes the given string by folding it case and diacritic insensitively and then splitting it apart using the the word unit delimiters for the current locale. If a set of stop words has been provided, the resulting token set will have the stop words subtracted.

+
+ + + +
- (NSSet *)tokenize:(NSString *)string
+ + + +
+

Parameters

+ +
+
string
+

A string of text you wish to tokenize.

+
+ +
+ + + +
+

Return Value

+

A set of searchable text tokens extracted from the given string.

+
+ + + + + +
+

Discussion

+

Tokenizes the given string by folding it case and diacritic insensitively and then splitting it apart using the the word unit delimiters for the current locale. If a set of stop words has been provided, the resulting token set will have the stop words subtracted.

+
+ + + + + + + +
+

Declared In

+ RKSearchTokenizer.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKSearchWord.html b/Pods/Documentation/RestKit/html/Classes/RKSearchWord.html new file mode 100644 index 00000000..7111e058 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKSearchWord.html @@ -0,0 +1,300 @@ + + + + + RKSearchWord Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSManagedObject
Declared inRKSearchWord.h
+ + + + + + +
+ +

Tasks

+ + + + +

Accessing the Search Word Attribute

+
    +
  • + +   word +

    A single search word extracted from an indexed entity.

    +
    + property + +
  • +
+ +
+ + + + + +
+ +

Properties

+ +
+ +

word

+ + + +
+

A single search word extracted from an indexed entity.

+
+ + + +
@property (nonatomic, strong) NSString *word
+ + + + + + + + + +
+

Discussion

+

A single search word extracted from an indexed entity.

+
+ + + + + + + +
+

Declared In

+ RKSearchWord.h
+
+ + +
+ +
+ + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKSearchWordEntity.html b/Pods/Documentation/RestKit/html/Classes/RKSearchWordEntity.html new file mode 100644 index 00000000..10441fff --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKSearchWordEntity.html @@ -0,0 +1,213 @@ + + + + + RKSearchWordEntity Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSEntityDescription
Declared inRKSearchWordEntity.h
+ + + + + + + + + + + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKTestFactory.html b/Pods/Documentation/RestKit/html/Classes/RKTestFactory.html new file mode 100644 index 00000000..771ee586 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKTestFactory.html @@ -0,0 +1,1313 @@ + + + + + RKTestFactory Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + + + + +
Inherits fromNSObject
Conforms toRKTestFactoryCallbacks
Declared inRKTestFactory.h
+ + + + +
+ +

Overview

+

The RKTestFactory class provides an interface for initializing RestKit objects within a unit testing environment. The factory is used to ensure isolation between test cases by ensuring that RestKit’s important singleton objects are torn down between tests and that each test is working within a clean Core Data environment. Callback hooks are provided so that application specific set up and tear down logic can be integrated as well.

+ +

The factory also provides for the definition of named factories for instantiating objects quickly. At initialization, there are factories defined for creating instances of AFHTTPClient, RKObjectManager, and RKManagedObjectStore. These factories may be redefined within your application should you choose to utilize a subclass or wish to centralize configuration of objects across the test suite. You may also define additional factories for building instances of objects specific to your application using the same infrastructure.

+
+ + + + + +
+ +

Tasks

+ + + +

Configuring the Factory

+ + + + + +

Defining & Instantiating Objects from Factories

+ +
    +
  • + + + defineFactory:withBlock: +

    Defines a factory with a given name for building object instances using the +given block. When the factory singleton receives an objectFromFactory: message, +the block designated for the given factory name is invoked and the resulting object +reference is returned.

    +
    + + +
  • + + + objectFromFactory:properties: +

    Creates and returns a new instance of an object using the factory with the given name.

    +
    + + +
  • + + + objectFromFactory: + + + + +
  • + + + sharedObjectFromFactory: +

    Fetches a shared object from the factory with the given name. If an existing object has already been created, then that instance is returned. If a shared instance does not yet exist, one will be constructed and returned for this and all subsequent invocations of sharedObjectFromFactory:. Shared object instances are discarded when the factory is torn down.

    +
    + + +
  • + + + insertManagedObjectForEntityForName:inManagedObjectContext:withProperties: +

    Inserts a new managed object for the NSEntityDescription with the given name into the specified managed object context and sets properties on the instance from the given dictionary. A permanent managed object ID is obtained for the object so that it can be referenced across threads without any further work.

    +
    + + +
  • + + + factoryNames +

    Returns a set of names for all defined factories.

    +
    + + +
  • +
+ + + +

Retrieving Shared Objects

+ +
    +
  • + + + client +

    Fetches the shared AFHTTPClient object using the factory defined for the name RKTestFactoryDefaultNamesClient.

    +
    + + +
  • + + + objectManager +

    Fetches the shared RKObjectManager object using the factory defined for the name RKTestFactoryDefaultNamesObjectManager.

    +
    + + +
  • + + + managedObjectStore +

    Fetches the shared an RKManagedObjectStore object using the factory defined for the name RKTestFactoryDefaultNamesManagedObjectStore.

    +
    + + +
  • +
+ + + +

Managing Test State

+ +
    +
  • + + + setUp +

    Sets up the RestKit testing environment. Invokes the didSetUp callback for application specific setup.

    +
    + + +
  • + + + tearDown +

    Tears down the RestKit testing environment by clearing singleton instances, helping to ensure test case isolation. Invokes the didTearDown callback for application specific cleanup.

    +
    + + +
  • +
+ +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

baseURL

+ + + +
+

Returns the base URL with which to initialize AFHTTPClient and RKObjectManager instances created via the factory.

+
+ + + +
+ (NSURL *)baseURL
+ + + + + +
+

Return Value

+

The base URL for the factory.

+
+ + + + + +
+

Discussion

+

Returns the base URL with which to initialize AFHTTPClient and RKObjectManager instances created via the factory.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

baseURLString

+ + + +
+

Returns the base URL as a string value.

+
+ + + +
+ (NSString *)baseURLString
+ + + + + +
+

Return Value

+

The base URL for the factory, as a string.

+
+ + + + + +
+

Discussion

+

Returns the base URL as a string value.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

client

+ + + +
+

Fetches the shared AFHTTPClient object using the factory defined for the name RKTestFactoryDefaultNamesClient.

+
+ + + +
+ (id)client
+ + + + + +
+

Return Value

+

The shared client instance.

+
+ + + + + +
+

Discussion

+

Fetches the shared AFHTTPClient object using the factory defined for the name RKTestFactoryDefaultNamesClient.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

defineFactory:withBlock:

+ + + +
+

Defines a factory with a given name for building object instances using the +given block. When the factory singleton receives an objectFromFactory: message, +the block designated for the given factory name is invoked and the resulting object +reference is returned.

+
+ + + +
+ (void)defineFactory:(NSString *)factoryName withBlock:(id ( ^ ) ( ))block
+ + + +
+

Parameters

+ +
+
factoryName
+

The name to assign the factory.

+
+ +
+
block
+

A block to execute when building an object instance for the factory name.

+
+ +
+ + + +
+

Return Value

+

A configured object instance.

+
+ + + + + +
+

Discussion

+

Defines a factory with a given name for building object instances using the +given block. When the factory singleton receives an objectFromFactory: message, +the block designated for the given factory name is invoked and the resulting object +reference is returned.

+ +

Existing factories can be invoking defineFactory:withBlock: with an existing factory name.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

factoryNames

+ + + +
+

Returns a set of names for all defined factories.

+
+ + + +
+ (NSSet *)factoryNames
+ + + + + +
+

Return Value

+

A set of the string names for all defined factories.

+
+ + + + + +
+

Discussion

+

Returns a set of names for all defined factories.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

insertManagedObjectForEntityForName:inManagedObjectContext:withProperties:

+ + + +
+

Inserts a new managed object for the NSEntityDescription with the given name into the specified managed object context and sets properties on the instance from the given dictionary. A permanent managed object ID is obtained for the object so that it can be referenced across threads without any further work.

+
+ + + +
+ (id)insertManagedObjectForEntityForName:(NSString *)entityName inManagedObjectContext:(NSManagedObjectContext *)managedObjectContext withProperties:(NSDictionary *)properties
+ + + +
+

Parameters

+ +
+
entityName
+

The name of the entity to insert a new managed object for.

+
+ +
+
managedObjectContext
+

The managed object context to insert the new object into. If nil, then the managed object context returned by invoking [[RKTestFactory managedObjectStore]](#//api/name/managedObjectStore).mainQueueManagedObjectContext] is used.

+
+ +
+
properties
+

A dictionary of properties to be set on the new managed object instance.

+
+ +
+ + + +
+

Return Value

+

A new object inheriting from NSManagedObject.

+
+ + + + + +
+

Discussion

+

Inserts a new managed object for the NSEntityDescription with the given name into the specified managed object context and sets properties on the instance from the given dictionary. A permanent managed object ID is obtained for the object so that it can be referenced across threads without any further work.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

managedObjectStore

+ + + +
+

Fetches the shared an RKManagedObjectStore object using the factory defined for the name RKTestFactoryDefaultNamesManagedObjectStore.

+
+ + + +
+ (id)managedObjectStore
+ + + + + +
+

Return Value

+

The shared managed object store instance.

+
+ + + + + +
+

Discussion

+

Fetches the shared an RKManagedObjectStore object using the factory defined for the name RKTestFactoryDefaultNamesManagedObjectStore.

+ +

On first invocation per factory setup/teardown, a new managed object store will be configured and returned. If there is an existing persistent store (i.e. from a previous test invocation), then the persistent store is deleted.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

managedObjectStoreFilename

+ + + +
+

Returns the filename used when constructing instances of RKManagedObjectStore via the factory.

+
+ + + +
+ (NSString *)managedObjectStoreFilename
+ + + + + +
+

Return Value

+

A string containing the filename to use when creating a managed object store.

+
+ + + + + +
+

Discussion

+

Returns the filename used when constructing instances of RKManagedObjectStore via the factory.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

objectFromFactory:

+ + + +
+ (id)objectFromFactory:(NSString *)factoryName
+ + +
+ +
+ +

objectFromFactory:properties:

+ + + +
+

Creates and returns a new instance of an object using the factory with the given name.

+
+ + + +
+ (id)objectFromFactory:(NSString *)factoryName properties:(NSDictionary *)properties
+ + + +
+

Parameters

+ +
+
factoryName
+

The name of the factory to use when building the requested object. +@raises NSInvalidArgumentException Raised if a factory with the given name is not defined.

+
+ +
+
properties
+

An NSDictionary of properties to be set on the created object.

+
+ +
+ + + +
+

Return Value

+

An object built using the factory registered for the given name.

+
+ + + + + +
+

Discussion

+

Creates and returns a new instance of an object using the factory with the given name.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

objectManager

+ + + +
+

Fetches the shared RKObjectManager object using the factory defined for the name RKTestFactoryDefaultNamesObjectManager.

+
+ + + +
+ (id)objectManager
+ + + + + +
+

Return Value

+

The shared object manager instance.

+
+ + + + + +
+

Discussion

+

Fetches the shared RKObjectManager object using the factory defined for the name RKTestFactoryDefaultNamesObjectManager.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

setBaseURL:

+ + + +
+

Sets the base URL for the factory.

+
+ + + +
+ (void)setBaseURL:(NSURL *)URL
+ + + +
+

Parameters

+ +
+
URL
+

The new base URL.

+
+ +
+ + + + + + + +
+

Discussion

+

Sets the base URL for the factory.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

setBaseURLString:

+ + + +
+

Sets the base URL for the factory to a new value by constructing an RKURL +from the given string.

+
+ + + +
+ (void)setBaseURLString:(NSString *)baseURLString
+ + + +
+

Parameters

+ +
+
baseURLString
+

A string containing the URL to set as the base URL for the factory.

+
+ +
+ + + + + + + +
+

Discussion

+

Sets the base URL for the factory to a new value by constructing an RKURL +from the given string.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

setManagedObjectStoreFilename:

+ + + +
+

Sets the filename to use when the factory constructs an instance of RKManagedObjectStore.

+
+ + + +
+ (void)setManagedObjectStoreFilename:(NSString *)managedObjectStoreFilename
+ + + +
+

Parameters

+ +
+
managedObjectStoreFilename
+

A string containing the filename to use when creating managed object store instances.

+
+ +
+ + + + + + + +
+

Discussion

+

Sets the filename to use when the factory constructs an instance of RKManagedObjectStore.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

setUp

+ + + +
+

Sets up the RestKit testing environment. Invokes the didSetUp callback for application specific setup.

+
+ + + +
+ (void)setUp
+ + + + + + + + + +
+

Discussion

+

Sets up the RestKit testing environment. Invokes the didSetUp callback for application specific setup.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

sharedObjectFromFactory:

+ + + +
+

Fetches a shared object from the factory with the given name. If an existing object has already been created, then that instance is returned. If a shared instance does not yet exist, one will be constructed and returned for this and all subsequent invocations of sharedObjectFromFactory:. Shared object instances are discarded when the factory is torn down.

+
+ + + +
+ (id)sharedObjectFromFactory:(NSString *)factoryName
+ + + +
+

Parameters

+ +
+
factoryName
+

The name of the factory to retrieve the shared instance of.

+
+ +
+ + + +
+

Return Value

+

The shared object instance for the factory registered with the given name.

+
+ + + + + +
+

Discussion

+

Fetches a shared object from the factory with the given name. If an existing object has already been created, then that instance is returned. If a shared instance does not yet exist, one will be constructed and returned for this and all subsequent invocations of sharedObjectFromFactory:. Shared object instances are discarded when the factory is torn down.

+ +

Shared objects are used to return object instances for cases where it does not make sense to instantiate a new instance on every invocation of the factory. A common example where this is appropriate is the managedObjectStore factory, where construction of a new store on each invocation would yield managed objects that cross Core Data stacks.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

tearDown

+ + + +
+

Tears down the RestKit testing environment by clearing singleton instances, helping to ensure test case isolation. Invokes the didTearDown callback for application specific cleanup.

+
+ + + +
+ (void)tearDown
+ + + + + + + + + +
+

Discussion

+

Tears down the RestKit testing environment by clearing singleton instances, helping to ensure test case isolation. Invokes the didTearDown callback for application specific cleanup.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKTestFixture.html b/Pods/Documentation/RestKit/html/Classes/RKTestFixture.html new file mode 100644 index 00000000..3defa752 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKTestFixture.html @@ -0,0 +1,720 @@ + + + + + RKTestFixture Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKTestFixture.h
+ + + + +
+ +

Overview

+

Provides a static method API for conveniently accessing fixture data +contained within a designated NSBundle. Useful when writing unit tests that +leverage fixture data for testing parsing and object mapping operations.

+
+ + + + + +
+ +

Tasks

+ + + + + +
    +
  • + + + fixtureBundle +

    Returns the NSBundle object designated as the source location for unit testing fixture data.

    +
    + + +
  • + + + setFixtureBundle: +

    Designates the specified NSBundle object as the source location for unit testing fixture data.

    +
    + + +
  • + + + pathForFixture: +

    Returns the full path to the specified fixture file on within the fixture bundle.

    +
    + + +
  • + + + stringWithContentsOfFixture: +

    Creates and returns a string object by reading data from the fixture identified by the specified file name using UTF-8 encoding.

    +
    + + +
  • + + + dataWithContentsOfFixture: +

    Creates and returns a data object by reading every byte from the fixture identified by the specified file name.

    +
    + + +
  • + + + MIMETypeForFixture: +

    Returns the MIME Type for the fixture identified by the specified name.

    +
    + + +
  • + + + parsedObjectWithContentsOfFixture: +

    Creates and returns an object representation of the data from the fixture identified by the specified file name by reading the +data as a string and parsing it using a parser appropriate for the MIME Type of the file.

    +
    + + +
  • +
+ +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

MIMETypeForFixture:

+ + + +
+

Returns the MIME Type for the fixture identified by the specified name.

+
+ + + +
+ (NSString *)MIMETypeForFixture:(NSString *)fixtureName
+ + + +
+

Parameters

+ +
+
fixtureName
+

The name of the fixture file.

+
+ +
+ + + +
+

Return Value

+

The MIME Type for the resource file or nil if the file could not be located.

+
+ + + + + +
+

Discussion

+

Returns the MIME Type for the fixture identified by the specified name.

+
+ + + + + + + +
+

Declared In

+ RKTestFixture.h
+
+ + +
+ +
+ +

dataWithContentsOfFixture:

+ + + +
+

Creates and returns a data object by reading every byte from the fixture identified by the specified file name.

+
+ + + +
+ (NSData *)dataWithContentsOfFixture:(NSString *)fixtureName
+ + + +
+

Parameters

+ +
+
fixtureName
+

The name of the resource file.

+
+ +
+ + + +
+

Return Value

+

A data object by reading every byte from the fixture file.

+
+ + + + + +
+

Discussion

+

Creates and returns a data object by reading every byte from the fixture identified by the specified file name.

+
+ + + + + + + +
+

Declared In

+ RKTestFixture.h
+
+ + +
+ +
+ +

fixtureBundle

+ + + +
+

Returns the NSBundle object designated as the source location for unit testing fixture data.

+
+ + + +
+ (NSBundle *)fixtureBundle
+ + + + + +
+

Return Value

+

The NSBundle object designated as the source location for unit testing fixture data

+ +
or nil if none has been configured.
+
+
+ + + + + +
+

Discussion

+

Returns the NSBundle object designated as the source location for unit testing fixture data.

+
+ + + + + + + +
+

Declared In

+ RKTestFixture.h
+
+ + +
+ +
+ +

parsedObjectWithContentsOfFixture:

+ + + +
+

Creates and returns an object representation of the data from the fixture identified by the specified file name by reading the +data as a string and parsing it using a parser appropriate for the MIME Type of the file.

+
+ + + +
+ (id)parsedObjectWithContentsOfFixture:(NSString *)fixtureName
+ + + +
+

Parameters

+ +
+
fixtureName
+

The name of the resource file.

+
+ +
+ + + +
+

Return Value

+

A new image object for the specified file, or nil if the method could not initialize the image from the specified file.

+
+ + + + + +
+

Discussion

+

Creates and returns an object representation of the data from the fixture identified by the specified file name by reading the +data as a string and parsing it using a parser appropriate for the MIME Type of the file.

+
+ + + + + + + +
+

Declared In

+ RKTestFixture.h
+
+ + +
+ +
+ +

pathForFixture:

+ + + +
+

Returns the full path to the specified fixture file on within the fixture bundle.

+
+ + + +
+ (NSString *)pathForFixture:(NSString *)fixtureName
+ + + +
+

Parameters

+ +
+
fixtureName
+

The name of the fixture file.

+
+ +
+ + + +
+

Return Value

+

The full path to the specified fixture file or nil if it cannot be located.

+
+ + + + + +
+

Discussion

+

Returns the full path to the specified fixture file on within the fixture bundle.

+
+ + + + + + + +
+

Declared In

+ RKTestFixture.h
+
+ + +
+ +
+ +

setFixtureBundle:

+ + + +
+

Designates the specified NSBundle object as the source location for unit testing fixture data.

+
+ + + +
+ (void)setFixtureBundle:(NSBundle *)bundle
+ + + +
+

Parameters

+ +
+
bundle
+

The new fixture NSBundle object.

+
+ +
+ + + + + + + +
+

Discussion

+

Designates the specified NSBundle object as the source location for unit testing fixture data.

+
+ + + + + + + +
+

Declared In

+ RKTestFixture.h
+
+ + +
+ +
+ +

stringWithContentsOfFixture:

+ + + +
+

Creates and returns a string object by reading data from the fixture identified by the specified file name using UTF-8 encoding.

+
+ + + +
+ (NSString *)stringWithContentsOfFixture:(NSString *)fixtureName
+ + + +
+

Parameters

+ +
+
fixtureName
+

The name of the fixture file.

+
+ +
+ + + +
+

Return Value

+

A string created by reading data from the specified fixture file using the NSUTF8StringEncoding.

+
+ + + + + +
+

Discussion

+

Creates and returns a string object by reading data from the fixture identified by the specified file name using UTF-8 encoding.

+
+ + + + + + + +
+

Declared In

+ RKTestFixture.h
+
+ + +
+ +
+ + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKTestHelpers.html b/Pods/Documentation/RestKit/html/Classes/RKTestHelpers.html new file mode 100644 index 00000000..3c1a3910 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKTestHelpers.html @@ -0,0 +1,784 @@ + + + + + RKTestHelpers Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKTestHelpers.h
+ + + + +
+ +

Overview

+

The RKTestHelpers class provides a number of helpful utility methods for use in unit or integration tests for RestKit applications.

+
+ + + + + +
+ +

Tasks

+ + + +

Stubbing Routes

+ + + + + +

Working with the Cache

+ +
    +
  • + + + disableCaching +

    Disables caching by setting a new [NSURLCache sharedURLCache] instance in which the memory and disk limits have been set to zero.

    +
    + + +
  • + + + cacheResponseForRequest:withResponseData: +

    Creates, stores, and returns a NSCachedURLResponse object containing an NSHTTPURLResponse for the given request with a 200 (OK) status code.

    +
    + + +
  • + + + cacheResponseForURL:HTTPMethod:headers:withData: +

    Creates, stores, and returns a NSCachedURLResponse object containing an NSHTTPURLResponse for the given URL and HTTP method with the given response data and a 200 (OK) status code.

    +
    + + +
  • +
+ +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

cacheResponseForRequest:withResponseData:

+ + + +
+

Creates, stores, and returns a NSCachedURLResponse object containing an NSHTTPURLResponse for the given request with a 200 (OK) status code.

+
+ + + +
+ (NSCachedURLResponse *)cacheResponseForRequest:(NSURLRequest *)request withResponseData:(NSData *)responseData
+ + + +
+

Parameters

+ +
+
request
+

The request to cache the response for.

+
+ +
+
responseData
+

The response data to be stored in the cache.

+
+ +
+ + + +
+

Return Value

+

The cached URL response that was stored to the cache.

+
+ + + + + +
+

Discussion

+

Creates, stores, and returns a NSCachedURLResponse object containing an NSHTTPURLResponse for the given request with a 200 (OK) status code.

+
+ + + + + + + +
+

Declared In

+ RKTestHelpers.h
+
+ + +
+ +
+ +

cacheResponseForURL:HTTPMethod:headers:withData:

+ + + +
+

Creates, stores, and returns a NSCachedURLResponse object containing an NSHTTPURLResponse for the given URL and HTTP method with the given response data and a 200 (OK) status code.

+
+ + + +
+ (NSCachedURLResponse *)cacheResponseForURL:(NSURL *)URL HTTPMethod:(NSString *)HTTPMethod headers:(NSDictionary *)requestHeaders withData:(NSData *)responseData
+ + + +
+

Parameters

+ +
+
URL
+

The URL to cache the response for.

+
+ +
+
HTTPMethod
+

The HTTP method of the request (i.e. ‘GET’, ‘POST’, ‘PUT’, ‘PATCH’, or ‘DELETE’).

+
+ +
+
responseData
+

The response data to be stored in the cache.

+
+ +
+ + + +
+

Return Value

+

The cached URL response that was stored to the cache.

+
+ + + + + +
+

Discussion

+

Creates, stores, and returns a NSCachedURLResponse object containing an NSHTTPURLResponse for the given URL and HTTP method with the given response data and a 200 (OK) status code.

+
+ + + + + + + +
+

Declared In

+ RKTestHelpers.h
+
+ + +
+ +
+ +

copyFetchRequestBlocksMatchingPathPattern:toBlocksMatchingRelativeString:onObjectManager:

+ + + +
+

Finds all registered fetch request blocks matching the given path pattern and adds a new fetch request block that returns the same value as the origin block that matches the given relative string portion of a URL object.

+
+ + + +
+ (void)copyFetchRequestBlocksMatchingPathPattern:(NSString *)pathPattern toBlocksMatchingRelativeString:(NSString *)relativeString onObjectManager:(RKObjectManager *)nilOrObjectManager
+ + + +
+

Parameters

+ +
+
pathPattern
+

The path pattern that matches the fetch request blocks to be copied.

+
+ +
+
relativeString
+

The relative string portion of the NSURL objects that the new blocks will match exactly.

+
+ +
+
nilOrObjectManager
+

The object manager to stub the route on. If nil, the shared object manager be be used.

+
+ +
+ + + + + + + +
+

Discussion

+

Finds all registered fetch request blocks matching the given path pattern and adds a new fetch request block that returns the same value as the origin block that matches the given relative string portion of a URL object.

+
+ + + + + + + +
+

Declared In

+ RKTestHelpers.h
+
+ + +
+ +
+ +

disableCaching

+ + + +
+

Disables caching by setting a new [NSURLCache sharedURLCache] instance in which the memory and disk limits have been set to zero.

+
+ + + +
+ (void)disableCaching
+ + + + + + + + + +
+

Discussion

+

Disables caching by setting a new [NSURLCache sharedURLCache] instance in which the memory and disk limits have been set to zero.

+
+ + + + + + + +
+

Declared In

+ RKTestHelpers.h
+
+ + +
+ +
+ +

stubRouteForClass:method:withPathPattern:onObjectManager:

+ + + +
+

Stubs the route with the given class and method with a given path pattern.

+
+ + + +
+ (RKRoute *)stubRouteForClass:(Class)objectClass method:(RKRequestMethod)method withPathPattern:(NSString *)pathPattern onObjectManager:(RKObjectManager *)nilOrObjectManager
+ + + +
+

Parameters

+ +
+
objectClass
+

The class of the route to stub.

+
+ +
+
method
+

The method of the route to stub.

+
+ +
+
pathPattern
+

The path pattern to return instead in place of the current route’s value.

+
+ +
+
nilOrObjectManager
+

The object manager to stub the route on. If nil, the shared object manager be be used.

+
+ +
+ + + +
+

Return Value

+

The new stubbed route object that was added to the route set of the target object manager.

+
+ + + + + +
+

Discussion

+

Stubs the route with the given class and method with a given path pattern.

+
+ + + + + + + +
+

Declared In

+ RKTestHelpers.h
+
+ + +
+ +
+ +

stubRouteForRelationship:ofClass:pathPattern:onObjectManager:

+ + + +
+

Stubs the relationship route for a given class with a given path pattern.

+
+ + + +
+ (RKRoute *)stubRouteForRelationship:(NSString *)relationshipName ofClass:(Class)objectClass pathPattern:(NSString *)pathPattern onObjectManager:(RKObjectManager *)nilOrObjectManager
+ + + +
+

Parameters

+ +
+
relationshipName
+

The name of the relationship to stub the route of.

+
+ +
+
objectClass
+

The class of the route to stub.

+
+ +
+
pathPattern
+

The path pattern to return instead in place of the current route’s value.

+
+ +
+
nilOrObjectManager
+

The object manager to stub the route on. If nil, the shared object manager be be used.

+
+ +
+ + + +
+

Return Value

+

The new stubbed route object that was added to the route set of the target object manager.

+
+ + + + + +
+

Discussion

+

Stubs the relationship route for a given class with a given path pattern.

+
+ + + + + + + +
+

Declared In

+ RKTestHelpers.h
+
+ + +
+ +
+ +

stubRouteNamed:withPathPattern:onObjectManager:

+ + + +
+

Stubs the route with the given name with a given path pattern.

+
+ + + +
+ (RKRoute *)stubRouteNamed:(NSString *)routeName withPathPattern:(NSString *)pathPattern onObjectManager:(RKObjectManager *)nilOrObjectManager
+ + + +
+

Parameters

+ +
+
routeName
+

The name of the route to stub.

+
+ +
+
pathPattern
+

The path pattern to return instead in place of the current route’s value.

+
+ +
+
nilOrObjectManager
+

The object manager to stub the route on. If nil, the shared object manager be be used.

+
+ +
+ + + +
+

Return Value

+

The new stubbed route object that was added to the route set of the target object manager.

+
+ + + + + +
+

Discussion

+

Stubs the route with the given name with a given path pattern.

+
+ + + + + + + +
+

Declared In

+ RKTestHelpers.h
+
+ + +
+ +
+ + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKTestNotificationObserver.html b/Pods/Documentation/RestKit/html/Classes/RKTestNotificationObserver.html new file mode 100644 index 00000000..f6ddd01b --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKTestNotificationObserver.html @@ -0,0 +1,893 @@ + + + + + RKTestNotificationObserver Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Inherits fromNSObject
Declared inRKTestNotificationObserver.h
+ + + + +
+ +

Overview

+

An RKTestNotificationObserver object provides support for awaiting a notification +to be posted as the result of an asynchronous operation by spinning the run loop. This +enables a straight-forward unit testing workflow by blocking execution of the test until +a notification is posted.

+
+ + + + + +
+ +

Tasks

+ + + + + + + +
+ + + + + +
+ +

Properties

+ +
+ +

name

+ + + +
+

The name of the notification the receiver is awaiting.

+
+ + + +
@property (nonatomic, copy) NSString *name
+ + + + + + + + + +
+

Discussion

+

The name of the notification the receiver is awaiting.

+
+ + + + + + + +
+

Declared In

+ RKTestNotificationObserver.h
+
+ + +
+ +
+ +

object

+ + + +
+

The object expected to post the notification the receiver is awaiting.

+
+ + + +
@property (nonatomic, weak) id object
+ + + + + + + + + +
+

Discussion

+

The object expected to post the notification the receiver is awaiting.

+ +

Can be nil.

+
+ + + + + + + +
+

Declared In

+ RKTestNotificationObserver.h
+
+ + +
+ +
+ +

timeout

+ + + +
+

The timeout interval, in seconds, to wait for the notification to be posted.

+
+ + + +
@property (nonatomic, assign) NSTimeInterval timeout
+ + + + + + + + + +
+

Discussion

+

The timeout interval, in seconds, to wait for the notification to be posted.

+ +

Default: 3 seconds

+
+ + + + + + + +
+

Declared In

+ RKTestNotificationObserver.h
+
+ + +
+ +
+ + + +
+ +

Class Methods

+ +
+ +

notificationObserver

+ + + +
+

Creates and initializes a notification obsercer object.

+
+ + + +
+ (RKTestNotificationObserver *)notificationObserver
+ + + + + +
+

Return Value

+

The newly created notification observer.

+
+ + + + + +
+

Discussion

+

Creates and initializes a notification obsercer object.

+
+ + + + + + + +
+

Declared In

+ RKTestNotificationObserver.h
+
+ + +
+ +
+ +

notificationObserverForName:

+ + + +
+

Instantiate a notification observer for the given notification name

+
+ + + +
+ (RKTestNotificationObserver *)notificationObserverForName:(NSString *)notificationName
+ + + +
+

Parameters

+ +
+
notificationName
+

The name of the NSNotification we want to watch for

+
+ +
+ + + + + + + +
+

Discussion

+

Instantiate a notification observer for the given notification name

+
+ + + + + + + +
+

Declared In

+ RKTestNotificationObserver.h
+
+ + +
+ +
+ +

notificationObserverForName:object:

+ + + +
+

Instantiate a notification observer for the given notification name and object

+
+ + + +
+ (RKTestNotificationObserver *)notificationObserverForName:(NSString *)notificationName object:(id)notificationSender
+ + + +
+

Parameters

+ +
+
notificationName
+

The name of the NSNotification we want to watch for

+
+ +
+
notificationSender
+

The source object of the NSNotification we want to watch for

+
+ +
+ + + +
+

Return Value

+

The newly created notification observer initialized with notificationName and notificationSender.

+
+ + + + + +
+

Discussion

+

Instantiate a notification observer for the given notification name and object

+
+ + + + + + + +
+

Declared In

+ RKTestNotificationObserver.h
+
+ + +
+ +
+ +

waitForNotificationWithName:object:usingBlock:

+ + + +
+

Configures a notification observer to wait for the a notification with the given name to be posted +by the source object during execution of the block.

+
+ + + +
+ (void)waitForNotificationWithName:(NSString *)name object:(id)notificationSender usingBlock:(void ( ^ ) ( ))block
+ + + +
+

Parameters

+ +
+
name
+

The name of the notification we are waiting for

+
+ +
+
notificationSender
+

The object we are waiting to post the notification

+
+ +
+
block
+

A block to invoke to trigger the notification activity

+
+ +
+ + + + + + + +
+

Discussion

+

Configures a notification observer to wait for the a notification with the given name to be posted +by the source object during execution of the block.

+
+ + + + + + + +
+

Declared In

+ RKTestNotificationObserver.h
+
+ + +
+ +
+ +

waitForNotificationWithName:usingBlock:

+ + + +
+

Configures a notification observer to wait for the a notification with the given name to be posted +during execution of the block.

+
+ + + +
+ (void)waitForNotificationWithName:(NSString *)name usingBlock:(void ( ^ ) ( ))block
+ + + +
+

Parameters

+ +
+
name
+

The name of the notification we are waiting for

+
+ +
+
block
+

A block to invoke to trigger the notification activity

+
+ +
+ + + + + + + +
+

Discussion

+

Configures a notification observer to wait for the a notification with the given name to be posted +during execution of the block.

+
+ + + + + + + +
+

Declared In

+ RKTestNotificationObserver.h
+
+ + +
+ +
+ + + +
+ +

Instance Methods

+ +
+ +

addObserver

+ + + +
+

Adds the receiver as an observer for the notification name and object under test.

+
+ + + +
- (void)addObserver
+ + + + + + + + + +
+

Discussion

+

Adds the receiver as an observer for the notification name and object under test.

+ +

If the observer has not already been added when waitForNotification +is invoked, it will be added before the runloop cycling begins.

+
+ + + + + + + +
+

Declared In

+ RKTestNotificationObserver.h
+
+ + +
+ +
+ +

waitForNotification

+ + + +
+

Wait for a notification matching the name and source object we are observing to be posted.

+
+ + + +
- (void)waitForNotification
+ + + + + + + + + +
+

Discussion

+

Wait for a notification matching the name and source object we are observing to be posted.

+ +

This method will block by spinning the runloop waiting for an appropriate notification matching +our observed name and object to be posted or the timeout configured is exceeded.

+
+ + + + + + + +
+

Declared In

+ RKTestNotificationObserver.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RKURLEncodedSerialization.html b/Pods/Documentation/RestKit/html/Classes/RKURLEncodedSerialization.html new file mode 100644 index 00000000..d8026730 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RKURLEncodedSerialization.html @@ -0,0 +1,228 @@ + + + + + RKURLEncodedSerialization Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + + + + +
Inherits fromNSObject
Conforms toRKSerialization
Declared inRKURLEncodedSerialization.h
+ + + + +
+ +

Overview

+

The RKURLEncodedSerialization class conforms to the RKSerialization protocol and provides support for the serialization and deserialization of URL encoded data. URL encoding is used to replace certain characters in a string with equivalent percent escape sequences. The list of characters replaced by the implementation are designed as illegal URL characters by RFC 3986. URL encoded data is used for the submission of HTML forms with the MIME Type application/x-www-form-urlencoded.

+
+ + + + + + + + + + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Classes/RK_FIX_CATEGORY_BUG.html b/Pods/Documentation/RestKit/html/Classes/RK_FIX_CATEGORY_BUG.html new file mode 100644 index 00000000..10494d26 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Classes/RK_FIX_CATEGORY_BUG.html @@ -0,0 +1,210 @@ + + + + + RK_FIX_CATEGORY_BUG Class Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + +
Declared inRKMacros.h
+ + + + + + + + + + + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Protocols/RKManagedObjectCaching.html b/Pods/Documentation/RestKit/html/Protocols/RKManagedObjectCaching.html new file mode 100644 index 00000000..877d00e7 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Protocols/RKManagedObjectCaching.html @@ -0,0 +1,621 @@ + + + + + RKManagedObjectCaching Protocol Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Conforms toNSObject
Declared inRKManagedObjectCaching.h
+ + + + +
+ +

Overview

+

Objects implementing the RKManagedObjectCaching protocol can act as the cache +strategy for RestKit managed object stores. The managed object cache is consulted +when objects are retrieved from Core Data during object mapping operations and provide +an opportunity to accelerate the mapping process by trading memory for speed.

+
+ + + + + +
+ +

Tasks

+ + + + +

Finding Managed Objects

+ + +
+ + + + + + + + + +
+ +

Instance Methods

+ +
+ +

didCreateObject:

+ + + +
+

Invoked to inform the receiver that an object was created and should be added to the cache.

+
+ + + +
- (void)didCreateObject:(NSManagedObject *)object
+ + + +
+

Parameters

+ +
+
object
+

The object that was created in a managed object context.

+
+ +
+ + + + + + + +
+

Discussion

+

Invoked to inform the receiver that an object was created and should be added to the cache.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectCaching.h
+
+ + +
+ +
+ +

didDeleteObject:

+ + + +
+

Invoked to inform the receiver that an object was deleted and should be removed to the cache.

+
+ + + +
- (void)didDeleteObject:(NSManagedObject *)object
+ + + +
+

Parameters

+ +
+
object
+

The object that was deleted from a managed object context.

+
+ +
+ + + + + + + +
+

Discussion

+

Invoked to inform the receiver that an object was deleted and should be removed to the cache.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectCaching.h
+
+ + +
+ +
+ +

didFetchObject:

+ + + +
+

Invoked to inform the receiver that an object was fetched and should be added to the cache.

+
+ + + +
- (void)didFetchObject:(NSManagedObject *)object
+ + + +
+

Parameters

+ +
+
object
+

The object that was fetched from a managed object context.

+
+ +
+ + + + + + + +
+

Discussion

+

Invoked to inform the receiver that an object was fetched and should be added to the cache.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectCaching.h
+
+ + +
+ +
+ +

findInstanceOfEntity:withPrimaryKeyAttribute:value:inManagedObjectContext:

+ + + +
+

Retrieves a model object from the object store given a Core Data entity and +the primary key attribute and value for the desired object.

+
+ + + +
- (NSManagedObject *)findInstanceOfEntity:(NSEntityDescription *)entity withPrimaryKeyAttribute:(NSString *)primaryKeyAttribute value:(id)primaryKeyValue inManagedObjectContext:(NSManagedObjectContext *)managedObjectContext
+ + + +
+

Parameters

+ +
+
entity
+

The Core Data entity for the type of object to be retrieved from the cache.

+
+ +
+
primaryKeyAttribute
+

The name of the attribute that acts as the primary key for the entity.

+
+ +
+
primaryKeyValue
+

The value for the primary key attribute of the object to be retrieved from the cache.

+
+ +
+
managedObjectContext
+

The managed object context to be searched for a matching instance.

+
+ +
+ + + +
+

Return Value

+

A managed object that is an instance of the given entity with a primary key and value matching +the specified parameters, or nil if no object was found.

+
+ + + + + +
+

Discussion

+

Retrieves a model object from the object store given a Core Data entity and +the primary key attribute and value for the desired object.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectCaching.h
+
+ + +
+ +
+ +

findInstancesOfEntity:withPrimaryKeyAttribute:value:inManagedObjectContext:

+ + + +
+

Retrieves an array of model objects from the object store given a Core Data entity and +the primary key attribute and value for the desired object.

+
+ + + +
- (NSArray *)findInstancesOfEntity:(NSEntityDescription *)entity withPrimaryKeyAttribute:(NSString *)primaryKeyAttribute value:(id)primaryKeyValue inManagedObjectContext:(NSManagedObjectContext *)managedObjectContext
+ + + +
+

Parameters

+ +
+
entity
+

The Core Data entity for the type of object to be retrieved from the cache.

+
+ +
+
primaryKeyAttribute
+

The name of the attribute that acts as the primary key for the entity.

+
+ +
+
primaryKeyValue
+

The value for the primary key attribute of the object to be retrieved from the cache.

+
+ +
+
managedObjectContext
+

The managed object context to be searched for a matching instance.

+
+ +
+ + + +
+

Return Value

+

An array of managed objects that are instances of the given entity with a primary key and value matching +the specified parameters, or nil if no object was found.

+
+ + + + + +
+

Discussion

+

Retrieves an array of model objects from the object store given a Core Data entity and +the primary key attribute and value for the desired object.

+
+ + + + + + + +
+

Declared In

+ RKManagedObjectCaching.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Protocols/RKMapperOperationDelegate.html b/Pods/Documentation/RestKit/html/Protocols/RKMapperOperationDelegate.html new file mode 100644 index 00000000..c6a669b0 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Protocols/RKMapperOperationDelegate.html @@ -0,0 +1,826 @@ + + + + + RKMapperOperationDelegate Protocol Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Conforms toNSObject
Declared inRKMapperOperation.h
+ + + + +
+ +

Overview

+

Objects wishing to act as the delegate for RKMapperOperation objects must adopt the RKMapperOperationDelegate protocol. The protocol provides a rich set of optional callback methods that provides insight into the lifecycle of a mapper operation.

+
+ + + + + +
+ +

Tasks

+ + + +

Tracking Mapper Status

+ + + + + +

Key Path Search Messages

+ + + + + +

Tracking Child Mapping Operation Status

+ + + +
+ + + + + + + + + +
+ +

Instance Methods

+ +
+ +

mapper:didFailMappingOperation:forKeyPath:withError:

+ + + +
+

Tells the delegate that a mapping operation that was started by the mapper has failed with an error.

+
+ + + +
- (void)mapper:(RKMapperOperation *)mapper didFailMappingOperation:(RKMappingOperation *)mappingOperation forKeyPath:(NSString *)keyPath withError:(NSError *)error
+ + + +
+

Parameters

+ +
+
mapper
+

The mapper operation performing the mapping.

+
+ +
+
mappingOperation
+

The mapping operation that has failed.

+
+ +
+
keyPath
+

The key path that was mapped. A nil key path indicates that the mapping matched the entire sourceObject.

+
+ +
+
error
+

The error that occurred during the execution of the mapping operation.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that a mapping operation that was started by the mapper has failed with an error.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mapper:didFindRepresentationOrArrayOfRepresentations:atKeyPath:

+ + + +
+

Tells the delegate that the mapper has found one or more mappable object representations at a key path specified in the mappingsDictionary.

+
+ + + +
- (void)mapper:(RKMapperOperation *)mapper didFindRepresentationOrArrayOfRepresentations:(id)dictionaryOrArrayOfDictionaries atKeyPath:(NSString *)keyPath
+ + + +
+

Parameters

+ +
+
mapper
+

The mapper operation performing the mapping.

+
+ +
+
dictionaryOrArrayOfDictionaries
+

The NSDictictionary or NSArray of NSDictionary object representations that was found at the keyPath.

+
+ +
+
keyPath
+

The key path that the representation was read from in the sourceObject. If the keyPath was [NSNull null] in the mappingsDictionary, it will be given as nil to the delegate.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapper has found one or more mappable object representations at a key path specified in the mappingsDictionary.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mapper:didFinishMappingOperation:forKeyPath:

+ + + +
+

Tells the delegate that a mapping operation that was started by the mapper has finished executing.

+
+ + + +
- (void)mapper:(RKMapperOperation *)mapper didFinishMappingOperation:(RKMappingOperation *)mappingOperation forKeyPath:(NSString *)keyPath
+ + + +
+

Parameters

+ +
+
mapper
+

The mapper operation performing the mapping.

+
+ +
+
mappingOperation
+

The mapping operation that has finished.

+
+ +
+
keyPath
+

The key path that was mapped. A nil key path indicates that the mapping matched the entire sourceObject.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that a mapping operation that was started by the mapper has finished executing.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mapper:didNotFindRepresentationOrArrayOfRepresentationsAtKeyPath:

+ + + +
+

Tells the delegate that the mapper failed to find any mappable object representations at a key path specified in the mappingsDictionary.

+
+ + + +
- (void)mapper:(RKMapperOperation *)mapper didNotFindRepresentationOrArrayOfRepresentationsAtKeyPath:(NSString *)keyPath
+ + + +
+

Parameters

+ +
+
mapper
+

The mapper operation performing the mapping.

+
+ +
+
keyPath
+

The key path that was searched for a mappable object representation.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapper failed to find any mappable object representations at a key path specified in the mappingsDictionary.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mapper:willStartMappingOperation:forKeyPath:

+ + + +
+

Tells the delegate that the mapper is about to start a mapping operation to map a representation found in the sourceObject.

+
+ + + +
- (void)mapper:(RKMapperOperation *)mapper willStartMappingOperation:(RKMappingOperation *)mappingOperation forKeyPath:(NSString *)keyPath
+ + + +
+

Parameters

+ +
+
mapper
+

The mapper operation performing the mapping.

+
+ +
+
mappingOperation
+

The mapping operation that is about to be started.

+
+ +
+
keyPath
+

The key path that was mapped. A nil key path indicates that the mapping matched the entire sourceObject.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapper is about to start a mapping operation to map a representation found in the sourceObject.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mapperDidCancelMapping:

+ + + +
+

Tells the delegate that the mapper has been cancelled.

+
+ + + +
- (void)mapperDidCancelMapping:(RKMapperOperation *)mapper
+ + + +
+

Parameters

+ +
+
mapper
+

The mapper operation that was cancelled.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapper has been cancelled.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mapperDidFinishMapping:

+ + + +
+

Tells the delegate that the mapper has finished.

+
+ + + +
- (void)mapperDidFinishMapping:(RKMapperOperation *)mapper
+ + + +
+

Parameters

+ +
+
mapper
+

The mapper operation that has finished mapping.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapper has finished.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ +

mapperWillStartMapping:

+ + + +
+

Tells the delegate that the mapper operation is about to start mapping.

+
+ + + +
- (void)mapperWillStartMapping:(RKMapperOperation *)mapper
+ + + +
+

Parameters

+ +
+
mapper
+

The mapper operation that is about to start mapping.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapper operation is about to start mapping.

+
+ + + + + + + +
+

Declared In

+ RKMapperOperation.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Protocols/RKMappingOperationDataSource.html b/Pods/Documentation/RestKit/html/Protocols/RKMappingOperationDataSource.html new file mode 100644 index 00000000..36b4f4bc --- /dev/null +++ b/Pods/Documentation/RestKit/html/Protocols/RKMappingOperationDataSource.html @@ -0,0 +1,411 @@ + + + + + RKMappingOperationDataSource Protocol Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Conforms toNSObject
Declared inRKMappingOperationDataSource.h
+ + + + +
+ +

Overview

+

An object that adopts the RKMappingOperationDataSource protocol is responsible for the retrieval or creation of target objects within an RKMapperOperation or RKMappingOperation. A data source is responsible for meeting the requirements of the underlying data store implementation and must return a key-value coding compliant object instance that can be used as the target object of a mapping operation. It is also responsible for commiting any changes necessary to the underlying data store once a mapping operation has completed its work.

+ +

At a minimum, a data source must implement the mappingOperation:targetObjectForRepresentation:withMapping: method. This method is responsible for finding an existing object instance to be updated or creating a new object if no existing object could be found or the underlying data store does not support persistence. Object mapping operations which target NSObject derived classes will always result in mapping to new transient objects, while persistent data stores such as Core Data can be queried to retrieve existing objects for update.

+
+ + + + + +
+ +

Tasks

+ + + + + + + +
+ + + + + + + + + +
+ +

Instance Methods

+ +
+ +

commitChangesForMappingOperation:error:

+ + + +
+

Tells the data source to commit any changes to the underlying data store.

+
+ + + +
- (BOOL)commitChangesForMappingOperation:(RKMappingOperation *)mappingOperation error:(NSError **)error
+ + + +
+

Parameters

+ +
+
mappingOperation
+

The mapping operation that has completed its work.

+
+ +
+
error
+

A pointer to an error to be set in the event that the mapping operation could not be committed.

+
+ +
+ + + +
+

Return Value

+

A Boolean value indicating if the changes for the mapping operation were committed successfully.

+
+ + + + + +
+

Discussion

+

Tells the data source to commit any changes to the underlying data store.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperationDataSource.h
+
+ + +
+ +
+ +

mappingOperation:targetObjectForRepresentation:withMapping:

+ + + +
+

Asks the data source for the target object for an object mapping operation given an NSDictionary representation of the object’s properties and the mapping object that will be used to perform the mapping.

+
+ + + +
- (id)mappingOperation:(RKMappingOperation *)mappingOperation targetObjectForRepresentation:(NSDictionary *)representation withMapping:(RKObjectMapping *)mapping
+ + + +
+

Parameters

+ +
+
mappingOperation
+

The mapping operation requesting the target object.

+
+ +
+
representation
+

A dictionary representation of the properties to be mapped onto the retrieved target object.

+
+ +
+
mapping
+

The object mapping to be used to perform a mapping from the representation to the target object.

+
+ +
+ + + +
+

Return Value

+

A key-value coding compliant object to perform the mapping on to.

+
+ + + + + +
+

Discussion

+

Asks the data source for the target object for an object mapping operation given an NSDictionary representation of the object’s properties and the mapping object that will be used to perform the mapping.

+ +

The representation value is a fragment of content from a deserialized response that has been identified as containing content that is mappable using the given mapping.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperationDataSource.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Protocols/RKMappingOperationDelegate.html b/Pods/Documentation/RestKit/html/Protocols/RKMappingOperationDelegate.html new file mode 100644 index 00000000..c1d2fbb4 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Protocols/RKMappingOperationDelegate.html @@ -0,0 +1,776 @@ + + + + + RKMappingOperationDelegate Protocol Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Conforms toNSObject
Declared inRKMappingOperation.h
+ + + + +
+ +

Overview

+

Objects acting as the delegate for RKMappingOperation objects must adopt the RKMappingOperationDelegate protocol. These methods enable the delegate to be notified of events such as the application of attribute and relationship mappings during a mapping operation.

+
+ + + + + +
+ +

Tasks

+ + + + + + + +
+ + + + + + + + + +
+ +

Instance Methods

+ +
+ +

mappingOperation:didConnectRelationship:usingMapping:

+ + + +
+

Tells the delegate that the mapping operation has connected a relationship.

+
+ + + +
- (void)mappingOperation:(RKMappingOperation *)operation didConnectRelationship:(NSRelationshipDescription *)relationship usingMapping:(RKConnectionMapping *)connectionMapping
+ + + +
+

Parameters

+ +
+
operation
+

The mapping operation.

+
+ +
+
relationship
+

The relationship that was connected.

+
+ +
+
connectionMapping
+

The mappings that was used to connect the relationship.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapping operation has connected a relationship.

+ +

Only sent when mapping an RKEntityMapping object that contains connection mappings.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

mappingOperation:didFailWithError:

+ + + +
+

Tells the delegate that the mapping operation has failed due to an error.

+
+ + + +
- (void)mappingOperation:(RKMappingOperation *)operation didFailWithError:(NSError *)error
+ + + +
+

Parameters

+ +
+
operation
+

The object mapping operation that has failed.

+
+ +
+
error
+

An error object indicating the reason for the failure.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapping operation has failed due to an error.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

mappingOperation:didFindValue:forKeyPath:mapping:

+ + + +
+

Tells the delegate that an attribute or relationship mapping was found for a given key path within the data being mapped.

+
+ + + +
- (void)mappingOperation:(RKMappingOperation *)operation didFindValue:(id)value forKeyPath:(NSString *)keyPath mapping:(RKPropertyMapping *)propertyMapping
+ + + +
+

Parameters

+ +
+
operation
+

The object mapping operation being performed.

+
+ +
+
value
+

The value that was found at the given key path in the source object representation.

+
+ +
+
keyPath
+

The key path in the source object for which the mapping is to be applied.

+
+ +
+
propertyMapping
+

The RKAttributeMapping or RKRelationshipMapping for which the mappable value was found within the source object representation.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that an attribute or relationship mapping was found for a given key path within the data being mapped.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

mappingOperation:didNotFindValueForKeyPath:mapping:

+ + + +
+

Tells the delegate that no attribute or relationships mapping was found for a given key path within the data being mapped.

+
+ + + +
- (void)mappingOperation:(RKMappingOperation *)operation didNotFindValueForKeyPath:(NSString *)keyPath mapping:(RKPropertyMapping *)propertyMapping
+ + + +
+

Parameters

+ +
+
operation
+

The object mapping operation being performed.

+
+ +
+
keyPath
+

The key path in the source object for which no mappable value was found.

+
+ +
+
propertyMapping
+

The RKAttributeMapping or RKRelationshipMapping for which no mappable value could be found within the source object representation.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that no attribute or relationships mapping was found for a given key path within the data being mapped.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

mappingOperation:didNotSetUnchangedValue:forKeyPath:usingMapping:

+ + + +
+

Tells the delegate that the mapping operation has declined to set a value for a given key path because the value has not changed.

+
+ + + +
- (void)mappingOperation:(RKMappingOperation *)operation didNotSetUnchangedValue:(id)value forKeyPath:(NSString *)keyPath usingMapping:(RKPropertyMapping *)propertyMapping
+ + + +
+

Parameters

+ +
+
operation
+

The object mapping operation being performed.

+
+ +
+
value
+

A unchanged value for the key path in the destination object.

+
+ +
+
keyPath
+

The key path in the destination object for which a unchanged value was not set.

+
+ +
+
propertyMapping
+

The RKAttributeMapping or RKRelationshipMapping found for the key path.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapping operation has declined to set a value for a given key path because the value has not changed.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

mappingOperation:didSelectObjectMapping:forDynamicMapping:

+ + + +
+

Tells the delegate that the mapping operation has selected a concrete object mapping with which to map the source object.

+
+ + + +
- (void)mappingOperation:(RKMappingOperation *)operation didSelectObjectMapping:(RKObjectMapping *)objectMapping forDynamicMapping:(RKDynamicMapping *)dynamicMapping
+ + + +
+

Parameters

+ +
+
operation
+

The mapping operation.

+
+ +
+
objectMapping
+

The concrete object mapping with which to perform the mapping.

+
+ +
+
dynamicMapping
+

The dynamic source mapping from which the object mapping was determined.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapping operation has selected a concrete object mapping with which to map the source object.

+ +

Only sent if the receiver was initialized with an instance of RKDynamicMapping as the mapping.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ +

mappingOperation:didSetValue:forKeyPath:usingMapping:

+ + + +
+

Tells the delegate that the mapping operation has set a value for a given key path with an attribute or relationship mapping.

+
+ + + +
- (void)mappingOperation:(RKMappingOperation *)operation didSetValue:(id)value forKeyPath:(NSString *)keyPath usingMapping:(RKPropertyMapping *)propertyMapping
+ + + +
+

Parameters

+ +
+
operation
+

The object mapping operation being performed.

+
+ +
+
value
+

A new value that was set on the destination object.

+
+ +
+
keyPath
+

The key path in the destination object for which a new value has been set.

+
+ +
+
propertyMapping
+

The RKAttributeMapping or RKRelationshipMapping found for the key path.

+
+ +
+ + + + + + + +
+

Discussion

+

Tells the delegate that the mapping operation has set a value for a given key path with an attribute or relationship mapping.

+
+ + + + + + + +
+

Declared In

+ RKMappingOperation.h
+
+ + +
+ +
+ + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Protocols/RKSerialization.html b/Pods/Documentation/RestKit/html/Protocols/RKSerialization.html new file mode 100644 index 00000000..44bc1547 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Protocols/RKSerialization.html @@ -0,0 +1,419 @@ + + + + + RKSerialization Protocol Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Conforms toNSObject
Declared inRKSerialization.h
+ + + + +
+ +

Overview

+

The RKSerialization protocol declares two methods that a class must implement so that it can provide support for serializing objects to and deserializing objects from UTF-8 encoded data representations of a serialization format such as JSON or XML. Serialization implementations typically handle data in a given MIME Type (i.e. application/json) and may be registered with the RKMIMETypeSerialization class.

+
+ + + + + +
+ +

Tasks

+ + + +

Deserializing an Object

+ +
    +
  • + + + objectFromData:error: +

    Deserializes and returns the given data in the format supported by the receiver (i.e. JSON, XML, etc) as a Foundation object representation.

    +
    + + required method +
  • +
+ + + +

Serializing an Object

+ +
    +
  • + + + dataFromObject:error: +

    Serializes and returns a UTF-8 encoded data representation of the given Foundation object in the format supported by the receiver (i.e. JSON, XML, etc).

    +
    + + required method +
  • +
+ +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

dataFromObject:error:

+ + + +
+

Serializes and returns a UTF-8 encoded data representation of the given Foundation object in the format supported by the receiver (i.e. JSON, XML, etc).

+
+ + + +
+ (NSData *)dataFromObject:(id)object error:(NSError **)error
+ + + +
+

Parameters

+ +
+
object
+

The object to be serialized.

+
+ +
+
error
+

A pointer to an NSError object.

+
+ +
+
A
+

pointer to an NSError object.

+
+ +
+ + + +
+

Return Value

+

A data representation of the given object in UTF-8 encoding, or nil if an error occurred.

+
+ + + + + +
+

Discussion

+

Serializes and returns a UTF-8 encoded data representation of the given Foundation object in the format supported by the receiver (i.e. JSON, XML, etc).

+
+ + + + + + + +
+

Declared In

+ RKSerialization.h
+
+ + +
+ +
+ +

objectFromData:error:

+ + + +
+

Deserializes and returns the given data in the format supported by the receiver (i.e. JSON, XML, etc) as a Foundation object representation.

+
+ + + +
+ (id)objectFromData:(NSData *)data error:(NSError **)error
+ + + +
+

Parameters

+ +
+
data
+

The UTF-8 encoded data representation of the object to be deserialized.

+
+ +
+
error
+

A pointer to an NSError object.

+
+ +
+ + + +
+

Return Value

+

A Foundation object from the serialized data in data, or nil if an error occurs.

+
+ + + + + +
+

Discussion

+

Deserializes and returns the given data in the format supported by the receiver (i.e. JSON, XML, etc) as a Foundation object representation.

+
+ + + + + + + +
+

Declared In

+ RKSerialization.h
+
+ + +
+ +
+ + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/Protocols/RKTestFactoryCallbacks.html b/Pods/Documentation/RestKit/html/Protocols/RKTestFactoryCallbacks.html new file mode 100644 index 00000000..4fcd3939 --- /dev/null +++ b/Pods/Documentation/RestKit/html/Protocols/RKTestFactoryCallbacks.html @@ -0,0 +1,422 @@ + + + + + RKTestFactoryCallbacks Protocol Reference + + + + + + + +
+ + + + +
+ +
+
+ + + +
+ +
+ + + + + + + +
Conforms toNSObject
Declared inRKTestFactory.h
+ + + + +
+ +

Overview

+

Defines optional callback methods for extending the functionality of the factory. Implementation can be provided via a category.

+
+ + + + + +
+ +

Tasks

+ + + + +

Customizing the Factory

+
    +
  • + + + didInitialize +

    Application specific initialization point for the factory.

    +
    + + +
  • + + + didSetUp +

    Application specific customization point for the factory.

    +
    + + +
  • + + + didTearDown +

    Application specific customization point for the factory.

    +
    + + +
  • +
+ +
+ + + + + + + +
+ +

Class Methods

+ +
+ +

didInitialize

+ + + +
+

Application specific initialization point for the factory.

+
+ + + +
+ (void)didInitialize
+ + + + + + + + + +
+

Discussion

+

Application specific initialization point for the factory.

+ +

Called once per unit testing run when the factory singleton instance is initialized. RestKit applications may override via a category.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

didSetUp

+ + + +
+

Application specific customization point for the factory.

+
+ + + +
+ (void)didSetUp
+ + + + + + + + + +
+

Discussion

+

Application specific customization point for the factory.

+ +

Invoked each time the factory is asked to set up the environment. RestKit applications leveraging the factory may override via a category.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ +

didTearDown

+ + + +
+

Application specific customization point for the factory.

+
+ + + +
+ (void)didTearDown
+ + + + + + + + + +
+

Discussion

+

Application specific customization point for the factory.

+ +

Invoked each time the factory is tearing down the environment. RestKit applications leveraging the factory may override via a category.

+
+ + + + + + + +
+

Declared In

+ RKTestFactory.h
+
+ + +
+ +
+ + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/css/styles.css b/Pods/Documentation/RestKit/html/css/styles.css new file mode 100755 index 00000000..bf946c02 --- /dev/null +++ b/Pods/Documentation/RestKit/html/css/styles.css @@ -0,0 +1,584 @@ +body { + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + font-size: 13px; +} + +code { + font-family: Courier, Consolas, monospace; + font-size: 13px; + color: #666; +} + +pre { + font-family: Courier, Consolas, monospace; + font-size: 13px; + line-height: 18px; + tab-interval: 0.5em; + border: 1px solid #C7CFD5; + background-color: #F1F5F9; + color: #666; + padding: 0.3em 1em; +} + +ul { + list-style-type: square; +} + +li { + margin-bottom: 10px; +} + +a, a code { + text-decoration: none; + color: #36C; +} + +a:hover, a:hover code { + text-decoration: underline; + color: #36C; +} + +h2 { + border-bottom: 1px solid #8391A8; + color: #3C4C6C; + font-size: 187%; + font-weight: normal; + margin-top: 1.75em; + padding-bottom: 2px; +} + +table { + margin-bottom: 4em; + border-collapse:collapse; + vertical-align: middle; +} + +td { + border: 1px solid #9BB3CD; + padding: .667em; + font-size: 100%; +} + +th { + border: 1px solid #9BB3CD; + padding: .3em .667em .3em .667em; + background: #93A5BB; + font-size: 103%; + font-weight: bold; + color: white; + text-align: left; +} + +/* @group Common page elements */ + +#top_header { + height: 91px; + left: 0; + min-width: 598px; + position: absolute; + right: 0; + top: 0; + z-index: 900; +} + +#footer { + clear: both; + padding-top: 20px; + text-align: center; +} + +#contents, #overview_contents { + -webkit-overflow-scrolling: touch; + border-top: 1px solid #2B334F; + position: absolute; + top: 91px; + left: 0; + right: 0; + bottom: 0; + overflow-x: hidden; + overflow-y: auto; + padding-left: 2em; + padding-right: 2em; + padding-top: 1em; + min-width: 550px; +} + +#contents.isShowingTOC { + left: 230px; + min-width: 320px; +} + +.copyright { + font-size: 12px; +} + +.generator { + font-size: 11px; +} + +.main-navigation ul li { + display: inline; + margin-left: 15px; + list-style: none; +} + +.navigation-top { + clear: both; + float: right; +} + +.navigation-bottom { + clear: both; + float: right; + margin-top: 20px; + margin-bottom: -10px; +} + +.open > .disclosure { + background-image: url("../img/disclosure_open.png"); +} + +.disclosure { + background: url("../img/disclosure.png") no-repeat scroll 0 0; +} + +.disclosure, .nodisclosure { + display: inline-block; + height: 8px; + margin-right: 5px; + position: relative; + width: 9px; +} + +/* @end */ + +/* @group Header */ + +#top_header #library { + background: url("../img/library_background.png") repeat-x 0 0 #485E78; + background-color: #ccc; + height: 35px; + font-size: 115%; +} + +#top_header #library #libraryTitle { + color: #FFFFFF; + margin-left: 15px; + text-shadow: 0 -1px 0 #485E78; + top: 8px; + position: absolute; +} + +#top_header #library #developerHome { + color: #92979E; + right: 15px; + top: 8px; + position: absolute; +} + +#top_header #library a:hover { + text-decoration: none; +} + +#top_header #title { + background: url("../img/title_background.png") repeat-x 0 0 #8A98A9; + border-bottom: 1px solid #B6B6B6; + height: 25px; + overflow: hidden; +} + +#top_header h1 { + font-size: 115%; + font-weight: normal; + margin: 0; + padding: 3px 0 2px; + text-align: center; + text-shadow: 0 1px 0 #D5D5D5; + white-space: nowrap; +} + +#headerButtons { + background-color: #D8D8D8; + background-image: url("../img/button_bar_background.png"); + border-bottom: 1px solid #EDEDED; + border-top: 1px solid #2B334F; + font-size: 8pt; + height: 28px; + left: 0; + list-style: none outside none; + margin: 0; + overflow: hidden; + padding: 0; + position: absolute; + right: 0; + top: 61px; +} + +#headerButtons li { + background-repeat: no-repeat; + display: inline; + margin-top: 0; + margin-bottom: 0; + padding: 0; +} + +#toc_button button { + border-color: #ACACAC; + border-style: none solid none none; + border-width: 0 1px 0 0; + height: 28px; + margin: 0; + padding-left: 30px; + text-align: left; + width: 230px; +} + +li#jumpto_button { + left: 230px; + margin-left: 0; + position: absolute; +} + +li#jumpto_button select { + height: 22px; + margin: 5px 2px 0 10px; + max-width: 300px; +} + +/* @end */ + +/* @group Table of contents */ + +#tocContainer.isShowingTOC { + border-right: 1px solid #ACACAC; + display: block; + overflow-x: hidden; + overflow-y: auto; + padding: 0; +} + +#tocContainer { + background-color: #E4EBF7; + border-top: 1px solid #2B334F; + bottom: 0; + display: none; + left: 0; + overflow: hidden; + position: absolute; + top: 91px; + width: 229px; +} + +#tocContainer > ul#toc { + font-size: 11px; + margin: 0; + padding: 12px 0 18px; + width: 209px; + -moz-user-select: none; + -webkit-user-select: none; + user-select: none; +} + +#tocContainer > ul#toc > li { + margin: 0; + padding: 0 0 7px 30px; + text-indent: -15px; +} + +#tocContainer > ul#toc > li > .sectionName a { + color: #000000; + font-weight: bold; +} + +#tocContainer > ul#toc > li > .sectionName a:hover { + text-decoration: none; +} + +#tocContainer > ul#toc li.children > ul { + display: none; + height: 0; +} + +#tocContainer > ul#toc > li > ul { + margin: 0; + padding: 0; +} + +#tocContainer > ul#toc > li > ul, ul#toc > li > ul > li { + margin-left: 0; + margin-bottom: 0; + padding-left: 15px; +} + +#tocContainer > ul#toc > li ul { + list-style: none; + margin-right: 0; + padding-right: 0; +} + +#tocContainer > ul#toc li.children.open > ul { + display: block; + height: auto; + margin-left: -15px; + padding-left: 0; +} + +#tocContainer > ul#toc > li > ul, ul#toc > li > ul > li { + margin-left: 0; + padding-left: 15px; +} + +#tocContainer li ul li { + margin-top: 0.583em; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +#tocContainer li ul li span.sectionName { + white-space: normal; +} + +#tocContainer > ul#toc > li > ul > li > .sectionName a { + font-weight: bold; +} + +#tocContainer > ul#toc > li > ul a { + color: #4F4F4F; +} + +/* @end */ + +/* @group Index formatting */ + +.index-title { + font-size: 13px; + font-weight: normal; +} + +.index-column { + float: left; + width: 30%; + min-width: 200px; + font-size: 11px; +} + +.index-column ul { + margin: 8px 0 0 0; + padding: 0; + list-style: none; +} + +.index-column ul li { + margin: 0 0 3px 0; + padding: 0; +} + +.hierarchy-column { + min-width: 400px; +} + +.hierarchy-column ul { + margin: 3px 0 0 15px; +} + +.hierarchy-column ul li { + list-style-type: square; +} + +/* @end */ + +/* @group Common formatting elements */ + +.title { + font-weight: normal; + font-size: 215%; + margin-top:0; +} + +.subtitle { + font-weight: normal; + font-size: 180%; + color: #3C4C6C; + border-bottom: 1px solid #5088C5; +} + +.subsubtitle { + font-weight: normal; + font-size: 145%; + height: 0.7em; +} + +.note { + border: 1px solid #5088C5; + background-color: white; + margin: 1.667em 0 1.75em 0; + padding: 0 .667em .083em .750em; +} + +.warning { + border: 1px solid #5088C5; + background-color: #F0F3F7; + margin-bottom: 0.5em; + padding: 0.3em 0.8em; +} + +.bug { + border: 1px solid #000; + background-color: #ffffcc; + margin-bottom: 0.5em; + padding: 0.3em 0.8em; +} + +.deprecated { + color: #F60425; +} + +/* @end */ + +/* @group Common layout */ + +.section { + margin-top: 3em; +} + +/* @end */ + +/* @group Object specification section */ + +.section-specification { + margin-left: 2.5em; + margin-right: 2.5em; + font-size: 12px; +} + +.section-specification table { + margin-bottom: 0em; + border-top: 1px solid #d6e0e5; +} + +.section-specification td { + vertical-align: top; + border-bottom: 1px solid #d6e0e5; + border-left-width: 0px; + border-right-width: 0px; + border-top-width: 0px; + padding: .6em; +} + +.section-specification .specification-title { + font-weight: bold; +} + +/* @end */ + +/* @group Tasks section */ + +.task-list { + list-style-type: none; + padding-left: 0px; +} + +.task-list li { + margin-bottom: 3px; +} + +.task-item-suffix { + color: #996; + font-size: 12px; + font-style: italic; + margin-left: 0.5em; +} + +span.tooltip span.tooltip { + font-size: 1.0em; + display: none; + padding: 0.3em; + border: 1px solid #aaa; + background-color: #fdfec8; + color: #000; + text-align: left; +} + +span.tooltip:hover span.tooltip { + display: block; + position: absolute; + margin-left: 2em; +} + +/* @end */ + +/* @group Method section */ + +.section-method { + margin-top: 2.3em; +} + +.method-title { + margin-bottom: 1.5em; +} + +.method-subtitle { + margin-top: 0.7em; + margin-bottom: 0.2em; +} + +.method-subsection p { + margin-top: 0.4em; + margin-bottom: 0.8em; +} + +.method-declaration { + margin-top:1.182em; + margin-bottom:.909em; +} + +.method-declaration code { + font:14px Courier, Consolas, monospace; + color:#000; +} + +.declaration { + color: #000; +} + +.argument-def { + margin-top: 0.3em; + margin-bottom: 0.3em; +} + +.argument-def dd { + margin-left: 1.25em; +} + +.see-also-section ul { + list-style-type: none; + padding-left: 0px; + margin-top: 0; +} + +.see-also-section li { + margin-bottom: 3px; +} + +.declared-in-ref { + color: #666; +} + +#tocContainer.hideInXcode { + display: none; + border: 0px solid black; +} + +#top_header.hideInXcode { + display: none; +} + +#contents.hideInXcode { + border: 0px solid black; + top: 0px; + left: 0px; +} + +/* @end */ + diff --git a/Pods/Documentation/RestKit/html/css/stylesPrint.css b/Pods/Documentation/RestKit/html/css/stylesPrint.css new file mode 100644 index 00000000..dc54cd2f --- /dev/null +++ b/Pods/Documentation/RestKit/html/css/stylesPrint.css @@ -0,0 +1,22 @@ + +header { + display: none; +} + +div.main-navigation, div.navigation-top { + display: none; +} + +div#overview_contents, div#contents.isShowingTOC, div#contents { + overflow: visible; + position: relative; + top: 0px; + border: none; + left: 0; +} +#tocContainer.isShowingTOC { + display: none; +} +nav { + display: none; +} \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/hierarchy.html b/Pods/Documentation/RestKit/html/hierarchy.html new file mode 100644 index 00000000..97d0952f --- /dev/null +++ b/Pods/Documentation/RestKit/html/hierarchy.html @@ -0,0 +1,283 @@ + + + + + RestKit 0.20.0dev Hierarchy + + + + + +
+ + + + +
+
+
+ + +
+ +
+

Class Hierarchy

+ + + +
+ + + + + +
+ + +
+
+ + \ No newline at end of file diff --git a/Pods/Documentation/RestKit/html/img/button_bar_background.png b/Pods/Documentation/RestKit/html/img/button_bar_background.png new file mode 100644 index 00000000..d2cd0d89 Binary files /dev/null and b/Pods/Documentation/RestKit/html/img/button_bar_background.png differ diff --git a/Pods/Documentation/RestKit/html/img/disclosure.png b/Pods/Documentation/RestKit/html/img/disclosure.png new file mode 100644 index 00000000..147198f0 Binary files /dev/null and b/Pods/Documentation/RestKit/html/img/disclosure.png differ diff --git a/Pods/Documentation/RestKit/html/img/disclosure_open.png b/Pods/Documentation/RestKit/html/img/disclosure_open.png new file mode 100644 index 00000000..ea3842bd Binary files /dev/null and b/Pods/Documentation/RestKit/html/img/disclosure_open.png differ diff --git a/Pods/Documentation/RestKit/html/img/library_background.png b/Pods/Documentation/RestKit/html/img/library_background.png new file mode 100644 index 00000000..8fa6d457 Binary files /dev/null and b/Pods/Documentation/RestKit/html/img/library_background.png differ diff --git a/Pods/Documentation/RestKit/html/img/title_background.png b/Pods/Documentation/RestKit/html/img/title_background.png new file mode 100644 index 00000000..9001dac2 Binary files /dev/null and b/Pods/Documentation/RestKit/html/img/title_background.png differ diff --git a/Pods/Documentation/RestKit/html/index.html b/Pods/Documentation/RestKit/html/index.html new file mode 100644 index 00000000..bef9b9f2 --- /dev/null +++ b/Pods/Documentation/RestKit/html/index.html @@ -0,0 +1,847 @@ + + + + + RestKit 0.20.0dev Reference + + + + + +
+ + + + +
+
+
+ + +
+ +
+ + +

RestKit

+ +

RestKit is a modern Objective-C framework for implementing RESTful web services clients on iOS and Mac OS X. It provides a powerful object mapping engine that seamlessly integrates with Core Data and a simple set of networking primitives for mapping HTTP requests and responses built on top of AFNetworking. It has an elegant, carefully designed set of APIs that make accessing and modeling RESTful resources feel almost magical. For example, here’s how to access the Twitter public timeline and turn the JSON contents into an array of Tweet objects:

+ +

``` objective-c +@interface Tweet : NSObject +@property (nonatomic, copy) NSNumber userID; +@property (nonatomic, copy) NSString username; +@property (nonatomic, copy) NSString *text; +@end

+ +

RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[RKTweet class]]; +[mapping addAttributeMappingsFromDictionary:@{

+ +
@"user.name":   @"username",
+@"user.id":     @"userID",
+@"text":        @"text"
+
+ +

}];

+ +

RKResponseDescriptor responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:mapping pathPattern:nil keyPath:nil statusCodes:nil]; +NSURL url = [NSURL URLWithString:@“http://api.twitter.com/1/statuses/public_timeline.json”]; +NSURLRequest request = [NSURLRequest requestWithURL:url]; +RKObjectRequestOperation operation = [[RKObjectRequestOperation alloc] initWithRequest:request responseDescriptors:@[responseDescriptor]]; +[operation setCompletionBlockWithSuccess:^(RKObjectRequestOperation operation, RKMappingResult result) {

+ +
NSLog(@"The public timeline Tweets: %@", [result array]);
+
+ +

} failure:nil]; +[operation start]; +```

+ +

Getting Started

+ + + + +

Overview

+ +

RestKit is designed to be modular and each module strives to maintain a minimal set of dependencies across the framework and with the host platform. At the core of library sits the object mapping engine, which is responsible for transforming objects between representations (such as JSON/XML <–> local domain objects).

+ +

Object Mapping Fundamentals

+ +

The object mapping engine is built on top of the Key-Value Coding (KVC) informal protocol that is foundational to numerous Cocoa technologies such as key-value observing, bindings, and Core Data. Object mappings are expressed as pairs of KVC key paths that specify the source and destination attributes or relationships that are to be transformed.

+ +

RestKit leverages the highly dynamic Objective-C runtime to infer the developers desired intent by examining the type of the source and destination properties and performing appropriate type transformations. For example, given a source key path of created_at that identifies a string within a parsed JSON document and a destination key path of creationDate that identifies an NSDate property on a target object, RestKit will transform the date from a string into an NSDate using an NSDateFormatter. Numerous other transformations are provided out of the box and the engine is pluggable to allow the developer to define new transformations or replace an existing transformation with a new implementation.

+ +

The mapper fully supports both simple attribute as well as relationship mappings in which nested to-one or to-many child objects are mapped recursively. Through relationship mappings, one object mapping can be added to another to compose aggregate mappings that are capable of processing arbitrarily complex source documents.

+ +

Object mapping is a deep topic and is explored in exhaustive detail in the Object Mapping Guide on the wiki.

+ +

API Quickstart

+ +

RestKit is broken into several modules that cleanly separate the mapping engine from the HTTP and Core Data integrations to provide maximum flexibility. Key classes in each module are highlighted below and each module is hyperlinked to the README.md contained within the source code.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Object Mapping
RKObjectMappingEncapsulates configuration for transforming object representations as expressed by key-value coding keypaths.
RKAttributeMappingSpecifies a desired transformation between attributes within an object or entity mapping in terms of a source and destination key path.
RKRelationshipMappingSpecifies a desired mapping of a nested to-one or to-many child objects in in terms of a source and destination key path and an RKObjectMapping with which to map the attributes of the child object.
RKDynamicMappingSpecifies a flexible mapping in which the decision about which RKObjectMapping is to be used to process a given document is deferred to run time.
RKObjectMapperProvides an interface for mapping a parsed document into a set of local domain objects.
RKObjectMappingOperationAn NSOperation that performs a mapping between object representations using an RKObjectMapping.
Networking
RKRequestDescriptorDescribes a request that can be sent from the application to a remote web application for a given object type.
RKResponseDescriptorDescribes an object mappable response that may be returned from a remote web application in terms of an object mapping, a key path, a SOCKit pattern for matching the URL, and a set of status codes that define the circumstances in which the mapping is appropriate for a given response.
RKObjectParameterizationPerforms mapping of a given object into an NSDictionary represenation suitable for use as the parameters of an HTTP request.
RKObjectRequestOperationAn NSOperation that sends an HTTP request and performs object mapping on the parsed response body using the configurations expressed in a set of RKResponseDescriptor objects.
RKResponseMapperOperationAn NSOperation that provides support for object mapping an NSHTTPURLResponse using a set of RKResponseDescriptor objects.
RKObjectManagerCaptures the common patterns for communicating with a RESTful web application over HTTP using object mapping including: +
    +
  • Centralizing RKRequestDescriptor and RKResponseDescriptor configurations
  • +
  • Describing URL configuration with an RKRouter
  • +
  • Serializing objects and sending requests with the serialized representations
  • +
  • Sending requests to load remote resources and object mapping the response bodies
  • +
  • Building multi-part form requests for objects
  • +
+
RKRouterGenerates NSURL objects from a base URL and a set of RKRoute objects describing relative paths used by the application.
RKRouteDescribes a single relative path for a given object type and HTTP method, the relationship of an object, or a symbolic name.
Core Data
RKManagedObjectStoreEncapsulates Core Data configuration including an NSManagedObjectModel, a NSPersistentStoreCoordinator, and a pair of NSManagedObjectContext objects.
RKEntityMappingModels a mapping for transforming an object representation into a NSManagedObject instance for a given NSEntityDescription.
RKConnectionMappingDescribes a mapping for establishing a relationship between Core Data entities using foreign key attributes.
RKManagedObjectRequestOperationAn NSOperation subclass that sends an HTTP request and performs object mapping on the parsed response body to create NSManagedObject instances, establishes relationships between objects using RKConnectionMapping objects, and cleans up orphaned objects that no longer exist in the remote backend system.
RKManagedObjectImporterProvides support for bulk mapping of managed objects using RKEntityMapping objects for two use cases: +
    +
  1. Bulk importing of parsed documents into an NSPersistentStore.
  2. +
  3. Generating a seed database for initializing an application's Core Data store with an initial data set upon installation.
  4. +
+
Search
RKSearchIndexerProvides support for generating a full-text searchable index within Core Data for string attributes of entities within an application.
RKSearchPredicateGenerates an NSCompoundPredicate given a string of text that will search an index built with an RKSearchIndexer across any indexed entity.
Testing
RKMappingTestProvides support for unit testing object mapping configurations given a parsed document and an object or entity mapping. Expectations are configured in terms of expected key path mappings and/or expected transformation results.
RKTestFixtureProvides an interface for easily generating test fixture data for unit testing.
RKTestFactoryProvides support for creating objects for use in testing.
+ + +

+ +

Examples

+ +

Object Request

+ +

``` objective-c +// GET a single Article from /articles/1234.json and map it into an object +// JSON looks like {“article”: {“title”: “My Article”, “author”: “Blake”, “body”: “Very cool!!”}} +RKObjectMapping mapping = [RKObjectMapping mappingForClass:[Article class]]; +[mapping addAttributeMappingsFromArray:@[@“title”, @“author”, @“body”]]; +NSIndexSet statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful); // Anything in 2xx +RKResponseDescriptor *responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:mapping pathPattern:@“/articles/:articleID” keyPath:@“article” statusCodes:statusCodes];

+ +

NSURLRequest request = [NSURLRequest requestWithURL:[NSURL URLWithString:@“http://restkit.org/articles/1234.json”]]; +RKObjectRequestOperation operation = [[RKObjectRequestOperation alloc] initWithRequest:request responseDescriptors:@[responseDescriptor]]; +[operation setCompletionBlockWithSuccess:^(RKObjectRequestOperation operation, RKMappingResult result) {

+ +
Article *article = [result firstObject];
+NSLog(@"Mapped the article: %@", article);
+
+ +

} failure:^(RKObjectRequestOperation operation, NSError error) {

+ +
NSLog(@"Failed with error: %@", [error localizedDescription]);
+
+ +

}];] +```

+ +

Managed Object Request

+ +

``` objective-c +// GET an Article and its Categories from /articles/888.json and map into Core Data entities +// JSON looks like {“article”: {“title”: “My Article”, “author”: “Blake”, “body”: “Very cool!!”, “categories”: [{“id”: 1, “name”: “Core Data”]} +NSManagedObjectModel managedObjectModel = [NSManagedObjectModel mergedModelFromBundles:nil]; +RKManagedObjectStore managedObjectStore = [[RKManagedObjectStore alloc] initWithManagedObjectModel:managedObjectModel]; +NSString *path = [RKApplicationDataDirectory() stringByAppendingPathComponent:@“Store.sqlite”]; +[managedObjectStore addSQLitePersistentStoreAtPath:path fromSeedDatabaseAtPath:nil error:nil]; +[managedObjectStore createManagedObjectContexts];

+ +

RKEntityMapping categoryMapping = [RKEntityMapping mappingForEntityForName:@“Category” inManagedObjectStore:managedObjectStore]; +[categoryMapping addAttributeMappingsFromDictionary:@{ “id”: “categoryID”, @“name”: “name” }]; +RKEntityMapping articleMapping = [RKEntityMapping mappingForEntityForName:@“Article” inManagedObjectStore:managedObjectStore]; +[articleMapping addAttributeMappingsFromArray:@[@“title”, @“author”, @“body”]]; +[articleMapping addPropertyMapping:[RKRelationshipMapping relationshipMappingFromKeyPath:@“categories” toKeyPath:@“categories” withMapping:categoryMapping]];

+ +

NSIndexSet statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful); // Anything in 2xx +RKResponseDescriptor responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:articleMapping pathPattern:@“/articles/:articleID” keyPath:@“article” statusCodes:statusCodes];

+ +

NSURLRequest request = [NSURLRequest requestWithURL:[NSURL URLWithString:@“http://restkit.org/articles/888.json”]]; +RKManagedObjectRequestOperation operation = [[RKManagedObjectRequestOperation alloc] initWithRequest:request responseDescriptors:@[responseDescriptor]]; +operation.managedObjectContext = managedObjectStore.mainQueueManagedObjectContext; +[operation setCompletionBlockWithSuccess:^(RKObjectRequestOperation operation, RKMappingResult result) { + Article *article = [result firstObject];

+ +
NSLog(@"Mapped the article: %@", article);
+NSLog(@"Mapped the category: %@", [article.categories anyObject]);
+
+ +

} failure:^(RKObjectRequestOperation operation, NSError error) {

+ +
NSLog(@"Failed with error: %@", [error localizedDescription]);
+
+ +

}]; +```

+ +

Map a Client Error Response to an NSError

+ +

``` objective-c +// GET /articles/error.json returns a 422 (Unprocessable Entity) +// JSON looks like {“errors”: “Some Error Has Occurred”}

+ +

RKObjectMapping *errorMapping = [RKObjectMapping mappingForClass:[RKErrorMessage class]]; +// The entire value at the source key path containing the errors maps to the message +[errorMapping addPropertyMapping:[RKAttributeMapping attributeMappingFromKeyPath:[NSNull null] toKeyPath:@“message”]];

+ +

NSIndexSet statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassClientError); +// Any response in the 4xx status code range with an “errors” key path uses this mapping +RKResponseDescriptor errorDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:mapping pathPattern:nil keyPath:@“errors” statusCodes:statusCodes];

+ +

NSURLRequest request = [NSURLRequest requestWithURL:[NSURL URLWithString:@“http://restkit.org/articles/error.json”]]; +RKObjectRequestOperation operation = [[RKObjectRequestOperation alloc] initWithRequest:request responseDescriptors:@[errorDescriptor]]; +[operation setCompletionBlockWithSuccess:nil failure:^(RKObjectRequestOperation operation, NSError error) {

+ +
NSLog(@"Loaded this error: %@", [error localizedDescription]);
+
+ +

}]; +```

+ +

Centralize Configuration in an Object Manager

+ +

``` objective-c +// Set up Article and Error Response Descriptors +RKObjectMapping mapping = [RKObjectMapping mappingForClass:[Article class]]; +[mapping addAttributeMappingsFromArray:@[@“title”, @“author”, @“body”]]; +NSIndexSet statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful); // Anything in 2xx +RKResponseDescriptor *articleDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:mapping pathPattern:@“/articles” keyPath:@“article” statusCodes:statusCodes];

+ +

RKObjectMapping errorMapping = [RKObjectMapping mappingForClass:[RKErrorMessage class]]; +// The entire value at the source key path containing the errors maps to the message +[errorMapping addPropertyMapping:[RKAttributeMapping attributeMappingFromKeyPath:[NSNull null] toKeyPath:@“message”]]; +NSIndexSet statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassClientError); +// Any response in the 4xx status code range with an “errors” key path uses this mapping +RKResponseDescriptor *errorDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:mapping pathPattern:nil keyPath:@“errors” statusCodes:statusCodes];

+ +

// Add our descriptors to the manager +RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@“http://restkit.org”]]; +[manager addResponseDescriptorsFromArray:@[ articleDescriptor, errorDescriptor ]];

+ +

[manager getObjectsAtPath:@“/articles/555.json” parameters:nil success:^(RKObjectRequestOperation operation, RKMappingResult mappingResult)) {

+ +
// Handled with articleDescriptor
+
+ +

} failure:^(RKObjectRequestOperation operation, NSError error) {

+ +
// Transport error or server error handled by errorDescriptor
+
+ +

}]; +```

+ +

Load a Collection of Objects at a Path

+ +

objective-c +RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://restkit.org"]`http://restkit.org`"]; +[manager getObjectsAtPath:@"/articles" parameters:nil success:^(`RKObjectRequestOperation` *operation, `RKMappingResult` *mappingResult)) { +} failure:^(`RKObjectRequestOperation` *operation, NSError *error) { +}]; +

+ +

Manage a Queue of Object Request Operations

+ +

`` objective-c +RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://restkit.org"]http://restkit.org`“];

+ +

NSURLRequest request = [NSURLRequest requestWithURL:[NSURL URLWithString:@“http://restkit.org/articles/1234.json”]http://restkit.org/articles/1234.json“]]; +RKObjectRequestOperation operation = [[RKObjectRequestOperation alloc] initWithRequest:request responseDescriptors:@[responseDescriptor]];

+ +

[manager enqueueObjectRequestOperation:operation]; +[manager cancelAllObjectRequestOperationsWithMethod:RKRequestMethodANY matchingPathPattern:@“/articles/:articleID\.json”]; +```

+ +

POST, PATCH, and DELETE an Object

+ +

``` objective-c +RKObjectMapping responseMapping = [RKObjectMapping mappingForClass:[Article class]]; +[responseMapping addAttributeMappingsFromArray:@[@“title”, @“author”, @“body”]]; +NSIndexSet statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful); // Anything in 2xx +RKResponseDescriptor *articleDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:responseMapping pathPattern:@“/articles” keyPath:@“article” statusCodes:statusCodes];

+ +

RKObjectMapping *requestMapping = [RKObjectMapping requestMapping]; // objectClass == NSMutableDictionary +[requestMapping addAttributeMappingsFromArray:@[@“title”, @“author”, @“body”]];

+ +

// For any object of class Article, serialize into an NSMutableDictionary using the given mapping and nest +// under the ‘article’ key path +RKRequestDescriptor *requestDescriptor = [RKRequestDescriptor requestDescriptorWithMapping:requestMapping objectClass:[Article class] rootKeyPath:@“article”];

+ +

RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@“http://restkit.org”]; +[manager addRequestDescriptor:requestDescriptor]; +[manager addResponseDescriptor:responseDescriptor];

+ +

Article *article = [Article new]; +article.title = @“Introduction to RestKit”; +article.body = @“This is some text.”; +article.author = @“Blake”;

+ +

// POST to create +[manager postObject:article path:@“/articles” parameters:nil success:nil failure:nil];

+ +

// PATCH to update +article.body = @“New Body”; +[manager patchObject:article path:@“/articles/1234” parameters:nil success:nil failure:nil];

+ +

// DELETE to destroy +[manager deleteObject:article path:@“/articles/1234” parameters:nil success:nil failure:nil]; +```

+ +

Configure Logging

+ +

``` objective-c +// Log all HTTP traffic with request and response bodies +RKLogConfigureByName(“RestKit/Network”, RKLogLevelTrace);

+ +

// Log debugging info about Core Data +RKLogConfigureByName(“RestKit/CoreData”, RKLogLevelDebug);

+ +

// Raise logging for a block +RKLogWithLevelWhileExecutingBlock(RKLogLevelTrace, ^{

+ +
// Do something that generates logs
+
+ +

}); +```

+ +

Configure Routing

+ +

`` objective-c +RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://restkit.org"]http://restkit.org`“];

+ +

// Class Routing +[manager.router.routeSet addRoute:[RKRoute routeWithClass:[GGSegment class] pathPattern:@“/segments/:segmentID\.json” method:RKRequestMethodGET]];

+ +

// Relationship Routing +[manager.router.routeSet addRoute:[RKRoute routeWithRelationshipName:@“amenities” objectClass:[GGAirport class] pathPattern:@“/airports/:airportID/amenities.json” method:RKRequestMethodGET]];

+ +

// Named Routes +[manager.router.routeSet addRoute:[RKRoute routeWithName:@“thumbs_down_review” resourcePathPattern:@“/reviews/:reviewID/thumbs_down” method:RKRequestMethodPOST]]; +```

+ +

POST an Object with a File Attachment

+ +

``` objective-c +Article article = [Article new]; +UIImage image = [UIImage imageNamed:@“some_image.png”];

+ +

// Serialize the Article attributes then attach a file +NSMutableURLRequest *request = [[RKObjectManager sharedManager] multipartFormRequestForObject:article method:RKRequestMethodPOST path:nil parameters:nil constructingBodyWithBlock:^(id formData) {

+ +
[formData appendPartWithFileData:UIImagePNGRepresentation(image)
+                            name:@"article[image]"
+                        fileName:@"photo.png"
+                        mimeType:@"image/png"];
+
+ +

}];

+ +

RKObjectRequestOperation *operation = [[RKObjectManager sharedManager] objectRequesOperationWithRequest:request success:nil failure:nil]; +[operation start]; +```

+ +

Enqueue a Batch of Object Request Operations

+ +

``` objective-c

+ +

RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@“http://restkit.org”]http://restkit.org“]];

+ +

Airport jfk = [Airport new]; +jfk.code = @“jfk”; +Airport lga = [Airport new]; +lga.code = @“lga”; +Airport *rdu = [Airport new]; +rdu.code = @“rdu”;

+ +

// Enqueue a GET for ‘/airports/jfk/weather’, ‘/airports/lga/weather’, ‘/airports/rdu/weather’ +RKRoute *route = [RKRoute routeWithName:@“airport_weather” resourcePathPattern:@“/airports/:code/weather” method:RKRequestMethodGET];

+ +

[manager enqueueBatchOfObjectRequestOperationsWithRoute:route

+ +
                                            objects:@[ jfk, lga, rdu]
+                                           progress:^(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations) {
+                                               NSLog(@"Finished %d operations", numberOfFinishedOperations);
+                                           } completion:^ (NSArray *operations) {
+                                               NSLog(@"All Weather Reports Loaded!");
+                                           }];
+
+ +

```

+ +

Generate a Seed Database

+ +

`` objective-c +NSManagedObjectModel *managedObjectModel = [NSManagedObjectModel mergedModelFromBundles:nil]; +RKManagedObjectStore` *managedObjectStore = [[RKManagedObjectStore alloc] initWithManagedObjectModel:managedObjectModel];

+ +

RKEntityMapping *articleMapping = [RKEntityMapping mappingForEntityForName:@“Article” inManagedObjectStore:managedObjectStore]; +[articleMapping addAttributeMappingsFromArray:@[@“title”, @“author”, @“body”]];

+ +

NSString seedPath = [RKApplicationDataDirectory() stringByAppendingPathComponent:@“MySeedDatabase.sqlite”]; +RKManagedObjectImporter importer = [[RKManagedObjectImporter alloc] initWithManagedObjectModel:managedObjectStore.managedObjectModel storePath:seedPath];

+ +

// Import the files “articles.json” from the Main Bundle using our RKEntityMapping +// JSON looks like {“articles”: [ {“title”: “Article 1”, “body”: “Text”, “author”: “Blake” ]} +NSError error; +NSBundle mainBundle = [NSBundle mainBundle]; +[importer importObjectsFromItemAtPath:[mainBundle pathForResource:@“articles” ofType:@“json”]

+ +
                          withMapping:articleMapping
+                              keyPath:@"articles"
+                                error:&error];
+
+ +

BOOL success = [importer finishImporting:&error]; +if (success) {

+ +
[importer logSeedingInfo];
+
+ +

} +```

+ +

Index and Search an Entity

+ +

`` objective-c +NSManagedObjectModel *managedObjectModel = [NSManagedObjectModel mergedModelFromBundles:nil]; +RKManagedObjectStore` *managedObjectStore = [[RKManagedObjectStore alloc] initWithManagedObjectModel:managedObjectModel]; +[managedObjectStore addSearchIndexingToEntityForName:@“Article” onAttributes:@[ @“title”, @“body” ]]; +[managedObjectStore addInMemoryPersistentStore:nil]; +[managedObjectStore createManagedObjectContexts]; +[managedObjectStore startIndexingPersistentStoreManagedObjectContext];

+ +

Article *article1 = [NSEntityDescription insertNewObjectForEntityForName:@“Article” inManagedObjectContext:managedObjectStore.mainQueueManagedObjectContext]; +article1.title = @“First Article”; +article1.body = “This should match search”;

+ +

Article *article2 = [NSEntityDescription insertNewObjectForEntityForName:@“Article” inManagedObjectContext:managedObjectStore.mainQueueManagedObjectContext]; +article2.title = @“Second Article”; +article2.body = “Does not”;

+ +

BOOL success = [managedObjectStore.mainQueueManagedObjectContext saveToPersistentStore:nil];

+ +

RKSearchPredicate predicate = [RKSearchPredicate searchPredicateWithText:@“Match” type:NSAndPredicateType]; +NSFetchRequest fetchRequest = [NSFetchRequest fetchRequestWithEntityName:@“Article”]; +fetchRequest.predicate = predicate;

+ +

// Contains article1 due to body text containing ‘match’ +NSArray *matches = [managedObjectStore.mainQueueManagedObjectContext executeFetchRequest:fetchRequest error:nil]; +NSLog(@“Found the matching articls: %@”, matches); +```

+ +

Unit Test a Mapping

+ +

``` objective-c +// JSON looks like {“article”: {“title”: “My Article”, “author”: “Blake”, “body”: “Very cool!!”}} +RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[Article class]]; +[mapping addAttributeMappingsFromArray:@[@“title”, @“author”, @“body”]];

+ +

NSDictionary article = @{ @“article”: @{ @“title”: @“My Title”, @“body”: @“The article body”, @“author”: @“Blake” } }; +RKMappingTest mappingTest = [[RKMappingTest alloc] initWithMapping:mapping sourceObject:article destinationObject:nil];

+ +

[mappingTest expectMappingFromKeyPath:@“title” toKeyPath:@“title” value:@“My Title”]; +[mappingTest performMapping]; +[mappingTest verify]; +```

+ +

Requirements

+ +

RestKit requires iOS 5.0 and above or Mac OS X 10.7 and above.

+ +

Several third-party open source libraries are used within RestKit, including:

+ +
    +
  1. AFNetworking – Networking Support
  2. +
  3. LibComponentLogging – Logging Support
  4. +
  5. SOCKit – String <–> Object Coding
  6. +
  7. iso8601parser – Support for parsing and generating ISO-8601 dates
  8. +
+ + +

The following Cocoa frameworks must be linked into the application target for proper compilation:

+ +
    +
  1. CFNetwork.framework on iOS
  2. +
  3. CoreData.framework
  4. +
  5. Security.framework
  6. +
  7. MobileCoreServices.framework on iOS or CoreServices.framework on OS X
  8. +
+ + +

And the following linker flags must be set:

+ +
    +
  1. -ObjC
  2. +
  3. -all_load
  4. +
+ + +

ARC

+ +

As of version 0.20.0, RestKit has migrated the entire codebase to ARC.

+ +

If you are including the RestKit sources directly into a project that does not yet use Automatic Reference Counting, you will need to set the -fobjc-arc compiler flag on all of the RestKit source files. To do this in Xcode, go to your active target and select the “Build Phases” tab. Now select all RestKit source files, press Enter, insert -fobjc-arc and then “Done” to enable ARC for RestKit.

+ +

Serialization Formats

+ +

RestKit provides a pluggable interface for handling arbitrary serialization formats via the ~!@[RKSerialization](Protocols/RKSerialization.html)](http://restkit.org/api/0.20.0/Classes/RKSerialization.html))@!~ protocol and the [RKMIMETypeSerialization](http://restkit.org/api/0.20.0/Classes/RKMIMETypeSerialization.html) class. Out of the box, RestKit supports handling the JSON format for serializing and deserializing object representations via the [NSJSONSerialization](http://developer.apple.com/library/mac/`#documentation/Foundation/Reference/NSJSONSerialization_Class/Reference/Reference.html) class.

+ +

Additional Serializations

+ +

Support for additional formats and alternate serialization backends is provided via external modules that can be added to the project. Currently the following serialization implementations are available for use:

+ +
    +
  • JSONKit
  • +
  • SBJSON
  • +
  • YAJL
  • +
  • NextiveJson
  • +
  • XMLReader + XMLWriter
  • +
+ + +

Installation

+ +

The recommended approach for installating RestKit is via the CocoaPods package manager, as it provides flexible dependency management and dead simple installation. For best results, it is recommended that you install via CocoaPods >= 0.15.2 using Git >= 1.8.0 installed via Homebrew.

+ +

via CocoaPods

+ +

Install CocoaPods if not already available:

+ +

bash +$ [sudo] gem install cocoapods +$ pod setup +

+ +

Edit your Podfile and add RestKit:

+ +

`` bash +$ edit Podfile +platform :ios, '5.0' +pod 'RestKit', :git => 'https://github.com/RestKit/RestKit.git',` :branch => ‘development’

+ +

Testing and Search are optional components

+ +

pod ‘RestKit/Testing’, :git => ‘https://github.com/RestKit/RestKit.git', :branch => 'development’ +pod ‘RestKit/Search’, :git => ‘https://github.com/RestKit/RestKit.git', :branch => 'development’ +```

+ +

Install into your project:

+ +

bash +$ pod install +

+ +

Please note that if your installation fails, it may be because you are installing with a version of Git lower than CocoaPods is expecting. Please ensure that you are running Git >= 1.8.0 by executing git --version. You can get a full picture of the installation details by executing pod install --verbose.

+ +

From a Release Package or as a Git submodule

+ +

Detailed installation instructions are available in the Visual Install Guide on the Wiki.

+ +

License

+ +

RestKit is licensed under the terms of the Apache License, version 2.0. Please see the LICENSE file for full details.

+ +

Credits

+ +

RestKit is brought to you by Blake Watters and the RestKit team.

+ +

Support is provided by the following organizations:

+ + + + + +
+ + + + + + + + + + + +
+ + +
+
+ + \ No newline at end of file diff --git a/Pods/Headers/AFNetworking/AFHTTPClient.h b/Pods/Headers/AFNetworking/AFHTTPClient.h new file mode 120000 index 00000000..a88168d7 --- /dev/null +++ b/Pods/Headers/AFNetworking/AFHTTPClient.h @@ -0,0 +1 @@ +../../AFNetworking/AFNetworking/AFHTTPClient.h \ No newline at end of file diff --git a/Pods/Headers/AFNetworking/AFHTTPRequestOperation.h b/Pods/Headers/AFNetworking/AFHTTPRequestOperation.h new file mode 120000 index 00000000..d51daed2 --- /dev/null +++ b/Pods/Headers/AFNetworking/AFHTTPRequestOperation.h @@ -0,0 +1 @@ +../../AFNetworking/AFNetworking/AFHTTPRequestOperation.h \ No newline at end of file diff --git a/Pods/Headers/AFNetworking/AFImageRequestOperation.h b/Pods/Headers/AFNetworking/AFImageRequestOperation.h new file mode 120000 index 00000000..f7c5e913 --- /dev/null +++ b/Pods/Headers/AFNetworking/AFImageRequestOperation.h @@ -0,0 +1 @@ +../../AFNetworking/AFNetworking/AFImageRequestOperation.h \ No newline at end of file diff --git a/Pods/Headers/AFNetworking/AFJSONRequestOperation.h b/Pods/Headers/AFNetworking/AFJSONRequestOperation.h new file mode 120000 index 00000000..4dd96227 --- /dev/null +++ b/Pods/Headers/AFNetworking/AFJSONRequestOperation.h @@ -0,0 +1 @@ +../../AFNetworking/AFNetworking/AFJSONRequestOperation.h \ No newline at end of file diff --git a/Pods/Headers/AFNetworking/AFNetworkActivityIndicatorManager.h b/Pods/Headers/AFNetworking/AFNetworkActivityIndicatorManager.h new file mode 120000 index 00000000..a09102c7 --- /dev/null +++ b/Pods/Headers/AFNetworking/AFNetworkActivityIndicatorManager.h @@ -0,0 +1 @@ +../../AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.h \ No newline at end of file diff --git a/Pods/Headers/AFNetworking/AFNetworking.h b/Pods/Headers/AFNetworking/AFNetworking.h new file mode 120000 index 00000000..83dd518f --- /dev/null +++ b/Pods/Headers/AFNetworking/AFNetworking.h @@ -0,0 +1 @@ +../../AFNetworking/AFNetworking/AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/AFNetworking/AFPropertyListRequestOperation.h b/Pods/Headers/AFNetworking/AFPropertyListRequestOperation.h new file mode 120000 index 00000000..fb82b5c5 --- /dev/null +++ b/Pods/Headers/AFNetworking/AFPropertyListRequestOperation.h @@ -0,0 +1 @@ +../../AFNetworking/AFNetworking/AFPropertyListRequestOperation.h \ No newline at end of file diff --git a/Pods/Headers/AFNetworking/AFURLConnectionOperation.h b/Pods/Headers/AFNetworking/AFURLConnectionOperation.h new file mode 120000 index 00000000..360459d4 --- /dev/null +++ b/Pods/Headers/AFNetworking/AFURLConnectionOperation.h @@ -0,0 +1 @@ +../../AFNetworking/AFNetworking/AFURLConnectionOperation.h \ No newline at end of file diff --git a/Pods/Headers/AFNetworking/AFXMLRequestOperation.h b/Pods/Headers/AFNetworking/AFXMLRequestOperation.h new file mode 120000 index 00000000..c5c354bb --- /dev/null +++ b/Pods/Headers/AFNetworking/AFXMLRequestOperation.h @@ -0,0 +1 @@ +../../AFNetworking/AFNetworking/AFXMLRequestOperation.h \ No newline at end of file diff --git a/Pods/Headers/AFNetworking/UIImageView+AFNetworking.h b/Pods/Headers/AFNetworking/UIImageView+AFNetworking.h new file mode 120000 index 00000000..7c7e6c38 --- /dev/null +++ b/Pods/Headers/AFNetworking/UIImageView+AFNetworking.h @@ -0,0 +1 @@ +../../AFNetworking/AFNetworking/UIImageView+AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/CoreData.h b/Pods/Headers/RestKit/RestKit/CoreData.h new file mode 120000 index 00000000..938f8874 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/CoreData.h @@ -0,0 +1 @@ +../../../RestKit/Code/CoreData.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/CoreData/NSEntityDescription+RKAdditions.h b/Pods/Headers/RestKit/RestKit/CoreData/NSEntityDescription+RKAdditions.h new file mode 120000 index 00000000..7c67378e --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/CoreData/NSEntityDescription+RKAdditions.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/NSEntityDescription+RKAdditions.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/CoreData/NSManagedObject+RKAdditions.h b/Pods/Headers/RestKit/RestKit/CoreData/NSManagedObject+RKAdditions.h new file mode 120000 index 00000000..bd245ecd --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/CoreData/NSManagedObject+RKAdditions.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/NSManagedObject+RKAdditions.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/CoreData/NSManagedObjectContext+RKAdditions.h b/Pods/Headers/RestKit/RestKit/CoreData/NSManagedObjectContext+RKAdditions.h new file mode 120000 index 00000000..5129d8f1 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/CoreData/NSManagedObjectContext+RKAdditions.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/NSManagedObjectContext+RKAdditions.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/CoreData/RKEntityByAttributeCache.h b/Pods/Headers/RestKit/RestKit/CoreData/RKEntityByAttributeCache.h new file mode 120000 index 00000000..aabbe426 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/CoreData/RKEntityByAttributeCache.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKEntityByAttributeCache.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/CoreData/RKEntityCache.h b/Pods/Headers/RestKit/RestKit/CoreData/RKEntityCache.h new file mode 120000 index 00000000..5e6d65dc --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/CoreData/RKEntityCache.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKEntityCache.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/CoreData/RKEntityMapping.h b/Pods/Headers/RestKit/RestKit/CoreData/RKEntityMapping.h new file mode 120000 index 00000000..bf7a7646 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/CoreData/RKEntityMapping.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKEntityMapping.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/CoreData/RKFetchRequestManagedObjectCache.h b/Pods/Headers/RestKit/RestKit/CoreData/RKFetchRequestManagedObjectCache.h new file mode 120000 index 00000000..b71783dc --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/CoreData/RKFetchRequestManagedObjectCache.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKFetchRequestManagedObjectCache.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/CoreData/RKInMemoryManagedObjectCache.h b/Pods/Headers/RestKit/RestKit/CoreData/RKInMemoryManagedObjectCache.h new file mode 120000 index 00000000..e133edd1 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/CoreData/RKInMemoryManagedObjectCache.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKInMemoryManagedObjectCache.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/CoreData/RKManagedObjectCaching.h b/Pods/Headers/RestKit/RestKit/CoreData/RKManagedObjectCaching.h new file mode 120000 index 00000000..4850ebe2 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/CoreData/RKManagedObjectCaching.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKManagedObjectCaching.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/CoreData/RKManagedObjectImporter.h b/Pods/Headers/RestKit/RestKit/CoreData/RKManagedObjectImporter.h new file mode 120000 index 00000000..895a95b3 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/CoreData/RKManagedObjectImporter.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKManagedObjectImporter.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/CoreData/RKManagedObjectMappingOperationDataSource.h b/Pods/Headers/RestKit/RestKit/CoreData/RKManagedObjectMappingOperationDataSource.h new file mode 120000 index 00000000..63c21c8e --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/CoreData/RKManagedObjectMappingOperationDataSource.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKManagedObjectMappingOperationDataSource.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/CoreData/RKManagedObjectStore.h b/Pods/Headers/RestKit/RestKit/CoreData/RKManagedObjectStore.h new file mode 120000 index 00000000..c2abf477 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/CoreData/RKManagedObjectStore.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKManagedObjectStore.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/CoreData/RKManagedObjectThreadSafeInvocation.h b/Pods/Headers/RestKit/RestKit/CoreData/RKManagedObjectThreadSafeInvocation.h new file mode 120000 index 00000000..7bb19966 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/CoreData/RKManagedObjectThreadSafeInvocation.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKManagedObjectThreadSafeInvocation.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/CoreData/RKPropertyInspector+CoreData.h b/Pods/Headers/RestKit/RestKit/CoreData/RKPropertyInspector+CoreData.h new file mode 120000 index 00000000..9c57f2d2 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/CoreData/RKPropertyInspector+CoreData.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKPropertyInspector+CoreData.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/CoreData/RKRelationshipConnectionOperation.h b/Pods/Headers/RestKit/RestKit/CoreData/RKRelationshipConnectionOperation.h new file mode 120000 index 00000000..80e3ca79 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/CoreData/RKRelationshipConnectionOperation.h @@ -0,0 +1 @@ +../../../../RestKit/Code/CoreData/RKRelationshipConnectionOperation.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/LCLNSLog_RK.h b/Pods/Headers/RestKit/RestKit/LCLNSLog_RK.h new file mode 120000 index 00000000..1c211adb --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/LCLNSLog_RK.h @@ -0,0 +1 @@ +../../../RestKit/Vendor/LibComponentLogging/NSLog/LCLNSLog_RK.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Network.h b/Pods/Headers/RestKit/RestKit/Network.h new file mode 120000 index 00000000..5210a78f --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Network.h @@ -0,0 +1 @@ +../../../RestKit/Code/Network.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Network/RKHTTPRequestOperation.h b/Pods/Headers/RestKit/RestKit/Network/RKHTTPRequestOperation.h new file mode 120000 index 00000000..2b63c3c4 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Network/RKHTTPRequestOperation.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKHTTPRequestOperation.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Network/RKManagedObjectRequestOperation.h b/Pods/Headers/RestKit/RestKit/Network/RKManagedObjectRequestOperation.h new file mode 120000 index 00000000..c5f56776 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Network/RKManagedObjectRequestOperation.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKManagedObjectRequestOperation.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Network/RKObjectManager.h b/Pods/Headers/RestKit/RestKit/Network/RKObjectManager.h new file mode 120000 index 00000000..f67267ff --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Network/RKObjectManager.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKObjectManager.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Network/RKObjectPaginator.h b/Pods/Headers/RestKit/RestKit/Network/RKObjectPaginator.h new file mode 120000 index 00000000..a7c82e2e --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Network/RKObjectPaginator.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKObjectPaginator.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Network/RKObjectParameterization.h b/Pods/Headers/RestKit/RestKit/Network/RKObjectParameterization.h new file mode 120000 index 00000000..73e232c7 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Network/RKObjectParameterization.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKObjectParameterization.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Network/RKObjectRequestOperation.h b/Pods/Headers/RestKit/RestKit/Network/RKObjectRequestOperation.h new file mode 120000 index 00000000..e4dbe06a --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Network/RKObjectRequestOperation.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKObjectRequestOperation.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Network/RKRequestDescriptor.h b/Pods/Headers/RestKit/RestKit/Network/RKRequestDescriptor.h new file mode 120000 index 00000000..7f8e8b3b --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Network/RKRequestDescriptor.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKRequestDescriptor.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Network/RKRequestOperationSubclass.h b/Pods/Headers/RestKit/RestKit/Network/RKRequestOperationSubclass.h new file mode 120000 index 00000000..6a68b63c --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Network/RKRequestOperationSubclass.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKRequestOperationSubclass.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Network/RKResponseDescriptor.h b/Pods/Headers/RestKit/RestKit/Network/RKResponseDescriptor.h new file mode 120000 index 00000000..4981d9a3 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Network/RKResponseDescriptor.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKResponseDescriptor.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Network/RKResponseMapperOperation.h b/Pods/Headers/RestKit/RestKit/Network/RKResponseMapperOperation.h new file mode 120000 index 00000000..a2e15860 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Network/RKResponseMapperOperation.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKResponseMapperOperation.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Network/RKRoute.h b/Pods/Headers/RestKit/RestKit/Network/RKRoute.h new file mode 120000 index 00000000..39eb2cba --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Network/RKRoute.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKRoute.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Network/RKRouteSet.h b/Pods/Headers/RestKit/RestKit/Network/RKRouteSet.h new file mode 120000 index 00000000..a702bdc1 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Network/RKRouteSet.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKRouteSet.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Network/RKRouter.h b/Pods/Headers/RestKit/RestKit/Network/RKRouter.h new file mode 120000 index 00000000..7187f17f --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Network/RKRouter.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Network/RKRouter.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/ObjectMapping.h b/Pods/Headers/RestKit/RestKit/ObjectMapping.h new file mode 120000 index 00000000..9ca1b531 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/ObjectMapping.h @@ -0,0 +1 @@ +../../../RestKit/Code/ObjectMapping.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/ObjectMapping/RKAttributeMapping.h b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKAttributeMapping.h new file mode 120000 index 00000000..b196d357 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKAttributeMapping.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKAttributeMapping.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/ObjectMapping/RKConnectionMapping.h b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKConnectionMapping.h new file mode 120000 index 00000000..62ef74d8 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKConnectionMapping.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKConnectionMapping.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/ObjectMapping/RKDynamicMapping.h b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKDynamicMapping.h new file mode 120000 index 00000000..67a1cafb --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKDynamicMapping.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKDynamicMapping.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/ObjectMapping/RKDynamicMappingMatcher.h b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKDynamicMappingMatcher.h new file mode 120000 index 00000000..ec2323bc --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKDynamicMappingMatcher.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKDynamicMappingMatcher.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/ObjectMapping/RKErrorMessage.h b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKErrorMessage.h new file mode 120000 index 00000000..6d6996d2 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKErrorMessage.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKErrorMessage.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/ObjectMapping/RKHTTPUtilities.h b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKHTTPUtilities.h new file mode 120000 index 00000000..318d5c22 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKHTTPUtilities.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKHTTPUtilities.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/ObjectMapping/RKMapperOperation.h b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKMapperOperation.h new file mode 120000 index 00000000..59e87e27 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKMapperOperation.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKMapperOperation.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/ObjectMapping/RKMapperOperation_Private.h b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKMapperOperation_Private.h new file mode 120000 index 00000000..bd329762 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKMapperOperation_Private.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKMapperOperation_Private.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/ObjectMapping/RKMapping.h b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKMapping.h new file mode 120000 index 00000000..6aaec37f --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKMapping.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKMapping.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/ObjectMapping/RKMappingErrors.h b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKMappingErrors.h new file mode 120000 index 00000000..68e39259 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKMappingErrors.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKMappingErrors.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/ObjectMapping/RKMappingOperation.h b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKMappingOperation.h new file mode 120000 index 00000000..6b4d1bf4 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKMappingOperation.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKMappingOperation.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/ObjectMapping/RKMappingOperationDataSource.h b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKMappingOperationDataSource.h new file mode 120000 index 00000000..d463834d --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKMappingOperationDataSource.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKMappingOperationDataSource.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/ObjectMapping/RKMappingResult.h b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKMappingResult.h new file mode 120000 index 00000000..03618d23 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKMappingResult.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKMappingResult.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/ObjectMapping/RKObjectMapping.h b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKObjectMapping.h new file mode 120000 index 00000000..d38ebca8 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKObjectMapping.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKObjectMapping.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/ObjectMapping/RKObjectMappingOperationDataSource.h b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKObjectMappingOperationDataSource.h new file mode 120000 index 00000000..cdac0494 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKObjectMappingOperationDataSource.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKObjectMappingOperationDataSource.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/ObjectMapping/RKObjectUtilities.h b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKObjectUtilities.h new file mode 120000 index 00000000..1ee01f31 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKObjectUtilities.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKObjectUtilities.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/ObjectMapping/RKPropertyInspector.h b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKPropertyInspector.h new file mode 120000 index 00000000..a3e2a9db --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKPropertyInspector.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKPropertyInspector.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/ObjectMapping/RKPropertyMapping.h b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKPropertyMapping.h new file mode 120000 index 00000000..db4bc5ce --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKPropertyMapping.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKPropertyMapping.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/ObjectMapping/RKRelationshipMapping.h b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKRelationshipMapping.h new file mode 120000 index 00000000..32b98479 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/ObjectMapping/RKRelationshipMapping.h @@ -0,0 +1 @@ +../../../../RestKit/Code/ObjectMapping/RKRelationshipMapping.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/RestKit.h b/Pods/Headers/RestKit/RestKit/RestKit.h new file mode 120000 index 00000000..49e183cd --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/RestKit.h @@ -0,0 +1 @@ +../../../RestKit/Code/RestKit.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Search.h b/Pods/Headers/RestKit/RestKit/Search.h new file mode 120000 index 00000000..d1fcf90c --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Search.h @@ -0,0 +1 @@ +../../../RestKit/Code/Search.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Support.h b/Pods/Headers/RestKit/RestKit/Support.h new file mode 120000 index 00000000..06fa6db7 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Support.h @@ -0,0 +1 @@ +../../../RestKit/Code/Support.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Support/RKDictionaryUtilities.h b/Pods/Headers/RestKit/RestKit/Support/RKDictionaryUtilities.h new file mode 120000 index 00000000..f4e01759 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Support/RKDictionaryUtilities.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKDictionaryUtilities.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Support/RKDotNetDateFormatter.h b/Pods/Headers/RestKit/RestKit/Support/RKDotNetDateFormatter.h new file mode 120000 index 00000000..44ee0287 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Support/RKDotNetDateFormatter.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKDotNetDateFormatter.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Support/RKErrors.h b/Pods/Headers/RestKit/RestKit/Support/RKErrors.h new file mode 120000 index 00000000..73192162 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Support/RKErrors.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKErrors.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Support/RKISO8601DateFormatter.h b/Pods/Headers/RestKit/RestKit/Support/RKISO8601DateFormatter.h new file mode 120000 index 00000000..e92d2882 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Support/RKISO8601DateFormatter.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKISO8601DateFormatter.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Support/RKLog.h b/Pods/Headers/RestKit/RestKit/Support/RKLog.h new file mode 120000 index 00000000..6a428cb4 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Support/RKLog.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKLog.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Support/RKMIMETypeSerialization.h b/Pods/Headers/RestKit/RestKit/Support/RKMIMETypeSerialization.h new file mode 120000 index 00000000..b77b8b3d --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Support/RKMIMETypeSerialization.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKMIMETypeSerialization.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Support/RKMIMETypes.h b/Pods/Headers/RestKit/RestKit/Support/RKMIMETypes.h new file mode 120000 index 00000000..71b36c87 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Support/RKMIMETypes.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKMIMETypes.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Support/RKMacros.h b/Pods/Headers/RestKit/RestKit/Support/RKMacros.h new file mode 120000 index 00000000..f1d842d5 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Support/RKMacros.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKMacros.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Support/RKNSJSONSerialization.h b/Pods/Headers/RestKit/RestKit/Support/RKNSJSONSerialization.h new file mode 120000 index 00000000..537580dc --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Support/RKNSJSONSerialization.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKNSJSONSerialization.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Support/RKPathMatcher.h b/Pods/Headers/RestKit/RestKit/Support/RKPathMatcher.h new file mode 120000 index 00000000..1cdb145a --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Support/RKPathMatcher.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKPathMatcher.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Support/RKPathUtilities.h b/Pods/Headers/RestKit/RestKit/Support/RKPathUtilities.h new file mode 120000 index 00000000..2ef3a20c --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Support/RKPathUtilities.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKPathUtilities.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Support/RKSerialization.h b/Pods/Headers/RestKit/RestKit/Support/RKSerialization.h new file mode 120000 index 00000000..b66ce920 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Support/RKSerialization.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKSerialization.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Support/RKURLEncodedSerialization.h b/Pods/Headers/RestKit/RestKit/Support/RKURLEncodedSerialization.h new file mode 120000 index 00000000..ea62327e --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Support/RKURLEncodedSerialization.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/RKURLEncodedSerialization.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Support/lcl_config_components_RK.h b/Pods/Headers/RestKit/RestKit/Support/lcl_config_components_RK.h new file mode 120000 index 00000000..7902c5b1 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Support/lcl_config_components_RK.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/lcl_config_components_RK.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Support/lcl_config_extensions_RK.h b/Pods/Headers/RestKit/RestKit/Support/lcl_config_extensions_RK.h new file mode 120000 index 00000000..eff8ca5b --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Support/lcl_config_extensions_RK.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/lcl_config_extensions_RK.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Support/lcl_config_logger_RK.h b/Pods/Headers/RestKit/RestKit/Support/lcl_config_logger_RK.h new file mode 120000 index 00000000..39088b84 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Support/lcl_config_logger_RK.h @@ -0,0 +1 @@ +../../../../RestKit/Code/Support/lcl_config_logger_RK.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/Testing.h b/Pods/Headers/RestKit/RestKit/Testing.h new file mode 120000 index 00000000..1404cdc1 --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/Testing.h @@ -0,0 +1 @@ +../../../RestKit/Code/Testing.h \ No newline at end of file diff --git a/Pods/Headers/RestKit/RestKit/lcl_RK.h b/Pods/Headers/RestKit/RestKit/lcl_RK.h new file mode 120000 index 00000000..dc1aeffe --- /dev/null +++ b/Pods/Headers/RestKit/RestKit/lcl_RK.h @@ -0,0 +1 @@ +../../../RestKit/Vendor/LibComponentLogging/Core/lcl_RK.h \ No newline at end of file diff --git a/Pods/Headers/SOCKit/SOCKit.h b/Pods/Headers/SOCKit/SOCKit.h new file mode 120000 index 00000000..8d9eb282 --- /dev/null +++ b/Pods/Headers/SOCKit/SOCKit.h @@ -0,0 +1 @@ +../../SOCKit/SOCKit.h \ No newline at end of file diff --git a/Pods/Local Podspecs/RestKit.podspec b/Pods/Local Podspecs/RestKit.podspec new file mode 100644 index 00000000..4ad4e5d1 --- /dev/null +++ b/Pods/Local Podspecs/RestKit.podspec @@ -0,0 +1,66 @@ +Pod::Spec.new do |s| + s.name = 'RestKit' + s.version = '0.20.0dev' + s.summary = 'RestKit is a framework for consuming and modeling RESTful web resources on iOS and OS X.' + s.homepage = 'http://www.restkit.org' + s.author = { 'Blake Watters' => 'blakewatters@gmail.com' } + s.source = { :git => 'https://github.com/RestKit/RestKit.git', :branch => 'development' } + s.license = 'Apache License, Version 2.0' + + # Platform setup + s.requires_arc = true + s.ios.deployment_target = '5.0' + s.osx.deployment_target = '10.7' + + # Exclude optional Search and Testing modules + s.preferred_dependency = 'Core' + + ### Subspecs + + s.subspec 'Core' do |cs| + cs.source_files = 'Code/*.h', 'Vendor/LibComponentLogging/Core', 'Vendor/LibComponentLogging/NSLog' + cs.header_dir = 'RestKit' + + cs.dependency 'RestKit/ObjectMapping' + cs.dependency 'RestKit/Network' + cs.dependency 'RestKit/CoreData' + end + + s.subspec 'ObjectMapping' do |os| + os.header_dir = 'RestKit/ObjectMapping' + os.source_files = 'Code/ObjectMapping' + end + + s.subspec 'Network' do |ns| + ns.header_dir = 'RestKit/Network' + ns.source_files = 'Code/Network' + ns.ios.frameworks = 'CFNetwork', 'Security', 'MobileCoreServices', 'SystemConfiguration' + ns.osx.frameworks = 'CoreServices', 'Security', 'SystemConfiguration' + ns.dependency 'SOCKit' + ns.dependency 'AFNetworking', '1.0' + ns.dependency 'RestKit/ObjectMapping' + ns.dependency 'RestKit/Support' + end + + s.subspec 'CoreData' do |cdos| + cdos.header_dir = 'RestKit/CoreData' + cdos.source_files = 'Code/CoreData' + cdos.frameworks = 'CoreData' + end + + s.subspec 'Testing' do |ts| + ts.header_dir = 'RestKit/Testing' + ts.source_files = 'Code/Testing' + end + + s.subspec 'Search' do |ss| + ss.header_dir = 'RestKit/Search' + ss.source_files = 'Code/Search' + ss.dependency 'RestKit/CoreData' + end + + s.subspec 'Support' do |ss| + ss.header_dir = 'RestKit/Support' + ss.source_files = 'Code/Support' + end +end diff --git a/Pods/Pods-Acknowledgements.markdown b/Pods/Pods-Acknowledgements.markdown new file mode 100644 index 00000000..120dbb15 --- /dev/null +++ b/Pods/Pods-Acknowledgements.markdown @@ -0,0 +1,232 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## AFNetworking + +Copyright (c) 2011 Gowalla (http://gowalla.com/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +## RestKit + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2009-2012 The RestKit Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +Generated by CocoaPods - http://cocoapods.org diff --git a/Pods/Pods-Acknowledgements.plist b/Pods/Pods-Acknowledgements.plist new file mode 100644 index 00000000..134ec5b5 --- /dev/null +++ b/Pods/Pods-Acknowledgements.plist @@ -0,0 +1,266 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2011 Gowalla (http://gowalla.com/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + Title + AFNetworking + Type + PSGroupSpecifier + + + FooterText + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2009-2012 The RestKit Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Title + RestKit + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - http://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Pods/Pods-prefix.pch b/Pods/Pods-prefix.pch new file mode 100644 index 00000000..251d0d1e --- /dev/null +++ b/Pods/Pods-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#endif + +#import +#if __IPHONE_OS_VERSION_MIN_REQUIRED + #import + #import +#else + #import + #import +#endif diff --git a/Pods/Pods-resources.sh b/Pods/Pods-resources.sh new file mode 100755 index 00000000..70fc22f3 --- /dev/null +++ b/Pods/Pods-resources.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +install_resource() +{ + case $1 in + *.storyboard) + echo "ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.xib) + echo "ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *) + echo "cp -R ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + cp -R "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + ;; + esac +} diff --git a/Pods/Pods.xcconfig b/Pods/Pods.xcconfig new file mode 100644 index 00000000..8f480d96 --- /dev/null +++ b/Pods/Pods.xcconfig @@ -0,0 +1,7 @@ +PODS_HEADERS_SEARCH_PATHS = ${PODS_PUBLIC_HEADERS_SEARCH_PATHS} +PODS_ROOT = ${SRCROOT}/Pods +PODS_BUILD_HEADERS_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/AFNetworking" "${PODS_ROOT}/BuildHeaders/RestKit" "${PODS_ROOT}/BuildHeaders/RestKit/RestKit/Network" "${PODS_ROOT}/BuildHeaders/RestKit/RestKit/Support" "${PODS_ROOT}/BuildHeaders/RestKit/RestKit/ObjectMapping" "${PODS_ROOT}/BuildHeaders/RestKit/RestKit" "${PODS_ROOT}/BuildHeaders/RestKit/RestKit/CoreData" "${PODS_ROOT}/BuildHeaders/SOCKit" +OTHER_LDFLAGS = -ObjC -framework CFNetwork -framework CoreData -framework MobileCoreServices -framework Security -framework SystemConfiguration +HEADER_SEARCH_PATHS = ${PODS_HEADERS_SEARCH_PATHS} +ALWAYS_SEARCH_USER_PATHS = YES +PODS_PUBLIC_HEADERS_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/AFNetworking" "${PODS_ROOT}/Headers/RestKit" "${PODS_ROOT}/Headers/RestKit/RestKit/Network" "${PODS_ROOT}/Headers/RestKit/RestKit/Support" "${PODS_ROOT}/Headers/RestKit/RestKit/ObjectMapping" "${PODS_ROOT}/Headers/RestKit/RestKit" "${PODS_ROOT}/Headers/RestKit/RestKit/CoreData" "${PODS_ROOT}/Headers/SOCKit" \ No newline at end of file diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 00000000..d1e520c7 --- /dev/null +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,4713 @@ + + + + + archiveVersion + 1 + classes + + objectVersion + 46 + objects + + 00543297B76C419492F59492 + + fileRef + 782E67B7399146C786CEF667 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 00F86FD8CAD146FE819B9EF3 + + includeInIndex + 1 + isa + PBXFileReference + name + RKMacros.h + path + RestKit/Code/Support/RKMacros.h + sourceTree + SOURCE_ROOT + + 0333F5F4A56944669C62A628 + + children + + 62610FC73D2E46D3B1A0F4FB + FB3A79CDCAE7422784B4353E + CD753EACFD10461BA456ED28 + + isa + PBXGroup + name + Pods + sourceTree + <group> + + 035F106C007141D89DC9B90C + + fileRef + 5647E49AADC14C93971C3F65 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 038C0277BD914C818AE05A88 + + fileRef + F19D230F577146C896378B4F + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 042B500F055C4DD3812CDAE3 + + includeInIndex + 1 + isa + PBXFileReference + name + RKObjectMapping.m + path + RestKit/Code/ObjectMapping/RKObjectMapping.m + sourceTree + SOURCE_ROOT + + 04567FBD6755455AA287087E + + includeInIndex + 1 + isa + PBXFileReference + name + RKEntityByAttributeCache.h + path + RestKit/Code/CoreData/RKEntityByAttributeCache.h + sourceTree + SOURCE_ROOT + + 05049E161BAD42FA818566F6 + + includeInIndex + 1 + isa + PBXFileReference + name + AFNetworkActivityIndicatorManager.m + path + AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.m + sourceTree + SOURCE_ROOT + + 0594F5C02F024B57B5EA2155 + + fileRef + C30E245F86604F8A998DA7AE + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 0605978F6E3540319BD4F679 + + includeInIndex + 1 + isa + PBXFileReference + name + RKDictionaryUtilities.h + path + RestKit/Code/Support/RKDictionaryUtilities.h + sourceTree + SOURCE_ROOT + + 06DB294542744ABB81E41A9D + + includeInIndex + 1 + isa + PBXFileReference + name + RKConnectionMapping.m + path + RestKit/Code/ObjectMapping/RKConnectionMapping.m + sourceTree + SOURCE_ROOT + + 088559B891954C8BA408B864 + + fileRef + 7A7EFE2488A548FE92E70197 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 08C2066C2CC5490D86799278 + + includeInIndex + 1 + isa + PBXFileReference + name + AFHTTPRequestOperation.m + path + AFNetworking/AFNetworking/AFHTTPRequestOperation.m + sourceTree + SOURCE_ROOT + + 09FDAB2D58C44826848DE584 + + includeInIndex + 1 + isa + PBXFileReference + name + RKRelationshipConnectionOperation.h + path + RestKit/Code/CoreData/RKRelationshipConnectionOperation.h + sourceTree + SOURCE_ROOT + + 0C730D053A4E4732B256C3C5 + + fileRef + AD29C3AE7F2F42468C1893E4 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 0D2F943108C949918A791597 + + includeInIndex + 1 + isa + PBXFileReference + name + RKMapperOperation.h + path + RestKit/Code/ObjectMapping/RKMapperOperation.h + sourceTree + SOURCE_ROOT + + 0D5BEFB9B9DB471887451D46 + + includeInIndex + 1 + isa + PBXFileReference + name + RKRouter.m + path + RestKit/Code/Network/RKRouter.m + sourceTree + SOURCE_ROOT + + 0F73FF9979B848FDA477A969 + + includeInIndex + 1 + isa + PBXFileReference + name + RKRouteSet.h + path + RestKit/Code/Network/RKRouteSet.h + sourceTree + SOURCE_ROOT + + 107BBF1DD7B7426D9F7D52F3 + + includeInIndex + 1 + isa + PBXFileReference + name + RKObjectParameterization.h + path + RestKit/Code/Network/RKObjectParameterization.h + sourceTree + SOURCE_ROOT + + 123794A07886452897E742F7 + + fileRef + C7F79963D26146508EBA00F7 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 128DADFB2F454EBCA8258229 + + fileRef + 217188D2AE4644978FB3B0F2 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 148CBFCEC8784977AE107665 + + includeInIndex + 1 + isa + PBXFileReference + name + Pods-prefix.pch + path + Pods-prefix.pch + sourceTree + SOURCE_ROOT + + 14B21406BD6E41D0BCE9FC41 + + includeInIndex + 1 + isa + PBXFileReference + name + RKErrorMessage.m + path + RestKit/Code/ObjectMapping/RKErrorMessage.m + sourceTree + SOURCE_ROOT + + 14B6C155062B443ABBA124FB + + fileRef + E2B7C48DCC35428DBDB3CD3F + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 1541E15DE18D4351BDE65AB6 + + fileRef + E7F6A44B58904877826174DE + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 15494542F9FB479FB39AA49B + + fileRef + F095892ADA18460F9B3FA3DE + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 156E0F348C4E496A81DAAEBA + + includeInIndex + 1 + isa + PBXFileReference + name + RKSerialization.h + path + RestKit/Code/Support/RKSerialization.h + sourceTree + SOURCE_ROOT + + 156F7D3AC15940CDB8410518 + + includeInIndex + 1 + isa + PBXFileReference + name + RKEntityMapping.h + path + RestKit/Code/CoreData/RKEntityMapping.h + sourceTree + SOURCE_ROOT + + 164025F70CEA464397CF79EB + + includeInIndex + 1 + isa + PBXFileReference + name + NSEntityDescription+RKAdditions.m + path + RestKit/Code/CoreData/NSEntityDescription+RKAdditions.m + sourceTree + SOURCE_ROOT + + 17EDFA3A4E69420C8367E1D3 + + fileRef + 678AA4AA5E794CA58553B520 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 19937F19CB3142E9A8CBB5DA + + fileRef + B4C42F6EB19B445B920DD774 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 1A5CA8B14715459BABDDAAED + + fileRef + B4129E8990A844F5B918A00C + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 1B3A45D67A0646C3BEB07249 + + includeInIndex + 1 + isa + PBXFileReference + name + RKPathUtilities.h + path + RestKit/Code/Support/RKPathUtilities.h + sourceTree + SOURCE_ROOT + + 1BEEF67C164246BE81E1D36E + + fileRef + 6D084AFFBE1C4D1E9EC0B031 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 1C4BA40FFECF43408F17D9A7 + + includeInIndex + 1 + isa + PBXFileReference + name + ObjectMapping.h + path + RestKit/Code/ObjectMapping.h + sourceTree + SOURCE_ROOT + + 1D9D8E7EF22942BCB4581246 + + fileRef + 7A0EA8E066E74678B6BD36C3 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 1DC3328EEF074ABF841E3A59 + + fileRef + C31F6D9D2ACF438F82D3C90C + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 1E19BA63307E4822934B8F96 + + fileRef + 40016BFCC96F4EED86F5D146 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 1F5DBD6F159943DFA385C8A4 + + fileRef + B0B38C8B338F43A981CE7E68 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 202CD71297404B58A26CEA60 + + buildActionMask + 2147483647 + files + + 758E06D8C2B74952B9D21E33 + 5F5A2E95C68748B586A5010A + 1A5CA8B14715459BABDDAAED + 977B7DB114974233875E8CEC + C64F63A02EF449EA8F8F5A6C + 15494542F9FB479FB39AA49B + 1BEEF67C164246BE81E1D36E + CA4B51061A6644B794C01828 + 5886B224FEC94C2880F0C8E4 + 9E5A2185467341C3B12DCB27 + 5E2C60E13BE3470F8126FB4D + F632F8C24ECD4983ADA3E060 + 3CF9574528F54EFB8BE84426 + 3D73E6FE7261409492F7F8B5 + D82365222D664E929A8D541B + 46E82B047C0E40EB90146394 + 5C6976DA72EB4A4492CF0AF1 + 59DD153786D04E76AAECB53C + DE24563623EF458F8C447750 + 17EDFA3A4E69420C8367E1D3 + EE8A2EE13C9846A0BB8338D3 + 9FBE246A845D42A0844096D4 + 5F6D09D4CA1E4A17910648E8 + 75EA039BCA45440AA1634E1F + C1F9275D371D420D92D6FC92 + B2568EEA5A4F4859991B7CF6 + 642EF119C2DE4A9A8653167F + 590282D737214463B319F58E + 7E40AA31659445AFAEBEE83F + 816486D2FFC74E19854DF828 + B20EBBA2792B494BB523F68B + B2E8201823E2445E91D0D173 + 0C730D053A4E4732B256C3C5 + F3FF3685AE064778917A51E2 + 778212723B074CDE94BF5847 + 67E0190E9BAF44EDB4E0B540 + 91BE10D03BAF4DF08F301623 + A6FC65EF8E84480997C7DEF6 + 19937F19CB3142E9A8CBB5DA + AE4D1885610B4AC4BFBA2B71 + 439629A3D5464C48B78DCC94 + 75AA60695810415A8F04C35A + E850D83F28B440E7971278B5 + 6742F3B763BA4EF2A2FBB46D + C077BD38B82A4ACC95A6D075 + C4FC012C39684AE69E277C29 + A08594AA4F8D46CFAE88165B + 6D051F23C115497FAE32FE1C + 9978CBFC0E004A7CA8A21B02 + 91CDDF6ADE184A838C8F4A9E + 93F11627ACC2465AA9B9E401 + B28F28E4F90C4E78A924933F + 366BDE0BAB6F445AA58D82C2 + 1541E15DE18D4351BDE65AB6 + 92D9E046309B48179E8AA9C7 + D2052D1353C74763966B3C11 + 925162A624B740B4B855A5D3 + 37AA97CBF67E4B0DA6AC3C50 + 035F106C007141D89DC9B90C + 92C12CC175C24EFEABCE848C + 8C67C68C92CC4F67BD66C4C5 + 49381B097E1D4251915DA90C + 55ADE8997A3C48FF8CB963B8 + 038C0277BD914C818AE05A88 + E8C01005F4304717A1AF70FB + 8A9064294EA8412FB1B7506A + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 214654E49DBD45F2BDD03F6F + + fileRef + 0D2F943108C949918A791597 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 217188D2AE4644978FB3B0F2 + + includeInIndex + 1 + isa + PBXFileReference + name + RKMappingOperationDataSource.h + path + RestKit/Code/ObjectMapping/RKMappingOperationDataSource.h + sourceTree + SOURCE_ROOT + + 236E5F49E4374687A0210B46 + + includeInIndex + 1 + isa + PBXFileReference + name + PodsDummy_Pods.m + path + PodsDummy_Pods.m + sourceTree + SOURCE_ROOT + + 2481EE93E584423D8C0D0CE3 + + fileRef + 6D4BCEEFBA184914AA48B4F2 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 248BA9681DAA4C048B6887C6 + + children + + 78A492F4B7DB43D5B1663306 + + isa + PBXGroup + name + Frameworks + sourceTree + <group> + + 24F6366A15B547BCA5D844A7 + + includeInIndex + 1 + isa + PBXFileReference + name + RKFetchRequestManagedObjectCache.h + path + RestKit/Code/CoreData/RKFetchRequestManagedObjectCache.h + sourceTree + SOURCE_ROOT + + 25122F8CAFAA45FABB153833 + + fileRef + 3F34231580B74150B2A950B3 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 2698397327924137BCAAD3F6 + + includeInIndex + 1 + isa + PBXFileReference + name + RKManagedObjectMappingOperationDataSource.h + path + RestKit/Code/CoreData/RKManagedObjectMappingOperationDataSource.h + sourceTree + SOURCE_ROOT + + 282E429B66BC46BA8D6AF010 + + children + + 500E8CB1CC024E6BAB943B2F + + isa + PBXGroup + name + Products + sourceTree + <group> + + 29C45E4C76BD48569549489B + + includeInIndex + 1 + isa + PBXFileReference + name + RKRequestOperationSubclass.h + path + RestKit/Code/Network/RKRequestOperationSubclass.h + sourceTree + SOURCE_ROOT + + 29CF7903866745F4A7846C5F + + includeInIndex + 1 + isa + PBXFileReference + name + NSManagedObjectContext+RKAdditions.m + path + RestKit/Code/CoreData/NSManagedObjectContext+RKAdditions.m + sourceTree + SOURCE_ROOT + + 2A63827BD4264945839F9DB1 + + includeInIndex + 1 + isa + PBXFileReference + name + RKMappingOperation.h + path + RestKit/Code/ObjectMapping/RKMappingOperation.h + sourceTree + SOURCE_ROOT + + 2AAC9C3E41BE42C2BA053679 + + includeInIndex + 1 + isa + PBXFileReference + name + RestKit.h + path + RestKit/Code/RestKit.h + sourceTree + SOURCE_ROOT + + 2B3AB9F38FDA4D918D227FED + + includeInIndex + 1 + isa + PBXFileReference + name + RKEntityMapping.m + path + RestKit/Code/CoreData/RKEntityMapping.m + sourceTree + SOURCE_ROOT + + 2D371B7BA7944126B8850FD0 + + fileRef + EEB12DC4678042099DC79CDF + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 2DE12FAB0B0A4BCF8958C784 + + includeInIndex + 1 + isa + PBXFileReference + name + UIImageView+AFNetworking.m + path + AFNetworking/AFNetworking/UIImageView+AFNetworking.m + sourceTree + SOURCE_ROOT + + 2E2945D4ED304E1E990746EA + + fileRef + 04567FBD6755455AA287087E + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 2F3345BA86414737A5FF0BA9 + + includeInIndex + 1 + isa + PBXFileReference + name + lcl_RK.h + path + RestKit/Vendor/LibComponentLogging/Core/lcl_RK.h + sourceTree + SOURCE_ROOT + + 301FBD4CD88049989B53E8D8 + + includeInIndex + 1 + isa + PBXFileReference + name + AFJSONRequestOperation.m + path + AFNetworking/AFNetworking/AFJSONRequestOperation.m + sourceTree + SOURCE_ROOT + + 31E981988FC546B4949CC7A6 + + includeInIndex + 1 + isa + PBXFileReference + name + RKManagedObjectStore.h + path + RestKit/Code/CoreData/RKManagedObjectStore.h + sourceTree + SOURCE_ROOT + + 32751115E2E14A3F8C26442F + + includeInIndex + 1 + isa + PBXFileReference + name + RKRouter.h + path + RestKit/Code/Network/RKRouter.h + sourceTree + SOURCE_ROOT + + 337FBFD12AEC48AD8AA32864 + + includeInIndex + 1 + isa + PBXFileReference + name + RKErrorMessage.h + path + RestKit/Code/ObjectMapping/RKErrorMessage.h + sourceTree + SOURCE_ROOT + + 341576CA82ED4B20A541D932 + + includeInIndex + 1 + isa + PBXFileReference + name + RKNSJSONSerialization.h + path + RestKit/Code/Support/RKNSJSONSerialization.h + sourceTree + SOURCE_ROOT + + 34350C9C221C416BB578C404 + + includeInIndex + 1 + isa + PBXFileReference + name + RKObjectManager.m + path + RestKit/Code/Network/RKObjectManager.m + sourceTree + SOURCE_ROOT + + 3578A0E869A74380B28A5A94 + + includeInIndex + 1 + isa + PBXFileReference + name + RKManagedObjectImporter.h + path + RestKit/Code/CoreData/RKManagedObjectImporter.h + sourceTree + SOURCE_ROOT + + 366BDE0BAB6F445AA58D82C2 + + fileRef + A567CA14DF0F44F7A5E30331 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 36DABDC5A0B34A55A401D777 + + includeInIndex + 1 + isa + PBXFileReference + name + Support.h + path + RestKit/Code/Support.h + sourceTree + SOURCE_ROOT + + 37AA97CBF67E4B0DA6AC3C50 + + fileRef + 3BA072156C6942D084784606 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 399E6239FBEF49A7AB08739D + + includeInIndex + 1 + isa + PBXFileReference + name + Pods-resources.sh + path + Pods-resources.sh + sourceTree + SOURCE_ROOT + + 39C050D4F9BE4C80A45047C5 + + includeInIndex + 1 + isa + PBXFileReference + name + RKFetchRequestManagedObjectCache.m + path + RestKit/Code/CoreData/RKFetchRequestManagedObjectCache.m + sourceTree + SOURCE_ROOT + + 3BA072156C6942D084784606 + + includeInIndex + 1 + isa + PBXFileReference + name + RKObjectRequestOperation.m + path + RestKit/Code/Network/RKObjectRequestOperation.m + sourceTree + SOURCE_ROOT + + 3CF9574528F54EFB8BE84426 + + fileRef + A58C53679C6F4F04B3981969 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 3D67CBB15C1843E0BEA34D6B + + includeInIndex + 1 + isa + PBXFileReference + name + RKDynamicMapping.h + path + RestKit/Code/ObjectMapping/RKDynamicMapping.h + sourceTree + SOURCE_ROOT + + 3D73E6FE7261409492F7F8B5 + + fileRef + 6BCA79C401AA4240AB50CFE1 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 3F34231580B74150B2A950B3 + + includeInIndex + 1 + isa + PBXFileReference + name + Testing.h + path + RestKit/Code/Testing.h + sourceTree + SOURCE_ROOT + + 3F84DEB693A941298BDB663A + + includeInIndex + 1 + isa + PBXFileReference + name + RKMapping.h + path + RestKit/Code/ObjectMapping/RKMapping.h + sourceTree + SOURCE_ROOT + + 40016BFCC96F4EED86F5D146 + + includeInIndex + 1 + isa + PBXFileReference + name + RKPropertyInspector.h + path + RestKit/Code/ObjectMapping/RKPropertyInspector.h + sourceTree + SOURCE_ROOT + + 439629A3D5464C48B78DCC94 + + fileRef + 14B21406BD6E41D0BCE9FC41 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 44B9EC6148434F6C9313CB3E + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods.xcconfig + path + Pods.xcconfig + sourceTree + SOURCE_ROOT + + 46CA438C8DEA4A95B9345AE2 + + fileRef + 3578A0E869A74380B28A5A94 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 46E82B047C0E40EB90146394 + + fileRef + 39C050D4F9BE4C80A45047C5 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 47252737B85A4DB381B7ADEC + + includeInIndex + 1 + isa + PBXFileReference + name + RKURLEncodedSerialization.h + path + RestKit/Code/Support/RKURLEncodedSerialization.h + sourceTree + SOURCE_ROOT + + 47789C2B6F164FEBA045EADE + + fileRef + B7E27AD03DDC44EA8B91EF60 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 47F7DACF4AA64C4CA011A0A5 + + fileRef + 2F3345BA86414737A5FF0BA9 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 49381B097E1D4251915DA90C + + fileRef + 7077E367251044F8A038AA10 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 4964C446A2C34140B3F97F09 + + includeInIndex + 1 + isa + PBXFileReference + name + LCLNSLog_RK.m + path + RestKit/Vendor/LibComponentLogging/NSLog/LCLNSLog_RK.m + sourceTree + SOURCE_ROOT + + 4AA288E46D194EE8BF7F035B + + fileRef + 1C4BA40FFECF43408F17D9A7 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 4B7269AA0C604B678E9768EC + + includeInIndex + 1 + isa + PBXFileReference + name + AFNetworking.h + path + AFNetworking/AFNetworking/AFNetworking.h + sourceTree + SOURCE_ROOT + + 4D0A2342CC0B470A83879409 + + includeInIndex + 1 + isa + PBXFileReference + name + RKLog.m + path + RestKit/Code/Support/RKLog.m + sourceTree + SOURCE_ROOT + + 4E80400664CC49EBA9F5B6AA + + fileRef + 78A492F4B7DB43D5B1663306 + isa + PBXBuildFile + + 500E8CB1CC024E6BAB943B2F + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + name + libPods.a + path + libPods.a + sourceTree + BUILT_PRODUCTS_DIR + + 503E76AA7AD14D4A821BC4FF + + includeInIndex + 1 + isa + PBXFileReference + name + AFHTTPClient.h + path + AFNetworking/AFNetworking/AFHTTPClient.h + sourceTree + SOURCE_ROOT + + 5082FBD0C9BA4EBD887A87E3 + + fileRef + 503E76AA7AD14D4A821BC4FF + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 5317D26B0A334BC397D0B21F + + fileRef + 5C94CCED1AB346D081DDF6D1 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 537C894FB39E4DEA85E5E8F7 + + fileRef + D49B6587E3864689AAB7A001 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 556309C8B2EC4AA082523962 + + buildSettings + + isa + XCBuildConfiguration + name + Debug + + 55ADE8997A3C48FF8CB963B8 + + fileRef + 0D5BEFB9B9DB471887451D46 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 5647E49AADC14C93971C3F65 + + includeInIndex + 1 + isa + PBXFileReference + name + RKRequestDescriptor.m + path + RestKit/Code/Network/RKRequestDescriptor.m + sourceTree + SOURCE_ROOT + + 5886B224FEC94C2880F0C8E4 + + fileRef + 2DE12FAB0B0A4BCF8958C784 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 590282D737214463B319F58E + + fileRef + 4D0A2342CC0B470A83879409 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 59DD153786D04E76AAECB53C + + fileRef + F12F8495ADC64B63B0A04A0F + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 5A266BB4B7154F39B68EC6DE + + includeInIndex + 1 + isa + PBXFileReference + name + RKHTTPUtilities.m + path + RestKit/Code/ObjectMapping/RKHTTPUtilities.m + sourceTree + SOURCE_ROOT + + 5A3C090585D34FA98D60F331 + + baseConfigurationReference + 44B9EC6148434F6C9313CB3E + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + ARCHS + $(ARCHS_STANDARD_32_BIT) + COPY_PHASE_STRIP + YES + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Pods-prefix.pch + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + GCC_WARN_INHIBIT_ALL_WARNINGS + NO + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 5.0 + OTHER_LDFLAGS + + PODS_HEADERS_SEARCH_PATHS + ${PODS_BUILD_HEADERS_SEARCH_PATHS} + PODS_ROOT + ${SRCROOT} + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + VALIDATE_PRODUCT + YES + + isa + XCBuildConfiguration + name + Release + + 5A3E0F450D0E4B0FA42D0905 + + fileRef + 1B3A45D67A0646C3BEB07249 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 5A741CEBA22049FC98951004 + + fileRef + A178CA33853F4786958F78DB + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 5B5A3F4E8F19462A92C0E7C7 + + includeInIndex + 1 + isa + PBXFileReference + name + RKDotNetDateFormatter.m + path + RestKit/Code/Support/RKDotNetDateFormatter.m + sourceTree + SOURCE_ROOT + + 5C6976DA72EB4A4492CF0AF1 + + fileRef + C7AC51080F7A46C9BF2EAD5B + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 5C94CCED1AB346D081DDF6D1 + + includeInIndex + 1 + isa + PBXFileReference + name + RKPropertyInspector+CoreData.h + path + RestKit/Code/CoreData/RKPropertyInspector+CoreData.h + sourceTree + SOURCE_ROOT + + 5C967B113A0049109F0964B8 + + includeInIndex + 1 + isa + PBXFileReference + name + RKLog.h + path + RestKit/Code/Support/RKLog.h + sourceTree + SOURCE_ROOT + + 5DA01298D3174D1AB61A92B7 + + includeInIndex + 1 + isa + PBXFileReference + name + RKObjectManager.h + path + RestKit/Code/Network/RKObjectManager.h + sourceTree + SOURCE_ROOT + + 5E2C60E13BE3470F8126FB4D + + fileRef + 8EAA728E0E4A4CB8A7AAB2F3 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 5F22DADE4A0D4FDF98A1251B + + includeInIndex + 1 + isa + PBXFileReference + name + RKURLEncodedSerialization.m + path + RestKit/Code/Support/RKURLEncodedSerialization.m + sourceTree + SOURCE_ROOT + + 5F33CB92D1574D878151FCF4 + + includeInIndex + 1 + isa + PBXFileReference + name + RKInMemoryManagedObjectCache.h + path + RestKit/Code/CoreData/RKInMemoryManagedObjectCache.h + sourceTree + SOURCE_ROOT + + 5F5A2E95C68748B586A5010A + + fileRef + 08C2066C2CC5490D86799278 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 5F6D09D4CA1E4A17910648E8 + + fileRef + B25F399065634364AD5D5137 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 60F4A06F72394CC1BCBCF1B9 + + fileRef + E721E506FEE44B12A955A267 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 6119BC6A81F34014B5B11DF8 + + includeInIndex + 1 + isa + PBXFileReference + name + RKObjectMappingOperationDataSource.h + path + RestKit/Code/ObjectMapping/RKObjectMappingOperationDataSource.h + sourceTree + SOURCE_ROOT + + 62610FC73D2E46D3B1A0F4FB + + children + + 503E76AA7AD14D4A821BC4FF + BCB090B4C7004219856A717D + 6D4BCEEFBA184914AA48B4F2 + 78AD951F6C03425C80FBBFD3 + C1A140C12B1D499D8E5D74D3 + 4B7269AA0C604B678E9768EC + D7B862ACBB74463FB15C04B9 + 997764FFB94341FC9FD98034 + C30E245F86604F8A998DA7AE + 9D887D0D6897464A8932968B + 8670BB77346C43B1A471812D + 08C2066C2CC5490D86799278 + B4129E8990A844F5B918A00C + 301FBD4CD88049989B53E8D8 + 05049E161BAD42FA818566F6 + F095892ADA18460F9B3FA3DE + 6D084AFFBE1C4D1E9EC0B031 + 6C4577C7F3FB42048783F2A5 + 2DE12FAB0B0A4BCF8958C784 + + isa + PBXGroup + name + AFNetworking + sourceTree + <group> + + 62CE91DC36F24886BEAC1D00 + + fileRef + 0605978F6E3540319BD4F679 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 642EF119C2DE4A9A8653167F + + fileRef + 8A07C12B42D84DD9ABE286EF + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 66BD6FAFCA7B45D0BF3F401C + + fileRef + 6B090F9EF3934A589C7D6361 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 6742F3B763BA4EF2A2FBB46D + + fileRef + CEB8E16F2A1A4EB194082795 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 678AA4AA5E794CA58553B520 + + includeInIndex + 1 + isa + PBXFileReference + name + RKManagedObjectStore.m + path + RestKit/Code/CoreData/RKManagedObjectStore.m + sourceTree + SOURCE_ROOT + + 67E0190E9BAF44EDB4E0B540 + + fileRef + 4964C446A2C34140B3F97F09 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 6AA4D4E4618042D6946958BB + + buildConfigurations + + EEF5ECA3167143CAB9A2F65C + 5A3C090585D34FA98D60F331 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 6B090F9EF3934A589C7D6361 + + includeInIndex + 1 + isa + PBXFileReference + name + lcl_config_extensions_RK.h + path + RestKit/Code/Support/lcl_config_extensions_RK.h + sourceTree + SOURCE_ROOT + + 6BCA79C401AA4240AB50CFE1 + + includeInIndex + 1 + isa + PBXFileReference + name + RKEntityCache.m + path + RestKit/Code/CoreData/RKEntityCache.m + sourceTree + SOURCE_ROOT + + 6C231D3DA397427CBE094B4C + + fileRef + 156E0F348C4E496A81DAAEBA + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 6C4577C7F3FB42048783F2A5 + + includeInIndex + 1 + isa + PBXFileReference + name + AFXMLRequestOperation.m + path + AFNetworking/AFNetworking/AFXMLRequestOperation.m + sourceTree + SOURCE_ROOT + + 6D051F23C115497FAE32FE1C + + fileRef + 6F4F8F97BB3E472AB58B1919 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 6D084AFFBE1C4D1E9EC0B031 + + includeInIndex + 1 + isa + PBXFileReference + name + AFURLConnectionOperation.m + path + AFNetworking/AFNetworking/AFURLConnectionOperation.m + sourceTree + SOURCE_ROOT + + 6D4BCEEFBA184914AA48B4F2 + + includeInIndex + 1 + isa + PBXFileReference + name + AFImageRequestOperation.h + path + AFNetworking/AFNetworking/AFImageRequestOperation.h + sourceTree + SOURCE_ROOT + + 6EC2B75F8DD743CB9B1BE72B + + fileRef + 337FBFD12AEC48AD8AA32864 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 6F4F8F97BB3E472AB58B1919 + + includeInIndex + 1 + isa + PBXFileReference + name + RKObjectMappingOperationDataSource.m + path + RestKit/Code/ObjectMapping/RKObjectMappingOperationDataSource.m + sourceTree + SOURCE_ROOT + + 7058C9D27F7E48B9AD4487B1 + + includeInIndex + 1 + isa + PBXFileReference + name + Search.h + path + RestKit/Code/Search.h + sourceTree + SOURCE_ROOT + + 7077E367251044F8A038AA10 + + includeInIndex + 1 + isa + PBXFileReference + name + RKRoute.m + path + RestKit/Code/Network/RKRoute.m + sourceTree + SOURCE_ROOT + + 7129178D0F5345808D9DB54A + + fileRef + D5840DB85CD64478A3659E57 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 71FF07CD5F5C4E1B85208126 + + includeInIndex + 1 + isa + PBXFileReference + name + RKPropertyInspector.m + path + RestKit/Code/ObjectMapping/RKPropertyInspector.m + sourceTree + SOURCE_ROOT + + 72859B9610C848EA811E9573 + + includeInIndex + 1 + isa + PBXFileReference + name + RKMappingOperation.m + path + RestKit/Code/ObjectMapping/RKMappingOperation.m + sourceTree + SOURCE_ROOT + + 74CF11DA0808438DA3A7008E + + includeInIndex + 1 + isa + PBXFileReference + name + RKPathMatcher.m + path + RestKit/Code/Support/RKPathMatcher.m + sourceTree + SOURCE_ROOT + + 758E06D8C2B74952B9D21E33 + + fileRef + 8670BB77346C43B1A471812D + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 75AA60695810415A8F04C35A + + fileRef + 5A266BB4B7154F39B68EC6DE + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 75EA039BCA45440AA1634E1F + + fileRef + FD719952DFFD456BBA215418 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 778212723B074CDE94BF5847 + + fileRef + 935C6B3706644157B3E5678A + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 782E67B7399146C786CEF667 + + includeInIndex + 1 + isa + PBXFileReference + name + RKEntityCache.h + path + RestKit/Code/CoreData/RKEntityCache.h + sourceTree + SOURCE_ROOT + + 78A492F4B7DB43D5B1663306 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + Foundation.framework + path + System/Library/Frameworks/Foundation.framework + sourceTree + SDKROOT + + 78AD951F6C03425C80FBBFD3 + + includeInIndex + 1 + isa + PBXFileReference + name + AFJSONRequestOperation.h + path + AFNetworking/AFNetworking/AFJSONRequestOperation.h + sourceTree + SOURCE_ROOT + + 7A0EA8E066E74678B6BD36C3 + + includeInIndex + 1 + isa + PBXFileReference + name + RKConnectionMapping.h + path + RestKit/Code/ObjectMapping/RKConnectionMapping.h + sourceTree + SOURCE_ROOT + + 7A7EFE2488A548FE92E70197 + + includeInIndex + 1 + isa + PBXFileReference + name + RKDotNetDateFormatter.h + path + RestKit/Code/Support/RKDotNetDateFormatter.h + sourceTree + SOURCE_ROOT + + 7C2C0C0422254E67AA9D2B56 + + includeInIndex + 1 + isa + PBXFileReference + name + RKManagedObjectCaching.h + path + RestKit/Code/CoreData/RKManagedObjectCaching.h + sourceTree + SOURCE_ROOT + + 7C878329A7BC42C5A7AEE6B6 + + fileRef + 5F33CB92D1574D878151FCF4 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 7E40AA31659445AFAEBEE83F + + fileRef + B3F3F5EA3E124DF5B6B67F72 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 7F93708FE1494BE8B2EDC1DC + + includeInIndex + 1 + isa + PBXFileReference + name + RKResponseMapperOperation.h + path + RestKit/Code/Network/RKResponseMapperOperation.h + sourceTree + SOURCE_ROOT + + 8104A8C562A1451EA9E66E69 + + includeInIndex + 1 + isa + PBXFileReference + name + RKObjectPaginator.m + path + RestKit/Code/Network/RKObjectPaginator.m + sourceTree + SOURCE_ROOT + + 816486D2FFC74E19854DF828 + + fileRef + 8FA73ECBA5BD45A2B296B95A + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 82639859494341C295BF8C6C + + fileRef + 0F73FF9979B848FDA477A969 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 8300DDC597904F78A77831BB + + fileRef + A9B2B2A049E34421A68ED6AB + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 832E3B2BAF204A17A5C5CD7C + + fileRef + 24F6366A15B547BCA5D844A7 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 839D74AA7B974748BFE17348 + + fileRef + 2AAC9C3E41BE42C2BA053679 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 854ED00113764BF5B51C212D + + includeInIndex + 1 + isa + PBXFileReference + name + RKDynamicMappingMatcher.h + path + RestKit/Code/ObjectMapping/RKDynamicMappingMatcher.h + sourceTree + SOURCE_ROOT + + 8670BB77346C43B1A471812D + + includeInIndex + 1 + isa + PBXFileReference + name + AFHTTPClient.m + path + AFNetworking/AFNetworking/AFHTTPClient.m + sourceTree + SOURCE_ROOT + + 86E089AE057A4211B785FAF7 + + children + + C1DBA756E0614EC0BE3A507B + BA24BB1D5A5D42238788BF13 + 5DA01298D3174D1AB61A92B7 + 996A4A2588074ED98E868D0F + 107BBF1DD7B7426D9F7D52F3 + CE48DA61082E461C8F2C1B30 + E2B7C48DCC35428DBDB3CD3F + 29C45E4C76BD48569549489B + A0E0AE5E133245CEB99F04D1 + 7F93708FE1494BE8B2EDC1DC + CBB31E1EE2E34C53AA1D6C2B + 32751115E2E14A3F8C26442F + 0F73FF9979B848FDA477A969 + A567CA14DF0F44F7A5E30331 + E7F6A44B58904877826174DE + 34350C9C221C416BB578C404 + 8104A8C562A1451EA9E66E69 + 98F06EBEF68B451BA713327E + 3BA072156C6942D084784606 + 5647E49AADC14C93971C3F65 + D032A68C674D47538F49A61C + D296E233C07A4594A4E56568 + 7077E367251044F8A038AA10 + 0D5BEFB9B9DB471887451D46 + F19D230F577146C896378B4F + + isa + PBXGroup + name + Network + sourceTree + <group> + + 88DBFF7579F84132AC912E1A + + fileRef + 00F86FD8CAD146FE819B9EF3 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 8996ACC5675549D78B1DA8B8 + + buildSettings + + isa + XCBuildConfiguration + name + Release + + 8A07C12B42D84DD9ABE286EF + + includeInIndex + 1 + isa + PBXFileReference + name + RKISO8601DateFormatter.m + path + RestKit/Code/Support/RKISO8601DateFormatter.m + sourceTree + SOURCE_ROOT + + 8A9064294EA8412FB1B7506A + + fileRef + 236E5F49E4374687A0210B46 + isa + PBXBuildFile + + 8C5D0836A10A41F1B9231A22 + + fileRef + 3D67CBB15C1843E0BEA34D6B + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 8C67C68C92CC4F67BD66C4C5 + + fileRef + D296E233C07A4594A4E56568 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 8CC3B17359794E95BA04B06B + + fileRef + D4B9ADB1A2154687AE3BD242 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 8EAA728E0E4A4CB8A7AAB2F3 + + includeInIndex + 1 + isa + PBXFileReference + name + NSManagedObject+RKAdditions.m + path + RestKit/Code/CoreData/NSManagedObject+RKAdditions.m + sourceTree + SOURCE_ROOT + + 8EE9D9B0527649E8B058980C + + children + + 399E6239FBEF49A7AB08739D + 148CBFCEC8784977AE107665 + 44B9EC6148434F6C9313CB3E + + isa + PBXGroup + name + Pods + sourceTree + <group> + + 8FA73ECBA5BD45A2B296B95A + + includeInIndex + 1 + isa + PBXFileReference + name + RKMIMETypeSerialization.m + path + RestKit/Code/Support/RKMIMETypeSerialization.m + sourceTree + SOURCE_ROOT + + 8FEC9228D95A4BA0A5A1F8F1 + + fileRef + 5C967B113A0049109F0964B8 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 906C395769AF4561AA1739A4 + + includeInIndex + 1 + isa + PBXFileReference + name + RKObjectMapping.h + path + RestKit/Code/ObjectMapping/RKObjectMapping.h + sourceTree + SOURCE_ROOT + + 9140D5C824C1412DAF9889FE + + attributes + + LastUpgradeCheck + 0450 + + buildConfigurationList + C280A2B0A05545EE88A0886F + compatibilityVersion + Xcode 3.2 + developmentRegion + English + hasScannedForEncodings + 0 + isa + PBXProject + knownRegions + + en + + mainGroup + B506C2957CDE4D60ABA28DEF + productRefGroup + 282E429B66BC46BA8D6AF010 + projectDirPath + + projectRoot + + targets + + F57178BC18574AA6B1069129 + + + 91BE10D03BAF4DF08F301623 + + fileRef + EDFA4581920B4DA2BFAEE247 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 91CDDF6ADE184A838C8F4A9E + + fileRef + 71FF07CD5F5C4E1B85208126 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 925162A624B740B4B855A5D3 + + fileRef + 98F06EBEF68B451BA713327E + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 925E7162DFA9466CBE49049C + + includeInIndex + 1 + isa + PBXFileReference + name + RKMapperOperation_Private.h + path + RestKit/Code/ObjectMapping/RKMapperOperation_Private.h + sourceTree + SOURCE_ROOT + + 92C12CC175C24EFEABCE848C + + fileRef + D032A68C674D47538F49A61C + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 92D9E046309B48179E8AA9C7 + + fileRef + 34350C9C221C416BB578C404 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 92EAF780AC1542AFB7F17C67 + + fileRef + 854ED00113764BF5B51C212D + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 935C6B3706644157B3E5678A + + includeInIndex + 1 + isa + PBXFileReference + name + lcl_RK.m + path + RestKit/Vendor/LibComponentLogging/Core/lcl_RK.m + sourceTree + SOURCE_ROOT + + 93F11627ACC2465AA9B9E401 + + fileRef + A2DFB3702DA2490DA4EC315C + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 94F194944C36490CA5228BEF + + includeInIndex + 1 + isa + PBXFileReference + name + RKRelationshipMapping.m + path + RestKit/Code/ObjectMapping/RKRelationshipMapping.m + sourceTree + SOURCE_ROOT + + 94F9127A50614EF1A9F0D0DD + + includeInIndex + 1 + isa + PBXFileReference + name + RKManagedObjectThreadSafeInvocation.m + path + RestKit/Code/CoreData/RKManagedObjectThreadSafeInvocation.m + sourceTree + SOURCE_ROOT + + 977B7DB114974233875E8CEC + + fileRef + 301FBD4CD88049989B53E8D8 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 97DC8C9AA0484A6C8D7511ED + + fileRef + 78AD951F6C03425C80FBBFD3 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 98F06EBEF68B451BA713327E + + includeInIndex + 1 + isa + PBXFileReference + name + RKObjectParameterization.m + path + RestKit/Code/Network/RKObjectParameterization.m + sourceTree + SOURCE_ROOT + + 996A4A2588074ED98E868D0F + + includeInIndex + 1 + isa + PBXFileReference + name + RKObjectPaginator.h + path + RestKit/Code/Network/RKObjectPaginator.h + sourceTree + SOURCE_ROOT + + 997764FFB94341FC9FD98034 + + includeInIndex + 1 + isa + PBXFileReference + name + AFURLConnectionOperation.h + path + AFNetworking/AFNetworking/AFURLConnectionOperation.h + sourceTree + SOURCE_ROOT + + 9978CBFC0E004A7CA8A21B02 + + fileRef + FDF50D86A2424BE6A53D3401 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 9CB44C48FD25445DB5713899 + + fileRef + 7F93708FE1494BE8B2EDC1DC + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 9D0DDCC858E748F58D342196 + + fileRef + 09FDAB2D58C44826848DE584 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 9D543FC4453A44D59CF0C7D1 + + fileRef + BCB090B4C7004219856A717D + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 9D887D0D6897464A8932968B + + includeInIndex + 1 + isa + PBXFileReference + name + UIImageView+AFNetworking.h + path + AFNetworking/AFNetworking/UIImageView+AFNetworking.h + sourceTree + SOURCE_ROOT + + 9E47B50DD9CB4EB08A9D20BF + + fileRef + 341576CA82ED4B20A541D932 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 9E5A2185467341C3B12DCB27 + + fileRef + 164025F70CEA464397CF79EB + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 9EC8935CB3ED48139EFBEBFD + + fileRef + D80B49AE18AF451CA8CD1F60 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + 9FBE246A845D42A0844096D4 + + fileRef + B8718F10571247FBB688E441 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + A08594AA4F8D46CFAE88165B + + fileRef + 042B500F055C4DD3812CDAE3 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + A0D6F96C284445B5A755AEDC + + includeInIndex + 1 + isa + PBXFileReference + name + RKMappingResult.m + path + RestKit/Code/ObjectMapping/RKMappingResult.m + sourceTree + SOURCE_ROOT + + A0E0AE5E133245CEB99F04D1 + + includeInIndex + 1 + isa + PBXFileReference + name + RKResponseDescriptor.h + path + RestKit/Code/Network/RKResponseDescriptor.h + sourceTree + SOURCE_ROOT + + A14E894FC03A43B3AE8625BB + + fileRef + 3F84DEB693A941298BDB663A + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + A178CA33853F4786958F78DB + + includeInIndex + 1 + isa + PBXFileReference + name + lcl_config_logger_RK.h + path + RestKit/Code/Support/lcl_config_logger_RK.h + sourceTree + SOURCE_ROOT + + A2DFB3702DA2490DA4EC315C + + includeInIndex + 1 + isa + PBXFileReference + name + RKPropertyMapping.m + path + RestKit/Code/ObjectMapping/RKPropertyMapping.m + sourceTree + SOURCE_ROOT + + A50E41F9EE8F4342B33BC64C + + fileRef + D0059010F2A946F3A96A5326 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + A567CA14DF0F44F7A5E30331 + + includeInIndex + 1 + isa + PBXFileReference + name + RKHTTPRequestOperation.m + path + RestKit/Code/Network/RKHTTPRequestOperation.m + sourceTree + SOURCE_ROOT + + A58C53679C6F4F04B3981969 + + includeInIndex + 1 + isa + PBXFileReference + name + RKEntityByAttributeCache.m + path + RestKit/Code/CoreData/RKEntityByAttributeCache.m + sourceTree + SOURCE_ROOT + + A6FC65EF8E84480997C7DEF6 + + fileRef + 06DB294542744ABB81E41A9D + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + A8301F92A8CB4445971C4DB4 + + buildActionMask + 2147483647 + dstPath + $(PRODUCT_NAME) + dstSubfolderSpec + 16 + files + + 5082FBD0C9BA4EBD887A87E3 + 9D543FC4453A44D59CF0C7D1 + 2481EE93E584423D8C0D0CE3 + 97DC8C9AA0484A6C8D7511ED + BAA554073A494C6EA291F1A8 + F22E5B8F744344528FF059A8 + E71A2F4D89AA49369DCAC483 + FAD0F75BA7F54570A0416DA5 + 0594F5C02F024B57B5EA2155 + DA412E3F665941E28B46DFD1 + 60F4A06F72394CC1BCBCF1B9 + 2D371B7BA7944126B8850FD0 + FC7EC64CA8464D1F8873F5CA + 2E2945D4ED304E1E990746EA + 00543297B76C419492F59492 + CA93C351CC234353A1C0E4D5 + 832E3B2BAF204A17A5C5CD7C + 7C878329A7BC42C5A7AEE6B6 + B3A824F127724EFD9CAD7089 + 46CA438C8DEA4A95B9345AE2 + E7F9E0E4F0524BF494B07854 + C2CA501525E74F0AAD90EB35 + 8300DDC597904F78A77831BB + 5317D26B0A334BC397D0B21F + 9D0DDCC858E748F58D342196 + ADF7E86CB4764F31BFDA46F4 + 66BD6FAFCA7B45D0BF3F401C + 5A741CEBA22049FC98951004 + 62CE91DC36F24886BEAC1D00 + 088559B891954C8BA408B864 + 123794A07886452897E742F7 + EC7443479461487BAC0525CC + 8FEC9228D95A4BA0A5A1F8F1 + 88DBFF7579F84132AC912E1A + 8CC3B17359794E95BA04B06B + 1DC3328EEF074ABF841E3A59 + 9E47B50DD9CB4EB08A9D20BF + 7129178D0F5345808D9DB54A + 5A3E0F450D0E4B0FA42D0905 + 6C231D3DA397427CBE094B4C + AA0ADFFA3DF14864AB31628C + FD7CC34D9CFE4D12A5CBABCE + 47789C2B6F164FEBA045EADE + 4AA288E46D194EE8BF7F035B + 839D74AA7B974748BFE17348 + E5D3A74EE0CE4FDA85357161 + BBB52397071444898630F507 + 25122F8CAFAA45FABB153833 + 47F7DACF4AA64C4CA011A0A5 + F25F97075E9A460FB26F6048 + B511670943464D5D99C87A11 + 1D9D8E7EF22942BCB4581246 + 8C5D0836A10A41F1B9231A22 + 92EAF780AC1542AFB7F17C67 + 6EC2B75F8DD743CB9B1BE72B + 537C894FB39E4DEA85E5E8F7 + 214654E49DBD45F2BDD03F6F + D4D7C1DC9C314762B5BB9B31 + A14E894FC03A43B3AE8625BB + 9EC8935CB3ED48139EFBEBFD + BE1AF1F2BAD04C068ACEB726 + 128DADFB2F454EBCA8258229 + 1F5DBD6F159943DFA385C8A4 + C1720759370544559BB3028D + D63384B9525744408472DB2D + BDA8C501363542E38EEF4584 + 1E19BA63307E4822934B8F96 + E347EDD9F10F465696D94217 + D9BCB4E96B4E450CB640A6CA + E9604E46B6F643D2ACFE196C + F353ACCA20D04FCC8F6846BF + F2B2A01CFE1945E0AD6AB039 + FDBA121368B74EF184B96CDC + D24ABF96D2E24162AF878761 + C8E9A624804A43338D5E8E93 + 14B6C155062B443ABBA124FB + BA75DF8D6389420AB6003FAD + C7AEF968B321426AABD38D3C + 9CB44C48FD25445DB5713899 + D123A2091B2F4B9FBDE0AE74 + BFEC456F42D640DA8ECC9E98 + 82639859494341C295BF8C6C + A50E41F9EE8F4342B33BC64C + + isa + PBXCopyFilesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + A9B2B2A049E34421A68ED6AB + + includeInIndex + 1 + isa + PBXFileReference + name + RKManagedObjectThreadSafeInvocation.h + path + RestKit/Code/CoreData/RKManagedObjectThreadSafeInvocation.h + sourceTree + SOURCE_ROOT + + AA0ADFFA3DF14864AB31628C + + fileRef + 47252737B85A4DB381B7ADEC + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + AD29C3AE7F2F42468C1893E4 + + includeInIndex + 1 + isa + PBXFileReference + name + RKPathUtilities.m + path + RestKit/Code/Support/RKPathUtilities.m + sourceTree + SOURCE_ROOT + + ADF7E86CB4764F31BFDA46F4 + + fileRef + CE2F7687C4284EA9B04A73BD + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + AE4D1885610B4AC4BFBA2B71 + + fileRef + B8BEBCF24A534035A73931DF + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + B0B38C8B338F43A981CE7E68 + + includeInIndex + 1 + isa + PBXFileReference + name + RKMappingResult.h + path + RestKit/Code/ObjectMapping/RKMappingResult.h + sourceTree + SOURCE_ROOT + + B20EBBA2792B494BB523F68B + + fileRef + CE587049696945CFBA6E66B0 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + B22CA12A70664AF194D1F94E + + children + + D9E287479D994E8CB3A8919E + 7A0EA8E066E74678B6BD36C3 + 3D67CBB15C1843E0BEA34D6B + 854ED00113764BF5B51C212D + 337FBFD12AEC48AD8AA32864 + D49B6587E3864689AAB7A001 + 0D2F943108C949918A791597 + 925E7162DFA9466CBE49049C + 3F84DEB693A941298BDB663A + D80B49AE18AF451CA8CD1F60 + 2A63827BD4264945839F9DB1 + 217188D2AE4644978FB3B0F2 + B0B38C8B338F43A981CE7E68 + 906C395769AF4561AA1739A4 + 6119BC6A81F34014B5B11DF8 + C26952BBA871489C898D4C62 + 40016BFCC96F4EED86F5D146 + B4B791BBD85949F2A7CFDDE8 + E66C37672D1C411B8949027B + EDFA4581920B4DA2BFAEE247 + 06DB294542744ABB81E41A9D + B4C42F6EB19B445B920DD774 + B8BEBCF24A534035A73931DF + 14B21406BD6E41D0BCE9FC41 + 5A266BB4B7154F39B68EC6DE + F1351D9E51964AD7AC4485F2 + CEB8E16F2A1A4EB194082795 + 72859B9610C848EA811E9573 + A0D6F96C284445B5A755AEDC + 042B500F055C4DD3812CDAE3 + 6F4F8F97BB3E472AB58B1919 + FDF50D86A2424BE6A53D3401 + 71FF07CD5F5C4E1B85208126 + A2DFB3702DA2490DA4EC315C + 94F194944C36490CA5228BEF + + isa + PBXGroup + name + ObjectMapping + sourceTree + <group> + + B2568EEA5A4F4859991B7CF6 + + fileRef + BCCF5D13835947B6B8145B62 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + B25F399065634364AD5D5137 + + includeInIndex + 1 + isa + PBXFileReference + name + RKRelationshipConnectionOperation.m + path + RestKit/Code/CoreData/RKRelationshipConnectionOperation.m + sourceTree + SOURCE_ROOT + + B28F28E4F90C4E78A924933F + + fileRef + 94F194944C36490CA5228BEF + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + B2E8201823E2445E91D0D173 + + fileRef + 74CF11DA0808438DA3A7008E + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + B3A824F127724EFD9CAD7089 + + fileRef + 7C2C0C0422254E67AA9D2B56 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + B3F3F5EA3E124DF5B6B67F72 + + includeInIndex + 1 + isa + PBXFileReference + name + RKMIMETypes.m + path + RestKit/Code/Support/RKMIMETypes.m + sourceTree + SOURCE_ROOT + + B4129E8990A844F5B918A00C + + includeInIndex + 1 + isa + PBXFileReference + name + AFImageRequestOperation.m + path + AFNetworking/AFNetworking/AFImageRequestOperation.m + sourceTree + SOURCE_ROOT + + B4B791BBD85949F2A7CFDDE8 + + includeInIndex + 1 + isa + PBXFileReference + name + RKPropertyMapping.h + path + RestKit/Code/ObjectMapping/RKPropertyMapping.h + sourceTree + SOURCE_ROOT + + B4C42F6EB19B445B920DD774 + + includeInIndex + 1 + isa + PBXFileReference + name + RKDynamicMapping.m + path + RestKit/Code/ObjectMapping/RKDynamicMapping.m + sourceTree + SOURCE_ROOT + + B506C2957CDE4D60ABA28DEF + + children + + 282E429B66BC46BA8D6AF010 + 0333F5F4A56944669C62A628 + E991633511A6469EAD3F9A77 + 248BA9681DAA4C048B6887C6 + + isa + PBXGroup + sourceTree + <group> + + B511670943464D5D99C87A11 + + fileRef + D9E287479D994E8CB3A8919E + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + B7DECA8CCAAE4C9AA57E8E7F + + includeInIndex + 1 + isa + PBXFileReference + name + NSManagedObjectContext+RKAdditions.h + path + RestKit/Code/CoreData/NSManagedObjectContext+RKAdditions.h + sourceTree + SOURCE_ROOT + + B7E27AD03DDC44EA8B91EF60 + + includeInIndex + 1 + isa + PBXFileReference + name + Network.h + path + RestKit/Code/Network.h + sourceTree + SOURCE_ROOT + + B8718F10571247FBB688E441 + + includeInIndex + 1 + isa + PBXFileReference + name + RKObjectPropertyInspector+CoreData.m + path + RestKit/Code/CoreData/RKObjectPropertyInspector+CoreData.m + sourceTree + SOURCE_ROOT + + B8BEBCF24A534035A73931DF + + includeInIndex + 1 + isa + PBXFileReference + name + RKDynamicMappingMatcher.m + path + RestKit/Code/ObjectMapping/RKDynamicMappingMatcher.m + sourceTree + SOURCE_ROOT + + BA24BB1D5A5D42238788BF13 + + includeInIndex + 1 + isa + PBXFileReference + name + RKManagedObjectRequestOperation.h + path + RestKit/Code/Network/RKManagedObjectRequestOperation.h + sourceTree + SOURCE_ROOT + + BA75DF8D6389420AB6003FAD + + fileRef + 29C45E4C76BD48569549489B + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + BAA554073A494C6EA291F1A8 + + fileRef + C1A140C12B1D499D8E5D74D3 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + BB3EF148671949DABCBABB19 + + includeInIndex + 1 + isa + PBXFileReference + name + SOCKit.m + path + SOCKit/SOCKit.m + sourceTree + SOURCE_ROOT + + BBB52397071444898630F507 + + fileRef + 36DABDC5A0B34A55A401D777 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + BCB090B4C7004219856A717D + + includeInIndex + 1 + isa + PBXFileReference + name + AFHTTPRequestOperation.h + path + AFNetworking/AFNetworking/AFHTTPRequestOperation.h + sourceTree + SOURCE_ROOT + + BCCF5D13835947B6B8145B62 + + includeInIndex + 1 + isa + PBXFileReference + name + RKErrors.m + path + RestKit/Code/Support/RKErrors.m + sourceTree + SOURCE_ROOT + + BDA8C501363542E38EEF4584 + + fileRef + C26952BBA871489C898D4C62 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + BE1AF1F2BAD04C068ACEB726 + + fileRef + 2A63827BD4264945839F9DB1 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + BFB879D11F4F477CBA3A7B5F + + includeInIndex + 1 + isa + PBXFileReference + name + LCLNSLog_RK.h + path + RestKit/Vendor/LibComponentLogging/NSLog/LCLNSLog_RK.h + sourceTree + SOURCE_ROOT + + BFEC456F42D640DA8ECC9E98 + + fileRef + 32751115E2E14A3F8C26442F + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + C077BD38B82A4ACC95A6D075 + + fileRef + 72859B9610C848EA811E9573 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + C1720759370544559BB3028D + + fileRef + 906C395769AF4561AA1739A4 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + C1A140C12B1D499D8E5D74D3 + + includeInIndex + 1 + isa + PBXFileReference + name + AFNetworkActivityIndicatorManager.h + path + AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.h + sourceTree + SOURCE_ROOT + + C1DBA756E0614EC0BE3A507B + + includeInIndex + 1 + isa + PBXFileReference + name + RKHTTPRequestOperation.h + path + RestKit/Code/Network/RKHTTPRequestOperation.h + sourceTree + SOURCE_ROOT + + C1F9275D371D420D92D6FC92 + + fileRef + 5B5A3F4E8F19462A92C0E7C7 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + C26952BBA871489C898D4C62 + + includeInIndex + 1 + isa + PBXFileReference + name + RKObjectUtilities.h + path + RestKit/Code/ObjectMapping/RKObjectUtilities.h + sourceTree + SOURCE_ROOT + + C280A2B0A05545EE88A0886F + + buildConfigurations + + 556309C8B2EC4AA082523962 + 8996ACC5675549D78B1DA8B8 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + C2CA501525E74F0AAD90EB35 + + fileRef + 31E981988FC546B4949CC7A6 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + C30E245F86604F8A998DA7AE + + includeInIndex + 1 + isa + PBXFileReference + name + AFXMLRequestOperation.h + path + AFNetworking/AFNetworking/AFXMLRequestOperation.h + sourceTree + SOURCE_ROOT + + C31F6D9D2ACF438F82D3C90C + + includeInIndex + 1 + isa + PBXFileReference + name + RKMIMETypeSerialization.h + path + RestKit/Code/Support/RKMIMETypeSerialization.h + sourceTree + SOURCE_ROOT + + C48DB98010534BBC87D82C88 + + children + + F05B05DC98014EC89230C7C7 + B7E27AD03DDC44EA8B91EF60 + 1C4BA40FFECF43408F17D9A7 + 2AAC9C3E41BE42C2BA053679 + 7058C9D27F7E48B9AD4487B1 + 36DABDC5A0B34A55A401D777 + 3F34231580B74150B2A950B3 + 2F3345BA86414737A5FF0BA9 + 935C6B3706644157B3E5678A + BFB879D11F4F477CBA3A7B5F + 4964C446A2C34140B3F97F09 + + isa + PBXGroup + name + Core + sourceTree + <group> + + C4FC012C39684AE69E277C29 + + fileRef + A0D6F96C284445B5A755AEDC + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + C64F63A02EF449EA8F8F5A6C + + fileRef + 05049E161BAD42FA818566F6 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + C686FF61DCB0494AA9969C77 + + includeInIndex + 1 + isa + PBXFileReference + name + RKISO8601DateFormatter.h + path + RestKit/Code/Support/RKISO8601DateFormatter.h + sourceTree + SOURCE_ROOT + + C7AC51080F7A46C9BF2EAD5B + + includeInIndex + 1 + isa + PBXFileReference + name + RKInMemoryManagedObjectCache.m + path + RestKit/Code/CoreData/RKInMemoryManagedObjectCache.m + sourceTree + SOURCE_ROOT + + C7AEF968B321426AABD38D3C + + fileRef + A0E0AE5E133245CEB99F04D1 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + C7F79963D26146508EBA00F7 + + includeInIndex + 1 + isa + PBXFileReference + name + RKErrors.h + path + RestKit/Code/Support/RKErrors.h + sourceTree + SOURCE_ROOT + + C8E9A624804A43338D5E8E93 + + fileRef + CE48DA61082E461C8F2C1B30 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + CA4B51061A6644B794C01828 + + fileRef + 6C4577C7F3FB42048783F2A5 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + CA93C351CC234353A1C0E4D5 + + fileRef + 156F7D3AC15940CDB8410518 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + CBB31E1EE2E34C53AA1D6C2B + + includeInIndex + 1 + isa + PBXFileReference + name + RKRoute.h + path + RestKit/Code/Network/RKRoute.h + sourceTree + SOURCE_ROOT + + CD753EACFD10461BA456ED28 + + children + + D0059010F2A946F3A96A5326 + BB3EF148671949DABCBABB19 + + isa + PBXGroup + name + SOCKit + sourceTree + <group> + + CE2F7687C4284EA9B04A73BD + + includeInIndex + 1 + isa + PBXFileReference + name + lcl_config_components_RK.h + path + RestKit/Code/Support/lcl_config_components_RK.h + sourceTree + SOURCE_ROOT + + CE48DA61082E461C8F2C1B30 + + includeInIndex + 1 + isa + PBXFileReference + name + RKObjectRequestOperation.h + path + RestKit/Code/Network/RKObjectRequestOperation.h + sourceTree + SOURCE_ROOT + + CE587049696945CFBA6E66B0 + + includeInIndex + 1 + isa + PBXFileReference + name + RKNSJSONSerialization.m + path + RestKit/Code/Support/RKNSJSONSerialization.m + sourceTree + SOURCE_ROOT + + CEB8E16F2A1A4EB194082795 + + includeInIndex + 1 + isa + PBXFileReference + name + RKMapping.m + path + RestKit/Code/ObjectMapping/RKMapping.m + sourceTree + SOURCE_ROOT + + D0059010F2A946F3A96A5326 + + includeInIndex + 1 + isa + PBXFileReference + name + SOCKit.h + path + SOCKit/SOCKit.h + sourceTree + SOURCE_ROOT + + D032A68C674D47538F49A61C + + includeInIndex + 1 + isa + PBXFileReference + name + RKResponseDescriptor.m + path + RestKit/Code/Network/RKResponseDescriptor.m + sourceTree + SOURCE_ROOT + + D123A2091B2F4B9FBDE0AE74 + + fileRef + CBB31E1EE2E34C53AA1D6C2B + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + D2052D1353C74763966B3C11 + + fileRef + 8104A8C562A1451EA9E66E69 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + D24ABF96D2E24162AF878761 + + fileRef + 107BBF1DD7B7426D9F7D52F3 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + D296E233C07A4594A4E56568 + + includeInIndex + 1 + isa + PBXFileReference + name + RKResponseMapperOperation.m + path + RestKit/Code/Network/RKResponseMapperOperation.m + sourceTree + SOURCE_ROOT + + D49B6587E3864689AAB7A001 + + includeInIndex + 1 + isa + PBXFileReference + name + RKHTTPUtilities.h + path + RestKit/Code/ObjectMapping/RKHTTPUtilities.h + sourceTree + SOURCE_ROOT + + D4B9ADB1A2154687AE3BD242 + + includeInIndex + 1 + isa + PBXFileReference + name + RKMIMETypes.h + path + RestKit/Code/Support/RKMIMETypes.h + sourceTree + SOURCE_ROOT + + D4D7C1DC9C314762B5BB9B31 + + fileRef + 925E7162DFA9466CBE49049C + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + D5840DB85CD64478A3659E57 + + includeInIndex + 1 + isa + PBXFileReference + name + RKPathMatcher.h + path + RestKit/Code/Support/RKPathMatcher.h + sourceTree + SOURCE_ROOT + + D63384B9525744408472DB2D + + fileRef + 6119BC6A81F34014B5B11DF8 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + D7B862ACBB74463FB15C04B9 + + includeInIndex + 1 + isa + PBXFileReference + name + AFPropertyListRequestOperation.h + path + AFNetworking/AFNetworking/AFPropertyListRequestOperation.h + sourceTree + SOURCE_ROOT + + D80B49AE18AF451CA8CD1F60 + + includeInIndex + 1 + isa + PBXFileReference + name + RKMappingErrors.h + path + RestKit/Code/ObjectMapping/RKMappingErrors.h + sourceTree + SOURCE_ROOT + + D82365222D664E929A8D541B + + fileRef + 2B3AB9F38FDA4D918D227FED + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + D9BCB4E96B4E450CB640A6CA + + fileRef + E66C37672D1C411B8949027B + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + D9E287479D994E8CB3A8919E + + includeInIndex + 1 + isa + PBXFileReference + name + RKAttributeMapping.h + path + RestKit/Code/ObjectMapping/RKAttributeMapping.h + sourceTree + SOURCE_ROOT + + DA412E3F665941E28B46DFD1 + + fileRef + 9D887D0D6897464A8932968B + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + DC57254F92FB4CCC9A37A120 + + children + + CE2F7687C4284EA9B04A73BD + 6B090F9EF3934A589C7D6361 + A178CA33853F4786958F78DB + 0605978F6E3540319BD4F679 + 7A7EFE2488A548FE92E70197 + C7F79963D26146508EBA00F7 + C686FF61DCB0494AA9969C77 + 5C967B113A0049109F0964B8 + 00F86FD8CAD146FE819B9EF3 + D4B9ADB1A2154687AE3BD242 + C31F6D9D2ACF438F82D3C90C + 341576CA82ED4B20A541D932 + D5840DB85CD64478A3659E57 + 1B3A45D67A0646C3BEB07249 + 156E0F348C4E496A81DAAEBA + 47252737B85A4DB381B7ADEC + FD719952DFFD456BBA215418 + 5B5A3F4E8F19462A92C0E7C7 + BCCF5D13835947B6B8145B62 + 8A07C12B42D84DD9ABE286EF + 4D0A2342CC0B470A83879409 + B3F3F5EA3E124DF5B6B67F72 + 8FA73ECBA5BD45A2B296B95A + CE587049696945CFBA6E66B0 + 74CF11DA0808438DA3A7008E + AD29C3AE7F2F42468C1893E4 + 5F22DADE4A0D4FDF98A1251B + + isa + PBXGroup + name + Support + sourceTree + <group> + + DDF0238DBC2E48579DED3698 + + includeInIndex + 1 + isa + PBXFileReference + name + RKManagedObjectMappingOperationDataSource.m + path + RestKit/Code/CoreData/RKManagedObjectMappingOperationDataSource.m + sourceTree + SOURCE_ROOT + + DE24563623EF458F8C447750 + + fileRef + DDF0238DBC2E48579DED3698 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + E2B7C48DCC35428DBDB3CD3F + + includeInIndex + 1 + isa + PBXFileReference + name + RKRequestDescriptor.h + path + RestKit/Code/Network/RKRequestDescriptor.h + sourceTree + SOURCE_ROOT + + E347EDD9F10F465696D94217 + + fileRef + B4B791BBD85949F2A7CFDDE8 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + E5D3A74EE0CE4FDA85357161 + + fileRef + 7058C9D27F7E48B9AD4487B1 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + E66C37672D1C411B8949027B + + includeInIndex + 1 + isa + PBXFileReference + name + RKRelationshipMapping.h + path + RestKit/Code/ObjectMapping/RKRelationshipMapping.h + sourceTree + SOURCE_ROOT + + E71A2F4D89AA49369DCAC483 + + fileRef + D7B862ACBB74463FB15C04B9 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + E721E506FEE44B12A955A267 + + includeInIndex + 1 + isa + PBXFileReference + name + NSEntityDescription+RKAdditions.h + path + RestKit/Code/CoreData/NSEntityDescription+RKAdditions.h + sourceTree + SOURCE_ROOT + + E7F6A44B58904877826174DE + + includeInIndex + 1 + isa + PBXFileReference + name + RKManagedObjectRequestOperation.m + path + RestKit/Code/Network/RKManagedObjectRequestOperation.m + sourceTree + SOURCE_ROOT + + E7F9E0E4F0524BF494B07854 + + fileRef + 2698397327924137BCAAD3F6 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + E850D83F28B440E7971278B5 + + fileRef + F1351D9E51964AD7AC4485F2 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + E8C01005F4304717A1AF70FB + + fileRef + BB3EF148671949DABCBABB19 + isa + PBXBuildFile + + E9604E46B6F643D2ACFE196C + + fileRef + C1DBA756E0614EC0BE3A507B + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + E991633511A6469EAD3F9A77 + + children + + 8EE9D9B0527649E8B058980C + 236E5F49E4374687A0210B46 + + isa + PBXGroup + name + Targets Support Files + sourceTree + <group> + + EC7443479461487BAC0525CC + + fileRef + C686FF61DCB0494AA9969C77 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + EDFA4581920B4DA2BFAEE247 + + includeInIndex + 1 + isa + PBXFileReference + name + RKAttributeMapping.m + path + RestKit/Code/ObjectMapping/RKAttributeMapping.m + sourceTree + SOURCE_ROOT + + EE8A2EE13C9846A0BB8338D3 + + fileRef + 94F9127A50614EF1A9F0D0DD + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + EE9823BC99234F9AA738049F + + buildActionMask + 2147483647 + files + + 4E80400664CC49EBA9F5B6AA + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + EEB12DC4678042099DC79CDF + + includeInIndex + 1 + isa + PBXFileReference + name + NSManagedObject+RKAdditions.h + path + RestKit/Code/CoreData/NSManagedObject+RKAdditions.h + sourceTree + SOURCE_ROOT + + EEF5ECA3167143CAB9A2F65C + + baseConfigurationReference + 44B9EC6148434F6C9313CB3E + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + ARCHS + $(ARCHS_STANDARD_32_BIT) + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Pods-prefix.pch + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + GCC_WARN_INHIBIT_ALL_WARNINGS + NO + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 5.0 + OTHER_LDFLAGS + + PODS_HEADERS_SEARCH_PATHS + ${PODS_BUILD_HEADERS_SEARCH_PATHS} + PODS_ROOT + ${SRCROOT} + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + + isa + XCBuildConfiguration + name + Debug + + F05B05DC98014EC89230C7C7 + + includeInIndex + 1 + isa + PBXFileReference + name + CoreData.h + path + RestKit/Code/CoreData.h + sourceTree + SOURCE_ROOT + + F095892ADA18460F9B3FA3DE + + includeInIndex + 1 + isa + PBXFileReference + name + AFPropertyListRequestOperation.m + path + AFNetworking/AFNetworking/AFPropertyListRequestOperation.m + sourceTree + SOURCE_ROOT + + F12F8495ADC64B63B0A04A0F + + includeInIndex + 1 + isa + PBXFileReference + name + RKManagedObjectImporter.m + path + RestKit/Code/CoreData/RKManagedObjectImporter.m + sourceTree + SOURCE_ROOT + + F1351D9E51964AD7AC4485F2 + + includeInIndex + 1 + isa + PBXFileReference + name + RKMapperOperation.m + path + RestKit/Code/ObjectMapping/RKMapperOperation.m + sourceTree + SOURCE_ROOT + + F19D230F577146C896378B4F + + includeInIndex + 1 + isa + PBXFileReference + name + RKRouteSet.m + path + RestKit/Code/Network/RKRouteSet.m + sourceTree + SOURCE_ROOT + + F22E5B8F744344528FF059A8 + + fileRef + 4B7269AA0C604B678E9768EC + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + F25F97075E9A460FB26F6048 + + fileRef + BFB879D11F4F477CBA3A7B5F + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + F2B2A01CFE1945E0AD6AB039 + + fileRef + 5DA01298D3174D1AB61A92B7 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + F353ACCA20D04FCC8F6846BF + + fileRef + BA24BB1D5A5D42238788BF13 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + F3FF3685AE064778917A51E2 + + fileRef + 5F22DADE4A0D4FDF98A1251B + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + F57178BC18574AA6B1069129 + + buildConfigurationList + 6AA4D4E4618042D6946958BB + buildPhases + + 202CD71297404B58A26CEA60 + A8301F92A8CB4445971C4DB4 + EE9823BC99234F9AA738049F + + buildRules + + dependencies + + isa + PBXNativeTarget + name + Pods + productName + Pods + productReference + 500E8CB1CC024E6BAB943B2F + productType + com.apple.product-type.library.static + + F632F8C24ECD4983ADA3E060 + + fileRef + 29CF7903866745F4A7846C5F + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + F75A67E4FAD34367A8A6C0EB + + children + + E721E506FEE44B12A955A267 + EEB12DC4678042099DC79CDF + B7DECA8CCAAE4C9AA57E8E7F + 04567FBD6755455AA287087E + 782E67B7399146C786CEF667 + 156F7D3AC15940CDB8410518 + 24F6366A15B547BCA5D844A7 + 5F33CB92D1574D878151FCF4 + 7C2C0C0422254E67AA9D2B56 + 3578A0E869A74380B28A5A94 + 2698397327924137BCAAD3F6 + 31E981988FC546B4949CC7A6 + A9B2B2A049E34421A68ED6AB + 5C94CCED1AB346D081DDF6D1 + 09FDAB2D58C44826848DE584 + 164025F70CEA464397CF79EB + 8EAA728E0E4A4CB8A7AAB2F3 + 29CF7903866745F4A7846C5F + A58C53679C6F4F04B3981969 + 6BCA79C401AA4240AB50CFE1 + 2B3AB9F38FDA4D918D227FED + 39C050D4F9BE4C80A45047C5 + C7AC51080F7A46C9BF2EAD5B + F12F8495ADC64B63B0A04A0F + DDF0238DBC2E48579DED3698 + 678AA4AA5E794CA58553B520 + 94F9127A50614EF1A9F0D0DD + B8718F10571247FBB688E441 + B25F399065634364AD5D5137 + + isa + PBXGroup + name + CoreData + sourceTree + <group> + + FAD0F75BA7F54570A0416DA5 + + fileRef + 997764FFB94341FC9FD98034 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + FB3A79CDCAE7422784B4353E + + children + + DC57254F92FB4CCC9A37A120 + F75A67E4FAD34367A8A6C0EB + C48DB98010534BBC87D82C88 + B22CA12A70664AF194D1F94E + 86E089AE057A4211B785FAF7 + + isa + PBXGroup + name + RestKit + sourceTree + <group> + + FC7EC64CA8464D1F8873F5CA + + fileRef + B7DECA8CCAAE4C9AA57E8E7F + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + FD719952DFFD456BBA215418 + + includeInIndex + 1 + isa + PBXFileReference + name + RKDictionaryUtilities.m + path + RestKit/Code/Support/RKDictionaryUtilities.m + sourceTree + SOURCE_ROOT + + FD7CC34D9CFE4D12A5CBABCE + + fileRef + F05B05DC98014EC89230C7C7 + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + FDBA121368B74EF184B96CDC + + fileRef + 996A4A2588074ED98E868D0F + isa + PBXBuildFile + settings + + ATTRIBUTES + + Public + + + + FDF50D86A2424BE6A53D3401 + + includeInIndex + 1 + isa + PBXFileReference + name + RKObjectUtilities.m + path + RestKit/Code/ObjectMapping/RKObjectUtilities.m + sourceTree + SOURCE_ROOT + + + rootObject + 9140D5C824C1412DAF9889FE + + diff --git a/Pods/PodsDummy_Pods.m b/Pods/PodsDummy_Pods.m new file mode 100644 index 00000000..99f32356 --- /dev/null +++ b/Pods/PodsDummy_Pods.m @@ -0,0 +1,4 @@ +@interface PodsDummy_Pods : NSObject +@end +@implementation PodsDummy_Pods +@end diff --git a/Pods/RestKit/CREDITS.md b/Pods/RestKit/CREDITS.md new file mode 100644 index 00000000..06bc5596 --- /dev/null +++ b/Pods/RestKit/CREDITS.md @@ -0,0 +1,84 @@ +RestKit Credits +=============== + +RestKit was originally developed in the summer of 2009 under the name OTRestFramework +as a Ruby on Rails specific object mapper for XML data. In early 2010 the framework was +rebranded as RestKit and evolved into a general purpose HTTP toolkit and object mapping +system. + +RestKit is available as an Open Source package under the terms of the Apache License (see +LICENSE for details). + +## Original Author +* Blake Watters (blakewatters) @blakewatters + +## Core Team +* Jeff Arena (jeffarena) +* Gregory Combs (grgcombs) +* Brian Morton (bmorton) + +## Web Designer +* Adit Shukla (aditshukla) + +## Contributors +#### Version 0.9.3 and earlier +* Jeremy Ellison (jeremyellison) +* Daniel Hammond (danielrhammond) +* Marc Weil (aspir) +* Pat Shields (pashields) +* Tim Kerchmar (timkerchmar) +* Rachit Shukla (rachitshukla) +* Adam Hinz (ahinz) +* Stefan Eletzhofer (seletz) +* Peter Marks (tassock) +* Chad Podoski (chadpod) +* Andras Hatvani (andrashatvani) +* Ed McManus (emcmanus) + +#### Version 0.10.0 +* Christopher Swasey (endash) +* Aneil Mallavarapu (amallavarapu) +* Rui D Lopes (ruidlopes) +* Robert Altman (inquinity) +* Beat Besmer (besi) +* Scott Penrose (spenrose) +* Charlie Savage (cfis) +* Jawwad Ahmad (jawwad) +* John Stallings (jstallings) +* Bob Spryn (sprynmr) +* Ray Fix (rayfix) +* Marlon Andrade (marlonandrade) +* David Young-Chan Kay (DavidYKay) +* Chethan Reddy (creddy) +* Julien Grimault (juliengrimault) +* Matthias Bartelmeß +* Nolan Waite (nolanw) +* Michael Fleet (fantasticmf) +* Tony Lee (hktonylee) +* Aaron Crespo (aaroncrespo) +* James Sullivan (jsullivanlive) +* Marco Pesenti Gritti (marcopg) +* Brad Phelan (bradphelan) +* Ivan Vučica (ivucica) +* Felix Holmgren (Felixyz) +* Open Thread (OpenFibers) +* Sergej Tatarincev (SevInf) +* Ben Einstein (beinstein) +* Johan Bilien (jobi) +* Björn Jonsson (bjornjonsson) +* Ralf van der Zanden (ralfvdz) +* Parker Boundy (parkerboundy) +* Jeremy Mack (mutewinter) +* Allen Wei (allenwei) +* Robin Eggenkamp (Edubits) +* Emil Wojtaszek (emilwojtaszek) +* Victor Kryukov (victorkryukov) +* Cody Rayment (crayment) +* Arne Harren (aharren) +* Cameron Royal (cammm) + +## Honorable Mentions +RestKit would like to thank the following companies for aiding in the support of this product: + +* GateGuru - http://www.gateguru.com +* Two Toasters - http://www.twotoasters.com \ No newline at end of file diff --git a/Pods/RestKit/Code/CoreData.h b/Pods/RestKit/Code/CoreData.h new file mode 100644 index 00000000..306955b1 --- /dev/null +++ b/Pods/RestKit/Code/CoreData.h @@ -0,0 +1,34 @@ +// +// CoreData.h +// RestKit +// +// Created by Blake Watters on 9/30/10. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import +#import "ObjectMapping.h" +#import "RKManagedObjectStore.h" +#import "RKManagedObjectImporter.h" +#import "RKManagedObjectMappingOperationDataSource.h" +#import "RKEntityMapping.h" +#import "RKManagedObjectCaching.h" +#import "RKInMemoryManagedObjectCache.h" +#import "RKFetchRequestManagedObjectCache.h" + +#import "RKPropertyInspector+CoreData.h" +#import "NSManagedObjectContext+RKAdditions.h" +#import "NSManagedObject+RKAdditions.h" +#import "NSEntityDescription+RKAdditions.h" diff --git a/Pods/RestKit/Code/CoreData/NSEntityDescription+RKAdditions.h b/Pods/RestKit/Code/CoreData/NSEntityDescription+RKAdditions.h new file mode 100644 index 00000000..8a10dd46 --- /dev/null +++ b/Pods/RestKit/Code/CoreData/NSEntityDescription+RKAdditions.h @@ -0,0 +1,112 @@ +// +// NSEntityDescription+RKAdditions.h +// RestKit +// +// Created by Blake Watters on 3/22/12. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import + +/** + The key for retrieving the name of the attribute that acts as + the primary key from the user info dictionary of the receiving NSEntityDescription. + + **Value**: @"primaryKeyAttribute" + */ +extern NSString * const RKEntityDescriptionPrimaryKeyAttributeUserInfoKey; + +/** + The substitution variable used in predicateForPrimaryKeyAttribute. + + **Value**: @"PRIMARY_KEY_VALUE" + @see predicateForPrimaryKeyAttribute + */ +extern NSString * const RKEntityDescriptionPrimaryKeyAttributeValuePredicateSubstitutionVariable; + +/** + Provides extensions to NSEntityDescription for various common tasks. + */ +@interface NSEntityDescription (RKAdditions) + +/** + The name of the attribute that acts as the primary key for the receiver. + + The primary key attribute can be configured in two ways: + 1. From within the Xcode Core Data editing view by + adding the desired attribute's name as the value for the + key `primaryKeyAttribute` to the user info dictionary. + 1. Programmatically, by retrieving the NSEntityDescription instance and + setting the property's value. + + Configuring the primary key attribute programmatically is a convenience interface + for directly manipulating the user info dictionary of the receiver. As such, the entity + **must** exist within a mutable managed object model. By default, models are returned in + an immutable state and must be sent the mutableCopy message to retrieve an mutable copy. Managed + object models are rendered immutable once used to create a persistent store coordinator, therefore + the developer **must** configure primary key attributes programmatically before creating a PSC during + Core Data initialization. + */ +@property (nonatomic, retain) NSString *primaryKeyAttributeName; + +/** + The attribute description object for the attribute designated as the primary key for the receiver. + */ +@property (nonatomic, readonly) NSAttributeDescription *primaryKeyAttribute; + +/** + The class representing the value of the attribute designated as the primary key for the receiver. + */ +@property (nonatomic, readonly) Class primaryKeyAttributeClass; + +/** + Returns a cached predicate specifying that the primary key attribute is equal to the $PRIMARY_KEY_VALUE + substitution variable. + + This predicate is cached to avoid parsing overhead during object mapping operations + and must be evaluated using [NSPredicate predicateWithSubstitutionVariables:] + + @return A cached predicate specifying the value of the primary key attribute is equal to the $PRIMARY_KEY_VALUE + substitution variable. + */ +- (NSPredicate *)predicateForPrimaryKeyAttribute; + +/** + Returns a predicate specifying that the value of the primary key attribute is equal to a given + value. This predicate is constructed by evaluating the cached predicate returned by the + predicateForPrimaryKeyAttribute with a dictionary of substitution variables specifying that + $PRIMARY_KEY_VALUE is equal to the given value. + + **NOTE**: This method considers the type of the receiver's primary key attribute when constructing + the predicate. It will coerce the given value into either an NSString or an NSNumber as + appropriate. This behavior is a convenience to avoid annoying issues related to Core Data's + handling of predicates for NSString and NSNumber types that were not appropriately casted. + + @param value The primary key value with which to create the predicate. + @return A predicate speciying that the value of the primary key attribute is equal to a given value. + */ +- (NSPredicate *)predicateForPrimaryKeyAttributeWithValue:(id)value; + +/** + Coerces the given value into the class representing the primary key. Currently support NSString + and NSNumber coercsions. + + @param primaryKeyValue The value of the primary that is to be coerced. + @bug **NOTE** This API is temporary and will be deprecated and replaced. + @since 0.10.1 + */ +- (id)coerceValueForPrimaryKey:(id)primaryKeyValue; + +@end diff --git a/Pods/RestKit/Code/CoreData/NSEntityDescription+RKAdditions.m b/Pods/RestKit/Code/CoreData/NSEntityDescription+RKAdditions.m new file mode 100644 index 00000000..3a23cf2e --- /dev/null +++ b/Pods/RestKit/Code/CoreData/NSEntityDescription+RKAdditions.m @@ -0,0 +1,112 @@ +// +// NSEntityDescription+RKAdditions.m +// RestKit +// +// Created by Blake Watters on 3/22/12. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import +#import "NSEntityDescription+RKAdditions.h" + +NSString * const RKEntityDescriptionPrimaryKeyAttributeUserInfoKey = @"primaryKeyAttribute"; +NSString * const RKEntityDescriptionPrimaryKeyAttributeValuePredicateSubstitutionVariable = @"PRIMARY_KEY_VALUE"; + +static char primaryKeyPredicateKey; + +@implementation NSEntityDescription (RKAdditions) + +- (void)setPredicateForPrimaryKeyAttribute:(NSString *)primaryKeyAttribute +{ + NSPredicate *predicate = (primaryKeyAttribute) ? [NSPredicate predicateWithFormat:@"%K == $PRIMARY_KEY_VALUE", primaryKeyAttribute] : nil; + objc_setAssociatedObject(self, + &primaryKeyPredicateKey, + predicate, + OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +#pragma mark - Public + +- (NSAttributeDescription *)primaryKeyAttribute +{ + return [[self attributesByName] valueForKey:[self primaryKeyAttributeName]]; +} + +- (Class)primaryKeyAttributeClass +{ + NSAttributeDescription *attributeDescription = [self primaryKeyAttribute]; + if (attributeDescription) { + return NSClassFromString(attributeDescription.attributeValueClassName); + } + + return nil; +} + +- (NSString *)primaryKeyAttributeName +{ + NSString *primaryKeyAttribute = [self.userInfo valueForKey:RKEntityDescriptionPrimaryKeyAttributeUserInfoKey]; + + // If we have loaded from the user info, ensure we have a predicate + if (! [self predicateForPrimaryKeyAttribute]) { + [self setPredicateForPrimaryKeyAttribute:primaryKeyAttribute]; + } + + return primaryKeyAttribute; +} + +- (void)setPrimaryKeyAttributeName:(NSString *)primaryKeyAttributeName +{ + NSMutableDictionary *userInfo = [self.userInfo mutableCopy]; + [userInfo setValue:primaryKeyAttributeName forKey:RKEntityDescriptionPrimaryKeyAttributeUserInfoKey]; + [self setUserInfo:userInfo]; +} + +- (NSPredicate *)predicateForPrimaryKeyAttribute +{ + return (NSPredicate *)objc_getAssociatedObject(self, &primaryKeyPredicateKey); +} + +- (id)coerceValueForPrimaryKey:(id)primaryKeyValue +{ + if (primaryKeyValue == nil) return [NSNull null]; + id searchValue = primaryKeyValue; + Class theClass = [self primaryKeyAttributeClass]; + if (theClass) { + // TODO: This coercsion behavior should be pluggable and reused from the mapper + if ([theClass isSubclassOfClass:[NSNumber class]] && ![searchValue isKindOfClass:[NSNumber class]]) { + // Handle NSString -> NSNumber + if ([searchValue isKindOfClass:[NSString class]]) { + searchValue = [NSNumber numberWithDouble:[searchValue doubleValue]]; + } + } else if ([theClass isSubclassOfClass:[NSString class]] && ![searchValue isKindOfClass:[NSString class]]) { + // Coerce to string + if ([searchValue respondsToSelector:@selector(stringValue)]) { + searchValue = [searchValue stringValue]; + } + } + } + + return searchValue; +} + +- (NSPredicate *)predicateForPrimaryKeyAttributeWithValue:(id)value +{ + id substitutionValue = [self coerceValueForPrimaryKey:value]; + NSDictionary *variables = [NSDictionary dictionaryWithObject:substitutionValue + forKey:RKEntityDescriptionPrimaryKeyAttributeValuePredicateSubstitutionVariable]; + return [[self predicateForPrimaryKeyAttribute] predicateWithSubstitutionVariables:variables]; +} + +@end diff --git a/Pods/RestKit/Code/CoreData/NSManagedObject+RKAdditions.h b/Pods/RestKit/Code/CoreData/NSManagedObject+RKAdditions.h new file mode 100644 index 00000000..0c5793ea --- /dev/null +++ b/Pods/RestKit/Code/CoreData/NSManagedObject+RKAdditions.h @@ -0,0 +1,38 @@ +// +// NSManagedObject+RKAdditions.h +// RestKit +// +// Created by Blake Watters on 3/14/12. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// + +#import + +@class RKManagedObjectStore, RKEntityMapping; + +/** + Provides extensions to NSManagedObject for various common tasks. + */ +@interface NSManagedObject (RKAdditions) + +///-------------------------------------- +/// @name Inspecting Managed Object State +///-------------------------------------- + +/** + Determines if the receiver has been deleted from the persistent store + and removed from the object graph. + + Unlike isDeleted, will return YES after a save event or if the managed object was deleted + in another managed object context that was then merged to the persistent store. + + @return YES if the object has been deleted from the persistent store, else NO. + */ +- (BOOL)hasBeenDeleted; + +/** + * Returns YES when an object has not been saved to the managed object context yet + */ +- (BOOL)isNew; + +@end diff --git a/Pods/RestKit/Code/CoreData/NSManagedObject+RKAdditions.m b/Pods/RestKit/Code/CoreData/NSManagedObject+RKAdditions.m new file mode 100644 index 00000000..a6ebc4b6 --- /dev/null +++ b/Pods/RestKit/Code/CoreData/NSManagedObject+RKAdditions.m @@ -0,0 +1,29 @@ +// +// NSManagedObject+RKAdditions.m +// RestKit +// +// Created by Blake Watters on 3/14/12. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// + +#import "NSManagedObject+RKAdditions.h" +#import "NSManagedObjectContext+RKAdditions.h" +#import "RKLog.h" +#import "RKManagedObjectStore.h" +#import "NSEntityDescription+RKAdditions.h" + +@implementation NSManagedObject (RKAdditions) + +- (BOOL)hasBeenDeleted +{ + NSManagedObject *managedObjectClone = [[self managedObjectContext] existingObjectWithID:[self objectID] error:nil]; + return (managedObjectClone == nil) ? YES : NO; +} + +- (BOOL)isNew +{ + NSDictionary *vals = [self committedValuesForKeys:nil]; + return [vals count] == 0; +} + +@end diff --git a/Pods/RestKit/Code/CoreData/NSManagedObjectContext+RKAdditions.h b/Pods/RestKit/Code/CoreData/NSManagedObjectContext+RKAdditions.h new file mode 100644 index 00000000..1a03ffdf --- /dev/null +++ b/Pods/RestKit/Code/CoreData/NSManagedObjectContext+RKAdditions.h @@ -0,0 +1,101 @@ +// +// NSManagedObjectContext+RKAdditions.h +// RestKit +// +// Created by Blake Watters on 3/14/12. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import + +@class RKManagedObjectStore; + +/** + Provides extensions to `NSManagedObjectContext` for various common tasks. + */ +@interface NSManagedObjectContext (RKAdditions) + +///--------------------------------- +/// @name Inserting a Managed Object +///--------------------------------- + +/** + Inserts a new managed object for the entity for the given name. + + This method is functionally equivalent to the follow code example. + + [NSEntityDescription insertNewObjectForEntityForName:entityName inManagedObjectContext:self]; + + @param entityName The name of an entity. + @return A new, autoreleased, fully configured instance of the class for the entity named entityName. The instance has its entity description set and is inserted into the receiver. + */ +- (id)insertNewObjectForEntityForName:(NSString *)entityName; + +///------------------------------- +/// @name Counting Managed Objects +///------------------------------- + +/** + Convenience method for performing a count of the number of instances of an entity with the given name. + + This method is functionally equivalent to the following code example. + + NSError *error; + NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:entityName]; + fetchRequest.predicate = predicate; + NSUInteger count = [managedObjectContext countForFetchRequest:fetchRequest error:&error]; + + @param entityName The name of an entity. + @param predicate A predicate to limit the search. May be nil. + @param error If there is a problem executing the fetch, upon return contains an instance of NSError that describes the problem. + @return The number of objects a fetch request for the given entity name with the given predicate would have returned if it had been passed to executeFetchRequest:error:, or NSNotFound if an error occurs. + */ +- (NSUInteger)countForEntityForName:(NSString *)entityName predicate:(NSPredicate *)predicate error:(NSError **)error; + +///---------------------------------------------- +/// @name Fetching Managed Objects by Primary Key +///---------------------------------------------- + +/** + Fetches a single managed object for the given entity with the given value for the primary key attribute in the receiver. + + @param entity The entity of the managed object to be retrieved by primary key. + @param primaryKeyValue The value for the entity's primary key attribute. + @return The managed object with the primary key attribute equal to the given value or nil if none was found. + */ +- (id)fetchObjectForEntity:(NSEntityDescription *)entity withValueForPrimaryKeyAttribute:(id)primaryKeyValue; + +/** + Fetches a single managed object for the entity for the given name with the given value for the primary key attribute in the receiver. + + @param entityName The name of the entity of the managed object to be retrieved by primary key. + @param primaryKeyValue The value for the receiving entity's primary key attribute. + @return The managed object with the primary key attribute equal to the given value or nil if none was found. + */ +- (id)fetchObjectForEntityForName:(NSString *)entityName withValueForPrimaryKeyAttribute:(id)primaryKeyValue; + +///------------------------------------------------- +/// @name Saving the Context to the Persistent Store +///------------------------------------------------- + +/** + Saves the receiver and then traverses up the parent context chain until a parent managed object context with a nil parent is found. If the final ancestor context does not have a reference to the persistent store coordinator, then a warning is generated and the method returns NO. + + @param error If there is a problem saving the receiver or any of its ancestor contexts, upon return contains an pointer to an instance of NSError that describes the problem. + @return YES if the save to the persistent store was successful, else NO. + */ +- (BOOL)saveToPersistentStore:(NSError **)error; + +@end diff --git a/Pods/RestKit/Code/CoreData/NSManagedObjectContext+RKAdditions.m b/Pods/RestKit/Code/CoreData/NSManagedObjectContext+RKAdditions.m new file mode 100644 index 00000000..c099b99f --- /dev/null +++ b/Pods/RestKit/Code/CoreData/NSManagedObjectContext+RKAdditions.m @@ -0,0 +1,100 @@ +// +// NSManagedObjectContext+RKAdditions.m +// RestKit +// +// Created by Blake Watters on 3/14/12. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import +#import "NSManagedObjectContext+RKAdditions.h" +#import "NSEntityDescription+RKAdditions.h" +#import "RKLog.h" + +@implementation NSManagedObjectContext (RKAdditions) + +- (id)insertNewObjectForEntityForName:(NSString *)entityName +{ + return [NSEntityDescription insertNewObjectForEntityForName:entityName inManagedObjectContext:self]; +} + +- (NSUInteger)countForEntityForName:(NSString *)entityName predicate:(NSPredicate *)predicate error:(NSError **)error +{ + NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:entityName]; + fetchRequest.predicate = predicate; + return [self countForFetchRequest:fetchRequest error:error]; +} + +- (id)fetchObjectForEntity:(NSEntityDescription *)entity withValueForPrimaryKeyAttribute:(id)primaryKeyValue +{ + NSPredicate *predicate = [entity predicateForPrimaryKeyAttributeWithValue:primaryKeyValue]; + if (! predicate) { + RKLogWarning(@"Attempt to fetchObjectForEntity for entity with nil primaryKeyAttribute. Set the primaryKeyAttributeName and try again! %@", self); + return nil; + } + + NSFetchRequest *fetchRequest = [NSFetchRequest new]; + fetchRequest.entity = entity; + fetchRequest.predicate = predicate; + fetchRequest.fetchLimit = 1; + __block NSError *error; + __block NSArray *objects; + [self performBlockAndWait:^{ + objects = [self executeFetchRequest:fetchRequest error:&error]; + }]; + if (! objects) { + RKLogCoreDataError(error); + return nil; + } + + if ([objects count] == 1) { + return [objects objectAtIndex:0]; + } + + return nil; +} + +- (id)fetchObjectForEntityForName:(NSString *)entityName withValueForPrimaryKeyAttribute:(id)primaryKeyValue +{ + NSEntityDescription *entity = [NSEntityDescription entityForName:entityName inManagedObjectContext:self]; + return [self fetchObjectForEntity:entity withValueForPrimaryKeyAttribute:primaryKeyValue]; +} + +- (BOOL)saveToPersistentStore:(NSError **)error +{ + __block NSError *localError = nil; + NSManagedObjectContext *contextToSave = self; + while (contextToSave) { + __block BOOL success; + [contextToSave performBlockAndWait:^{ + success = [contextToSave save:&localError]; + }]; + + if (! success) { + if (error) *error = localError; + return NO; + } + + if (! contextToSave.parentContext && contextToSave.persistentStoreCoordinator == nil) { + RKLogWarning(@"Reached the end of the chain of nested managed object contexts without encountering a persistent store coordinator. Objects are not fully persisted."); + return NO; + } + contextToSave = contextToSave.parentContext; + } + + return YES; +} + +@end diff --git a/Pods/RestKit/Code/CoreData/RKEntityByAttributeCache.h b/Pods/RestKit/Code/CoreData/RKEntityByAttributeCache.h new file mode 100644 index 00000000..d3135d1a --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKEntityByAttributeCache.h @@ -0,0 +1,184 @@ +// +// RKEntityByAttributeCache.h +// RestKit +// +// Created by Blake Watters on 5/1/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import + +/** + The `RKEntityByAttributeCache` class provides an in-memory caching mechanism for managed objects instances of an entity in a managed object context with the value of one of the object's attributes acting as the cache key. When loaded, the cache will retrieve all instances of an entity from the store and build a dictionary mapping values for the given cache key attribute to the managed object ID for all objects matching the value. The cache can then be used to quickly retrieve objects by attribute value for the cache key without executing another fetch request against the managed object context. This can provide a large performance improvement when a large number of objects are being retrieved using a particular attribute as the key. + + `RKEntityByAttributeCache` instances are used by the `RKEntityCache` to provide caching for multiple entities at once. + + @bug Please note that the `RKEntityByAttribute` cache is implemented using a `NSFetchRequest` with a result type of `NSDictionaryResultType`. This means that the cache **cannot** load pending object instances via a fetch from the `load` method. Pending objects must be manually added to the cache via `addObject:` if it is desirable for the pending objects to be retrieved by subsequent invocations of `objectWithAttributeValue:inContext:` and `objectsWithAttributeValue:inContext:` prior to a save. + + This is a limitation imposed by Core Data. The dictionary result type implementation is leveraged instead a normal fetch request because it offers very large performance and memory utilization improvements by avoiding construction of managed object instances and faulting. + + @see `RKEntityCache` + */ +@interface RKEntityByAttributeCache : NSObject + +///----------------------- +/// @name Creating a Cache +///----------------------- + +/** + Initializes the receiver with a given entity, attribute, and managed object context. + + @param entity The Core Data entity description for the managed objects being cached. + @param attributeName The name of an attribute within the cached entity that acts as the cache key. + @param context The managed object context the cache retrieves the cached + objects from + @return The receiver, initialized with the given entity, attribute, and managed object + context. + */ +- (id)initWithEntity:(NSEntityDescription *)entity attribute:(NSString *)attributeName managedObjectContext:(NSManagedObjectContext *)context; + +///----------------------------- +/// @name Getting Cache Identity +///----------------------------- + +/** + The Core Data entity description for the managed objects being cached. + */ +@property (nonatomic, readonly) NSEntityDescription *entity; + +/** + An attribute that is part of the cached entity that acts as the cache key. + */ +@property (nonatomic, readonly) NSString *attribute; + +/** + The managed object context the receiver fetches cached objects from. + */ +@property (nonatomic, readonly) NSManagedObjectContext *managedObjectContext; + +/** + A Boolean value determining if the receiever monitors the managed object context + for changes and updates the cache entries using the notifications emitted. + */ +@property (nonatomic, assign) BOOL monitorsContextForChanges; + +///------------------------------------- +/// @name Loading and Flushing the Cache +///------------------------------------- + +/** + Loads the cache by finding all instances of the configured entity and building + an association between the value of the cached attribute's value and the + managed object ID for the object. + */ +- (void)load; + +/** + Flushes the cache by releasing all cache attribute value to managed object ID + associations. + */ +- (void)flush; + +///----------------------------- +/// @name Inspecting Cache State +///----------------------------- + +/** + A Boolean value indicating if the cache has loaded associations between cache attribute values and managed object ID's. + */ +- (BOOL)isLoaded; + +/** + Returns a count of the total number of cached objects. + */ +- (NSUInteger)count; + +/** + Returns the total number of cached objects with a given value for the attribute acting as the cache key. + + @param attributeValue The value for the cache key attribute to retrieve + a count of the objects with a matching value. + @return The number of objects in the cache with the given value for the cache + attribute of the receiver. + */ +- (NSUInteger)countWithAttributeValue:(id)attributeValue; + +/** + Returns the number of unique attribute values contained within the receiver. + + @return The number of unique attribute values within the receiver. + */ +- (NSUInteger)countOfAttributeValues; + +/** + Returns a Boolean value that indicates whether a given object is present + in the cache. + + @param object An object. + @return YES if object is present in the cache, otherwise NO. + */ +- (BOOL)containsObject:(NSManagedObject *)object; + +/** + Returns a Boolean value that indicates whether one of more objects is present + in the cache with a given value of the cache key attribute. + + @param attributeValue The value with which to check the cache for objects with a matching value. + @return YES if one or more objects with the given value for the cache key attribute is present in the cache, otherwise NO. + */ +- (BOOL)containsObjectWithAttributeValue:(id)attributeValue; + +/** + Returns the first object with a matching value for the cache key attribute + in a given managed object context. + + @param attributeValue A value for the cache key attribute. + @param context The managed object context to retrieve the object from. + @return An object with the value of attribute matching attributeValue or nil. + */ +- (NSManagedObject *)objectWithAttributeValue:(id)attributeValue inContext:(NSManagedObjectContext *)context; + +/** + Returns the collection of objects with a matching value for the cache key attribute in a given managed object context. + + @param attributeValue A value for the cache key attribute. + @param context The managed object context to retrieve the objects from. + @return An array of objects with the value of attribute matching attributeValue or an empty array. + */ +- (NSArray *)objectsWithAttributeValue:(id)attributeValue inContext:(NSManagedObjectContext *)context; + +///------------------------------ +/// @name Managing Cached Objects +///------------------------------ + +/** + Adds a managed object to the cache. + + The object must be an instance of the cached entity. + + @param object The managed object to add to the cache. + */ +- (void)addObject:(NSManagedObject *)object; + +/** + Removes a managed object from the cache. + + The object must be an instance of the cached entity. + + @param object The managed object to remove from the cache. + */ +- (void)removeObject:(NSManagedObject *)object; + +@end diff --git a/Pods/RestKit/Code/CoreData/RKEntityByAttributeCache.m b/Pods/RestKit/Code/CoreData/RKEntityByAttributeCache.m new file mode 100644 index 00000000..ca7fe6e2 --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKEntityByAttributeCache.m @@ -0,0 +1,327 @@ +// +// RKEntityByAttributeCache.m +// RestKit +// +// Created by Blake Watters on 5/1/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#if TARGET_OS_IPHONE +#import +#endif + +#import "RKEntityByAttributeCache.h" +#import "RKLog.h" +#import "RKPropertyInspector.h" +#import "RKPropertyInspector+CoreData.h" +#import "NSManagedObject+RKAdditions.h" + +// Set Logging Component +#undef RKLogComponent +#define RKLogComponent RKlcl_cRestKitCoreDataCache + +@interface RKEntityByAttributeCache () +@property (nonatomic, strong) NSMutableDictionary *attributeValuesToObjectIDs; +@end + +@implementation RKEntityByAttributeCache + + +- (id)initWithEntity:(NSEntityDescription *)entity attribute:(NSString *)attributeName managedObjectContext:(NSManagedObjectContext *)context +{ + NSParameterAssert(entity); + NSParameterAssert(attributeName); + NSParameterAssert(context); + + self = [self init]; + if (self) { + _entity = entity; + _attribute = attributeName; + _managedObjectContext = context; + _monitorsContextForChanges = YES; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(managedObjectContextDidChange:) + name:NSManagedObjectContextObjectsDidChangeNotification + object:context]; + +#if TARGET_OS_IPHONE + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(didReceiveMemoryWarning:) + name:UIApplicationDidReceiveMemoryWarningNotification + object:nil]; +#endif + } + + return self; +} + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +- (NSUInteger)count +{ + return [[[self.attributeValuesToObjectIDs allValues] valueForKeyPath:@"@sum.@count"] integerValue]; +} + +- (NSUInteger)countOfAttributeValues +{ + return [self.attributeValuesToObjectIDs count]; +} + +- (NSUInteger)countWithAttributeValue:(id)attributeValue +{ + return [[self objectsWithAttributeValue:attributeValue inContext:self.managedObjectContext] count]; +} + +- (BOOL)shouldCoerceAttributeToString:(NSString *)attributeValue +{ + if ([attributeValue isKindOfClass:[NSString class]] || [attributeValue isEqual:[NSNull null]]) { + return NO; + } + + Class attributeType = [[RKPropertyInspector sharedInspector] typeForProperty:self.attribute ofEntity:self.entity]; + return [attributeType instancesRespondToSelector:@selector(stringValue)]; +} + +- (void)load +{ + RKLogDebug(@"Loading entity cache for Entity '%@' by attribute '%@' in managed object context %@ (concurrencyType = %ld)", + self.entity.name, self.attribute, self.managedObjectContext, (unsigned long)self.managedObjectContext.concurrencyType); + @synchronized(self.attributeValuesToObjectIDs) { + self.attributeValuesToObjectIDs = [NSMutableDictionary dictionary]; + + NSExpressionDescription* objectIDExpression = [NSExpressionDescription new]; + objectIDExpression.name = @"objectID"; + objectIDExpression.expression = [NSExpression expressionForEvaluatedObject]; + objectIDExpression.expressionResultType = NSObjectIDAttributeType; + + // NOTE: `NSDictionaryResultType` does NOT support fetching pending changes. Pending objects must be manually added to the cache via `addObject:`. + NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; + fetchRequest.entity = self.entity; + fetchRequest.resultType = NSDictionaryResultType; + fetchRequest.propertiesToFetch = [NSArray arrayWithObjects:objectIDExpression, self.attribute, nil]; + + [self.managedObjectContext performBlockAndWait:^{ + NSError *error = nil; + NSArray *dictionaries = [self.managedObjectContext executeFetchRequest:fetchRequest error:&error]; + if (dictionaries) { + RKLogDebug(@"Retrieved %ld dictionaries for cachable `NSManagedObjectID` objects with fetch request: %@", (long) [dictionaries count], fetchRequest); + } else { + RKLogWarning(@"Failed to load entity cache. Failed to execute fetch request: %@", fetchRequest); + RKLogCoreDataError(error); + } + + for (NSDictionary *dictionary in dictionaries) { + id attributeValue = [dictionary objectForKey:self.attribute]; + NSManagedObjectID *objectID = [dictionary objectForKey:@"objectID"]; + [self setObjectID:objectID forAttributeValue:attributeValue]; + } + }]; + } +} + +- (void)flush +{ + @synchronized(self.attributeValuesToObjectIDs) { + RKLogDebug(@"Flushing entity cache for Entity '%@' by attribute '%@'", self.entity.name, self.attribute); + self.attributeValuesToObjectIDs = nil; + } +} + +- (void)reload +{ + [self flush]; + [self load]; +} + +- (BOOL)isLoaded +{ + return (self.attributeValuesToObjectIDs != nil); +} + +- (NSManagedObject *)objectForObjectID:(NSManagedObjectID *)objectID inContext:(NSManagedObjectContext *)context +{ + /** + NOTE: + + We use `existingObjectWithID:` as opposed to `objectWithID:` as `objectWithID:` can return us a fault + that will raise an exception when fired. `existingObjectWithID:error:` will return nil if the ID has been + deleted. `objectRegisteredForID:` is also an acceptable approach. + */ + __block NSError *error = nil; + __block NSManagedObject *object; + [context performBlockAndWait:^{ + object = [context existingObjectWithID:objectID error:&error]; + }]; + if (! object) { + if (error) { + RKLogError(@"Failed to retrieve managed object with ID %@. Error %@\n%@", objectID, [error localizedDescription], [error userInfo]); + } + + return nil; + } + + return object; +} + +- (NSManagedObject *)objectWithAttributeValue:(id)attributeValue inContext:(NSManagedObjectContext *)context +{ + NSArray *objects = [self objectsWithAttributeValue:attributeValue inContext:context]; + return ([objects count] > 0) ? [objects objectAtIndex:0] : nil; +} + +- (NSArray *)objectsWithAttributeValue:(id)attributeValue inContext:(NSManagedObjectContext *)context +{ + attributeValue = [self shouldCoerceAttributeToString:attributeValue] ? [attributeValue stringValue] : attributeValue; + NSMutableArray *objectIDs = [[self.attributeValuesToObjectIDs objectForKey:attributeValue] copy]; + if (objectIDs) { + /** + NOTE: + In my benchmarking, retrieving the objects one at a time using existingObjectWithID: is significantly faster + than issuing a single fetch request against all object ID's. + */ + NSMutableArray *objects = [NSMutableArray arrayWithCapacity:[objectIDs count]]; + for (NSManagedObjectID *objectID in objectIDs) { + NSManagedObject *object = [self objectForObjectID:objectID inContext:context]; + if (object) { + [objects addObject:object]; + } else { + RKLogDebug(@"Evicting objectID association for attribute '%@'=>'%@' of Entity '%@': %@", self.attribute, attributeValue, self.entity.name, objectID); + [self removeObjectID:objectID forAttributeValue:attributeValue]; + } + } + + return objects; + } + + return [NSArray array]; +} + +- (void)setObjectID:(NSManagedObjectID *)objectID forAttributeValue:(id)attributeValue +{ + @synchronized(self.attributeValuesToObjectIDs) { + attributeValue = [self shouldCoerceAttributeToString:attributeValue] ? [attributeValue stringValue] : attributeValue; + if (attributeValue) { + NSMutableArray *objectIDs = [self.attributeValuesToObjectIDs objectForKey:attributeValue]; + if (objectIDs) { + if (! [objectIDs containsObject:objectID]) { + [objectIDs addObject:objectID]; + } + } else { + objectIDs = [NSMutableArray arrayWithObject:objectID]; + } + + + if (nil == self.attributeValuesToObjectIDs) self.attributeValuesToObjectIDs = [NSMutableDictionary dictionary]; + [self.attributeValuesToObjectIDs setValue:objectIDs forKey:attributeValue]; + } else { + RKLogWarning(@"Unable to add object for object ID %@: nil value for attribute '%@'", objectID, self.attribute); + } + } +} + +- (void)removeObjectID:(NSManagedObjectID *)objectID forAttributeValue:(id)attributeValue +{ + @synchronized(self.attributeValuesToObjectIDs) { + // Coerce to a string if possible + attributeValue = [self shouldCoerceAttributeToString:attributeValue] ? [attributeValue stringValue] : attributeValue; + if (attributeValue) { + NSMutableArray *objectIDs = [self.attributeValuesToObjectIDs objectForKey:attributeValue]; + if (objectIDs && [objectIDs containsObject:objectID]) { + [objectIDs removeObject:objectID]; + } + } else { + RKLogWarning(@"Unable to remove object for object ID %@: nil value for attribute '%@'", objectID, self.attribute); + } + } +} + +- (void)addObject:(NSManagedObject *)object +{ + __block NSEntityDescription *entity; + __block id attributeValue; + __block NSManagedObjectID *objectID; + [self.managedObjectContext performBlockAndWait:^{ + entity = object.entity; + objectID = [object objectID]; + attributeValue = [object valueForKey:self.attribute]; + }]; + NSAssert([entity isEqual:self.entity], @"Cannot add object with entity '%@' to cache for entity of '%@'", [entity name], [self.entity name]); + // Coerce to a string if possible + [self setObjectID:objectID forAttributeValue:attributeValue]; +} + +- (void)removeObject:(NSManagedObject *)object +{ + __block NSEntityDescription *entity; + __block id attributeValue; + __block NSManagedObjectID *objectID; + [object.managedObjectContext performBlockAndWait:^{ + entity = object.entity; + objectID = [object objectID]; + attributeValue = [object valueForKey:self.attribute]; + }]; + NSAssert([entity isEqual:self.entity], @"Cannot remove object with entity '%@' from cache for entity of '%@'", [entity name], [self.entity name]); + [self removeObjectID:objectID forAttributeValue:attributeValue]; +} + +- (BOOL)containsObjectWithAttributeValue:(id)attributeValue +{ + // Coerce to a string if possible + attributeValue = [self shouldCoerceAttributeToString:attributeValue] ? [attributeValue stringValue] : attributeValue; + return [[self objectsWithAttributeValue:attributeValue inContext:self.managedObjectContext] count] > 0; +} + +- (BOOL)containsObject:(NSManagedObject *)object +{ + NSArray *allObjectIDs = [[self.attributeValuesToObjectIDs allValues] valueForKeyPath:@"@distinctUnionOfArrays.self"]; + return [allObjectIDs containsObject:object.objectID]; +} + +- (void)managedObjectContextDidChange:(NSNotification *)notification +{ + if (self.monitorsContextForChanges == NO) return; + + NSDictionary *userInfo = notification.userInfo; + NSSet *insertedObjects = [userInfo objectForKey:NSInsertedObjectsKey]; + NSSet *updatedObjects = [userInfo objectForKey:NSUpdatedObjectsKey]; + NSSet *deletedObjects = [userInfo objectForKey:NSDeletedObjectsKey]; + RKLogTrace(@"insertedObjects=%@, updatedObjects=%@, deletedObjects=%@", insertedObjects, updatedObjects, deletedObjects); + + NSMutableSet *objectsToAdd = [NSMutableSet setWithSet:insertedObjects]; + [objectsToAdd unionSet:updatedObjects]; + + for (NSManagedObject *object in objectsToAdd) { + if ([object.entity isEqual:self.entity]) { + [self addObject:object]; + } + } + + for (NSManagedObject *object in deletedObjects) { + if ([object.entity isEqual:self.entity]) { + [self removeObject:object]; + } + } +} + +- (void)didReceiveMemoryWarning:(NSNotification *)notification +{ + [self flush]; +} + +@end diff --git a/Pods/RestKit/Code/CoreData/RKEntityCache.h b/Pods/RestKit/Code/CoreData/RKEntityCache.h new file mode 100644 index 00000000..3cbe8699 --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKEntityCache.h @@ -0,0 +1,135 @@ +// +// RKEntityCache.h +// RestKit +// +// Created by Blake Watters on 5/2/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// + +#import + +@class RKEntityByAttributeCache; + +/** + Instances of RKInMemoryEntityCache provide an in-memory caching mechanism for + objects in a Core Data managed object context. Managed objects can be cached by + attribute for fast retrieval without repeatedly hitting the Core Data persistent store. + This can provide a substantial speed advantage over issuing fetch requests + in cases where repeated look-ups of the same data are performed using a small set + of attributes as the query key. Internally, the cache entries are maintained as + references to the NSManagedObjectID of corresponding cached objects. + */ +@interface RKEntityCache : NSObject + +///----------------------------------------------------------------------------- +/// @name Initializing the Cache +///----------------------------------------------------------------------------- + +/** + Initializes the receiver with a managed object context containing the entity instances to be cached. + + @param context The managed object context containing objects to be cached. + @returns self, initialized with context. + */ +- (id)initWithManagedObjectContext:(NSManagedObjectContext *)context; + +/** + The managed object context with which the receiver is associated. + */ +@property (nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext; + +///----------------------------------------------------------------------------- +/// @name Caching Objects by Attribute +///----------------------------------------------------------------------------- + +/** + Caches all instances of an entity using the value for an attribute as the cache key. + + @param entity The entity to cache all instances of. + @param attributeName The attribute to cache the instances by. + */ +- (void)cacheObjectsForEntity:(NSEntityDescription *)entity byAttribute:(NSString *)attributeName; + +/** + Returns a Boolean value indicating if all instances of an entity have been cached by a given attribute name. + + @param entity The entity to check the cache status of. + @param attributeName The attribute to check the cache status with. + @return YES if the cache has been loaded with instances with the given attribute, else NO. + */ +- (BOOL)isEntity:(NSEntityDescription *)entity cachedByAttribute:(NSString *)attributeName; + +/** + Retrieves the first cached instance of a given entity where the specified attribute matches the given value. + + @param entity The entity to search the cache for instances of. + @param attributeName The attribute to search the cache for matches with. + @param attributeValue The value of the attribute to return a match for. + @param context The managed object from which to retrieve the cached results. + @return A matching managed object instance or nil. + @raise NSInvalidArgumentException Raised if instances of the entity and attribute have not been cached. + */ +- (NSManagedObject *)objectForEntity:(NSEntityDescription *)entity withAttribute:(NSString *)attributeName value:(id)attributeValue inContext:(NSManagedObjectContext *)context; + +/** + Retrieves all cached instances of a given entity where the specified attribute matches the given value. + + @param entity The entity to search the cache for instances of. + @param attributeName The attribute to search the cache for matches with. + @param attributeValue The value of the attribute to return a match for. + @param context The managed object from which to retrieve the cached results. + @return All matching managed object instances or nil. + @raise NSInvalidArgumentException Raised if instances of the entity and attribute have not been cached. + */ +- (NSArray *)objectsForEntity:(NSEntityDescription *)entity withAttribute:(NSString *)attributeName value:(id)attributeValue inContext:(NSManagedObjectContext *)context; + +///----------------------------------------------------------------------------- +// @name Accessing Underlying Caches +///----------------------------------------------------------------------------- + +/** + Retrieves the underlying entity attribute cache for a given entity and attribute. + + @param entity The entity to retrieve the entity attribute cache object for. + @param attributeName The attribute to retrieve the entity attribute cache object for. + @return The entity attribute cache for the given entity and attribute, or nil if none was found. + */ +- (RKEntityByAttributeCache *)attributeCacheForEntity:(NSEntityDescription *)entity attribute:(NSString *)attributeName; + +/** + Retrieves all entity attributes caches for a given entity. + + @param entity The entity to retrieve the collection of entity attribute caches for. + @return An array of entity attribute cache objects for the given entity or an empty array if none were found. + */ +- (NSArray *)attributeCachesForEntity:(NSEntityDescription *)entity; + +///----------------------------------------------------------------------------- +// @name Managing the Cache +///----------------------------------------------------------------------------- + +/** + Flushes the entity cache by sending a flush message to each entity attribute cache + contained within the receiver. + + @see [RKEntityByAttributeCache flush] + */ +- (void)flush; + +/** + Adds a given object to all entity attribute caches for the object's entity contained + within the receiver. + + @param object The object to add to the appropriate entity attribute caches. + */ +- (void)addObject:(NSManagedObject *)object; + +/** + Removed a given object from all entity attribute caches for the object's entity contained + within the receiver. + + @param object The object to remove from the appropriate entity attribute caches. + */ +- (void)removeObject:(NSManagedObject *)object; + +@end diff --git a/Pods/RestKit/Code/CoreData/RKEntityCache.m b/Pods/RestKit/Code/CoreData/RKEntityCache.m new file mode 100644 index 00000000..70faecbd --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKEntityCache.m @@ -0,0 +1,132 @@ +// +// RKEntityCache.m +// RestKit +// +// Created by Blake Watters on 5/2/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// + +#import "RKEntityCache.h" +#import "RKEntityByAttributeCache.h" + +@interface RKEntityCache () +@property (nonatomic, strong) NSMutableSet *attributeCaches; +@end + +@implementation RKEntityCache + + +- (id)initWithManagedObjectContext:(NSManagedObjectContext *)context +{ + NSAssert(context, @"Cannot initialize entity cache with a nil context"); + self = [super init]; + if (self) { + _managedObjectContext = context; + _attributeCaches = [[NSMutableSet alloc] init]; + } + + return self; +} + +- (id)init +{ + return [self initWithManagedObjectContext:nil]; +} + + +- (void)cacheObjectsForEntity:(NSEntityDescription *)entity byAttribute:(NSString *)attributeName +{ + NSAssert(entity, @"Cannot cache objects for a nil entity"); + NSAssert(attributeName, @"Cannot cache objects without an attribute"); + RKEntityByAttributeCache *attributeCache = [self attributeCacheForEntity:entity attribute:attributeName]; + if (attributeCache && !attributeCache.isLoaded) { + [attributeCache load]; + } else { + attributeCache = [[RKEntityByAttributeCache alloc] initWithEntity:entity attribute:attributeName managedObjectContext:self.managedObjectContext]; + [attributeCache load]; + [self.attributeCaches addObject:attributeCache]; + } +} + +- (BOOL)isEntity:(NSEntityDescription *)entity cachedByAttribute:(NSString *)attributeName +{ + NSAssert(entity, @"Cannot check cache status for a nil entity"); + NSAssert(attributeName, @"Cannot check cache status for a nil attribute"); + RKEntityByAttributeCache *attributeCache = [self attributeCacheForEntity:entity attribute:attributeName]; + return (attributeCache && attributeCache.isLoaded); +} + +- (NSManagedObject *)objectForEntity:(NSEntityDescription *)entity withAttribute:(NSString *)attributeName value:(id)attributeValue inContext:(NSManagedObjectContext *)context +{ + NSAssert(entity, @"Cannot retrieve cached objects with a nil entity"); + NSAssert(attributeName, @"Cannot retrieve cached objects by a nil entity"); + RKEntityByAttributeCache *attributeCache = [self attributeCacheForEntity:entity attribute:attributeName]; + if (attributeCache) { + return [attributeCache objectWithAttributeValue:attributeValue inContext:context]; + } + + return nil; +} + +- (NSArray *)objectsForEntity:(NSEntityDescription *)entity withAttribute:(NSString *)attributeName value:(id)attributeValue inContext:(NSManagedObjectContext *)context +{ + NSAssert(entity, @"Cannot retrieve cached objects with a nil entity"); + NSAssert(attributeName, @"Cannot retrieve cached objects by a nil entity"); + RKEntityByAttributeCache *attributeCache = [self attributeCacheForEntity:entity attribute:attributeName]; + if (attributeCache) { + return [attributeCache objectsWithAttributeValue:attributeValue inContext:context]; + } + + return [NSSet set]; +} + +- (RKEntityByAttributeCache *)attributeCacheForEntity:(NSEntityDescription *)entity attribute:(NSString *)attributeName +{ + NSAssert(entity, @"Cannot retrieve attribute cache for a nil entity"); + NSAssert(attributeName, @"Cannot retrieve attribute cache for a nil attribute"); + for (RKEntityByAttributeCache *cache in self.attributeCaches) { + if ([cache.entity isEqual:entity] && [cache.attribute isEqualToString:attributeName]) { + return cache; + } + } + + return nil; +} + +- (NSSet *)attributeCachesForEntity:(NSEntityDescription *)entity +{ + NSAssert(entity, @"Cannot retrieve attribute caches for a nil entity"); + NSMutableSet *set = [NSMutableSet set]; + for (RKEntityByAttributeCache *cache in self.attributeCaches) { + if ([cache.entity isEqual:entity]) { + [set addObject:cache]; + } + } + + return [NSSet setWithSet:set]; +} + +- (void)flush +{ + [self.attributeCaches makeObjectsPerformSelector:@selector(flush)]; +} + +- (void)addObject:(NSManagedObject *)object +{ + NSAssert(object, @"Cannot add a nil object to the cache"); + NSArray *attributeCaches = [self attributeCachesForEntity:object.entity]; + for (RKEntityByAttributeCache *cache in attributeCaches) { + [cache addObject:object]; + } +} + +- (void)removeObject:(NSManagedObject *)object +{ + NSAssert(object, @"Cannot remove a nil object from the cache"); + NSArray *attributeCaches = [self attributeCachesForEntity:object.entity]; + for (RKEntityByAttributeCache *cache in attributeCaches) { + [cache removeObject:object]; + } +} + +@end diff --git a/Pods/RestKit/Code/CoreData/RKEntityMapping.h b/Pods/RestKit/Code/CoreData/RKEntityMapping.h new file mode 100644 index 00000000..5f2bf2a7 --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKEntityMapping.h @@ -0,0 +1,119 @@ +// +// RKEntityMapping.h +// RestKit +// +// Created by Blake Watters on 5/31/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import +#import "RKObjectMapping.h" +#import "RKConnectionMapping.h" +#import "RKMacros.h" + +@class RKManagedObjectStore; + +/** + RKEntityMapping objects model an object mapping with a Core Data destination entity. + */ +@interface RKEntityMapping : RKObjectMapping + +///----------------------------------------------------------------------------- +/// @name Initializing an Entity Mapping +///----------------------------------------------------------------------------- + +/** + Initializes the receiver with a given entity. + + @param entity An entity with which to initialize the receiver. + @returns The receiver, initialized with the given entity. + */ +- (id)initWithEntity:(NSEntityDescription *)entity; + +/** + A convenience initializer that creates and returns an entity mapping for the entity with the given name in + the managed object model of the given managed object store. + + This method is functionally equivalent to the following example code: + + NSEntityDescription *entity = [[managedObjectStore.managedObjectModel entitiesByName] objectForKey:entityName]; + return [RKEntityMapping mappingForEntity:entity]; + + @param entityName The name of the entity in the managed object model for which an entity mapping is to be created. + @param managedObjectStore A managed object store containing the managed object model in which an entity with the given name is defined. + @return A new entity mapping for the entity with the given name in the managed object model of the given managed object store. + */ ++ (id)mappingForEntityForName:(NSString *)entityName inManagedObjectStore:(RKManagedObjectStore *)managedObjectStore; + +/** + The Core Data entity description used for this object mapping + */ +@property (nonatomic, strong) NSEntityDescription *entity; + +/** + The name of the attribute on the destination entity that acts as the primary key for instances + of the entity in the remote backend system. Used to uniquely identify objects within the store + so that existing objects are updated rather than creating new ones. + + @warning Note that primaryKeyAttribute defaults to the primaryKeyAttribute configured + on the NSEntityDescription for the entity targetted by the receiving mapping. This provides + flexibility in cases where a single entity is the target of many mappings with differing + primary key definitions. + + If the `primaryKeyAttribute` is set on an `RKEntityMapping` that targets an entity with a + nil primaryKeyAttribute, then the primaryKeyAttribute will be set on the entity as well for + convenience and backwards compatibility. This may change in the future. + + @see `[NSEntityDescription primaryKeyAttribute]` + */ +// TODO: Make me readonly +@property (nonatomic, strong) NSString *primaryKeyAttribute; + +/** + Retrieves an array of RKConnectionMapping objects for connecting the receiver's relationships + by primary key. + + @see `RKConnectionMapping` + */ +@property (weak, nonatomic, readonly) NSArray *connectionMappings; + +/** + Adds a connection mapping to the receiver. + + @param connectionMapping The connection mapping to be added. + */ +- (void)addConnectionMapping:(RKConnectionMapping *)connectionMapping; +- (void)addConnectionMappingsFromArray:(NSArray *)arrayOfConnectionMappings; + +// Convenience method. +- (RKConnectionMapping *)addConnectionMappingForRelationshipForName:(NSString *)relationshipName + fromSourceKeyPath:(NSString *)sourceKeyPath + toKeyPath:(NSString *)destinationKeyPath + matcher:(RKDynamicMappingMatcher *)matcher; + +/** + Removes a connection mapping from the receiver. + + @param connectionMapping The connection mapping to be added. + */ +- (void)removeConnectionMapping:(RKConnectionMapping *)connectionMapping; + +/** + Returns the default value for the specified attribute as expressed in the Core Data entity definition. This value will + be assigned if the object mapping is applied and a value for a missing attribute is not present in the payload. + */ +- (id)defaultValueForMissingAttribute:(NSString *)attributeName; + +@end diff --git a/Pods/RestKit/Code/CoreData/RKEntityMapping.m b/Pods/RestKit/Code/CoreData/RKEntityMapping.m new file mode 100644 index 00000000..1abdd7a4 --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKEntityMapping.m @@ -0,0 +1,167 @@ +// +// RKEntityMapping.m +// RestKit +// +// Created by Blake Watters on 5/31/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKEntityMapping.h" +#import "RKManagedObjectStore.h" +#import "RKDynamicMappingMatcher.h" +#import "RKPropertyInspector+CoreData.h" +#import "NSEntityDescription+RKAdditions.h" +#import "RKLog.h" +#import "RKRelationshipMapping.h" +#import "RKObjectUtilities.h" + +// Set Logging Component +#undef RKLogComponent +#define RKLogComponent RKlcl_cRestKitCoreData + +@interface RKEntityMapping () +@property (nonatomic, weak, readwrite) Class objectClass; +@property (nonatomic, strong) NSMutableArray *mutableConnections; +@end + +@implementation RKEntityMapping + + ++ (id)mappingForClass:(Class)objectClass +{ + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"You must provide a managedObjectStore. Invoke mappingForClass:inManagedObjectStore: instead."] + userInfo:nil]; +} + ++ (id)mappingForEntityForName:(NSString *)entityName inManagedObjectStore:(RKManagedObjectStore *)managedObjectStore +{ + NSEntityDescription *entity = [[managedObjectStore.managedObjectModel entitiesByName] objectForKey:entityName]; + return [[self alloc] initWithEntity:entity]; +} + +- (id)initWithEntity:(NSEntityDescription *)entity +{ + NSAssert(entity, @"Cannot initialize an RKEntityMapping without an entity. Maybe you want RKObjectMapping instead?"); + Class objectClass = NSClassFromString([entity managedObjectClassName]); + NSAssert(objectClass, @"Cannot initialize an entity mapping for an entity with a nil managed object class: Got nil class for managed object class name '%@'. Maybe you forgot to add the class files to your target?", [entity managedObjectClassName]); + self = [self initWithClass:objectClass]; + if (self) { + self.entity = entity; + + [self addObserver:self forKeyPath:@"entity" options:NSKeyValueObservingOptionInitial context:nil]; + [self addObserver:self forKeyPath:@"primaryKeyAttribute" options:NSKeyValueObservingOptionInitial | NSKeyValueObservingOptionNew context:nil]; + } + + return self; +} + +- (id)initWithClass:(Class)objectClass +{ + self = [super initWithClass:objectClass]; + if (self) { + self.mutableConnections = [NSMutableArray array]; + } + + return self; +} + +- (void)dealloc +{ + [self removeObserver:self forKeyPath:@"entity"]; + [self removeObserver:self forKeyPath:@"primaryKeyAttribute"]; +} + +- (RKConnectionMapping *)connectionMappingForRelationshipWithName:(NSString *)relationshipName +{ + for (RKConnectionMapping *connection in self.connectionMappings) { + if ([connection.relationship.name isEqualToString:relationshipName]) { + return connection; + } + } + return nil; +} + +- (void)addConnectionMapping:(RKConnectionMapping *)mapping +{ + NSParameterAssert(mapping); + RKConnectionMapping *connectionMapping = [self connectionMappingForRelationshipWithName:mapping.relationship.name]; + NSAssert(connectionMapping == nil, @"Cannot add connect relationship %@ by primary key, a mapping already exists.", mapping.relationship.name); + NSAssert(self.mutableConnections, @"self.mutableConnections should not be nil"); + [self.mutableConnections addObject:mapping]; +} + +- (void)addConnectionMappingsFromArray:(NSArray *)arrayOfConnectionMappings +{ + for (RKConnectionMapping *connectionMapping in arrayOfConnectionMappings) { + [self addConnectionMapping:connectionMapping]; + } +} + +- (RKConnectionMapping *)addConnectionMappingForRelationshipForName:(NSString *)relationshipName + fromSourceKeyPath:(NSString *)sourceKeyPath + toKeyPath:(NSString *)destinationKeyPath + matcher:(RKDynamicMappingMatcher *)matcher +{ + NSRelationshipDescription *relationship = [[self.entity propertiesByName] objectForKey:relationshipName]; + NSAssert(relationship, @"Unable to find a relationship named '%@' in the entity: %@", relationshipName, self.entity); + RKConnectionMapping *connectionMapping = [[RKConnectionMapping alloc] initWithRelationship:relationship sourceKeyPath:sourceKeyPath destinationKeyPath:destinationKeyPath matcher:matcher]; + [self addConnectionMapping:connectionMapping]; + return connectionMapping; +} + +- (void)removeConnectionMapping:(RKConnectionMapping *)connectionMapping +{ + [self.mutableConnections removeObject:connectionMapping]; +} + +- (id)defaultValueForMissingAttribute:(NSString *)attributeName +{ + NSAttributeDescription *desc = [[self.entity attributesByName] valueForKey:attributeName]; + return [desc defaultValue]; +} + +- (Class)classForProperty:(NSString *)propertyName +{ + Class propertyClass = [super classForProperty:propertyName]; + if (! propertyClass) { + propertyClass = [[RKPropertyInspector sharedInspector] typeForProperty:propertyName ofEntity:self.entity]; + } + + return propertyClass; +} + +/* + Allows the primaryKeyAttributeName property on the NSEntityDescription to configure the mapping and vice-versa + */ +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context +{ + if ([keyPath isEqualToString:@"entity"]) { + if (! self.primaryKeyAttribute) { + self.primaryKeyAttribute = [self.entity primaryKeyAttributeName]; + } + } else if ([keyPath isEqualToString:@"primaryKeyAttribute"]) { + if (! self.entity.primaryKeyAttribute) { + self.entity.primaryKeyAttributeName = self.primaryKeyAttribute; + } + } +} + +- (NSArray *)connectionMappings +{ + return [NSArray arrayWithArray:self.mutableConnections]; +} + +@end diff --git a/Pods/RestKit/Code/CoreData/RKFetchRequestManagedObjectCache.h b/Pods/RestKit/Code/CoreData/RKFetchRequestManagedObjectCache.h new file mode 100644 index 00000000..d68ab6a0 --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKFetchRequestManagedObjectCache.h @@ -0,0 +1,19 @@ +// +// RKFetchRequestManagedObjectCache.h +// RestKit +// +// Created by Jeff Arena on 1/24/12. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// + +#import "RKManagedObjectCaching.h" + +/** + Provides a simple managed object cache strategy in which every request for an object + is satisfied by dispatching an NSFetchRequest against the Core Data persistent store. + Performance can be disappointing for data sets with a large amount of redundant data + being mapped and connected together, but the memory footprint stays flat. + */ +@interface RKFetchRequestManagedObjectCache : NSObject + +@end diff --git a/Pods/RestKit/Code/CoreData/RKFetchRequestManagedObjectCache.m b/Pods/RestKit/Code/CoreData/RKFetchRequestManagedObjectCache.m new file mode 100644 index 00000000..562d36bc --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKFetchRequestManagedObjectCache.m @@ -0,0 +1,74 @@ +// +// RKFetchRequestMappingCache.m +// RestKit +// +// Created by Jeff Arena on 1/24/12. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// + +#import "RKFetchRequestManagedObjectCache.h" +#import "NSEntityDescription+RKAdditions.h" +#import "RKLog.h" +#import "RKPropertyInspector.h" +#import "RKPropertyInspector+CoreData.h" + +// Set Logging Component +#undef RKLogComponent +#define RKLogComponent RKlcl_cRestKitCoreData + +@implementation RKFetchRequestManagedObjectCache + +- (NSArray *)findInstancesOfEntity:(NSEntityDescription *)entity + withPrimaryKeyAttribute:(NSString *)primaryKeyAttribute + value:(id)primaryKeyValue + inManagedObjectContext:(NSManagedObjectContext *)managedObjectContext +{ + NSAssert(entity, @"Cannot find existing managed object without a target class"); + NSAssert(primaryKeyAttribute, @"Cannot find existing managed object instance without mapping that defines a primaryKeyAttribute"); + NSAssert(managedObjectContext, @"Cannot find existing managed object with a nil context"); + + id searchValue = primaryKeyValue; + Class type = [[RKPropertyInspector sharedInspector] typeForProperty:primaryKeyAttribute ofEntity:entity]; + if (type && ([type isSubclassOfClass:[NSString class]] && NO == [primaryKeyValue isKindOfClass:[NSString class]])) { + searchValue = [NSString stringWithFormat:@"%@", primaryKeyValue]; + } else if (type && ([type isSubclassOfClass:[NSNumber class]] && NO == [primaryKeyValue isKindOfClass:[NSNumber class]])) { + if ([primaryKeyValue isKindOfClass:[NSString class]]) { + searchValue = [NSNumber numberWithDouble:[(NSString *)primaryKeyValue doubleValue]]; + } + } + + // Use cached predicate if primary key matches + NSPredicate *predicate = nil; + if ([entity.primaryKeyAttributeName isEqualToString:primaryKeyAttribute]) { + predicate = [entity predicateForPrimaryKeyAttributeWithValue:searchValue]; + } else { + // Parse a predicate + predicate = [NSPredicate predicateWithFormat:@"%K = %@", primaryKeyAttribute, searchValue]; + } + NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:[entity name]]; + fetchRequest.predicate = predicate; + NSError *error = nil; + NSArray *objects = [managedObjectContext executeFetchRequest:fetchRequest error:&error]; + if (! objects) { + RKLogError(@"Failed to execute fetch request due to error: %@", error); + } + RKLogDebug(@"Found objects '%@' using fetchRequest '%@'", objects, fetchRequest); + + return objects; +} + +- (NSManagedObject *)findInstanceOfEntity:(NSEntityDescription *)entity + withPrimaryKeyAttribute:(NSString *)primaryKeyAttribute + value:(id)primaryKeyValue + inManagedObjectContext:(NSManagedObjectContext *)managedObjectContext +{ + NSArray *objects = [self findInstancesOfEntity:entity withPrimaryKeyAttribute:primaryKeyAttribute value:primaryKeyValue inManagedObjectContext:managedObjectContext]; + + NSManagedObject *object = nil; + if ([objects count] > 0) { + object = [objects objectAtIndex:0]; + } + return object; +} + +@end diff --git a/Pods/RestKit/Code/CoreData/RKInMemoryManagedObjectCache.h b/Pods/RestKit/Code/CoreData/RKInMemoryManagedObjectCache.h new file mode 100644 index 00000000..6e725752 --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKInMemoryManagedObjectCache.h @@ -0,0 +1,40 @@ +// +// RKInMemoryManagedObjectCache.h +// RestKit +// +// Created by Jeff Arena on 1/24/12. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKManagedObjectCaching.h" + +/** + Provides a fast managed object cache where-in object instances are retained in memory to avoid hitting the Core Data persistent store. Performance is greatly increased over fetch request based strategy at the expense of memory consumption. + */ +@interface RKInMemoryManagedObjectCache : NSObject + +///--------------------------- +/// @name Initializing a Cache +///--------------------------- + +/** + Initializes the receiver with a managed object context that is to be observed and used to populate the in memory cache. The receiver may then be used to fulfill cache requests for child contexts of the given managed object context. + + @param managedObjectContext The managed object context with which to initialize the receiver. + @return The receiver, initialized with the given managed object context. + */ +- (id)initWithManagedObjectContext:(NSManagedObjectContext *)managedObjectContext; + +@end diff --git a/Pods/RestKit/Code/CoreData/RKInMemoryManagedObjectCache.m b/Pods/RestKit/Code/CoreData/RKInMemoryManagedObjectCache.m new file mode 100644 index 00000000..3c931226 --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKInMemoryManagedObjectCache.m @@ -0,0 +1,104 @@ +// +// RKInMemoryManagedObjectCache.m +// RestKit +// +// Created by Jeff Arena on 1/24/12. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKInMemoryManagedObjectCache.h" +#import "NSEntityDescription+RKAdditions.h" +#import "RKEntityCache.h" +#import "RKLog.h" +#import "RKEntityByAttributeCache.h" + +// Set Logging Component +#undef RKLogComponent +#define RKLogComponent RKlcl_cRestKitCoreData + +@interface RKInMemoryManagedObjectCache () +@property (nonatomic, strong, readwrite) RKEntityCache *entityCache; +@end + +@implementation RKInMemoryManagedObjectCache + +- (id)initWithManagedObjectContext:(NSManagedObjectContext *)managedObjectContext +{ + self = [super init]; + if (self) { + self.entityCache = [[RKEntityCache alloc] initWithManagedObjectContext:managedObjectContext]; + } + + return self; +} + +- (id)init +{ + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"%@ Failed to call designated initializer. Invoke initWithManagedObjectContext: instead.", + NSStringFromClass([self class])] + userInfo:nil]; +} + + +- (NSManagedObject *)findInstanceOfEntity:(NSEntityDescription *)entity + withPrimaryKeyAttribute:(NSString *)primaryKeyAttribute + value:(id)primaryKeyValue + inManagedObjectContext:(NSManagedObjectContext *)managedObjectContext +{ + NSAssert(self.entityCache, @"Entity cache cannot be nil."); + if (! [self.entityCache isEntity:entity cachedByAttribute:primaryKeyAttribute]) { + RKLogInfo(@"Caching instances of Entity '%@' by primary key attribute '%@'", entity.name, primaryKeyAttribute); + [self.entityCache cacheObjectsForEntity:entity byAttribute:primaryKeyAttribute]; + RKEntityByAttributeCache *attributeCache = [self.entityCache attributeCacheForEntity:entity attribute:primaryKeyAttribute]; + RKLogTrace(@"Cached %ld objects", (long)[attributeCache count]); + } + + return [self.entityCache objectForEntity:entity withAttribute:primaryKeyAttribute value:primaryKeyValue inContext:managedObjectContext]; +} + +- (NSArray *)findInstancesOfEntity:(NSEntityDescription *)entity + withPrimaryKeyAttribute:(NSString *)primaryKeyAttribute + value:(id)primaryKeyValue + inManagedObjectContext:(NSManagedObjectContext *)managedObjectContext +{ + NSAssert(self.entityCache, @"Entity cache cannot be nil."); + + if (! [self.entityCache isEntity:entity cachedByAttribute:primaryKeyAttribute]) { + RKLogInfo(@"Caching instances of Entity '%@' by primary key attribute '%@'", entity.name, primaryKeyAttribute); + [self.entityCache cacheObjectsForEntity:entity byAttribute:primaryKeyAttribute]; + RKEntityByAttributeCache *attributeCache = [self.entityCache attributeCacheForEntity:entity attribute:primaryKeyAttribute]; + RKLogTrace(@"Cached %ld objects", (long)[attributeCache count]); + } + + return [self.entityCache objectsForEntity:entity withAttribute:primaryKeyAttribute value:primaryKeyValue inContext:managedObjectContext]; +} + +- (void)didFetchObject:(NSManagedObject *)object +{ + [self.entityCache addObject:object]; +} + +- (void)didCreateObject:(NSManagedObject *)object +{ + [self.entityCache addObject:object]; +} + +- (void)didDeleteObject:(NSManagedObject *)object +{ + [self.entityCache removeObject:object]; +} + +@end diff --git a/Pods/RestKit/Code/CoreData/RKManagedObjectCaching.h b/Pods/RestKit/Code/CoreData/RKManagedObjectCaching.h new file mode 100644 index 00000000..1777bcef --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKManagedObjectCaching.h @@ -0,0 +1,84 @@ +// +// RKManagedObjectCaching.h +// RestKit +// +// Created by Jeff Arena on 1/24/12. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// + +#import + +/** + Objects implementing the RKManagedObjectCaching protocol can act as the cache + strategy for RestKit managed object stores. The managed object cache is consulted + when objects are retrieved from Core Data during object mapping operations and provide + an opportunity to accelerate the mapping process by trading memory for speed. + */ +@protocol RKManagedObjectCaching + +@required + +///------------------------------ +/// @name Finding Managed Objects +///------------------------------ + +/** + Retrieves a model object from the object store given a Core Data entity and + the primary key attribute and value for the desired object. + + @param entity The Core Data entity for the type of object to be retrieved from the cache. + @param primaryKeyAttribute The name of the attribute that acts as the primary key for the entity. + @param primaryKeyValue The value for the primary key attribute of the object to be retrieved from the cache. + @param managedObjectContext The managed object context to be searched for a matching instance. + @return A managed object that is an instance of the given entity with a primary key and value matching + the specified parameters, or nil if no object was found. + */ +- (NSManagedObject *)findInstanceOfEntity:(NSEntityDescription *)entity + withPrimaryKeyAttribute:(NSString *)primaryKeyAttribute + value:(id)primaryKeyValue + inManagedObjectContext:(NSManagedObjectContext *)managedObjectContext; + +/** + Retrieves an array of model objects from the object store given a Core Data entity and + the primary key attribute and value for the desired object. + + @param entity The Core Data entity for the type of object to be retrieved from the cache. + @param primaryKeyAttribute The name of the attribute that acts as the primary key for the entity. + @param primaryKeyValue The value for the primary key attribute of the object to be retrieved from the cache. + @param managedObjectContext The managed object context to be searched for a matching instance. + @return An array of managed objects that are instances of the given entity with a primary key and value matching + the specified parameters, or nil if no object was found. + */ +- (NSArray *)findInstancesOfEntity:(NSEntityDescription *)entity + withPrimaryKeyAttribute:(NSString *)primaryKeyAttribute + value:(id)primaryKeyValue + inManagedObjectContext:(NSManagedObjectContext *)managedObjectContext; + +///--------------------------------------------------- +/// @name Handling Managed Object Change Notifications +///--------------------------------------------------- + +@optional + +/** + Invoked to inform the receiver that an object was fetched and should be added to the cache. + + @param object The object that was fetched from a managed object context. + */ +- (void)didFetchObject:(NSManagedObject *)object; + +/** + Invoked to inform the receiver that an object was created and should be added to the cache. + + @param object The object that was created in a managed object context. + */ +- (void)didCreateObject:(NSManagedObject *)object; + +/** + Invoked to inform the receiver that an object was deleted and should be removed to the cache. + + @param object The object that was deleted from a managed object context. + */ +- (void)didDeleteObject:(NSManagedObject *)object; + +@end diff --git a/Pods/RestKit/Code/CoreData/RKManagedObjectImporter.h b/Pods/RestKit/Code/CoreData/RKManagedObjectImporter.h new file mode 100644 index 00000000..a34b1fc2 --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKManagedObjectImporter.h @@ -0,0 +1,152 @@ +// +// RKManagedObjectImporter.h +// RestKit +// +// Created by Blake Watters on 3/4/10. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import + +@class RKMapping, RKObjectManager; + +/** + Instances of RKManagedObjectImporter perform bulk imports of managed objects into a persistent store from + source files (typically in JSON or XML format) using object mappings. The importer provides functionality + for updating an existing persistent store or creating a seed database that can be used to bootstrap a new + persistent store with an initial data set. + + The importer requires that the source files have a MIME type that is identifiable by file extension and be + parsable using a parser registered with the shared parser registry. + + @see RKParserRegistry + */ +@interface RKManagedObjectImporter : NSObject + +///----------------------------------------------------------------------------- +/// @name Initializing an Importer +///----------------------------------------------------------------------------- + +/** + Initializes the receiver with a given managed object model and a path at which a SQLite persistent store + should be created to persist imported managed objects. + + When initialized with a managed object model and store path, the receiver will construct an internal + persistent store coordinator, SQLite persistent store, and managed object context with the private queue + concurrency type with which to perform the importing. + + @param managedObjectModel A Core Data manage object model with which to initialize the receiver. + @param storePath The path at which to create a SQLite persistent store to persist the imported managed objects. + @return The receiver, initialized with the given managed object model and a complete Core Data persistence + stack with a SQLite persistent store at the given store path. + + @warning As this initialization code path is typical for generating seed databases, the value of + `resetsStoreBeforeImporting` is initialized to **YES**. + */ +- (id)initWithManagedObjectModel:(NSManagedObjectModel *)managedObjectModel storePath:(NSString *)storePath; + +/** + Initializes the receiver with a given persistent store in which to persist imported managed objects. + + When initialized with a persistent store, the receiver will construct a managed object context with the + private queue concurrency type and the persistent store coordinator of the given persistent store. This + prepares the receiver for importing content into an existing Core Data persistence stack. + + @param persistentStore A Core Data persistent store with which to initialize the receiver. + @return The receiver, initialized with the given persistent store. The persistent store coordinator and + managed object model are determined from the given persistent store and a new managed object context with + the private queue concurrency type is constructed. + */ +- (id)initWithPersistentStore:(NSPersistentStore *)persistentStore; + +/** + A Boolean value indicating whether existing managed objects in the persistent store should + be deleted before import. + + The default value of this property is YES if the receiver was initialized with a + managed object model and store path, else NO. + */ +@property (nonatomic, assign) BOOL resetsStoreBeforeImporting; + +///----------------------------------------------------------------------------- +/// @name Accessing Core Data Details +///----------------------------------------------------------------------------- + +/** + The persistent store in which imported managed objects will be persisted. + */ +@property (nonatomic, strong, readonly) NSPersistentStore *persistentStore; + +/** + The managed object model containing entities that may be imported by the receiver. + */ +@property (nonatomic, strong, readonly) NSManagedObjectModel *managedObjectModel; + +/** + A managed object context with the NSPrivateQueueConcurrencyType concurrency type + used to perform the import. + */ +@property (nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext; + +/** + A convenience accessor for retrieving the complete filesystem path to the persistent + store in which the receiver will persist imported managed objects. + + Equivalent to executing the following example code: + + NSURL *URL = [importer.persistentStore.persistentStoreCoordinator URLForPersistentStore:importer.persistentStore]; + return [URL path]; + + */ +@property (nonatomic, strong, readonly) NSString *storePath; + +///----------------------------------------------------------------------------- +/// @name Importing Managed Objects +///----------------------------------------------------------------------------- + +/** + Imports managed objects from the file or directory at the given path. + + @param path The path to the file or directory you wish to import. This parameter must not be nil. + @param mapping The entity or dynamic mapping you wish to use for importing content at the given path. + @param keyPath An optional key path to be evaluated against the results of parsing the content read at the given path. If the + mappable content is not contained in a nesting attribute, the key path should be specified as nil. + @param error On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing + the error information. You may specify nil for this parameter if you do not want the error information. + @return A count of the number of managed object imported from the given path or NSNotFound if an error occurred during import. + */ +- (NSUInteger)importObjectsFromItemAtPath:(NSString *)path withMapping:(RKMapping *)mapping keyPath:(NSString *)keyPath error:(NSError **)error; + +/** + Finishes the import process by saving the managed object context to the persistent store, ensuring all + imported managed objects are written to disk. + + @param error On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing + the error information. You may specify nil for this parameter if you do not want the error information. + @return YES if the save to the persistent store was successful, else NO. + */ +- (BOOL)finishImporting:(NSError **)error; + +///----------------------------------------------------------------------------- +/// @name Obtaining Seeding Info +///----------------------------------------------------------------------------- + +/** + Logs information about where on the filesystem to access the SQLite database for the persistent + store in which the imported managed objects were persisted. + */ +- (void)logSeedingInfo; + +@end diff --git a/Pods/RestKit/Code/CoreData/RKManagedObjectImporter.m b/Pods/RestKit/Code/CoreData/RKManagedObjectImporter.m new file mode 100644 index 00000000..a6394256 --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKManagedObjectImporter.m @@ -0,0 +1,301 @@ +// +// RKManagedObjectImporter.m +// RestKit +// +// Created by Blake Watters on 3/4/10. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#if TARGET_OS_IPHONE +#import +#endif + +#import "RKManagedObjectImporter.h" +#import "RKMapperOperation.h" +#import "RKManagedObjectMappingOperationDataSource.h" +#import "RKInMemoryManagedObjectCache.h" +#import "RKMIMETypeSerialization.h" +#import "RKPathUtilities.h" +#import "RKLog.h" + +// Set Logging Component +#undef RKLogComponent +#define RKLogComponent RKlcl_cRestKitCoreData + +@interface RKManagedObjectImporter () +@property (nonatomic, strong, readwrite) NSManagedObjectModel *managedObjectModel; +@property (nonatomic, strong, readwrite) NSString *storePath; +@property (nonatomic, strong, readwrite) NSPersistentStoreCoordinator *persistentStoreCoordinator; +@property (nonatomic, strong, readwrite) NSPersistentStore *persistentStore; +@property (nonatomic, strong, readwrite) NSManagedObjectContext *managedObjectContext; +@property (nonatomic, strong, readwrite) RKManagedObjectMappingOperationDataSource *mappingOperationDataSource; +@property (nonatomic, strong, readwrite) NSOperationQueue *connectionQueue; +@property (nonatomic, assign) BOOL hasPerformedResetIfNecessary; +@end + +@implementation RKManagedObjectImporter + +- (id)initWithManagedObjectModel:(NSManagedObjectModel *)managedObjectModel storePath:(NSString *)storePath +{ + NSParameterAssert(managedObjectModel); + NSParameterAssert(storePath); + + self = [super init]; + if (self) { + self.managedObjectModel = managedObjectModel; + self.storePath = storePath; + + NSError *error = nil; + NSPersistentStoreCoordinator *persistentStoreCoordinator = [self createPersistentStoreCoordinator:&error]; + NSAssert(persistentStoreCoordinator, @"Importer initialization failed: Unable to create persistent store coordinator: %@", error); + self.persistentStoreCoordinator = persistentStoreCoordinator; + + NSManagedObjectContext *managedObjectContext = [self createManagedObjectContext]; + NSAssert(managedObjectContext, @"Importer initialization failed: Unable to create managed object context"); + self.managedObjectContext = managedObjectContext; + + self.connectionQueue = [NSOperationQueue new]; + [self.connectionQueue setName:@"RKManagedObjectImporter Connection Queue"]; + [self.connectionQueue setSuspended:YES]; + + RKManagedObjectMappingOperationDataSource *mappingOperationDataSource = [self createMappingOperationDataSource]; + self.mappingOperationDataSource = mappingOperationDataSource; + + self.hasPerformedResetIfNecessary = NO; + self.resetsStoreBeforeImporting = YES; + } + + return self; +} + +- (id)initWithPersistentStore:(NSPersistentStore *)persistentStore +{ + NSParameterAssert(persistentStore); + + self = [super init]; + if (self) { + self.persistentStoreCoordinator = persistentStore.persistentStoreCoordinator; + self.managedObjectModel = persistentStore.persistentStoreCoordinator.managedObjectModel; + + NSURL *storeURL = [self.persistentStoreCoordinator URLForPersistentStore:persistentStore]; + self.storePath = [storeURL path]; + + NSManagedObjectContext *managedObjectContext = [self createManagedObjectContext]; + NSAssert(managedObjectContext, @"Importer initialization failed: Unable to create managed object store"); + self.managedObjectContext = managedObjectContext; + + self.connectionQueue = [NSOperationQueue new]; + [self.connectionQueue setName:@"RKManagedObjectImporter Connection Queue"]; + [self.connectionQueue setSuspended:YES]; + + RKManagedObjectMappingOperationDataSource *mappingOperationDataSource = [self createMappingOperationDataSource]; + self.mappingOperationDataSource = mappingOperationDataSource; + + self.hasPerformedResetIfNecessary = NO; + self.resetsStoreBeforeImporting = NO; + } + + return self; +} + +- (id)init +{ + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"%@ Failed to call designated initializer. Invoke initWithManagedObjectModel:storePath: instead.", + NSStringFromClass([self class])] + userInfo:nil]; +} + +- (NSPersistentStoreCoordinator *)createPersistentStoreCoordinator:(NSError **)error +{ + BOOL isDirectory = NO; + [[NSFileManager defaultManager] fileExistsAtPath:self.storePath isDirectory:&isDirectory]; + NSAssert(!isDirectory, @"Cannot create SQLite persistent store: The given store path specifies a directory."); + + NSURL *storeURL = [NSURL fileURLWithPath:self.storePath]; + NSPersistentStoreCoordinator *persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:self.managedObjectModel]; + NSPersistentStore *persistentStore = [persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType + configuration:nil + URL:storeURL + options:nil error:error]; + if (! persistentStore) { + return nil; + } + + return persistentStoreCoordinator; +} + +- (NSManagedObjectContext *)createManagedObjectContext +{ + NSManagedObjectContext *managedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType]; + [managedObjectContext performBlockAndWait:^{ + managedObjectContext.persistentStoreCoordinator = self.persistentStoreCoordinator; + managedObjectContext.mergePolicy = NSMergeByPropertyObjectTrumpMergePolicy; + }]; + + return managedObjectContext; +} + +- (RKManagedObjectMappingOperationDataSource *)createMappingOperationDataSource +{ + NSAssert(self.connectionQueue, @"Connection Queue cannot be nil"); + RKInMemoryManagedObjectCache *managedObjectCache = [[RKInMemoryManagedObjectCache alloc] initWithManagedObjectContext:self.managedObjectContext]; + RKManagedObjectMappingOperationDataSource *mappingOperationDataSource = [[RKManagedObjectMappingOperationDataSource alloc] initWithManagedObjectContext:self.managedObjectContext + cache:managedObjectCache]; + mappingOperationDataSource.operationQueue = self.connectionQueue; + + return mappingOperationDataSource; +} + + +- (void)resetPersistentStoreIfNecessary +{ + if (self.hasPerformedResetIfNecessary) return; + + if (self.resetsStoreBeforeImporting) { + RKLogInfo(@"Persistent store reset requested before importing. Deleting existing managed object instances..."); + for (NSEntityDescription *entity in self.managedObjectModel.entities) { + @autoreleasepool { + NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; + fetchRequest.entity = entity; + [self.managedObjectContext performBlockAndWait:^{ + NSError *error; + NSArray *managedObjects = [self.managedObjectContext executeFetchRequest:fetchRequest error:&error]; + RKLogInfo(@"Deleting %ld managed object instances for the '%@' entity", (unsigned long) [managedObjects count], entity.name); + for (NSManagedObject *managedObject in managedObjects) { + [self.managedObjectContext deleteObject:managedObject]; + } + }]; + } + } + } + + self.hasPerformedResetIfNecessary = YES; +} + +- (NSUInteger)importObjectsFromFileAtPath:(NSString *)path withMapping:(RKMapping *)mapping keyPath:(NSString *)keyPath error:(NSError **)error +{ + NSParameterAssert(path); + NSParameterAssert(mapping); + + // Perform the reset on the first import action if requested + [self resetPersistentStoreIfNecessary]; + + __block NSError *localError = nil; + NSData *payload = [NSData dataWithContentsOfFile:path options:0 error:&localError]; + if (! payload) { + RKLogError(@"Failed to read file at path '%@': %@", path, [localError localizedDescription]); + if (error) *error = localError; + return NSNotFound; + } + + NSString *MIMEType = RKMIMETypeFromPathExtension(path); + id parsedData = [RKMIMETypeSerialization objectFromData:payload MIMEType:MIMEType error:&localError]; + if (!parsedData) { + RKLogError(@"Failed to parse file at path '%@': %@", path, [localError localizedDescription]); + } + + if (! parsedData) { + if (error) *error = localError; + return NSNotFound; + } + + NSDictionary *mappingDictionary = @{ (keyPath ?: [NSNull null]) : mapping }; + RKMapperOperation *mapper = [[RKMapperOperation alloc] initWithObject:parsedData mappingsDictionary:mappingDictionary]; + mapper.mappingOperationDataSource = self.mappingOperationDataSource; + __block RKMappingResult *mappingResult; + [self.managedObjectContext performBlockAndWait:^{ + [mapper start]; + mappingResult = mapper.mappingResult; + localError = mapper.error; + }]; + if (mappingResult == nil) { + if (error) *error = localError; + RKLogError(@"Importing file at path '%@' failed with error: %@", path, localError); + return NSNotFound; + } + + NSUInteger objectCount = [mappingResult count]; + RKLogInfo(@"Imported %lu objects from file at path '%@'", (unsigned long)objectCount, path); + return objectCount; +} + +- (NSUInteger)importObjectsFromDirectoryAtPath:(NSString *)path withMapping:(RKMapping *)mapping keyPath:(NSString *)keyPath error:(NSError **)error +{ + NSError *localError = nil; + NSArray *entries = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:path error:&localError]; + if (! entries) { + RKLogError(@"Import failed for directory at path '%@': Unable to read directory contents with error: %@", path, localError); + if (error) *error = localError; + return NSNotFound; + } + + NSUInteger aggregateObjectCount = 0; + for (NSString *entry in entries) { + NSUInteger objectCount = [self importObjectsFromFileAtPath:path withMapping:mapping keyPath:keyPath error:&localError]; + if (objectCount == NSNotFound) { + if (error) *error = localError; + return NSNotFound; + } else { + aggregateObjectCount += objectCount; + } + } + + return aggregateObjectCount; +} + +- (NSUInteger)importObjectsFromItemAtPath:(NSString *)path withMapping:(RKMapping *)mapping keyPath:(NSString *)keyPath error:(NSError **)error +{ + NSParameterAssert(path); + NSParameterAssert(mapping); + + BOOL isDirectory; + [[NSFileManager defaultManager] fileExistsAtPath:path isDirectory:&isDirectory]; + if (isDirectory) { + return [self importObjectsFromDirectoryAtPath:path withMapping:mapping keyPath:keyPath error:error]; + } + + return [self importObjectsFromFileAtPath:path withMapping:mapping keyPath:keyPath error:error]; +} + +- (BOOL)finishImporting:(NSError **)error +{ + // Perform our connection operations in a batch, before we save the MOC + [self.connectionQueue setSuspended:NO]; + [self.connectionQueue waitUntilAllOperationsAreFinished]; + + __block BOOL success; + __block NSError *localError = nil; + [self.managedObjectContext performBlockAndWait:^{ + success = [self.managedObjectContext save:&localError]; + if (! success) { + RKLogCoreDataError(localError); + } + }]; + + if (! success && error) *error = localError; + return success; +} + +- (void)logSeedingInfo +{ + NSString *storeDirectory = [self.storePath stringByDeletingLastPathComponent]; + NSString *storeFilename = [self.storePath lastPathComponent]; + RKLogCritical(@"A seed database has been generated at '%@'. " + @"Please execute `open \"%@\"` in your Terminal and copy %@ to your app. Be sure to add the seed database to your \"Copy Resources\" build phase.", + self.storePath, storeDirectory, storeFilename); +} + +@end diff --git a/Pods/RestKit/Code/CoreData/RKManagedObjectMappingOperationDataSource.h b/Pods/RestKit/Code/CoreData/RKManagedObjectMappingOperationDataSource.h new file mode 100644 index 00000000..f03739dc --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKManagedObjectMappingOperationDataSource.h @@ -0,0 +1,84 @@ +// +// RKManagedObjectMappingOperationDataSource.h +// RestKit +// +// Created by Blake Watters on 7/3/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import +#import "RKMappingOperationDataSource.h" + +@protocol RKManagedObjectCaching; + +/** + The `RKManagedObjectMappingOperationDataSource` class provides support for performing object mapping operations where the mapped objects exist within a Core Data managed object context. The class is responsible for finding exist managed object instances by primary key, instantiating new managed objects, and connecting relationships for mapped objects. + + @see `RKMappingOperationDataSource` + @see `RKConnectionMapping` + */ +@interface RKManagedObjectMappingOperationDataSource : NSObject + +///------------------------------------------------------------------ +/// @name Initializing a Managed Object Mapping Operation Data Source +///------------------------------------------------------------------ + +/** + Initializes the receiver with a given managed object context and managed object cache. + + @param managedObjectContext The managed object context with which to associate the receiver. Cannot be nil. + @param managedObjectCache The managed object cache used by the receiver to find existing object instances by primary key. + @return The receiver, initialized with the given managed object context and managed objet cache. + */ +- (id)initWithManagedObjectContext:(NSManagedObjectContext *)managedObjectContext cache:(id)managedObjectCache; + +///----------------------------------------------------- +/// @name Accessing the Managed Object Context and Cache +///----------------------------------------------------- + +/** + The managed object context with which the receiver is associated. + */ +@property (nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext; + +/** + The managed object cache utilized by the receiver to find existing managed object instances by primary key. A nil managed object cache will result in the insertion of new managed objects for all mapped content. + + @see `RKFetchRequestManagedObjectCache` + @see `RKInMemoryManagedObjectCache` + */ +@property (nonatomic, strong, readonly) id managedObjectCache; + +///--------------------------------------------------- +/// @name Configuring Relationship Connection Queueing +///--------------------------------------------------- + +/** + The parent operation upon which instances of `RKRelationshipConnectionOperation` created by the data source are dependent upon. + + When connecting relationships as part of a managed object mapping operation, it is possible that the mapping operation itself will create managed objects that should be used to satisfy the connections mappings of representations being mapped. To support such cases, is is desirable to defer the execution of connection operations until the execution of the aggregate mapping operation is complete. The `parentOperation` property provides support for deferring the execution of the enqueued relationship connection operations by establishing a dependency between the connection operations and a parent operation, such as an instance of `RKMapperOperation` such that they will not be executed by the `operationQueue` until the parent operation has finished executing. + */ +@property (nonatomic, weak) NSOperation *parentOperation; + +/** + The operation queue in which instances of `RKRelationshipConnectionOperation` will be enqueued to connect the relationships of mapped objects. + + If `nil`, then current operation queue as returned from `[NSOperationQueue currentQueue]` will be used. + + Please see the documentation for `parentOperation` for a discussion of this property's function. + */ +@property (nonatomic, strong) NSOperationQueue *operationQueue; + +@end diff --git a/Pods/RestKit/Code/CoreData/RKManagedObjectMappingOperationDataSource.m b/Pods/RestKit/Code/CoreData/RKManagedObjectMappingOperationDataSource.m new file mode 100644 index 00000000..1e88a1ae --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKManagedObjectMappingOperationDataSource.m @@ -0,0 +1,180 @@ +// +// RKManagedObjectMappingOperationDataSource.m +// RestKit +// +// Created by Blake Watters on 7/3/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKManagedObjectMappingOperationDataSource.h" +#import "RKObjectMapping.h" +#import "RKEntityMapping.h" +#import "RKLog.h" +#import "RKManagedObjectStore.h" +#import "RKMappingOperation.h" +#import "RKDynamicMappingMatcher.h" +#import "RKManagedObjectCaching.h" +#import "RKRelationshipConnectionOperation.h" +#import "RKMappingErrors.h" + +// Set Logging Component +#undef RKLogComponent +#define RKLogComponent RKlcl_cRestKitCoreData + +extern NSString * const RKObjectMappingNestingAttributeKeyName; + +@interface RKManagedObjectMappingOperationDataSource () +@property (nonatomic, strong, readwrite) NSManagedObjectContext *managedObjectContext; +@property (nonatomic, strong, readwrite) id managedObjectCache; +@end + +@implementation RKManagedObjectMappingOperationDataSource + +- (id)initWithManagedObjectContext:(NSManagedObjectContext *)managedObjectContext cache:(id)managedObjectCache +{ + NSParameterAssert(managedObjectContext); + + self = [self init]; + if (self) { + self.managedObjectContext = managedObjectContext; + self.managedObjectCache = managedObjectCache; + } + + return self; +} + +- (id)mappingOperation:(RKMappingOperation *)mappingOperation targetObjectForRepresentation:(NSDictionary *)representation withMapping:(RKObjectMapping *)mapping +{ + NSAssert(representation, @"Mappable data cannot be nil"); + NSAssert(self.managedObjectContext, @"%@ must be initialized with a managed object context.", [self class]); + + if (! [mapping isKindOfClass:[RKEntityMapping class]]) { + return [mapping.objectClass new]; + } + + RKEntityMapping *entityMapping = (RKEntityMapping *)mapping; + id object = nil; + id primaryKeyValue = nil; + NSString *primaryKeyAttribute; + + NSEntityDescription *entity = [entityMapping entity]; + RKAttributeMapping *primaryKeyAttributeMapping = nil; + + primaryKeyAttribute = [entityMapping primaryKeyAttribute]; + if (primaryKeyAttribute) { + // If a primary key has been set on the object mapping, find the attribute mapping + // so that we can extract any existing primary key from the mappable data + for (RKAttributeMapping *attributeMapping in entityMapping.attributeMappings) { + if ([attributeMapping.destinationKeyPath isEqualToString:primaryKeyAttribute]) { + primaryKeyAttributeMapping = attributeMapping; + break; + } + } + + // Get the primary key value out of the mappable data (if any) + if ([primaryKeyAttributeMapping.sourceKeyPath isEqualToString:RKObjectMappingNestingAttributeKeyName]) { + RKLogDebug(@"Detected use of nested dictionary key as primaryKey attribute..."); + primaryKeyValue = [[representation allKeys] lastObject]; + } else { + NSString* keyPathForPrimaryKeyElement = primaryKeyAttributeMapping.sourceKeyPath; + if (keyPathForPrimaryKeyElement) { + primaryKeyValue = [representation valueForKeyPath:keyPathForPrimaryKeyElement]; + } else { + RKLogWarning(@"Unable to find source attribute for primaryKeyAttribute '%@': unable to find existing object instances by primary key.", primaryKeyAttribute); + } + } + } + + if (! self.managedObjectCache) { + RKLogWarning(@"Performing managed object mapping with a nil managed object cache:\n" + "Unable to update existing object instances by primary key. Duplicate objects may be created."); + } + + // If we have found the primary key attribute & value, try to find an existing instance to update + if (primaryKeyAttribute && primaryKeyValue && NO == [primaryKeyValue isEqual:[NSNull null]]) { + object = [self.managedObjectCache findInstanceOfEntity:entity + withPrimaryKeyAttribute:primaryKeyAttribute + value:primaryKeyValue + inManagedObjectContext:self.managedObjectContext]; + + if (object && [self.managedObjectCache respondsToSelector:@selector(didFetchObject:)]) { + [self.managedObjectCache didFetchObject:object]; + } + } + + if (object == nil) { + object = [[NSManagedObject alloc] initWithEntity:entity + insertIntoManagedObjectContext:self.managedObjectContext]; + if (primaryKeyAttribute && primaryKeyValue && ![primaryKeyValue isEqual:[NSNull null]]) { + [object setValue:primaryKeyValue forKey:primaryKeyAttribute]; + } + + if ([self.managedObjectCache respondsToSelector:@selector(didCreateObject:)]) { + [self.managedObjectCache didCreateObject:object]; + } + } + + return object; +} + +// Mapping operations should be executed against managed object contexts with the `NSPrivateQueueConcurrencyType` concurrency type +- (BOOL)executingConnectionOperationsWouldDeadlock +{ + return [NSThread isMainThread] && [self.managedObjectContext concurrencyType] == NSMainQueueConcurrencyType && self.operationQueue; +} + +- (void)emitDeadlockWarningIfNecessary +{ + if ([self executingConnectionOperationsWouldDeadlock]) { + RKLogWarning(@"Mapping operation was configured with a managedObjectContext with the `NSMainQueueConcurrencyType` concurrency type" + " and given an operationQueue to perform background work. This configuration will lead to a deadlock with" + " the main queue waiting on the mapping to complete and the operationQueue waiting for access to the MOC." + " You should instead provide a managedObjectContext with the NSPrivateQueueConcurrencyType."); + } +} + +- (BOOL)commitChangesForMappingOperation:(RKMappingOperation *)mappingOperation error:(NSError **)error +{ + if ([mappingOperation.objectMapping isKindOfClass:[RKEntityMapping class]]) { + [self emitDeadlockWarningIfNecessary]; + + NSArray *connectionMappings = [(RKEntityMapping *)mappingOperation.objectMapping connectionMappings]; + if ([connectionMappings count] > 0 && self.managedObjectCache == nil) { + NSDictionary *userInfo = @{ NSLocalizedDescriptionKey: @"Cannot map an entity mapping that contains connection mappings with a data source whose managed object cache is nil." }; + NSError *localError = [NSError errorWithDomain:RKErrorDomain code:RKMappingErrorNilManagedObjectCache userInfo:userInfo]; + if (error) *error = localError; + return NO; + } + + for (RKConnectionMapping *connectionMapping in connectionMappings) { + RKRelationshipConnectionOperation *operation = [[RKRelationshipConnectionOperation alloc] initWithManagedObject:mappingOperation.destinationObject + connectionMapping:connectionMapping + managedObjectCache:self.managedObjectCache]; + [operation setCompletionBlock:^{ + if ([mappingOperation.delegate respondsToSelector:@selector(mappingOperation:didConnectRelationship:usingMapping:)]) { + [mappingOperation.delegate mappingOperation:mappingOperation didConnectRelationship:connectionMapping.relationship usingMapping:connectionMapping]; + } + }]; + if (self.parentOperation) [operation addDependency:self.parentOperation]; + NSOperationQueue *operationQueue = self.operationQueue ?: [NSOperationQueue currentQueue]; + [operationQueue addOperation:operation]; + RKLogTrace(@"Enqueued %@ dependent upon parent operation %@ to operation queue %@", operation, self.parentOperation, operationQueue); + } + } + + return YES; +} + +@end diff --git a/Pods/RestKit/Code/CoreData/RKManagedObjectStore.h b/Pods/RestKit/Code/CoreData/RKManagedObjectStore.h new file mode 100644 index 00000000..d9899af3 --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKManagedObjectStore.h @@ -0,0 +1,218 @@ +// +// RKManagedObjectStore.h +// RestKit +// +// Created by Blake Watters on 9/22/09. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import +#import "RKEntityMapping.h" +#import "RKManagedObjectCaching.h" + +@class RKManagedObjectStore; + +/** + The `RKManagedObjectStore` class encapsulates a Core Data stack including a managed object model, a persistent store coordinator, and a set of managed object contexts. The managed object store simplifies the task of properly setting up a Core Data stack and provides some additional functionality, such as the use of a seed database to initialize a SQLite backed persistent store and a simple code path for resetting the store by destroying and recreating the persistent stores. + + ## Initialization + + The managed object store is designed to easily initialize a Core Data stack in a recommended configuration. A store object must always be initialized with a managed object model, but this managed object model can be directly provided, inferred from an already configured persistent store coordinator, or read from the currently available bundles within the application. Note that several features provided by the framework rely on the store being initialized with a mutable managed object model. Please refer to the documentation in the `initWithManagedObjectModel:` for details. + + ## Managed Object Contexts + + The managed object store provides the application developer with a pair of managed objects with which to work with Core Data. The store configures a primary managed object context with the NSPrivateQueueConcurrencyType that is associated with the persistent store coordinator for handling Core Data persistence. A second context is also created with the NSMainQueueConcurrencyType that is a child of the primary managed object context for doing work on the main queue. Additional child contexts can be created directly or via a convenience method interface provided by the store (see newChildManagedObjectContextWithConcurrencyType:). + + The managed object context hierarchy is designed to isolate the main thread from disk I/O and avoid deadlocks. Because the primary context manages its own private queue, saving the main queue context will not result in the objects being saved to the persistent store. The primary context must be saved as well for objects to be persisted to disk. + + It is also worth noting that because of the parent/child context hierarchy, objects created on the main thread will not obtain permanent managed object ID's even after the primary context has been saved. If you need to refer to the permanent representations of objects created on the main thread after a save, you may ask the main queue context to obtain permanent managed objects for your objects via `obtainPermanentIDsForObjects:error:`. Be warned that when obtaining permanent managed object ID's, you must include all newly created objects that are reachable from the object you are concerned with in the set of objects provided to `obtainPermanentIDsForObjects:error:`. This means any newly created object in a one-to-one or one-to-many relationship must be provided or you will face a crash from the managed object context. This is due to a bug in Core Data still present in iOS5, but fixed in iOS6 (see Open Radar http://openradar.appspot.com/11478919). + + @see `NSManagedObjectContext (RKAdditions)` + @see `NSEntityDescription (RKAdditions)` + */ +@interface RKManagedObjectStore : NSObject + +///----------------------------------------- +/// @name Accessing the Default Object Store +///----------------------------------------- + +/** + Returns the default managed object store for the application. + + @return The default managed object store. + */ ++ (RKManagedObjectStore *)defaultStore; + +/** + Sets the default managed object store for the application. + + @param managedObjectStore The new default managed object store. + */ ++ (void)setDefaultStore:(RKManagedObjectStore *)managedObjectStore; + +///----------------------------------- +/// @name Initializing an Object Store +///----------------------------------- + +/** + Initializes the receiver with a given managed object model. This is the designated initializer for `RKManagedObjectStore`. + + @param managedObjectModel The managed object model with which to initialize the receiver. + @return The receiver, initialized with the given managed object model. + @bug Several features require that the managed object model used to initialize the store be mutable so that entities may be changed before the persistent store coordinator is created. Since iOS 5, managed object models initialized via initWithContentsOfURL: return an immutable model. The application developer must send the returned managed object model a mutable copy message to ensure that it is mutable before initializing the managed object store. The recommended approach for initializing a managed object store is as follows: + + NSURL *modelURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"MyApplication" ofType:@"momd"]]; + // NOTE: Due to an iOS 5 bug, the managed object model returned is immutable. + NSManagedObjectModel *managedObjectModel = [[[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL] mutableCopy]; + RKManagedObjectStore *managedObjectStore = [[RKManagedObjectStore alloc] initWithManagedObjectModel:managedObjectModel]; + + */ +- (id)initWithManagedObjectModel:(NSManagedObjectModel *)managedObjectModel; + +/** + Initializes the receiver with an existing persistent store coordinator. + + The managed object model from the persistent store coordinator will be used to initialize the receiver and the given persistent store coordinator will be configured as the persistent store coordinator for the managed object store. + + This initialization method provides for easy integration with an existing Core Data stack. + + @param persistentStoreCoordinator The persistent store coordinator with which to initialize the receiver. + @return The receiver, initialized with the managed object model of the given persistent store coordinator and the persistent store coordinator. + */ +- (id)initWithPersistentStoreCoordinator:(NSPersistentStoreCoordinator *)persistentStoreCoordinator; + +/** + Initializes the receiver with a managed object model obtained by merging the models from all of the application's non-framework bundles. + + @see `[NSBundle allBundles]` + @see `[NSManagedObjectModel mergedModelFromBundles:]` + + @warning Obtaining a managed object model by merging all bundles may result in an application error if versioned object models are in use. + */ +- (id)init; + +///----------------------------------------------------------------------------- +/// @name Configuring Persistent Stores +///----------------------------------------------------------------------------- + +/** + Creates a persistent store coordinator with the receiver's managed object model. After invocation, the persistentStoreCoordinator property will no longer be nil. + + @warning Creating the persistent store coordinator will render the managed object model immutable. Attempts to use functionality that requires a mutable managed object model after the persistent store coordinator has been created will raise an application error. + */ +- (void)createPersistentStoreCoordinator; + +/** + Adds a new in memory persistent store to the persistent store coordinator of the receiver. + + This method will invoke createPersistentStore if a persistent store coordinator has not yet been created. + + @param error On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information. + @returns The new persistent store, or nil in the event of an error. + */ +- (NSPersistentStore *)addInMemoryPersistentStore:(NSError **)error; + +/** + Adds a new SQLite persistent store, optionally initialized with a seed database, to the persistent store coordinator of the receiver. + + @param storePath The path at which to save the persistent store on disk. + @param seedPath An optional path to a seed database to copy to the given storePath in the event that a store does not yet exist. + @param error On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information. + + @warning If the seed database at the given path was created with an incompatible managed object model an application error may be raised. + */ +- (NSPersistentStore *)addSQLitePersistentStoreAtPath:(NSString *)storePath fromSeedDatabaseAtPath:(NSString *)seedPath error:(NSError **)error; + +/** + Resets the persistent stores in the receiver's persistent store coordinator and recreates them. If a store being reset is backed by a file on disk (such as a SQLite file), the file will be removed prior to recreating the store. If the store was originally created using a seed database, the seed will be recopied to reset the store to its seeded state. + + @param error On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information. + @return A Boolean value indicating if the reset was successful. + + @warning This method will implictly result in the managed object contexts associated with the receiver to be discarded and recreated. Any managed objects or additional child contexts associated with the store will need to be discarded or else exceptions may be raised (i.e. `NSObjectInaccessibleException`). + */ +- (BOOL)resetPersistentStores:(NSError **)error; + +///----------------------------------------- +/// @name Retrieving Details about the Store +///----------------------------------------- + +/** + Returns the managed object model of the receiver. + + @return The managed object model of the receiver. + */ +@property (nonatomic, strong, readonly) NSManagedObjectModel *managedObjectModel; + +/** + Returns the persistent store coordinator of the receiver. + + @return The persistent store coordinator of the receiver. + */ +@property (nonatomic, strong, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator; + +/** + The managed object cache associated with the receiver. + + The managed object cache is used to accelerate intensive Core Data operations by caching managed objects by their primary key value. + + **Default**: An instance of `RKFetchRequestManagedObjectCache`. + + @see `RKManagedObjectCaching` + @warning A nil managed object cache will result in a store that is unable to uniquely identify existing objects by primary key attribute value and may result in the creation of duplicate objects within the store. + */ +@property (nonatomic, strong) id managedObjectCache; + +///------------------------------------------- +/// @name Working with Managed Object Contexts +///------------------------------------------- + +/** + Creates the persistent store and main queue managed object contexts for the receiver. + + @see `persistentStoreManagedObjectContext` + @see `mainQueueManagedObjectContext` + @raises NSInternalInconsistencyException Raised if the managed object contexts have already been created. + */ +- (void)createManagedObjectContexts; + +/** + Returns the managed object context of the receiver that is associated with the persistent store coordinator and is responsible for managing persistence. + + The persistent store context is created with the `NSPrivateQueueConcurrencyType` and as such must be interacted with using `[NSManagedObjectContext performBlock:]` or `[NSManagedObjectContext performBlockAndWait:]`. This context typically serves as the parent context for scratch contexts or main queue contexts for interacting with the user interface. Created by the invocation of `createManagedObjectContexts`. + + @see `createManagedObjectContexts` + */ +@property (nonatomic, strong, readonly) NSManagedObjectContext *persistentStoreManagedObjectContext; + +/** + The main queue managed object context of the receiver. + + The main queue context is available for usage on the main queue to drive user interface needs. The context is created with the NSMainQueueConcurrencyType and as such may be messaged directly from the main thread. The context is a child context of the persistentStoreManagedObjectContext and can persist changes up to the parent via a save. + */ +@property (nonatomic, strong, readonly) NSManagedObjectContext *mainQueueManagedObjectContext; + +/** + Creates a new child managed object context of the persistent store managed object context with a given concurrency type. + + @param concurrencyType The desired concurrency type for the new context. + @return A newly created managed object context with the given concurrency type whose parent is the `persistentStoreManagedObjectContext`. + */ +- (NSManagedObjectContext *)newChildManagedObjectContextWithConcurrencyType:(NSManagedObjectContextConcurrencyType)concurrencyType; + +@end + +// Option containing the path to the seed database a SQLite store was initialized with +extern NSString * const RKSQLitePersistentStoreSeedDatabasePathOption; diff --git a/Pods/RestKit/Code/CoreData/RKManagedObjectStore.m b/Pods/RestKit/Code/CoreData/RKManagedObjectStore.m new file mode 100644 index 00000000..ec626d2f --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKManagedObjectStore.m @@ -0,0 +1,247 @@ +// +// RKManagedObjectStore.m +// RestKit +// +// Created by Blake Watters on 9/22/09. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKManagedObjectStore.h" +#import "RKLog.h" +#import "RKPropertyInspector.h" +#import "RKPropertyInspector+CoreData.h" +#import "RKPathUtilities.h" +#import "RKInMemoryManagedObjectCache.h" +#import "RKFetchRequestManagedObjectCache.h" +#import "NSManagedObjectContext+RKAdditions.h" + +// Set Logging Component +#undef RKLogComponent +#define RKLogComponent RKlcl_cRestKitCoreData + +NSString * const RKSQLitePersistentStoreSeedDatabasePathOption = @"RKSQLitePersistentStoreSeedDatabasePathOption"; +NSString * const RKManagedObjectStoreDidFailSaveNotification = @"RKManagedObjectStoreDidFailSaveNotification"; + +static RKManagedObjectStore *defaultStore = nil; + +@interface RKManagedObjectStore () +@property (nonatomic, strong, readwrite) NSManagedObjectModel *managedObjectModel; +@property (nonatomic, strong, readwrite) NSPersistentStoreCoordinator *persistentStoreCoordinator; +@property (nonatomic, strong, readwrite) NSManagedObjectContext *persistentStoreManagedObjectContext; +@property (nonatomic, strong, readwrite) NSManagedObjectContext *mainQueueManagedObjectContext; +@end + +@implementation RKManagedObjectStore + + ++ (RKManagedObjectStore *)defaultStore +{ + return defaultStore; +} + ++ (void)setDefaultStore:(RKManagedObjectStore *)managedObjectStore +{ + @synchronized(defaultStore) { + defaultStore = managedObjectStore; + } +} + +- (id)initWithManagedObjectModel:(NSManagedObjectModel *)managedObjectModel +{ + self = [super init]; + if (self) { + self.managedObjectModel = managedObjectModel; + self.managedObjectCache = [RKFetchRequestManagedObjectCache new]; + + // Hydrate the defaultStore + if (! defaultStore) { + [RKManagedObjectStore setDefaultStore:self]; + } + } + + return self; +} + +- (id)initWithPersistentStoreCoordinator:(NSPersistentStoreCoordinator *)persistentStoreCoordinator +{ + self = [self initWithManagedObjectModel:persistentStoreCoordinator.managedObjectModel]; + if (self) { + self.persistentStoreCoordinator = persistentStoreCoordinator; + } + + return self; +} + +- (id)init +{ + NSManagedObjectModel *managedObjectModel = [NSManagedObjectModel mergedModelFromBundles:[NSBundle allBundles]]; + return [self initWithManagedObjectModel:managedObjectModel]; +} + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +- (void)createPersistentStoreCoordinator +{ + self.persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:self.managedObjectModel]; +} + +- (NSPersistentStore *)addInMemoryPersistentStore:(NSError **)error +{ + if (! self.persistentStoreCoordinator) [self createPersistentStoreCoordinator]; + + return [self.persistentStoreCoordinator addPersistentStoreWithType:NSInMemoryStoreType configuration:nil URL:nil options:nil error:error]; +} + +- (NSPersistentStore *)addSQLitePersistentStoreAtPath:(NSString *)storePath fromSeedDatabaseAtPath:(NSString *)seedPath error:(NSError **)error +{ + if (! self.persistentStoreCoordinator) [self createPersistentStoreCoordinator]; + + NSURL *storeURL = [NSURL fileURLWithPath:storePath]; + if (seedPath) { + BOOL success = [self copySeedDatabaseIfNecessaryFromPath:seedPath toPath:storePath error:error]; + if (! success) return nil; + } + + // Allow inferred migration from the original version of the application. + NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys: + (seedPath ? seedPath : [NSNull null]), RKSQLitePersistentStoreSeedDatabasePathOption, + [NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, + [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, + nil]; + + return [self.persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:options error:error]; +} + +- (BOOL)copySeedDatabaseIfNecessaryFromPath:(NSString *)seedPath toPath:(NSString *)storePath error:(NSError **)error +{ + if (NO == [[NSFileManager defaultManager] fileExistsAtPath:storePath]) { + NSError *localError; + if (![[NSFileManager defaultManager] copyItemAtPath:seedPath toPath:storePath error:&localError]) { + RKLogError(@"Failed to copy seed database from path '%@' to path '%@': %@", seedPath, storePath, [localError localizedDescription]); + if (error) *error = localError; + + return NO; + } + } + + return YES; +} + +- (NSManagedObjectContext *)newChildManagedObjectContextWithConcurrencyType:(NSManagedObjectContextConcurrencyType)concurrencyType +{ + NSManagedObjectContext *managedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:concurrencyType]; + [managedObjectContext performBlockAndWait:^{ + managedObjectContext.parentContext = self.persistentStoreManagedObjectContext; + managedObjectContext.mergePolicy = NSMergeByPropertyStoreTrumpMergePolicy; + }]; + + return managedObjectContext; +} + +- (void)createManagedObjectContexts +{ + NSAssert(!self.persistentStoreManagedObjectContext, @"Unable to create managed object contexts: A primary managed object context already exists."); + NSAssert(!self.mainQueueManagedObjectContext, @"Unable to create managed object contexts: A main queue managed object context already exists."); + + // Our primary MOC is a private queue concurrency type + self.persistentStoreManagedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType]; + self.persistentStoreManagedObjectContext.persistentStoreCoordinator = self.persistentStoreCoordinator; + self.persistentStoreManagedObjectContext.mergePolicy = NSMergeByPropertyStoreTrumpMergePolicy; + + // Create an MOC for use on the main queue + self.mainQueueManagedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSMainQueueConcurrencyType]; + self.mainQueueManagedObjectContext.parentContext = self.persistentStoreManagedObjectContext; + self.mainQueueManagedObjectContext.mergePolicy = NSMergeByPropertyStoreTrumpMergePolicy; + + // Merge changes from a primary MOC back into the main queue when complete + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(handlePersistentStoreManagedObjectContextDidSaveNotification:) + name:NSManagedObjectContextDidSaveNotification + object:self.persistentStoreManagedObjectContext]; +} + +- (void)recreateManagedObjectContexts +{ + [[NSNotificationCenter defaultCenter] removeObserver:self name:NSManagedObjectContextDidSaveNotification object:self.persistentStoreManagedObjectContext]; + + self.persistentStoreManagedObjectContext = nil; + self.mainQueueManagedObjectContext = nil; + [self createManagedObjectContexts]; +} + +- (BOOL)resetPersistentStores:(NSError **)error +{ + NSError *localError; + for (NSPersistentStore *persistentStore in self.persistentStoreCoordinator.persistentStores) { + NSURL *URL = [self.persistentStoreCoordinator URLForPersistentStore:persistentStore]; + BOOL success = [self.persistentStoreCoordinator removePersistentStore:persistentStore error:&localError]; + if (success) { + if ([URL isFileURL]) { + if (! [[NSFileManager defaultManager] removeItemAtURL:URL error:&localError]) { + RKLogError(@"Failed to remove persistent store at URL %@: %@", URL, localError); + if (error) *error = localError; + return NO; + } + } else { + RKLogDebug(@"Skipped removal of persistent store file: URL for persistent store is not a file URL. (%@)", URL); + } + + // Reclone the persistent store from the seed path if necessary + if ([persistentStore.type isEqualToString:NSSQLiteStoreType]) { + NSString *seedPath = [persistentStore.options valueForKey:RKSQLitePersistentStoreSeedDatabasePathOption]; + if (seedPath && ![seedPath isEqual:[NSNull null]]) { + success = [self copySeedDatabaseIfNecessaryFromPath:seedPath toPath:[persistentStore.URL path] error:&localError]; + if (! success) { + RKLogError(@"Failed reset of SQLite persistent store: Failed to copy seed database."); + if (error) *error = localError; + return NO; + } + } + } + + // Add a new store with the same options + NSPersistentStore *newStore = [self.persistentStoreCoordinator addPersistentStoreWithType:persistentStore.type + configuration:persistentStore.configurationName + URL:persistentStore.URL + options:persistentStore.options error:&localError]; + if (! newStore) { + if (error) *error = localError; + return NO; + } + } else { + RKLogError(@"Failed reset of persistent store %@: Failed to remove persistent store with error: %@", persistentStore, localError); + if (error) *error = localError; + return NO; + } + } + + [self recreateManagedObjectContexts]; + return YES; +} + +- (void)handlePersistentStoreManagedObjectContextDidSaveNotification:(NSNotification *)notification +{ + RKLogDebug(@"persistentStoreManagedObjectContext was saved: merging changes to mainQueueManagedObjectContext"); + RKLogTrace(@"Merging changes detailed in userInfo dictionary: %@", [notification userInfo]); + NSAssert([notification object] == self.persistentStoreManagedObjectContext, @"Received Managed Object Context Did Save Notification for Unexpected Context: %@", [notification object]); + [self.mainQueueManagedObjectContext performBlock:^{ + [self.mainQueueManagedObjectContext mergeChangesFromContextDidSaveNotification:notification]; + }]; +} + +@end diff --git a/Pods/RestKit/Code/CoreData/RKManagedObjectThreadSafeInvocation.h b/Pods/RestKit/Code/CoreData/RKManagedObjectThreadSafeInvocation.h new file mode 100644 index 00000000..cb4f1534 --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKManagedObjectThreadSafeInvocation.h @@ -0,0 +1,32 @@ +// +// RKManagedObjectThreadSafeInvocation.h +// RestKit +// +// Created by Blake Watters on 5/12/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import + +@interface RKManagedObjectThreadSafeInvocation : NSInvocation + +@property (nonatomic, strong) NSManagedObjectContext *privateQueueManagedObjectContext; +@property (nonatomic, strong) NSManagedObjectContext *mainQueueManagedObjectContext; + ++ (RKManagedObjectThreadSafeInvocation *)invocationWithMethodSignature:(NSMethodSignature *)methodSignature; +- (void)setManagedObjectKeyPaths:(NSSet *)keyPaths forArgument:(NSInteger)index; +- (void)invokeOnMainThread; + +@end diff --git a/Pods/RestKit/Code/CoreData/RKManagedObjectThreadSafeInvocation.m b/Pods/RestKit/Code/CoreData/RKManagedObjectThreadSafeInvocation.m new file mode 100644 index 00000000..e3053614 --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKManagedObjectThreadSafeInvocation.m @@ -0,0 +1,163 @@ +// +// RKManagedObjectThreadSafeInvocation.m +// RestKit +// +// Created by Blake Watters on 5/12/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKManagedObjectThreadSafeInvocation.h" +#import "RKLog.h" + +// Set Logging Component +#undef RKLogComponent +#define RKLogComponent RKlcl_cRestKitCoreData + +@interface RKManagedObjectThreadSafeInvocation () +@property (nonatomic, strong) NSMutableDictionary *argumentKeyPaths; +@end + +@implementation RKManagedObjectThreadSafeInvocation + + ++ (RKManagedObjectThreadSafeInvocation *)invocationWithMethodSignature:(NSMethodSignature *)methodSignature +{ + return (RKManagedObjectThreadSafeInvocation *)[super invocationWithMethodSignature:methodSignature]; +} + +- (void)setManagedObjectKeyPaths:(NSSet *)keyPaths forArgument:(NSInteger)index +{ + if (nil == _argumentKeyPaths) { + self.argumentKeyPaths = [NSMutableDictionary dictionary]; + } + + NSNumber *argumentIndex = [NSNumber numberWithInteger:index]; + [self.argumentKeyPaths setObject:keyPaths forKey:argumentIndex]; +} + +- (void)setValue:(id)value forKeyPathOrKey:(NSString *)keyPath object:(id)object +{ + [object setValue:value forKeyPath:keyPath]; + + id testValue = [object valueForKeyPath:keyPath]; + if (![value isEqual:testValue]) { + [object setValue:value forKey:keyPath]; + testValue = [object valueForKeyPath:keyPath]; + + NSAssert([value isEqual:testValue], @"Could not set value"); + } +} + +- (void)serializeManagedObjectsForArgument:(id)argument withKeyPaths:(NSSet *)keyPaths +{ + for (NSString *keyPath in keyPaths) { + id value = [argument valueForKeyPath:keyPath]; + if ([value isKindOfClass:[NSManagedObject class]]) { + NSManagedObjectID *objectID = [(NSManagedObject *)value objectID]; + [self setValue:objectID forKeyPathOrKey:keyPath object:argument]; + } else if ([value respondsToSelector:@selector(allObjects)]) { + id collection = [[[[value class] alloc] init] mutableCopy]; + for (id subObject in value) { + if ([subObject isKindOfClass:[NSManagedObject class]]) { + [collection addObject:[(NSManagedObject *)subObject objectID]]; + } else { + [collection addObject:subObject]; + } + } + + [self setValue:collection forKeyPathOrKey:keyPath object:argument]; + } + } +} + +- (void)deserializeManagedObjectIDsForArgument:(id)argument withKeyPaths:(NSSet *)keyPaths +{ + NSAssert(self.mainQueueManagedObjectContext, @"Managed object context cannot be nil"); + for (NSString *keyPath in keyPaths) { + id value = [argument valueForKeyPath:keyPath]; + if ([value isKindOfClass:[NSManagedObjectID class]]) { + __block NSManagedObject *managedObject = nil; + __block NSError *error; + [self.mainQueueManagedObjectContext performBlockAndWait:^{ + managedObject = [self.mainQueueManagedObjectContext existingObjectWithID:(NSManagedObjectID *)value error:&error]; + }]; + NSAssert(managedObject, @"Expected managed object for ID %@, got nil", value); + [self setValue:managedObject forKeyPathOrKey:keyPath object:argument]; + } else if ([value respondsToSelector:@selector(allObjects)]) { + id collection = [[[[value class] alloc] init] mutableCopy]; + for (id subObject in value) { + if ([subObject isKindOfClass:[NSManagedObjectID class]]) { + __block NSManagedObject *managedObject = nil; + __block NSError *error; + [self.mainQueueManagedObjectContext performBlockAndWait:^{ + managedObject = [self.mainQueueManagedObjectContext existingObjectWithID:(NSManagedObjectID *)subObject error:&error]; + }]; + NSAssert(managedObject, @"Expected managed object for ID %@, got nil: %@", subObject, error); + [collection addObject:managedObject]; + } else { + [collection addObject:subObject]; + } + } + + + [self setValue:collection forKeyPathOrKey:keyPath object:argument]; + } + } +} + +- (void)serializeManagedObjects +{ + for (NSNumber *argumentIndex in _argumentKeyPaths) { + NSSet *managedKeyPaths = [_argumentKeyPaths objectForKey:argumentIndex]; + id argument = nil; + [self getArgument:&argument atIndex:[argumentIndex intValue]]; + if (argument) { + [self serializeManagedObjectsForArgument:argument withKeyPaths:managedKeyPaths]; + } + } +} + +- (void)deserializeManagedObjects +{ + for (NSNumber *argumentIndex in _argumentKeyPaths) { + NSSet *managedKeyPaths = [_argumentKeyPaths objectForKey:argumentIndex]; + id argument = nil; + [self getArgument:&argument atIndex:[argumentIndex intValue]]; + if (argument) { + [self deserializeManagedObjectIDsForArgument:argument withKeyPaths:managedKeyPaths]; + } + } +} + +- (void)performInvocationOnMainThread +{ + [self deserializeManagedObjects]; + [self invoke]; +} + +- (void)invokeOnMainThread +{ + [self serializeManagedObjects]; + if ([NSThread isMainThread]) { + [self performInvocationOnMainThread]; + } else { + dispatch_sync(dispatch_get_main_queue(), ^{ + [self performInvocationOnMainThread]; + }); + } +} + + +@end diff --git a/Pods/RestKit/Code/CoreData/RKObjectPropertyInspector+CoreData.m b/Pods/RestKit/Code/CoreData/RKObjectPropertyInspector+CoreData.m new file mode 100644 index 00000000..347b3819 --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKObjectPropertyInspector+CoreData.m @@ -0,0 +1,89 @@ +// +// RKPropertyInspector+CoreData.m +// RestKit +// +// Created by Blake Watters on 8/14/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import +#import "RKPropertyInspector+CoreData.h" +#import "RKLog.h" +#import "RKMacros.h" +#import + + +RK_FIX_CATEGORY_BUG(RKPropertyInspector_CoreData) + +// Set Logging Component +#undef RKLogComponent +#define RKLogComponent RKlcl_cRestKitCoreData + +@implementation RKPropertyInspector (CoreData) + +- (NSDictionary *)propertyNamesAndTypesForEntity:(NSEntityDescription *)entity +{ + NSMutableDictionary *propertyNamesAndTypes = [_propertyNamesToTypesCache objectForKey:[entity name]]; + if (propertyNamesAndTypes) { + return propertyNamesAndTypes; + } + + propertyNamesAndTypes = [NSMutableDictionary dictionary]; + for (NSString *name in [entity attributesByName]) { + NSAttributeDescription *attributeDescription = [[entity attributesByName] valueForKey:name]; + if ([attributeDescription attributeValueClassName]) { + [propertyNamesAndTypes setValue:NSClassFromString([attributeDescription attributeValueClassName]) forKey:name]; + + } else if ([attributeDescription attributeType] == NSTransformableAttributeType && + ![name isEqualToString:@"_mapkit_hasPanoramaID"]) { + + const char *className = [[entity managedObjectClassName] cStringUsingEncoding:NSUTF8StringEncoding]; + const char *propertyName = [name cStringUsingEncoding:NSUTF8StringEncoding]; + Class managedObjectClass = objc_getClass(className); + + // property_getAttributes() returns everything we need to implement this... + // See: http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html#//apple_ref/doc/uid/TP40008048-CH101-SW5 + objc_property_t prop = class_getProperty(managedObjectClass, propertyName); + NSString *attributeString = [NSString stringWithCString:property_getAttributes(prop) encoding:NSUTF8StringEncoding]; + const char *destinationClassName = [[RKPropertyInspector propertyTypeFromAttributeString:attributeString] cStringUsingEncoding:NSUTF8StringEncoding]; + Class destinationClass = objc_getClass(destinationClassName); + if (destinationClass) { + [propertyNamesAndTypes setObject:destinationClass forKey:name]; + } + } + } + + for (NSString *name in [entity relationshipsByName]) { + NSRelationshipDescription *relationshipDescription = [[entity relationshipsByName] valueForKey:name]; + if ([relationshipDescription isToMany]) { + [propertyNamesAndTypes setValue:[NSSet class] forKey:name]; + } else { + NSEntityDescription *destinationEntity = [relationshipDescription destinationEntity]; + Class destinationClass = NSClassFromString([destinationEntity managedObjectClassName]); + [propertyNamesAndTypes setValue:destinationClass forKey:name]; + } + } + + [_propertyNamesToTypesCache setObject:propertyNamesAndTypes forKey:[entity name]]; + RKLogDebug(@"Cached property names and types for Entity '%@': %@", entity, propertyNamesAndTypes); + return propertyNamesAndTypes; +} + +- (Class)typeForProperty:(NSString *)propertyName ofEntity:(NSEntityDescription *)entity +{ + return [[self propertyNamesAndTypesForEntity:entity] valueForKey:propertyName]; +} + +@end diff --git a/Pods/RestKit/Code/CoreData/RKPropertyInspector+CoreData.h b/Pods/RestKit/Code/CoreData/RKPropertyInspector+CoreData.h new file mode 100644 index 00000000..d63bb783 --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKPropertyInspector+CoreData.h @@ -0,0 +1,32 @@ +// +// RKPropertyInspector+CoreData.h +// RestKit +// +// Created by Blake Watters on 8/14/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKPropertyInspector.h" + +@interface RKPropertyInspector (CoreData) + +- (NSDictionary *)propertyNamesAndTypesForEntity:(NSEntityDescription *)entity; + +/** + Returns the Class type of the specified property on the object class + */ +- (Class)typeForProperty:(NSString *)propertyName ofEntity:(NSEntityDescription *)entity; + +@end diff --git a/Pods/RestKit/Code/CoreData/RKRelationshipConnectionOperation.h b/Pods/RestKit/Code/CoreData/RKRelationshipConnectionOperation.h new file mode 100644 index 00000000..78601160 --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKRelationshipConnectionOperation.h @@ -0,0 +1,70 @@ +// +// RKRelationshipConnectionOperation.h +// RestKit +// +// Created by Blake Watters on 7/12/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import + +@class RKConnectionMapping; +@protocol RKManagedObjectCaching; + +/** + The `RKRelationshipConnectionOperation` class is a subclass of `NSOperation` that manages the connection of `NSManagedObject` relationships as described by an `RKConnectionMapping` object. When executed, the operation will find related objects by searching the associated managed object cache for a matching object whose destination attribute value matches that of the associated managed object's source attribute. + + For example, given a managed object for the `Employee` entity with a one-to-one relationship to a `Company` named `company` (with an inverse relationship one-to-many relationship named `employees`) and a connection mapping specifying that the relationship can be connected by finding the `Company` managed object whose `companyID` attribute matches the `companyID` of the `Employee`, the operation would find the Company that employs the Employee by primary key and set the Core Data relationship to reflect the relationship appropriately. + + @see `RKConnectionMapping` + */ +@interface RKRelationshipConnectionOperation : NSOperation + +///------------------------------------------------------- +/// @name Initializing a Relationship Connection Operation +///------------------------------------------------------- + +/** + Initializes the receiver with a given managed object, connection mapping, and managed object cache. + + @param managedObject The object to attempt to connect a relationship to. + @param connectionMapping A mapping describing the relationship and attributes necessary to perform the connection. + @param managedObjectCache The managed object cache from which to attempt to fetch a matching object to satisfy the connection. + @return The receiver, initialized with the given managed object, connection mapping, and managed object cache. + */ +- (id)initWithManagedObject:(NSManagedObject *)managedObject + connectionMapping:(RKConnectionMapping *)connectionMapping + managedObjectCache:(id)managedObjectCache; + +///-------------------------------------------- +/// @name Accessing Details About the Operation +///-------------------------------------------- + +/** + The managed object the receiver will attempt to connect a relationship for. + */ +@property (nonatomic, strong, readonly) NSManagedObject *managedObject; + +/** + The connection mapping describing the relationship connection the receiver will attempt to connect. + */ +@property (nonatomic, strong, readonly) RKConnectionMapping *connectionMapping; + +/** + The managed object cache the receiver will use to fetch a related object satisfying the connection mapping. + */ +@property (nonatomic, strong, readonly) id managedObjectCache; + +@end diff --git a/Pods/RestKit/Code/CoreData/RKRelationshipConnectionOperation.m b/Pods/RestKit/Code/CoreData/RKRelationshipConnectionOperation.m new file mode 100644 index 00000000..9a810cfd --- /dev/null +++ b/Pods/RestKit/Code/CoreData/RKRelationshipConnectionOperation.m @@ -0,0 +1,208 @@ +// +// RKRelationshipConnectionOperation.m +// RestKit +// +// Created by Blake Watters on 7/12/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import +#import "RKRelationshipConnectionOperation.h" +#import "RKEntityMapping.h" +#import "RKLog.h" +#import "RKManagedObjectCaching.h" +#import "RKDynamicMappingMatcher.h" +#import "RKErrors.h" + +// Set Logging Component +#undef RKLogComponent +#define RKLogComponent RKlcl_cRestKitCoreData + +@interface RKRelationshipConnectionOperation () +@property (nonatomic, strong, readwrite) NSManagedObject *managedObject; +@property (nonatomic, strong, readwrite) RKConnectionMapping *connectionMapping; +@property (nonatomic, strong, readwrite) id managedObjectCache; +@property (nonatomic, strong, readwrite) NSError *error; + +// Helpers +@property (weak, nonatomic, readonly) NSManagedObjectContext *managedObjectContext; + +@end + +@implementation RKRelationshipConnectionOperation + + +- (id)initWithManagedObject:(NSManagedObject *)managedObject connectionMapping:(RKConnectionMapping *)connectionMapping managedObjectCache:(id)managedObjectCache +{ + NSParameterAssert(managedObject); + NSParameterAssert(connectionMapping); + NSParameterAssert(managedObjectCache); + self = [self init]; + if (self) { + self.managedObject = managedObject; + self.connectionMapping = connectionMapping; + self.managedObjectCache = managedObjectCache; + } + + return self; +} + +- (NSManagedObjectContext *)managedObjectContext +{ + return self.managedObject.managedObjectContext; +} + +- (NSManagedObject *)findOneConnectedWithSourceValue:(id)sourceValue +{ + NSAssert(self.managedObjectContext, @"Cannot lookup objects with a nil managedObjectContext"); + return [self.managedObjectCache findInstanceOfEntity:self.connectionMapping.relationship.destinationEntity + withPrimaryKeyAttribute:self.connectionMapping.destinationKeyPath + value:sourceValue + inManagedObjectContext:self.managedObjectContext]; +} + +- (id)relationshipValueWithConnectionResult:(id)result +{ + // TODO: Replace with use of object mapping engine for type conversion + + // NOTE: This is a nasty hack to work around the fact that NSOrderedSet does not support key-value + // collection operators. We try to detect and unpack a doubly wrapped collection + if ([self.connectionMapping.relationship isOrdered] + && [result conformsToProtocol:@protocol(NSFastEnumeration)] + && [[result lastObject] conformsToProtocol:@protocol(NSFastEnumeration)]) { + + NSMutableOrderedSet *set = [NSMutableOrderedSet orderedSet]; + for (id enumerable in result) { + for (id object in enumerable) { + [set addObject:object]; + } + } + + return set; + } + + if ([self.connectionMapping.relationship isToMany]) { + if ([result isKindOfClass:[NSArray class]]) { + if ([self.connectionMapping.relationship isOrdered]) { + return [NSOrderedSet orderedSetWithArray:result]; + } else { + return [NSSet setWithArray:result]; + } + } else if ([result isKindOfClass:[NSSet class]]) { + if ([self.connectionMapping.relationship isOrdered]) { + return [NSOrderedSet orderedSetWithSet:result]; + } else { + return result; + } + } else { + if ([self.connectionMapping.relationship isOrdered]) { + return [NSOrderedSet orderedSetWithObject:result]; + } else { + return [NSSet setWithObject:result]; + } + } + } + + return result; +} + +- (NSMutableSet *)findAllConnectedWithSourceValue:(id)sourceValue +{ + NSMutableSet *result = [NSMutableSet set]; + + id values = nil; + if ([sourceValue conformsToProtocol:@protocol(NSFastEnumeration)]) { + values = sourceValue; + } else { + values = [NSArray arrayWithObject:sourceValue]; + } + + for (id value in values) { + NSAssert(self.managedObjectContext, @"Cannot lookup objects with a nil managedObjectContext"); + NSArray *objects = [self.managedObjectCache findInstancesOfEntity:self.connectionMapping.relationship.destinationEntity + withPrimaryKeyAttribute:self.connectionMapping.destinationKeyPath + value:value + inManagedObjectContext:self.managedObjectContext]; + [result addObjectsFromArray:objects]; + } + return result; +} + +- (BOOL)isToMany +{ + return self.connectionMapping.relationship.isToMany; +} + +- (BOOL)checkMatcher +{ + if (!self.connectionMapping.matcher) { + return YES; + } else { + return [self.connectionMapping.matcher matches:self.managedObject]; + } +} + +- (id)findConnected +{ + if ([self checkMatcher]) { + id connectionResult = nil; + if ([self.connectionMapping isForeignKeyConnection]) { + BOOL isToMany = [self isToMany]; + id sourceValue = [self.managedObject valueForKey:self.connectionMapping.sourceKeyPath]; + if (isToMany) { + connectionResult = [self findAllConnectedWithSourceValue:sourceValue]; + } else { + connectionResult = [self findOneConnectedWithSourceValue:sourceValue]; + } + } else if ([self.connectionMapping isKeyPathConnection]) { + connectionResult = [self.managedObject valueForKeyPath:self.connectionMapping.sourceKeyPath]; + } else { + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"%@ Attempted to establish a relationship using a mapping" + "specifies neither a foreign key or a key path connection: %@", + NSStringFromClass([self class]), self.connectionMapping] + userInfo:nil]; + } + + return [self relationshipValueWithConnectionResult:connectionResult]; + } else { + return nil; + } +} + +- (void)connectRelationship +{ + NSString *relationshipName = self.connectionMapping.relationship.name; + RKLogTrace(@"Connecting relationship '%@' with mapping: %@", relationshipName, self.connectionMapping); + [self.managedObjectContext performBlockAndWait:^{ + id relatedObject = [self findConnected]; + [self.managedObject setValue:relatedObject forKeyPath:relationshipName]; + RKLogDebug(@"Connected relationship '%@' to object '%@'", relationshipName, relatedObject); + }]; +} + +- (void)main +{ + if (self.isCancelled) return; + [self connectRelationship]; +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"<%@:%p %@ in %@ using %@>", + [self class], self, self.connectionMapping, self.managedObjectContext, self.managedObjectCache]; +} + +@end diff --git a/Pods/RestKit/Code/Network.h b/Pods/RestKit/Code/Network.h new file mode 100644 index 00000000..ff48d22a --- /dev/null +++ b/Pods/RestKit/Code/Network.h @@ -0,0 +1,27 @@ +// +// Network.h +// RestKit +// +// Created by Blake Watters on 9/30/10. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKRoute.h" +#import "RKRouteSet.h" +#import "RKRouter.h" +#import "RKRequestDescriptor.h" +#import "RKResponseDescriptor.h" +#import "RKObjectManager.h" +#import "RKHTTPUtilities.h" diff --git a/Pods/RestKit/Code/Network/RKHTTPRequestOperation.h b/Pods/RestKit/Code/Network/RKHTTPRequestOperation.h new file mode 100644 index 00000000..6e197f4d --- /dev/null +++ b/Pods/RestKit/Code/Network/RKHTTPRequestOperation.h @@ -0,0 +1,61 @@ +// +// RKHTTPRequestOperation.h +// RestKit +// +// Created by Blake Watters on 8/7/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "AFNetworking.h" +#import "AFHTTPRequestOperation.h" + +// Expose the default headers from AFNetworking's AFHTTPClient +@interface AFHTTPClient () +@property (readonly, nonatomic) NSDictionary *defaultHeaders; +@end + +/** + The `RKHTTPRequestOperation` class is a subclass of `AFHTTPRequestOperation` for HTTP or HTTPS requests made by RestKit. It provides per-instance configuration of the acceptable status codes and content types and integrates with the `RKLog` system to provide detailed requested and response logging. Instances of `RKHTTPRequest` are created by `RKObjectRequestOperation` and its subclasses to HTTP requests that will be object mapped. When used to make standalone HTTP requests, `RKHTTPRequestOperation` instance behave identically to `AFHTTPRequestOperation` with the exception of emitting logging information. + */ +@interface RKHTTPRequestOperation : AFHTTPRequestOperation + +///------------------------------------------------------------ +/// @name Configuring Acceptable Status Codes and Content Types +///------------------------------------------------------------ + +/** + The set of status codes which the operation considers successful. + + When `nil`, the acceptability of status codes is deferred to the superclass implementation. + + **Default**: `nil` + */ +@property (nonatomic, strong) NSIndexSet *acceptableStatusCodes; + +/** + The set of content types which the operation considers successful. + + The set may contain `NSString` or `NSRegularExpression` objects. When `nil`, the acceptability of content types is deferred to the superclass implementation. + + **Default**: `nil` + */ +@property (nonatomic, strong) NSSet *acceptableContentTypes; + +/** + Whether the response received a 304 response, whether via the initial request, or by virtue of cache revalidation occurring from `NSURLCache`. + */ +@property (nonatomic, readonly) BOOL wasNotModified; + +@end diff --git a/Pods/RestKit/Code/Network/RKHTTPRequestOperation.m b/Pods/RestKit/Code/Network/RKHTTPRequestOperation.m new file mode 100644 index 00000000..ebfd46e7 --- /dev/null +++ b/Pods/RestKit/Code/Network/RKHTTPRequestOperation.m @@ -0,0 +1,179 @@ +// +// RKHTTPRequestOperation.m +// RestKit +// +// Created by Blake Watters on 8/7/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKHTTPRequestOperation.h" +#import "RKLog.h" +#import "lcl_RK.h" +#import "RKHTTPUtilities.h" +#import "RKMIMETypes.h" + +// Set Logging Component +#undef RKLogComponent +#define RKLogComponent RKlcl_cRestKitNetwork + +static BOOL RKLogIsStringBlank(NSString *string) +{ + return ([[string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] length] == 0); +} + +static NSString *RKLogTruncateString(NSString *string) +{ + static NSInteger maxMessageLength; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + NSDictionary *envVars = [[NSProcessInfo processInfo] environment]; + maxMessageLength = RKLogIsStringBlank(envVars[@"RKLogMaxLength"]) ? NSIntegerMax : [envVars[@"RKLogMaxLength"] integerValue]; + }); + + return ([string length] <= maxMessageLength) + ? string + : [NSString stringWithFormat:@"%@... (truncated at %ld characters)", + [string substringToIndex:maxMessageLength], + (long) maxMessageLength]; +} + +@interface RKHTTPRequestOperationLogger : NSObject + ++ (id)sharedLogger; + +@end + +@implementation RKHTTPRequestOperationLogger + ++ (id)sharedLogger +{ + static RKHTTPRequestOperationLogger *sharedInstance = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + sharedInstance = [[RKHTTPRequestOperationLogger alloc] init]; + }); + return sharedInstance; +} + ++ (void)load +{ + [self sharedLogger]; +} + +- (id)init +{ + self = [super init]; + if (self) { + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(HTTPOperationDidStart:) + name:AFNetworkingOperationDidStartNotification + object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(HTTPOperationDidFinish:) + name:AFNetworkingOperationDidFinishNotification + object:nil]; + } + + return self; +} + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +- (void)HTTPOperationDidStart:(NSNotification *)notification +{ + RKHTTPRequestOperation *operation = [notification object]; + + if ((_RKlcl_component_level[(__RKlcl_log_symbol(RKlcl_cRestKitNetwork))]) >= (__RKlcl_log_symbol(RKlcl_vTrace))) { + NSString *body = nil; + if ([operation.request HTTPBody]) { + body = RKLogTruncateString([NSString stringWithUTF8String:[[operation.request HTTPBody] bytes]]); + } + + RKLogTrace(@"%@ '%@':\nrequest.headers=%@\nrequest.body=%@", [operation.request HTTPMethod], [[operation.request URL] absoluteString], [operation.request allHTTPHeaderFields], body); + } else { + RKLogInfo(@"%@ '%@'", [operation.request HTTPMethod], [[operation.request URL] absoluteString]); + } +} + +- (void)HTTPOperationDidFinish:(NSNotification *)notification +{ + RKHTTPRequestOperation *operation = [notification object]; + if (operation.error) { + if ((_RKlcl_component_level[(__RKlcl_log_symbol(RKlcl_cRestKitNetwork))]) >= (__RKlcl_log_symbol(RKlcl_vTrace))) { + RKLogError(@"%@ '%@' (%ld):\nerror=%@\nresponse.body=%@", [operation.request HTTPMethod], [[operation.request URL] absoluteString], (long)[operation.response statusCode], operation.error, operation.responseString); + } else { + RKLogError(@"%@ '%@' (%ld): %@", [operation.request HTTPMethod], [[operation.request URL] absoluteString], (long)[operation.response statusCode], operation.error); + } + } else { + if ((_RKlcl_component_level[(__RKlcl_log_symbol(RKlcl_cRestKitNetwork))]) >= (__RKlcl_log_symbol(RKlcl_vTrace))) { + RKLogTrace(@"%@ '%@' (%ld):\nresponse.headers=%@\nresponse.body=%@", [operation.request HTTPMethod], [[operation.request URL] absoluteString], (long)[operation.response statusCode], [operation.response allHeaderFields], RKLogTruncateString(operation.responseString)); + } else { + RKLogInfo(@"%@ '%@' (%ld)", [operation.request HTTPMethod], [[operation.request URL] absoluteString], (long)[operation.response statusCode]); + } + } +} + +@end + +@interface AFURLConnectionOperation () +@end + +@implementation RKHTTPRequestOperation + +- (BOOL)hasAcceptableStatusCode +{ + return self.acceptableStatusCodes ? [self.acceptableStatusCodes containsIndex:[self.response statusCode]] : [super hasAcceptableStatusCode]; +} + +- (BOOL)hasAcceptableContentType +{ + return self.acceptableContentTypes ? RKMIMETypeInSet([self.response MIMEType], self.acceptableContentTypes) : [super hasAcceptableContentType]; +} + +- (BOOL)wasNotModified +{ + return [(NSString *)[[self.response allHeaderFields] objectForKey:@"Status"] isEqualToString:@"304 Not Modified"]; +} + +#pragma mark - NSURLConnectionDelegate methods + +- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge +{ + [super connection:connection didReceiveAuthenticationChallenge:challenge]; + + RKLogDebug(@"Received authentication challenge"); +} + +- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse +{ + if ([AFHTTPRequestOperation instancesRespondToSelector:@selector(connection:willSendRequest:redirectResponse:)]) { + NSURLRequest *returnValue = [super connection:connection willSendRequest:request redirectResponse:redirectResponse]; + if (returnValue) { + if (redirectResponse) RKLogDebug(@"Following redirect request: %@", returnValue); + return returnValue; + } else { + RKLogDebug(@"Not following redirect to %@", request); + return nil; + } + } else { + if (redirectResponse) RKLogDebug(@"Following redirect request: %@", request); + return request; + } +} + +@end diff --git a/Pods/RestKit/Code/Network/RKManagedObjectRequestOperation.h b/Pods/RestKit/Code/Network/RKManagedObjectRequestOperation.h new file mode 100644 index 00000000..bec8066a --- /dev/null +++ b/Pods/RestKit/Code/Network/RKManagedObjectRequestOperation.h @@ -0,0 +1,180 @@ +// +// RKManagedObjectRequestOperation.h +// RestKit +// +// Created by Blake Watters on 8/9/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import +#import "RKObjectRequestOperation.h" +#import "RKManagedObjectCaching.h" + +/** + `RKManagedObjectRequestOperation` is a subclass of `RKObjectRequestOperation` that implements object mapping on the response body of an `NSHTTPResponse` loaded via an `RKHTTPRequestOperation` in which the mapping targets `NSManagedObject` objects managed by Core Data. + + The `RKManagedObjectRequestOperation` class extends the basic behavior of an `RKObjectRequestOperation` to meet the constraints imposed by Core Data. In particular, managed object request operations observe the threading requirements by making use of `NSManagedObjectContext` concurrency types, leverage the support for parent/child contexts, and handle obtaining a permanent `NSManagedObjectID` for objects being mapped so that they are addressable across contexts. Object mapping is internally performed within a block provided to the target context via `performBlockAndWait:`, ensuring execution on the appropriate queue. + + Aside from providing the basic infrastructure for successful object mapping into Core Data, a number of additional Core Data specific features are provided by the `RKManagedObjectRequestOperation` class that warrant discussion in detail. + + ## Parent Context + + Every `RKManagedObjectRequestOperation` object must be assigned an `NSManagedObjectContext` in which to persist the results of the underlying object mapping operation. This context is used as the parent context for a new, private `NSManagedObjectContext` with a concurrency type of `NSPrivateQueueConcurrencyType` in which the object mapping is actually performed. The use of this parent context has a number of benefits: + + 1. If the context that was assigned to the managed object request operation has a concurrency type of `NSMainQueueConcurrencyType`, then directly mapping into the context would block the execution of the main thread for the duration of the mapping process. The use of the private child context isolates the mapping process from the main thread entirely. + 1. In the event of an error, the private context can be discarded, leaving the state of the parent context unchanged. On successful completion, the private context is saved and 'pushes' its changes up one level into the parent context. + + ## Permanent Managed Object IDs + + One of the confounding factors when working with asycnhronous processes interacting with Core Data is the addressability of managed objects that have not been saved to the persistent store across contexts. Unpersisted `NSManagedObject` instances have an `objectID` that is temporary and unsuitable for use in uniquely addressing a given object across two managed object contexts, even if they have common ancestry and share a persistent store coordinator. To mitigate this addressability issue without requiring objects to be saved to the persistent store, managed object request operations invoke `obtainPermanentIDsForObjects:` on the operation's target object (if any) and all managed objects that were inserted into the context during the mapping process. By the time the operation finishes, all managed objects in the mapping result can be referenced by `objectID` across contexts with no further action. + + ## Primary Keys & Managed Object Caching + + When object mapping managed objects it is necessary to differentiate between objects that already exist in the local store and those that are being created as part of the mapping process. This ensures that the local store does not become populated with duplicate records. To make this differentiation, RestKit requires that each `NSEntityDescription` be configured with a primary key attribute. The primary key must correspond to a static attribute assigned by the remote backend system. During mapping, this key is used to search the managed object context for an existing managed object. If one is found, the object is updated else a new object is created. Primary keys are configured at the entity level and additional discussion accompanies the `NSEntityDescription (RKAdditions)` category. + + Primary key attributes are used in conjunction with the `RKManagedObjectCaching` protocol. Each managed object request operation is associated with an object conforming to the `RKManagedObjectCaching` protocol via the `managedObjectCache` proeprty. This cache is consulted during mapping to find existing objects and when establishing relationships between entities by primary key. Please see the documentation accompanying `RKManagedObjectCaching` and `RKConnectionMapping` for more information. + + ## Fetching Result Objects + + When a `completionBlock` is configured for an instance of `RKManagedObjectRequestOperation` additional work is performed before the mapping result is returned to the caller. Because mapping internally occurs on a private managed object context with the `NSPrivateQueueConcurrencyType` concurrency type, attempts to directly access the `NSManagedObject` instances contained within the `RKMappingResult` would violate the threading constraints imposed by Core Data. As such, before the mapping result is returned to the caller in a completion block the objects are re-fetched from the `managedObjectContext`. Please see `RKManagedObjectThreadSafeInvocation` for details about the implementation. + + TODO: Is this necessary? + + ## Deleting Managed Objects for `DELETE` requests + + `RKManagedObjectRequestOperation` adds special behavior to `DELETE` requests. Upon retrieving a successful (2xx status code) response for a `DELETE`, the operation will invoke `deleteObject:` with the operations `targetObject` on the managed object context. This will delete the target object from the local store in conjunction the successfully deleted remote representation. + + ## Fetch Request Blocks and Deleting Orphaned Objects + + A common problem when accessing remote resources representing collections of objects is the problem of deletion of remote objects. The `RKManagedObjectRequestOperation` class provides support for the cleanup of such orphaned objects. In order to utilize the functionality, the operation must be able to compare a set of reference objects to the retrieved payload in order to determine which objects exist in the local store, but are no longer being returned by the server. This reference set of objects is built by executing an `NSFetchRequest` that corresponds to the URL being loaded. Configuration of this fetch request is done via an `RKFetchRequestBlock` block object. This block takes a single `NSURL` argument and returns an `NSFetchRequest` objects. An array of these blocks can be provided to the managed object request operation and the array will be searched in reverse order until a non-nil value is returned by a block. Any block that cannot build a fetch request for the given URL is expected to return `nil` to indicate that it does not match the given URL. Processing of the URL is typically performed using an `RKPathMatcher` object against the value returned from the `relativePath` or `relativeString` methods of `NSURL`. + + To illustrate this concept, please consider the following real-world example which builds a fetch request for retrieving the Terminals that exist in an Airport: + + RKObjectManager *manager = [RKObjectManager managerWithBaseURL:@"http://restkit.org"]; + [manager addFetchRequestBlock:^NSFetchRequest *(NSURL *URL) { + RKPathMatcher *pathMatcher = [RKPathMatcher pathMatcherWithPattern:@"/airports/:airport_id/terminals.json"]; + + NSDictionary *argsDict = nil; + BOOL match = [pathMatcher matchesPath:[URL relativePath] tokenizeQueryStrings:NO parsedArguments:&argsDict]; + NSString *airportID; + if (match) { + airportID = [argsDict objectForKey:@"airport_id"]; + NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:@"GGTerminal"]; + NSEntityDescription *entity = [NSEntityDescription entityForName:@"GGAirport" inManagedObjectContext:managedObjectStore.persistentStoreManagedObjectContext]; + fetchRequest.predicate = [entity predicateForPrimaryKeyAttributeWithValue:airportID]; + fetchRequest.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"name" ascending:YES]]; + return fetchRequest; + } + + return nil; + }]; + + The above example code defines an `RKFetchRequestBlock` block object that will match an `NSURL` with a relative path matching the pattern `@"/airports/:airport_id/terminals.json"`. If a match is found, the block extracts the `airport_id` key from the matched arguments and uses it to construct an `NSPredicate` for the primary key attribute of `GGAirport` entity. It then constructs an `NSFetchRequest` for the `GGTerminal` entity that will retrieve all the managed objects with an airport ID attribute whose value is equal to `airport_id` encoded within the URL's path. + + In more concrete terms, given the URL `http://restkit.org/airports/1234/terminals.json` the block would return an `NSFetchRequest` equal to: + + NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:@"GGTerminal"]; + fetchRequest.predicate = [NSPredicate predicateWithFormat:@"airportID = 1234"]; + fetchRequest.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"name" ascending:YES]]; + + Once configured and registered with the object manager, any `RKManagedObjectRequestOperation` created through the manager will automatically consult the fetch request blocks and perform orphaned object cleanup. No cleanup is performed if no block in the `fetchRequestBlocks` property is found to match the URL of the request. + + ## Managed Object Context Save Behaviors + + The results of the operation can either be 'pushed' to the parent context or saved to the persistent store. Configuration is available via the `savesToPersistentStore` property. If an error is encountered while saving the managed object context, then the operation is considered to have failed and the `error` property will be set to the `NSError` object returned by the failed save. + + ## Limitations and Caveats + + @warning `RKManagedObjectRequestOperation` **does NOT** support object mapping that targets an `NSManagedObjectContext` with a `concurrencyType` of `NSConfinementConcurrencyType`. + + @see `RKObjectRequestOperation` + @see `RKEntityMapping` + @see `RKManagedObjectResponseMapperOperation` + */ +@interface RKManagedObjectRequestOperation : RKObjectRequestOperation + +///---------------------------------------- +/// @name Configuring Core Data Integration +///---------------------------------------- + +/** + The managed object context associated with the managed object request operation. + + This context acts as the parent context for a private managed object context in which the object mapping is performed and changes will be saved to this context upon successful completion of the operation. + + Please see the above discussion about 'Parent Context' for details. + */ +@property (nonatomic, strong) NSManagedObjectContext *managedObjectContext; + +/** + The managed object cache associated with the managed object request operation. + + The cache is used to look up existing objects by primary key to prevent the creation of duplicate objects during mapping. Please see the above discussion of 'Managed Object Caching' for more details. + + @warning A `nil` value for the `managedObjectCache` property is valid, but may result in the creation of duplicate objects. + */ +@property (nonatomic, weak) id managedObjectCache; + +/** + An array of `RKFetchRequestBlock` block objects used to map `NSURL` objects into corresponding `NSFetchRequest` objects. + + Fetch requests corresponding to URL's are used when deleting orphaned objects and completing object request operations in which `avoidsNetworkAccess` has been set to `YES`. Please see the above discussion of 'Fetch Request Blocks' for more details. + */ +@property (nonatomic, copy) NSArray *fetchRequestBlocks; + +///------------------------------------ +/// @name Managing Completion Behaviors +///------------------------------------ + +/** + A Boolean value that determines if the receiver will delete orphaned objects upon completion of the operation. + + Please see the above discussion of 'Deleting Managed Objects for `DELETE` requests' for more details. + + **Default**: `NO` + */ +@property (nonatomic, assign) BOOL deletesOrphanedObjects; + +/** + A Boolean value that determines if the operation saves the mapping results to the persistent store upon successful completion. If the network transport or mapping portions of the operation fail the operation then this option has no effect. + + When `YES`, the receiver will invoke `saveToPersistentStore:` on its private managed object context to persist the mapping results all the way back to the persistent store coordinator. If `NO`, the private mapping context will be saved causing the mapped objects to be 'pushed' to the parent context as represented by the `managedObjectContext` property. + + **Default**: `YES` + */ +@property (nonatomic, assign) BOOL savesToPersistentStore; + +@end + +/** + A block object for returning an `NSFetchRequest` suitable for fetching the managed objects that corresponds to the contents of the resource at the given URL. It accepts a single `NSURL` argument and returns an `NSFetchRequest`. + + `RKFetchRequestBlock` objects are used to identify objects that exist in the local persistent store, but have been removed from the server-side. Such orphaned objects can optionally be auto-removed by `RKManagedObjectRequestOperation` objects. + + A block that returns `nil` is considered not to match the given URL. + + @param URL The URL object to build a fetch request for. + @return An `NSFetchRequest` object corresponding to the given URL, or nil if the URL could not be processed. + */ +typedef NSFetchRequest *(^RKFetchRequestBlock)(NSURL *URL); + +/** + Returns a fetch request object from an array of `RKFetchRequestBlock` objects given a URL. + + @param fetchRequestBlocks An array of `RKFetchRequestBlock` blocks to + @param URL The URL for which to return a fetch request. + @return A fetch request from the first block that matches the URL. + */ +NSFetchRequest *RKFetchRequestFromBlocksWithURL(NSArray *fetchRequestBlocks, NSURL *URL); diff --git a/Pods/RestKit/Code/Network/RKManagedObjectRequestOperation.m b/Pods/RestKit/Code/Network/RKManagedObjectRequestOperation.m new file mode 100644 index 00000000..5c584fc8 --- /dev/null +++ b/Pods/RestKit/Code/Network/RKManagedObjectRequestOperation.m @@ -0,0 +1,293 @@ +// +// RKManagedObjectRequestOperation.m +// RestKit +// +// Created by Blake Watters on 8/9/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKManagedObjectRequestOperation.h" +#import "RKLog.h" +#import "RKHTTPUtilities.h" +#import "RKResponseMapperOperation.h" +#import "RKRequestOperationSubclass.h" +#import "NSManagedObjectContext+RKAdditions.h" + +// Set Logging Component +#undef RKLogComponent +#define RKLogComponent RKlcl_cRestKitCoreData + +NSFetchRequest *RKFetchRequestFromBlocksWithURL(NSArray *fetchRequestBlocks, NSURL *URL) +{ + NSFetchRequest *fetchRequest = nil; + for (RKFetchRequestBlock block in [fetchRequestBlocks reverseObjectEnumerator]) { + fetchRequest = block(URL); + if (fetchRequest) break; + } + return fetchRequest; +} + +@interface RKManagedObjectRequestOperation () +// Core Data specific +@property (readwrite, nonatomic, strong) NSManagedObjectContext *privateContext; +@property (readwrite, nonatomic, copy) NSManagedObjectID *targetObjectID; +@property (readwrite, nonatomic, strong) NSMutableDictionary *managedObjectsByKeyPath; +@property (readwrite, nonatomic, strong) NSError *error; +@property (nonatomic, strong) RKManagedObjectResponseMapperOperation *responseMapperOperation; +@end + +@implementation RKManagedObjectRequestOperation + +// Designated initializer +- (id)initWithHTTPRequestOperation:(RKHTTPRequestOperation *)requestOperation responseDescriptors:(NSArray *)responseDescriptors +{ + self = [super initWithHTTPRequestOperation:requestOperation responseDescriptors:responseDescriptors]; + if (self) { + self.savesToPersistentStore = YES; + } + return self; +} + +- (void)setTargetObject:(id)targetObject +{ + [super setTargetObject:targetObject]; + + if ([targetObject isKindOfClass:[NSManagedObject class]]) { + self.targetObjectID = [targetObject objectID]; + } +} + +- (void)setManagedObjectContext:(NSManagedObjectContext *)managedObjectContext +{ + _managedObjectContext = managedObjectContext; + + // Create a private context + NSManagedObjectContext *privateContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType]; + [privateContext performBlockAndWait:^{ + privateContext.parentContext = self.managedObjectContext; + privateContext.mergePolicy = NSMergeByPropertyStoreTrumpMergePolicy; + }]; + self.privateContext = privateContext; +} + +#pragma mark - RKMapperOperationDelegate methods + +- (void)mapper:(RKMapperOperation *)mapper didFinishMappingOperation:(RKMappingOperation *)mappingOperation forKeyPath:(NSString *)keyPath +{ + if ([mappingOperation.destinationObject isKindOfClass:[NSManagedObject class]]) { + [self.managedObjectsByKeyPath setObject:mappingOperation.destinationObject forKey:keyPath]; + } +} + +#pragma mark - RKObjectRequestOperation Overrides + +- (void)cancel +{ + [super cancel]; + [self.responseMapperOperation cancel]; +} + +- (RKMappingResult *)performMappingOnResponse:(NSError **)error +{ + if (self.HTTPRequestOperation.wasNotModified) { + RKLogDebug(@"Managed object mapping requested for cached response: skipping mapping..."); + // TODO: This is unexpectedly returning an empty result set... need to be able to retrieve the appropriate objects... + return [[RKMappingResult alloc] initWithDictionary:@{}]; + } + + self.responseMapperOperation = [[RKManagedObjectResponseMapperOperation alloc] initWithResponse:self.HTTPRequestOperation.response + data:self.HTTPRequestOperation.responseData + responseDescriptors:self.responseDescriptors]; + self.responseMapperOperation.targetObjectID = self.targetObjectID; + self.responseMapperOperation.managedObjectContext = self.privateContext; + self.responseMapperOperation.managedObjectCache = self.managedObjectCache; + [self.responseMapperOperation setQueuePriority:[self queuePriority]]; + [[RKObjectRequestOperation responseMappingQueue] addOperation:self.responseMapperOperation]; + [self.responseMapperOperation waitUntilFinished]; + if ([self isCancelled]) return nil; + if (self.responseMapperOperation.error) { + if (error) *error = self.responseMapperOperation.error; + return nil; + } + + return self.responseMapperOperation.mappingResult; +} + +- (BOOL)deleteTargetObjectIfAppropriate:(NSError **)error +{ + __block BOOL _blockSuccess = YES; + + if (self.targetObjectID + && NSLocationInRange(self.HTTPRequestOperation.response.statusCode, RKStatusCodeRangeForClass(RKStatusCodeClassSuccessful)) + && [[[self.HTTPRequestOperation.request HTTPMethod] uppercaseString] isEqualToString:@"DELETE"]) { + + // 2xx DELETE request, proceed with deletion from the MOC + __block NSError *_blockError = nil; + [self.privateContext performBlockAndWait:^{ + NSManagedObject *backgroundThreadObject = [self.privateContext existingObjectWithID:self.targetObjectID error:&_blockError]; + if (backgroundThreadObject) { + RKLogInfo(@"Deleting local object %@ due to `DELETE` request", backgroundThreadObject); + [self.privateContext deleteObject:backgroundThreadObject]; + } else { + RKLogWarning(@"Unable to delete object sent with `DELETE` request: Failed to retrieve object with objectID %@", self.targetObjectID); + RKLogCoreDataError(_blockError); + _blockSuccess = NO; + *error = _blockError; + } + }]; + } + + return _blockSuccess; +} + +- (NSSet *)localObjectsFromFetchRequestsMatchingRequestURL:(NSError **)error +{ + NSMutableSet *localObjects = [NSMutableSet set]; + __block NSError *_blockError; + __block NSArray *_blockObjects; + + // Pass the fetch request blocks a relative `NSURL` object if possible + NSURL *URL = [self.HTTPRequestOperation.request URL]; + NSArray *baseURLs = [self.responseDescriptors valueForKeyPath:@"@distinctUnionOfObjects.baseURL"]; + if ([baseURLs count] == 1) { + NSURL *baseURL = baseURLs[0]; + NSString *pathAndQueryString = RKPathAndQueryStringFromURLRelativeToURL(URL, baseURL); + URL = [NSURL URLWithString:pathAndQueryString relativeToURL:baseURL]; + } + + for (RKFetchRequestBlock fetchRequestBlock in [self.fetchRequestBlocks reverseObjectEnumerator]) { + NSFetchRequest *fetchRequest = fetchRequestBlock(URL); + if (fetchRequest) { + RKLogDebug(@"Found fetch request matching URL '%@': %@", URL, fetchRequest); + + [self.privateContext performBlockAndWait:^{ + _blockObjects = [self.privateContext executeFetchRequest:fetchRequest error:&_blockError]; + }]; + + if (_blockObjects == nil) { + if (error) *error = _blockError; + return nil; + } + RKLogTrace(@"Fetched local objects matching URL '%@' with fetch request '%@': %@", URL, fetchRequest, _blockObjects); + [localObjects addObjectsFromArray:_blockObjects]; + } else { + RKLogDebug(@"Fetch request block %@ returned nil fetch request for URL: '%@'", fetchRequestBlock, URL); + } + } + + return localObjects; +} + +- (BOOL)deleteLocalObjectsMissingFromMappingResult:(RKMappingResult *)result error:(NSError **)error +{ + if (! self.deletesOrphanedObjects) { + RKLogDebug(@"Skipping deletion of orphaned objects: deletesOrphanedObjects=NO"); + return YES; + } + + if (! [[self.HTTPRequestOperation.request.HTTPMethod uppercaseString] isEqualToString:@"GET"]) { + RKLogDebug(@"Skipping cleanup of objects via managed object cache: only used for GET requests."); + return YES; + } + + NSArray *results = [result array]; + NSSet *localObjects = [self localObjectsFromFetchRequestsMatchingRequestURL:error]; + if (! localObjects) return NO; + for (id object in localObjects) { + if (NO == [results containsObject:object]) { + RKLogDebug(@"Deleting orphaned object %@: not found in result set and expected at this URL", object); + [self.privateContext performBlockAndWait:^{ + [self.privateContext deleteObject:object]; + }]; + } + } + + return YES; +} + +- (BOOL)saveContext:(NSError **)error +{ + __block BOOL success = YES; + __block NSError *localError = nil; + if ([self.privateContext hasChanges]) { + if (self.savesToPersistentStore) { + success = [self.privateContext saveToPersistentStore:&localError]; + } else { + [self.privateContext performBlockAndWait:^{ + success = [self.privateContext save:&localError]; + }]; + } + if (success) { + if ([self.targetObject isKindOfClass:[NSManagedObject class]]) { + [self.managedObjectContext performBlock:^{ + RKLogDebug(@"Refreshing mapped target object %@ in context %@", self.targetObject, self.managedObjectContext); + [self.managedObjectContext refreshObject:self.targetObject mergeChanges:YES]; + }]; + } + } else { + if (error) *error = localError; + RKLogError(@"Failed saving managed object context %@ %@", (self.savesToPersistentStore ? @"to the persistent store" : @""), self.privateContext); + RKLogCoreDataError(localError); + } + } + + return success; +} + +- (BOOL)obtainPermanentObjectIDsForInsertedObjects:(NSError **)error +{ + __block BOOL _blockSuccess = YES; + __block NSError *localError = nil; + NSArray *insertedObjects = [self.privateContext.insertedObjects allObjects]; + if ([insertedObjects count] > 0) { + RKLogDebug(@"Obtaining permanent ID's for %ld managed objects", (unsigned long) [insertedObjects count]); + [self.privateContext performBlockAndWait:^{ + _blockSuccess = [self.privateContext obtainPermanentIDsForObjects:insertedObjects error:&localError]; + }]; + if (!_blockSuccess && error) *error = localError; + } + + return _blockSuccess;; +} + +- (void)willFinish +{ + BOOL success; + NSError *error = nil; + + // Handle any cleanup + success = [self deleteTargetObjectIfAppropriate:&error]; + if (! success) { + self.error = error; + return; + } + + success = [self deleteLocalObjectsMissingFromMappingResult:self.mappingResult error:&error]; + if (! success) { + self.error = error; + return; + } + + // Persist our mapped objects + success = [self obtainPermanentObjectIDsForInsertedObjects:&error]; + if (! success) { + self.error = error; + return; + } + success = [self saveContext:&error]; + if (! success) self.error = error; +} + +@end diff --git a/Pods/RestKit/Code/Network/RKObjectManager.h b/Pods/RestKit/Code/Network/RKObjectManager.h new file mode 100644 index 00000000..0f762451 --- /dev/null +++ b/Pods/RestKit/Code/Network/RKObjectManager.h @@ -0,0 +1,801 @@ +// +// RKObjectManager.h +// RestKit +// +// Created by Jeremy Ellison on 8/14/09. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import +#import "RKRouter.h" +#import "RKObjectPaginator.h" +#import "RKMacros.h" +#import "AFNetworking.h" +#import "RKManagedObjectRequestOperation.h" + +@protocol RKSerialization; +@class RKManagedObjectStore, RKObjectRequestOperation, RKManagedObjectRequestOperation, +RKMappingResult, RKRequestDescriptor, RKResponseDescriptor; + +/** + The `RKObjectManager` class provides a centralized interface for performing object mapping based HTTP request and response operations. It encapsulates common configuration such as request/response descriptors and routing, provides for the creation of `NSURLRequest` and `RKObjectRequestOperation` objects, and one-line methods to enqueue object request operations for the basic HTTP request methods (GET, POST, PUT, DELETE, etc). + + ## Object Request Operations + + Object request operations model the lifecycle of an object mapped HTTP request from start to finish. They are initialized with a fully configured `NSURLRequest` object and a set of `RKResponseDescriptor` objects that specify how an HTTP response is to be mapped into local domain objects. Object request operations may be constructed as standalone objects, but are often constructed through an `RKObjectManager` object. The object request operation encapsulates the functionality of two underlying operations that perform the bulk of the work. The HTTP request and response loading is handled by an `RKHTTPRequestOperation`, which is responsible for the HTTP transport details. Once a response has been successfully loaded, the object request operation starts an `RKResponseMapperOperation` that is responsible for handling the mapping of the response body. When working with Core Data, the `RKManagedObjectRequestOperation` class is used. The object manager encapsulates the Core Data configuration details and provides an interface that will return the appropriate object request operation for a request through the `appropriateObjectRequestOperationWithObject:method:path:parameters:` method. + + ## The Base URL and Path Patterns + + Each object manager is configured with a base URL that defines the URL that all request sent through the manager will be relative to. The base URL is configured directly through the `managerWithBaseURL:` method or is inherited from an AFNetworking `AFHTTPClient` object if the manager is initialized via the `initWithHTTPClient:` method. The base URL can point directly at the root of a URL or may include a path. + + Path patterns are a common unit of abstraction in RestKit for describing the path portion of URL's. When working with API's, there is typically one or more dynamic portions of the URL that correspond to primary keys or other identifying resource attributes. For example, a blogging application may represent articles in a URL structure such as '/articles/1234' and comments about an article might appear at '/articles/1234/comments'. These path structures could be represented as the path patterns '/articles/:articleID' and '/articles/:articleID/comments', substituing the dynamic key ':articleID' in place of the primary key of in the path. These keys can be used to interpolate a path with an object's property values using key-value coding or be used to match a string. + + Path patterns appear throughout RestKit, but the most fundamental uses are for the dynamic generation of URL paths from objects and the matching of request and response URLs for mapping configuration. When generating a URL, a path pattern is interpolated with the value of an object. Consider this example: + + // Set object attributes + RKArticle *article = [RKArticle new]; + article.articleID = @12345; + + // Interpolate with the object + NSString *path = RKPathFromPatternWithObject(@"/articles/:articleID", article); + NSLog(@"The path is %@", path); // prints /articles/12345 + + This may at first glance appear to provide only a small syntactic improvement over using `[NSString stringWithFormat:]`, but it becomes more interesting once you consider that the dynamic key can include key path: + + RKCategory *category = [RKCategory new]; + comment.name = @"RestKit; + article.category = category; + + NSString *path = RKPathFromPatternWithObject(@"/categories/:comment.name/articles/:articleID/comments/", article); + NSLog(@"The path is %@", path); // prints /categories/RestKit/articles/12345 + + These path patterns can then be registered with the manager via an `RKRoute` object (discussed in detail below), enabling one to perform object request operations like so: + + RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://restkit.org"]]; + [manager.router.routeSet addRoute:[RKRoute routeWithClass:[RKArticle class] pathPattern:@"/categories/:comment.name/articles/:articleID/comments/" method:RKRequestMethodGET]]; + + // Now GET our article object... sending a GET to '/categories/RestKit/articles/12345' + [manager getObject:article path:nil parameters:nil success:^(RKObjectRequestOperation *operation, RKMappingResult *result) { + NSLog(@"Loading mapping result: %@", result); + } failure:nil]; + + Once a path pattern has been registered via the routing system, the manager can automatically build full request URL's when given nothing but the object to be sent. + + The second use case of path patterns is in the matching of path into a dictionary of attributes. In this case, the path pattern is evaluatd against a string and used to construct an `NSDictionary` object containing the matched key paths, optionally including the values of a query string. This functionality is provided via the `RKPathMatcher` class and is discussed in detail in the accompanying documentation. + + ## Request and Response Descriptors + + RestKit centralizes configuration for object mapping configurations into the object manager through `RKRequestDescriptor` and `RKResponseDescriptor` objects. A collection of each of these object types are maintained by the manager and used to initialize all `RKObjectRequestOperation` objects created by the manager. + + Request descriptors describe how `NSURLRequest` objects constructed by the manager will be built by specifying how the attributes and relationships for a given class will be object mapped to construct request parameters and what, if any, root key path the parameters will be nested under. Request descriptor objects can also be used with the `RKObjectParameterization` class to map an object into an `NSDictionary` representation that is suitable for use as the parameters of a request. + + Response descriptors describe how `NSHTTPURLResponse` objects loaded by object request operations sent by the manager are to be object mapped into local domain objects. Response descriptors are matched against a given response via URL path matching, parsed content key path matching, or both. The `RKMapping` object associated from a matched `RKResponseDescriptor` is given to an instance of `RKMapperOperation` with the parsed response body to perform object mapping on the response. + + To better illustrate these concepts, consider the following example for an imaginary Wiki client application: + + @interface RKWikiPage : NSObject + @property (nonatomic, copy) NSString *title; + @property (nonatomic, copy) NSString *body; + @end + + // Construct a request mapping for our class + RKObjectMapping *requestMapping = [RKObjectMapping requestMapping]; + [requestMapping addAttributeMappingsFromDictionary:@{ @"title": @"title", @"body": @"body" }]; + + // We wish to generate parameters of the format: + // @{ @"page": @{ @"title": @"An Example Page", @"body": @"Some example content" } } + RKRequestDescriptor *requestDescriptor = [RKRequestDescriptor requestDescriptorWithMapping:mapping + objectClass:[RKWikiPage class] + rootKeyPath:@"page"]; + + // Construct an object mapping for the response + // We are expecting JSON in the format: + // {"page": {"title": "", "body": "<body value>"} + RKObjectMapping *responseMapping = [RKObjectMapping mappingForClass:[RKWikiPage class]]; + [responseMapping addAttributeMappingsFromArray:@[ @"title", @"body" ]]; + + // Construct a response descriptor that matches any URL (the pathPattern is nil), when the response payload + // contains content nested under the `@"page"` key path, if the response status code is 200 (OK) + RKResponseDescriptor *responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:responseMapping + pathPattern:nil + keyPath:@"page" + statusCodes:[NSIndexSet indexSetWithIndex:200]]; + + // Register our descriptors with a manager + RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://restkit.org/"]]; + [manager addRequestDescriptor:requestDescriptor]; + [manager addResponseDescriptor:responseDescriptor]; + + // Work with the object + RKWikiPage *page = [RKWikiPage new]; + page.title = @"An Example Page"; + page.body = @"Some example content"; + + // POST the parameterized representation of the `page` object to `/posts` and map the response + [manager postObject:page path:@"/pages" parameters:nil success:^(RKObjectRequestOperation *operation, RKMappingResult *result) { + NSLog(@"We object mapped the response with the following result: %@", result); + } failure:nil]; + + In the above example, request and response mapping configurations were described for a simple data model and then used to perform a basic POST operation and map the results. An arbitrary number of request and response descriptors may be added to the manager to accommodate your application's needs. + + ## MIME Types + + MIME Types serve an important function to the object manager. They are used to identify how content is to be serialized when constructing request bodies and also used to set the 'Accept' header for content negotiation. RestKit aspires to be content type agnostic by leveraging the pluggable `RKMIMESerialization` class to handle content serialization and deserialization. + + ## Routing + + Routing is the process of generating an `NSURL` appropriate for a particular HTTP server request interaction. Using routing instead of hard-coding paths enables centralization of configuration and allows the developer to focus on what they want done rather than the details of how to do it. Changes to the URL structure in the application can be made in one place. Routes can also be useful in testing, as they permit for the changing of paths at run-time. + + Routing interfaces are provided by the `RKRouter` class. Each object manager is in initialized with an `RKRouter` object with a baseURL equal to the baseURL of the underlying `AFHTTPClient` object. Each `RKRouter` instance maintains an `RKRouteSet` object that manages a collection of `RKRoute` objects. Routes are defined in terms of a path pattern. + + There are three types of routes currently supported: + + 1. Class Routes. Class routes are configured to target a given object class and HTTP request method. For example, we might route the HTTP `GET` for a `User` class to the path pattern `@"/users/:userID"`. + 1. Relationship Routes. Relationship routes identify the path appropriate for performing a request for an object that is related to another object. For example, each `User` may have many friends. This might be routed as a relationship route for the `User` class with the name `@"friends"` to the path pattern `@"/users/:userID/friends"`. + 1. Named Routes. Names routes bind an arbitrary name to a path. For example, there might be an action to follow another user that could be added as a named route with the name `@"follow_user"` that generates a `POST` to the path pattern `@"/users/:userID/follow"`. + + To better understand these concepts, please consider the following example code for configuring the above routing examples: + + RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://restkit.org"]]; + + // Class Route + [manager.router.routeSet addRoute:[RKRoute routeWithClass:[User class] pathPattern:@"/users/:userID" method:RKRequestMethodGET]]; + + // Relationship Route + [manager.router.routeSet addRoute:[RKRoute routeWithRelationshipName:@"friends" objectClass:[User class] pathPattern:@"/users/:userID/friends" method:RKRequestMethodGET]]; + + // Named Route + [manager.router.routeSet addRoute:[RKRoute routeWithName:@"follow_user" pathPattern:@"/users/:userID/follow" method:RKRequestMethodPOST]]; + + Once configured, routes will be consulted by the object manager whenever the path parameter provided to a method is given as nil. For example, invoking the following code would result in a `GET` to the path `@"/users/1234"`: + + User *user = [User new]; + user.userID = 1234; + [manager getObject:user path:nil parameters:nil success:^(RKObjectRequestOperation *operation, RKMappingResult *result) { + // Request + } failure:nil]; + + Routes can also be explicitly used to construct `NSMutableURLRequest` objects and are referenced explicitly in a few object request operation methods: + + 1. `requestWithObject:method:path:parameters:` - Consults routing when path is nil. + 1. `multipartFormRequestWithObject:method:path:parameters:constructingBodyWithBlock:` - Consults routing when path is nil. + 1. `requestWithPathForRouteNamed:object:parameters:` - Explicitly retrieves the route with the given name. + 1. `getObjectsAtPathForRelationship:ofObject:parameters:success:failure:` - Explicitly retrieves the route for the given name and object class. + 1. `getObjectsAtPathForRouteNamed:object:parameters:success:failure:` - Explicitly retrieves the route for the given name. + + Please see the documentation for `RKRouter`, `RKRouteSet`, and `RKRoute` for more details about the routing classes. + + ## Core Data + + RestKit features deep integration with Apple's Core Data persistence framework. The object manager provides access to this integration by creating `RKManagedObjectRequestOperation` objects when an attempt is made to interact with a resource that has been mapped using an `RKEntityMapping`. To utilize the Core Data integration, the object manager must be provided with a fully configured `RKManagedObjectStore` object. The `RKManagedObjectStore` provides access to the `NSManagedObjectModel` and `NSManagedObjectContext` objects required to peform object mapping that targets a Core Data entity. + + Please see the documentation for `RKManagedObjectStore`, `RKEntityMapping`, and `RKManagedObjectRequestOperation` for in depth information about Core Data in RestKit. + + ## Subclassing Notes + + The object manager is designed to support subclassing. The default behaviors can be altered and tailored to the specific needs of your application easily by manipulating a few core methods: + + * `objectRequestOperationWithRequest:success:failure:` - Used to construct all non-managed object request operations for the manager. Provide a subclass implementation if you wish to alter the behavior of all unmanaged object request operations. + * `managedObjectRequestOperationWithRequest:managedObjectContext:success:failure:` - Used to construct all managed object request operations for the manager. Provide a subclass implementation if you wish to alter the behavior of all managed object request operations. + * `appropriateObjectRequestOperationWithObject:method:path:parameters:` - Used to construct all object request operations for the manager, both managed and unmanaged. Invokes either `objectRequestOperationWithRequest:success:failure:` or `managedObjectRequestOperationWithRequest:managedObjectContext:success:failure:` to construct the actual request. Provide a subclass implementation to alter behaviors for all object request operations constructed by the manager. + * `enqueueObjectRequestOperation:` - Invoked to enqueue all operations constructed by the manager that are to be started as soon as possible. Provide a subclass implementation if you wish to work with object request operations as they are be enqueued. + + Also note that the behavior of the lower level HTTP details can also be altered by subclassing `AFHTTPClient` and using an instance of your subclassed client to initialize the manager. + + @warning Note that when subclassing `AFHTTPClient` to change object manager behaviors it is not possible to alter the paramters of requests that are constructed on behalf of the manager. This is because the object manager handles its own serialization and construction of the request body, but defers to the `AFHTTPClient` for all other details (such as default HTTP headers, etc). + + @see `RKObjectRequestOperation` + @see `RKRouter` + @see `RKPathMatcher` + @see `RKMIMETypeSerialization` + */ +@interface RKObjectManager : NSObject + +///---------------------------------------------- +/// @name Configuring the Shared Manager Instance +///---------------------------------------------- + +/** + Return the shared instance of the object manager + + @return The shared manager instance. + */ ++ (RKObjectManager *)sharedManager; + +/** + Set the shared instance of the object manager + + @param manager The new shared manager instance. + */ ++ (void)setSharedManager:(RKObjectManager *)manager; + +///------------------------------------- +/// @name Initializing an Object Manager +///------------------------------------- + +/** + Creates and returns a new `RKObjectManager` object initialized with a new `AFHTTPClient` object that was in turn initialized with the given base URL. The RestKit defaults are applied to the object manager. + + When initialized with a base URL, the returned object manager will have a `requestSerializationMIMEType` with the value of `RKMIMETypeFormURLEncoded` and a default value for the 'Accept' header set to `RKMIMETypeJSON`. + + @param baseURL The base URL with which to initialize the `AFHTTPClient` object + @return A new `RKObjectManager` initialized with an `AFHTTPClient` that was initialized with the given baseURL. + */ ++ (id)managerWithBaseURL:(NSURL *)baseURL; + +/** + Initializes the receiver with the given AFNetworking HTTP client object, adopting the network configuration from the client. + + This is the designated initializer. If the `sharedManager` instance is `nil`, the receiver will be set as the `sharedManager`. The default headers and parameter encoding of the given HTTP client are adopted by the receiver to initialize the values of the `defaultHeaders` and `requestSerializationMIMEType` properties. + + @param client The AFNetworking HTTP client with which to initialize the receiver. + @return The receiver, initialized with the given client. + */ +- (id)initWithHTTPClient:(AFHTTPClient *)client; + +///------------------------------------------ +/// @name Accessing Object Manager Properties +///------------------------------------------ + +/** + The AFNetworking HTTP client with which the receiver makes requests. + */ +@property (nonatomic, strong, readonly) AFHTTPClient *HTTPClient; + +/** + The base URL of the underlying HTTP client. + */ +@property (nonatomic, readonly) NSURL *baseURL; + +/** + The default HTTP headers for all `NSURLRequest` objects constructed by the object manager. + + The returned dictionary contains all of the default headers set on the underlying `AFHTTPClient` object and the value of the 'Accept' header set on the object manager, if any. + + @see `setAcceptHeaderWithMIMEType:` + */ +@property (nonatomic, readonly) NSDictionary *defaultHeaders; + +/** + The operation queue which manages operations enqueued by the object manager. + */ +@property (nonatomic, strong) NSOperationQueue *operationQueue; + +/** + The router used to generate URL objects for routable requests created by the manager. + + @see `RKRouter` + @see `RKRoute` + */ +@property (nonatomic, strong) RKRouter *router; + +///-------------------------------------------------- +/// @name Configuring Request and Response MIME Types +///-------------------------------------------------- + +/** + The MIME Type to serialize request parameters into when constructing request objects. + + The value of the `requestSerializationMIMEType` is used to obtain an appropriate `RKSerialization` conforming class from the `RKMIMESerialization` interface. Parameterized objects and dictionaries of parameters are then serialized for transport using the class registered for the MIME Type. By default, the value is `RKMIMETypeFormURLEncoded` which means that the request body of all `POST`, `PUT`, and `PATCH` requests will be sent in the URL encoded format. This is analagous to submitting an HTML form via a web browser. Other common formats include `RKMIMETypeJSON`, which will cause request bodies to be encoded as JSON. + + The value given for the `requestSerializationMIMEType` must correspond to a MIME Type registered via `[RKMIMETypeSerialization registerClass:forMIMEType:]`. Implementations are provided by default for `RKMIMETypeFormURLEncoded` and `RKMIMETypeJSON`. + + **Default**: `RKMIMETypeFormURLEncoded` or the value of the parameter encoding for the underlying `AFHTTPClient`. + */ +@property (nonatomic, strong) NSString *requestSerializationMIMEType; + +/** + The value for the HTTP "Accept" header to specify the preferred serialization format for retrieved data. + + If the receiver was initialized with an `AFHTTPClient`, then the value of the 'Accept' header is deferred to the client. If initialized directly with a baseURL, the default value is `RKMIMETypeJSON`, which is equal to the string `@"application/json"`. A value of `nil` will prevent the object manager from explicitly setting a value for the "Accept" header. + + @param MIMEType The MIME Type to set as the value for the HTTP "Accept" header. + */ +- (void)setAcceptHeaderWithMIMEType:(NSString *)MIMEType; + +///------------------------------- +/// @name Creating Request Objects +///------------------------------- + +/** + Creates and returns an `NSMutableURLRequest` object with a given object, method, path, and parameters. + + The manager is searched for an `RKRequestDescriptor` object with an objectClass that matches the class of the given object. If found, the matching request descriptor and object are used to build a parameterization of the object's attributes using the `RKObjectParameterization` class if the request method is a `POST`, `PUT`, or `PATCH`. The parameterized representation of the object is reverse merged with the given parameters dictionary, if any, and then serialized and set as the request body. If the HTTP method is `GET` or `DELETE`, the object will not be parameterized and the given parameters, if any, will be used to construct a url-encoded query string that is appended to the request's URL. + + If the given path is nil, the router is searched for a class route with the class of the object andthe method. The path pattern of the retrieved route is interpolated with the object and the resulting path is appended to the HTTP client's base URL and used as the request URL. + + @param object The object with which to construct the request. For the `POST`, `PUT`, and `PATCH` request methods, the object will parameterized using the `RKRequestDescriptor` for the object. + @param method The HTTP method for the request, such as `GET`, `POST`, `PUT`, or `DELETE`. + @param path The path to be appended to the HTTP client's base URL and used as the request URL. If nil, the router is consulted. + @param parameters The parameters to be either set as a query string for `GET` requests, or reverse merged with the parameterization of the object and set as the request HTTP body. + + @return An `NSMutableURLRequest` object. + @see RKObjectParameterization + @see RKRouter + */ +- (NSMutableURLRequest *)requestWithObject:(id)object + method:(RKRequestMethod)method + path:(NSString *)path + parameters:(NSDictionary *)parameters; + +/** + Creates an `NSMutableURLRequest` object with the specified HTTP method and path, and constructs a `multipart/form-data` HTTP body, using the specified parameters and multipart form data block. See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2 + + This method wraps the underlying `AFHTTPClient` method `multipartFormRequestWithMethod:path:parameters:constructingBodyWithBlock` and adds routing and object parameterization. + + @param object The object with which to construct the request. For the `POST`, `PUT`, and `PATCH` request methods, the object will parameterized using the `RKRequestDescriptor` for the object. + @param method The HTTP method for the request, such as `GET`, `POST`, `PUT`, or `DELETE`. + @param path The path to be appended to the HTTP client's base URL and used as the request URL. If nil, the router is consulted. + @param parameters The parameters to be either set as a query string for `GET` requests, or reverse merged with the parameterization of the object and set as the request HTTP body. + @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol. This can be used to upload files, encode HTTP body as JSON or XML, or specify multiple values for the same parameter, as one might for array values. + @return An `NSMutableURLRequest` object. + @warning An exception will be raised if the specified method is not `POST`, `PUT` or `DELETE`. + @see [AFHTTPClient multipartFormRequestWithMethod:path:parameters:constructingBodyWithBlock] + */ +- (NSMutableURLRequest *)multipartFormRequestWithObject:(id)object + method:(RKRequestMethod)method + path:(NSString *)path + parameters:(NSDictionary *)parameters + constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block; + +/** + Creates an `NSMutableURLRequest` object with the `NSURL` returned by the router for the given route name and object and the given parameters. + + The implementation invokes `requestWithObject:method:path:parameters:` after constructing the path with the given route. + + @param routeName The name of the route object containing the path pattern which is to be interpolated against the given object, appended to the HTTP client's base URL and used as the request URL. + @param object The object with which to interpolate the path pattern of the named route. Can be nil. + @param parameters The parameters to be either set as a query string for `GET` requests, or the request HTTP body. + @return An `NSMutableRequest` object. + + @see `requestWithObject:method:path:parameters` + */ +- (NSMutableURLRequest *)requestWithPathForRouteNamed:(NSString *)routeName + object:(id)object + parameters:(NSDictionary *)parameters; +/** + Creates an `NSMutableURLRequest` object with the `NSURL` returned by the router for the relationship of the given object and the given parameters. + + The implementation invokes `requestWithObject:method:path:parameters:` after constructing the path with the given route. + + Creates an `RKObjectRequestOperation` with a `GET` request for the relationship with the given name of the given object, and enqueues it to the manager's operation queue. + + @param relationshipName The name of the relationship being loaded. Used to retrieve the `RKRoute` object from the router for the given object's class and the relationship name. Cannot be nil. + @param object The object for which related objects are being loaded. Evaluated against the `RKRoute` for the relationship for the object's class with the given name to compute the path. Cannot be nil. + @param method The HTTP method for the request. + @param parameters The parameters to be encoded and appended as the query string for the request URL, or parameterized and set as the request body. May be nil. + @return An `NSMutableURLRequest` object for the specified relationship. + + @raises NSInvalidArgumentException Raised if no route is configured for a relationship of the given object's class with the given name. + @see `requestWithObject:method:path:parameters` + */ +- (NSMutableURLRequest *)requestWithPathForRelationship:(NSString *)relationship + ofObject:(id)object + method:(RKRequestMethod)method + parameters:(NSDictionary *)parameters; + +///----------------------------------------- +/// @name Creating Object Request Operations +///----------------------------------------- + +/** + Sets the `RKHTTPRequestOperation` subclass to be used when constructing HTTP request operations for requests dispatched through the manager. + + When set, an instance of the given class will be initialized via `initWithRequest:` each time that the receiver constructs an HTTP request operation. HTTP request operations are used to initialize instances of `RKObjectRequestOperation` and are responsible for managing the HTTP request/response lifecycle of a request whose response is destined to be object mapped. Providing a subclass implementation of `RKHTTPRequestOperation` allows the behavior of all requests sent through the manager to be changed. + + @param operationClass A class object inheriting from `RKHTTPRequestOperation` to be used for HTTP requests dispatched through the manager. + @raises `NSInvalidArgumentException` Raised if the given class does not inherit from `RKHTTPRequestOperation`. + @see `RKHTTPRequestOperation` + @warning The given class must inherit from `RKHTTPRequestOperation`, else an exception will be raised. + */ +- (void)setHTTPOperationClass:(Class)operationClass; + +/** + Creates an `RKObjectRequestOperation` operation with the given request and sets the completion block with the given success and failure blocks. + + @param request The request object to be loaded asynchronously during execution of the operation. + @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the `RKMappingResult` object created by object mapping the response data of request. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred. + @return An `RKObjectRequestOperation` object that is ready to be sent. + + @warning Instances of `RKObjectRequestOperation` are not capable of mapping the loaded `NSHTTPURLResponse` into a Core Data entity. Use an instance of `RKManagedObjectRequestOperation` if the response is to be mapped using an `RKEntityMapping`. + */ +- (RKObjectRequestOperation *)objectRequestOperationWithRequest:(NSURLRequest *)request + success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure; + +/** + Creates an `RKManagedObjectRequestOperation` operation with the given request and managed object context, and sets the completion block with the given success and failure blocks. + + The given managed object context given will be used as the parent context of the private managed context in which the response is mapped and will be used to fetch the results upon invocation of the success completion block. + + @param request The request object to be loaded asynchronously during execution of the operation. + @param managedObjectContext The managed object context with which to associate the operation. This context will be used as the parent context of a new operation local `NSManagedObjectContext` with the `NSPrivateQueueConcurrencyType` concurrency type. Upon success, the private context will be saved and changes resulting from the object mapping will be 'pushed' to the given context. + @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the `RKMappingResult` object created by object mapping the response data of request. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred. + @return An `RKObjectRequestOperation` object that is ready to be sent. + + @see `RKManagedObjectRequestOperation` + */ +- (RKManagedObjectRequestOperation *)managedObjectRequestOperationWithRequest:(NSURLRequest *)request + managedObjectContext:(NSManagedObjectContext *)managedObjectContext + success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure; + + +/** + Creates and returns an object request operation of the appropriate type for the given object, request method, path, and parameters. + + The type of object request operation created is determined by evaluating the type of the object given and examining the list of `RKResponseDescriptor` objects added to the manager. + + If the given object is non-nil and inherits from `NSManagedObject`, then an instance of `RKManagedObjectRequestOperation` is returned. + + If the given object is nil, then the `RKResponseDescriptor` objects added to the manager are evaluated to determine the type of operation created. In this case, the path of the operation is used to filter the set of `RKResponseDescriptor` objects to those that may be used to map the response. If the path is nil, the router is consulted to determine an appropriate path with which to perform the matching. If the filtered array of matching response descriptors defines a mapping configuration with an `RKEntityMapping` object, then an `RKManagedObjectRequestOperation` is returned; otherwise an `RKObjectRequestOperation` is returned. + + If an `RKManagedObjectRequestOperation` operation is created, the managed object context used will be the `mainQueueManagedObjectContext` of the manager's `managedObjectStore`. + + @param object The object with which to construct the object request operation. May be nil. + @param method The request method for the request. + @param path The path to be appended to the HTTP client's baseURL and set as the URL of the request. If nil, the router is consulted. + @param parameters The parameters to be either set as a query string for `GET` requests, or reverse merged with the parameterization of the object and set as the request HTTP body. + + @return A newly created `RKObjectRequestOperation` or `RKManagedObjectRequest` operation as deemed appropriate by the manager for the given parameters. + @warning The given object must be a single object instance. Collections are not yet supported. + + @see `requestWithObject:method:path:parameters` + */ +- (id)appropriateObjectRequestOperationWithObject:(id)object + method:(RKRequestMethod)method + path:(NSString *)path + parameters:(NSDictionary *)parameters; + +///-------------------------------------------------- +/// @name Managing Enqueued Object Request Operations +///-------------------------------------------------- + +/** + Enqueues an `RKObjectRequestOperation` to the object manager's operation queue. + + @param objectRequestOperation The object request operation to be enqueued. + */ +- (void)enqueueObjectRequestOperation:(RKObjectRequestOperation *)objectRequestOperation; + +/** + Cancels all operations in the object manager's operation queue whose requests match the specified HTTP method and path pattern. + + Paths are matches against the `path` of the `NSURL` of the `NSURLRequest` of each `RKObjectRequestOperation` contained in the receiver's operation queue using a `RKPathMatcher` object. + + @param method The HTTP method to match for the cancelled requests, such as `RKRequestMethodGET`, `RKRequestMethodPOST`, `RKRequestMethodPUT`, `RKRequestMethodPatch`, or `RKRequestMethodDELETE`. If `RKRequestMethodAny`, all object request operations with URLs matching the given path pattern will be cancelled. + @param pathPattern The pattern to match against the path of the request URL for executing object request operations considered for cancellation. + + @see `RKPathMatcher` + */ +- (void)cancelAllObjectRequestOperationsWithMethod:(RKRequestMethod)method matchingPathPattern:(NSString *)pathPattern; + +///----------------------------------------- +/// @name Batching Object Request Operations +///----------------------------------------- + +/** + Creates and enqueues an `RKObjectRequestOperation` to the object manager's operation queue for each specified object into a batch. Each object request operation is built by evaluating the object against the given route to construct a request path and then invoking `appropriateObjectRequestOperationWithObject:method:path:parameters:`. When each object request operation finishes, the specified progress block is executed, until all of the request operations have finished, at which point the completion block also executes. + + @warning Note that the route type is significant in how that the object request operation is constructed. If the given route is a class route, then the `targetObject` of the operation will be set to the object for which the operation is being constructed. For named routes and relationship routes, the target object is `nil`. + + @param route The route specifying the request method and the path pattern with which to construct the request for each object object request operation in the batch. + @param objects The set of objects for which to enqueue a batch of object request operations. + @param progress A block object to be executed when an object request operation completes. This block has no return value and takes two arguments: the number of finished operations and the total number of operations initially executed. + @param completion A block object to be executed when the object request operations complete. This block has no return value and takes one argument: the list of operations executed. + + @see `[RKObjectManager enqueueBatchOfObjectRequestOperations:progress:completion]` + @see `RKRoute` + */ +- (void)enqueueBatchOfObjectRequestOperationsWithRoute:(RKRoute *)route + objects:(NSArray *)objects + progress:(void (^)(NSUInteger numberOfFinishedOperations, + NSUInteger totalNumberOfOperations))progress + completion:(void (^)(NSArray *operations))completion; + +/** + Enqueues a set of `RKObjectRequestOperation` to the object manager's operation queue. + + @param operations The set of object request operations to be enqueued. + @param progress A block object to be executed when an object request operation completes. This block has no return value and takes two arguments: the number of finished operations and the total number of operations initially executed. + @param completion A block object to be executed when the object request operations complete. This block has no return value and takes one argument: the list of operations executed. + + */ +- (void)enqueueBatchOfObjectRequestOperations:(NSArray *)operations + progress:(void (^)(NSUInteger numberOfFinishedOperations, + NSUInteger totalNumberOfOperations))progress + completion:(void (^)(NSArray *operations))completion; + +///------------------------------------- +/// @name Making Object Requests by Path +///------------------------------------- + +/** + Creates an `RKObjectRequestOperation` with a `GET` request with a URL for the given path, and enqueues it to the manager's operation queue. + + The type of object request operation created is determined by invoking `appropriateObjectRequestOperationWithObject:method:path:parameters:`. + + @param path The path to be appended to the HTTP client's base URL and used as the request URL. + @param parameters The parameters to be encoded and appended as the query string for the request URL. + @param success A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the `RKMappingResult` object created by object mapping the response data of request. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred. + + @see [RKObjectManager appropriateObjectRequestOperationWithObject:method:path:parameters:] + */ +- (void)getObjectsAtPath:(NSString *)path + parameters:(NSDictionary *)parameters + success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure; + +/** + Creates an `RKObjectRequestOperation` with a `GET` request for the relationship with the given name of the given object, and enqueues it to the manager's operation queue. + + The type of object request operation created is determined by invoking `appropriateObjectRequestOperationWithObject:method:path:parameters:`. + + @param relationshipName The name of the relationship being loaded. Used to retrieve the `RKRoute` object from the router for the given object's class and the relationship name. Cannot be nil. + @param object The object for which related objects are being loaded. Evaluated against the `RKRoute` for the relationship for the object's class with the given name to compute the path. Cannot be nil. + @param parameters The parameters to be encoded and appended as the query string for the request URL. May be nil. + @param success A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the mapped result created from object mapping the response data of request. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred. + + @raises NSInvalidArgumentException Raised if no route is configured for a relationship of the given object's class with the given name. + @see [RKRouter URLForRelationship:ofObject:method:] + @see [RKObjectManager appropriateObjectRequestOperationWithObject:method:path:parameters:] + */ +- (void)getObjectsAtPathForRelationship:(NSString *)relationshipName + ofObject:(id)object + parameters:(NSDictionary *)parameters + success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure; + +/** + Creates an `RKObjectRequestOperation` with a `GET` request for the URL returned by the router for the given route name, and enqueues it to the manager's operation queue. + + The type of object request operation created is determined by invoking `appropriateObjectRequestOperationWithObject:method:path:parameters:`. + + @param routeName The name of the route being loaded. Used to retrieve the `RKRoute` object from the router with the given name. Cannot be nil. + @param object The object to be interpolated against the path pattern of the `RKRoute` object retrieved with the given name. Used to compute the path to be appended to the HTTP client's base URL and used as the request URL. May be nil. + @param parameters The parameters to be encoded and appended as the query string for the request URL. May be nil. + @param success A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the mapped result created from object mapping the response data of request. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred. + + @raises NSInvalidArgumentException Raised if no route is configured with the given name or the route returned specifies an HTTP method other than `GET`. + @see [RKRouter URLForRouteNamed:method:object:] + @see [RKObjectManager appropriateObjectRequestOperationWithObject:method:path:parameters:] + */ +- (void)getObjectsAtPathForRouteNamed:(NSString *)routeName + object:(id)object + parameters:(NSDictionary *)parameters + success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure; + +///------------------------------------------- +/// @name Making Object Requests for an Object +///------------------------------------------- + +/** + Creates an `RKObjectRequestOperation` with a `GET` request for the given object, and enqueues it to the manager's operation queue. + + The type of object request operation created is determined by invoking `appropriateObjectRequestOperationWithObject:method:path:parameters:`. + + @param object The object with which to construct the object request operation. Cannot be nil. + @param path The path to be appended to the HTTP client's base URL and used as the request URL. If nil, the request URL will be obtained by consulting the router for a route registered for the given object's class and the `RKRequestMethodGET` request method. + @param parameters The parameters to be encoded and appended as the query string for the request URL. + @param success A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the `RKMappingResult` object created by object mapping the response data of request. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred. + + @see [RKRouter URLForObject:method:] + @see [RKObjectManager appropriateObjectRequestOperationWithObject:method:path:parameters:] + */ +- (void)getObject:(id)object + path:(NSString *)path + parameters:(NSDictionary *)parameters + success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure; + +/** + Creates an `RKObjectRequestOperation` with a `POST` request for the given object, and enqueues it to the manager's operation queue. + + @param object The object with which to construct the object request operation. Cannot be nil. + @param path The path to be appended to the HTTP client's base URL and used as the request URL. If nil, the request URL will be obtained by consulting the router for a route registered for the given object's class and the `RKRequestMethodPOST` method. + @param parameters The parameters to be reverse merged with the parameterization of the given object and set as the request body. + @param success A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the `RKMappingResult` object created by object mapping the response data of request. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred. + + @see [RKRouter URLForObject:method:] + @see [RKObjectManager appropriateObjectRequestOperationWithObject:method:path:parameters:] + */ +- (void)postObject:(id)object + path:(NSString *)path + parameters:(NSDictionary *)parameters + success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure; + +/** + Creates an `RKObjectRequestOperation` with a `PUT` request for the given object, and enqueues it to the manager's operation queue. + + @param object The object with which to construct the object request operation. Cannot be nil. + @param path The path to be appended to the HTTP client's base URL and used as the request URL. If nil, the request URL will be obtained by consulting the router for a route registered for the given object's class and the `RKRequestMethodPUT` method. + @param parameters The parameters to be reverse merged with the parameterization of the given object and set as the request body. + @param success A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the `RKMappingResult` object created by object mapping the response data of request. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred. + + @see [RKRouter URLForObject:method:] + @see [RKObjectManager appropriateObjectRequestOperationWithObject:method:path:parameters:] + */ +- (void)putObject:(id)object + path:(NSString *)path + parameters:(NSDictionary *)parameters + success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure; + +/** + Creates an `RKObjectRequestOperation` with a `PATCH` request for the given object, and enqueues it to the manager's operation queue. + + @param object The object with which to construct the object request operation. Cannot be nil. + @param path The path to be appended to the HTTP client's base URL and used as the request URL. If nil, the request URL will be obtained by consulting the router for a route registered for the given object's class and the `RKRequestMethodPATCH` method. + @param parameters The parameters to be reverse merged with the parameterization of the given object and set as the request body. + @param success A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the `RKMappingResult` object created by object mapping the response data of request. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred. + + @see [RKRouter URLForObject:method:] + @see [RKObjectManager appropriateObjectRequestOperationWithObject:method:path:parameters:] + */ +- (void)patchObject:(id)object + path:(NSString *)path + parameters:(NSDictionary *)parameters + success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure; + +/** + Creates an `RKObjectRequestOperation` with a `DELETE` request for the given object, and enqueues it to the manager's operation queue. + + The type of object request operation created is determined by invoking `appropriateObjectRequestOperationWithObject:method:path:parameters:`. + + @param object The object with which to construct the object request operation. Cannot be nil. + @param path The path to be appended to the HTTP client's base URL and used as the request URL. If nil, the request URL will be obtained by consulting the router for a route registered for the given object's class and the `RKRequestMethodDELETE` request method. + @param parameters The parameters to be encoded and appended as the query string for the request URL. + @param success A block object to be executed when the object request operation finishes successfully. This block has no return value and takes two arguments: the created object request operation and the `RKMappingResult` object created by object mapping the response data of request. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred. + + @see [RKRouter URLForObject:method:] + @see [RKObjectManager appropriateObjectRequestOperationWithObject:method:path:parameters:] + */ +- (void)deleteObject:(id)object + path:(NSString *)path + parameters:(NSDictionary *)parameters + success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure; + +///------------------------------------------------ +/// @name Managing Request and Response Descriptors +///------------------------------------------------ + +/** + Returns an array containing the `RKRequestDescriptor` objects added to the manager. + + @return An array containing the request descriptors of the receiver. The elements of the array are instances of `RKRequestDescriptor`. + + @see RKRequestDescriptor + */ +@property (nonatomic, readonly) NSArray *requestDescriptors; + +/** + Adds a request descriptor to the manager. + + @param requestDescriptor The request descriptor object to the be added to the manager. + */ +- (void)addRequestDescriptor:(RKRequestDescriptor *)requestDescriptor; + +/** + Adds the `RKRequestDescriptor` objects contained in a given array to the manager. + + @param requestDescriptors An array of `RKRequestDescriptor` objects to be added to the manager. + @exception NSInvalidArgumentException Raised if any element of the given array is not an `RKRequestDescriptor` object. + */ +- (void)addRequestDescriptorsFromArray:(NSArray *)requestDescriptors; + +/** + Removes a given request descriptor from the manager. + + @param requestDescriptor An `RKRequestDescriptor` object to be removed from the manager. + */ +- (void)removeRequestDescriptor:(RKRequestDescriptor *)requestDescriptor; + +/** + Returns an array containing the `RKResponseDescriptor` objects added to the manager. + + @return An array containing the request descriptors of the receiver. The elements of the array are instances of `RKRequestDescriptor`. + + @see RKResponseDescriptor + */ +@property (nonatomic, readonly) NSArray *responseDescriptors; + +/** + Adds a response descriptor to the manager. + + Adding a response descriptor to the manager sets the `baseURL` of the descriptor to the `baseURL` of the manager, causing it to evaluate URL objects relatively. + + @param responseDescriptor The response descriptor object to the be added to the manager. + */ +- (void)addResponseDescriptor:(RKResponseDescriptor *)responseDescriptor; + +/** + Adds the `RKResponseDescriptor` objects contained in a given array to the manager. + + @param responseDescriptors An array of `RKResponseDescriptor` objects to be added to the manager. + @exception NSInvalidArgumentException Raised if any element of the given array is not an `RKResponseDescriptor` object. + */ +- (void)addResponseDescriptorsFromArray:(NSArray *)responseDescriptors; + +/** + Removes a given response descriptor from the manager. + + @param responseDescriptor An `RKResponseDescriptor` object to be removed from the manager. + */ +- (void)removeResponseDescriptor:(RKResponseDescriptor *)responseDescriptor; + +///---------------------------------------- +/// @name Configuring Core Data Integration +///---------------------------------------- + +// Moves to RKObjectManager+CoreData + +/** + A Core Data backed object store for persisting objects that have been fetched from the Web + */ +@property (nonatomic, strong) RKManagedObjectStore *managedObjectStore; + +/** + An array of `RKFetchRequestBlock` blocks used to map `NSURL` objects into corresponding `NSFetchRequest` objects. + + When searched, the blocks are iterated in the reverse-order of their registration and the first block with a non-nil return value halts the search. + */ +@property (nonatomic, readonly) NSArray *fetchRequestBlocks; + +/** + Adds the given `RKFetchRequestBlock` block to the manager. + + @param A block object to be executed when constructing an `NSFetchRequest` object from a given `NSURL`. The block has a return type of `NSFetchRequest` and accepts a single `NSURL` argument. + */ +- (void)addFetchRequestBlock:(RKFetchRequestBlock)block; + +///--------------------------------- +/// @name Creating Paginator Objects +///--------------------------------- + +/** + Creates and returns an RKObjectPaginator instance targeting the specified path pattern. + + The paginator instantiated will be initialized with a URL built by appending the pathPattern to the baseURL of the client. + + @return The newly created paginator instance. + @see RKObjectPaginator + */ +//- (RKObjectPaginator *)paginatorWithPathPattern:(NSString *)pathPattern; + +@end + +#ifdef _SYSTEMCONFIGURATION_H +/** + Returns a string description of the given network status. + + @param networkReachabilityStatus The network reachability status. + @return A string describing the reachability status. + */ +NSString *RKStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus networkReachabilityStatus); +#endif diff --git a/Pods/RestKit/Code/Network/RKObjectManager.m b/Pods/RestKit/Code/Network/RKObjectManager.m new file mode 100644 index 00000000..2724b365 --- /dev/null +++ b/Pods/RestKit/Code/Network/RKObjectManager.m @@ -0,0 +1,617 @@ +// +// RKObjectManager.m +// RestKit +// +// Created by Jeremy Ellison on 8/14/09. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import <objc/runtime.h> +#import "RKObjectManager.h" +#import "RKObjectParameterization.h" +#import "RKManagedObjectStore.h" +#import "RKRequestDescriptor.h" +#import "RKResponseDescriptor.h" +#import "RKDictionaryUtilities.h" +#import "RKMIMETypes.h" +#import "RKLog.h" +#import "RKMIMETypeSerialization.h" +#import "RKPathMatcher.h" +#import "RKMappingErrors.h" + +#if !__has_feature(objc_arc) +#error RestKit must be built with ARC. +// You can turn on ARC for only RestKit files by adding "-fobjc-arc" to the build phase for each of its files. +#endif + +////////////////////////////////// +// Shared Instance + +static RKObjectManager *sharedManager = nil; + +////////////////////////////////// +// Utility Functions + +/** + Returns the subset of the given array of `RKResponseDescriptor` objects that match the given path. + + @param responseDescriptors An array of `RKResponseDescriptor` objects. + @param path The path for which to select matching response descriptors. + @return An `NSArray` object whose elements are `RKResponseDescriptor` objects matching the given path. + */ +static NSArray *RKFilteredArrayOfResponseDescriptorsMatchingPath(NSArray *responseDescriptors, NSString *path) +{ + NSIndexSet *indexSet = [responseDescriptors indexesOfObjectsPassingTest:^BOOL(RKResponseDescriptor *responseDescriptor, NSUInteger idx, BOOL *stop) { + return [responseDescriptor matchesPath:path]; + }]; + return [responseDescriptors objectsAtIndexes:indexSet]; +} + +/** + Returns the first `RKRequestDescriptor` object from the given array that matches the given object. + + @param requestDescriptors An array of `RKRequestDescriptor` objects. + @param object The object to find a matching request descriptor for. + @return An `RKRequestDescriptor` object matching the given object, or `nil` if none could be found. + */ +static RKRequestDescriptor *RKRequestDescriptorFromArrayMatchingObject(NSArray *requestDescriptors, id object) +{ + for (RKRequestDescriptor *requestDescriptor in requestDescriptors) { + if ([requestDescriptor matchesObject:object]) return requestDescriptor; + } + return nil; +} + +/** + Returns `YES` if the given array of `RKResponseDescriptor` objects contains an `RKEntityMapping`. + + @param responseDescriptor An array of `RKResponseDescriptor` objects. + @return `YES` if the `mapping` property of any of the response descriptor objects in the given array is an instance of `RKEntityMapping`, else `NO`. + */ +static BOOL RKDoesArrayOfResponseDescriptorsContainEntityMapping(NSArray *responseDescriptors) +{ + for (RKResponseDescriptor *responseDescriptor in responseDescriptors) { + if ([responseDescriptor.mapping isKindOfClass:[RKEntityMapping class]]) { + return YES; + } + } + + return NO; +} + +static NSString *RKMIMETypeFromAFHTTPClientParameterEncoding(AFHTTPClientParameterEncoding encoding) +{ + switch (encoding) { + case AFFormURLParameterEncoding: + return RKMIMETypeFormURLEncoded; + break; + + case AFJSONParameterEncoding: + return RKMIMETypeJSON; + break; + + case AFPropertyListParameterEncoding: + break; + + default: + RKLogWarning(@"RestKit is unable to infer the appropriate request serialization MIME Type from an `AFHTTPClientParameterEncoding` value of %d: defaulting to `RKMIMETypeFormURLEncoded`", encoding); + break; + } + + return RKMIMETypeFormURLEncoded; +} + +/////////////////////////////////// + +@interface RKObjectManager () +@property (nonatomic, strong, readwrite) AFHTTPClient *HTTPClient; +@property (nonatomic, strong) NSMutableArray *mutableRequestDescriptors; +@property (nonatomic, strong) NSMutableArray *mutableResponseDescriptors; +@property (nonatomic, strong) NSMutableArray *mutableFetchRequestBlocks; +@property (nonatomic, strong) NSString *acceptHeaderValue; +@property (nonatomic) Class HTTPOperationClass; +@end + +@implementation RKObjectManager + +- (id)initWithHTTPClient:(AFHTTPClient *)client +{ + self = [super init]; + if (self) { + self.HTTPClient = client; + self.router = [[RKRouter alloc] initWithBaseURL:client.baseURL]; + self.operationQueue = [NSOperationQueue new]; + self.mutableRequestDescriptors = [NSMutableArray new]; + self.mutableResponseDescriptors = [NSMutableArray new]; + self.mutableFetchRequestBlocks = [NSMutableArray new]; + self.requestSerializationMIMEType = RKMIMETypeFromAFHTTPClientParameterEncoding(client.parameterEncoding); + + // Set shared manager if nil + if (nil == sharedManager) { + [RKObjectManager setSharedManager:self]; + } + } + + return self; +} + ++ (RKObjectManager *)sharedManager +{ + return sharedManager; +} + ++ (void)setSharedManager:(RKObjectManager *)manager +{ + sharedManager = manager; +} + ++ (RKObjectManager *)managerWithBaseURL:(NSURL *)baseURL +{ + RKObjectManager *manager = [[self alloc] initWithHTTPClient:[AFHTTPClient clientWithBaseURL:baseURL]]; + manager.acceptHeaderValue = RKMIMETypeJSON; + manager.requestSerializationMIMEType = RKMIMETypeFormURLEncoded; + return manager; +} + +// NOTE: This implementation could just use the default headers on AFHTTPClient, but this +// feels less intrusive. +- (void)setAcceptHeaderWithMIMEType:(NSString *)MIMEType; +{ + self.acceptHeaderValue = MIMEType; +} + +- (NSURL *)baseURL +{ + return self.HTTPClient.baseURL; +} + +- (NSDictionary *)defaultHeaders +{ + NSMutableDictionary *defaultHeaders = [self.HTTPClient.defaultHeaders mutableCopy]; + if (self.acceptHeaderValue) [defaultHeaders setValue:self.acceptHeaderValue forKey:@"Accept"]; + return defaultHeaders; +} + +///////////////////////////////////////////////////////////// +#pragma mark - Object Collection Loaders + +//- (RKObjectPaginator *)paginatorWithPathPattern:(NSString *)pathPattern +//{ +// RKURL *patternURL = [[self baseURL] URLByAppendingResourcePath:resourcePathPattern]; +// RKObjectPaginator *paginator = [RKObjectPaginator paginatorWithPatternURL:patternURL +// mappingProvider:self.mappingProvider]; +// paginator.configurationDelegate = self; +// return paginator; +//} + +/** + This method is the `RKObjectManager` analog for the method of the same name on `AFHTTPClient`. + */ +- (NSMutableURLRequest *)requestWithMethod:(NSString *)method + path:(NSString *)path + parameters:(NSDictionary *)parameters +{ + NSMutableURLRequest* request; + if (parameters && !([method isEqualToString:@"GET"] || [method isEqualToString:@"HEAD"] || [method isEqualToString:@"DELETE"])) { + request = [self.HTTPClient requestWithMethod:method path:path parameters:nil]; + + NSError *error = nil; + NSString *charset = (__bridge NSString *)CFStringConvertEncodingToIANACharSetName(CFStringConvertNSStringEncodingToEncoding(self.HTTPClient.stringEncoding)); + [request setValue:[NSString stringWithFormat:@"%@; charset=%@", self.requestSerializationMIMEType, charset] forHTTPHeaderField:@"Content-Type"]; + NSData *requestBody = [RKMIMETypeSerialization dataFromObject:parameters MIMEType:self.requestSerializationMIMEType error:&error]; + [request setHTTPBody:requestBody]; + } else { + request = [self.HTTPClient requestWithMethod:method path:path parameters:parameters]; + } + if (self.acceptHeaderValue) [request setValue:self.acceptHeaderValue forHTTPHeaderField:@"Accept"]; + + return request; +} + +- (NSMutableURLRequest *)requestWithPathForRouteNamed:(NSString *)routeName + object:(id)object + parameters:(NSDictionary *)parameters +{ + RKRequestMethod method; + NSURL *URL = [self.router URLForRouteNamed:routeName method:&method object:object]; + NSAssert(URL, @"No route found named '%@'", routeName); + return [self requestWithMethod:RKStringFromRequestMethod(method) path:[URL relativeString] parameters:parameters]; +} + +- (NSMutableURLRequest *)requestWithPathForRelationship:(NSString *)relationship + ofObject:(id)object + method:(RKRequestMethod)method + parameters:(NSDictionary *)parameters +{ + NSURL *URL = [self.router URLForRelationship:relationship ofObject:object method:method]; + NSAssert(URL, @"No relationship route found for the '%@' class with the name '%@'", NSStringFromClass([object class]), relationship); + return [self requestWithMethod:RKStringFromRequestMethod(method) path:[URL relativeString] parameters:parameters]; +} + +- (NSMutableURLRequest *)requestWithObject:(id)object + method:(RKRequestMethod)method + path:(NSString *)path + parameters:(NSDictionary *)parameters; +{ + NSString *requestPath = (path) ? path : [[self.router URLForObject:object method:method] relativeString]; + NSString *stringMethod = RKStringFromRequestMethod(method); + NSDictionary *requestParameters = nil; + RKRequestDescriptor *requestDescriptor = RKRequestDescriptorFromArrayMatchingObject(self.requestDescriptors, object); + if ((method != RKRequestMethodGET && method != RKRequestMethodDELETE) && requestDescriptor) { + NSError *error = nil; + requestParameters = [[RKObjectParameterization parametersWithObject:object requestDescriptor:requestDescriptor error:&error] mutableCopy]; + if (error) { + RKLogError(@"Object parameterization failed while building %@ request to '%@': %@", stringMethod, requestPath, error); + return nil; + } + if (parameters) { + requestParameters = RKDictionaryByMergingDictionaryWithDictionary(requestParameters, parameters); + } + } else { + requestParameters = parameters; + } + + return [self requestWithMethod:stringMethod path:requestPath parameters:requestParameters]; +} + +- (NSMutableURLRequest *)multipartFormRequestWithObject:(id)object + method:(RKRequestMethod)method + path:(NSString *)path + parameters:(NSDictionary *)parameters + constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block +{ + NSString *requestPath = (path) ? path : [[self.router URLForObject:object method:method] relativeString]; + NSString *stringMethod = RKStringFromRequestMethod(method); + NSDictionary *requestParameters = nil; + RKRequestDescriptor *requestDescriptor = RKRequestDescriptorFromArrayMatchingObject(self.requestDescriptors, object); + if (requestDescriptor) { + NSError *error = nil; + requestParameters = [[RKObjectParameterization parametersWithObject:object requestDescriptor:requestDescriptor error:&error] mutableCopy]; + if (parameters) { + requestParameters = RKDictionaryByMergingDictionaryWithDictionary(requestParameters, parameters); + } + } else { + requestParameters = parameters; + } + + return [self.HTTPClient multipartFormRequestWithMethod:stringMethod path:requestPath parameters:requestParameters constructingBodyWithBlock:block]; +} + +- (void)setHTTPOperationClass:(Class)operationClass +{ + NSAssert(operationClass == nil || [operationClass isSubclassOfClass:[RKHTTPRequestOperation class]], @""); + _HTTPOperationClass = operationClass; +} + +- (RKHTTPRequestOperation *)HTTPOperationWithRequest:(NSURLRequest *)request +{ + Class operationClass = self.HTTPOperationClass ?: [RKHTTPRequestOperation class]; + return [[operationClass alloc] initWithRequest:request]; +} + +- (RKObjectRequestOperation *)objectRequestOperationWithRequest:(NSURLRequest *)request + success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure +{ + RKObjectRequestOperation *operation = [[RKObjectRequestOperation alloc] initWithHTTPRequestOperation:[self HTTPOperationWithRequest:request] responseDescriptors:self.responseDescriptors]; + [operation setCompletionBlockWithSuccess:success failure:failure]; + return operation; +} + +- (RKManagedObjectRequestOperation *)managedObjectRequestOperationWithRequest:(NSURLRequest *)request + managedObjectContext:(NSManagedObjectContext *)managedObjectContext + success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure +{ + RKManagedObjectRequestOperation *operation = [[RKManagedObjectRequestOperation alloc] initWithHTTPRequestOperation:[self HTTPOperationWithRequest:request] responseDescriptors:self.responseDescriptors]; + [operation setCompletionBlockWithSuccess:success failure:failure]; + operation.managedObjectContext = managedObjectContext; + operation.managedObjectCache = self.managedObjectStore.managedObjectCache; + operation.fetchRequestBlocks = self.fetchRequestBlocks; + return operation; +} + +- (id)appropriateObjectRequestOperationWithObject:(id)object + method:(RKRequestMethod)method + path:(NSString *)path + parameters:(NSDictionary *)parameters +{ + RKObjectRequestOperation *operation = nil; + NSURLRequest *request = [self requestWithObject:object method:method path:path parameters:parameters]; + NSString *requestPath = (path) ? path : [[self.router URLForObject:object method:method] relativeString]; + NSArray *matchingDescriptors = RKFilteredArrayOfResponseDescriptorsMatchingPath(self.responseDescriptors, requestPath); + BOOL containsEntityMapping = RKDoesArrayOfResponseDescriptorsContainEntityMapping(matchingDescriptors); + BOOL isManagedObjectRequestOperation = (containsEntityMapping || [object isKindOfClass:[NSManagedObject class]]); + + if (isManagedObjectRequestOperation && !self.managedObjectStore) RKLogWarning(@"Asked to create an `RKManagedObjectRequestOperation` object, but managedObjectStore is nil."); + if ((containsEntityMapping) && self.managedObjectStore) { + // Construct a Core Data operation + NSManagedObjectContext *managedObjectContext = [object respondsToSelector:@selector(managedObjectContext)] ? [object managedObjectContext] : self.managedObjectStore.mainQueueManagedObjectContext; + operation = [self managedObjectRequestOperationWithRequest:request managedObjectContext:managedObjectContext success:nil failure:nil]; + if ([object isKindOfClass:[NSManagedObject class]] && [[object objectID] isTemporaryID]) { + RKLogInfo(@"Asked to perform object request with NSManagedObject with temporary object ID: Obtaining permanent ID before proceeding."); + __block BOOL _blockSuccess; + __block NSError *_blockError; + + [[object managedObjectContext] performBlockAndWait:^{ + _blockSuccess = [[object managedObjectContext] obtainPermanentIDsForObjects:@[object] error:&_blockError]; + }]; + if (! _blockSuccess) RKLogWarning(@"Failed to obtain permanent ID for object %@: %@", object, _blockError); + } + } else { + // Non-Core Data operation + operation = [self objectRequestOperationWithRequest:request success:nil failure:nil]; + } + + operation.targetObject = object; + return operation; +} + +- (void)getObjectsAtPathForRelationship:(NSString *)relationshipName + ofObject:(id)object + parameters:(NSDictionary *)parameters + success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure +{ + NSURL *URL = [self.router URLForRelationship:relationshipName ofObject:object method:RKRequestMethodGET]; + NSAssert(URL, @"Failed to generate URL for relationship named '%@' for object: %@", relationshipName, object); + return [self getObjectsAtPath:[URL relativeString] parameters:parameters success:success failure:failure]; +} + +- (void)getObjectsAtPathForRouteNamed:(NSString *)routeName + object:(id)object + parameters:(NSDictionary *)parameters + success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure +{ + RKRequestMethod method; + NSURL *URL = [self.router URLForRouteNamed:routeName method:&method object:object]; + NSAssert(URL, @"No route found named '%@'", routeName); + NSString *path = [URL relativeString]; + NSAssert(method == RKRequestMethodGET, @"Expected route named '%@' to specify a GET, but it does not", routeName); + return [self getObjectsAtPath:path parameters:parameters success:success failure:failure]; +} + +- (void)getObjectsAtPath:(NSString *)path + parameters:(NSDictionary *)parameters + success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure +{ + RKObjectRequestOperation *operation = [self appropriateObjectRequestOperationWithObject:nil method:RKRequestMethodGET path:path parameters:parameters]; + [operation setCompletionBlockWithSuccess:success failure:failure]; + [self enqueueObjectRequestOperation:operation]; +} + +- (void)getObject:(id)object + path:(NSString *)path + parameters:(NSDictionary *)parameters + success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure +{ + RKObjectRequestOperation *operation = [self appropriateObjectRequestOperationWithObject:object method:RKRequestMethodGET path:path parameters:parameters]; + [operation setCompletionBlockWithSuccess:success failure:failure]; + [self enqueueObjectRequestOperation:operation]; +} + +- (void)postObject:(id)object + path:(NSString *)path + parameters:(NSDictionary *)parameters + success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure +{ + RKObjectRequestOperation *operation = [self appropriateObjectRequestOperationWithObject:object method:RKRequestMethodPOST path:path parameters:parameters]; + [operation setCompletionBlockWithSuccess:success failure:failure]; + [self enqueueObjectRequestOperation:operation]; +} + +- (void)putObject:(id)object + path:(NSString *)path + parameters:(NSDictionary *)parameters + success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure +{ + RKObjectRequestOperation *operation = [self appropriateObjectRequestOperationWithObject:object method:RKRequestMethodPUT path:path parameters:parameters]; + [operation setCompletionBlockWithSuccess:success failure:failure]; + [self enqueueObjectRequestOperation:operation]; +} + +- (void)patchObject:(id)object + path:(NSString *)path + parameters:(NSDictionary *)parameters + success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure +{ + RKObjectRequestOperation *operation = [self appropriateObjectRequestOperationWithObject:object method:RKRequestMethodPATCH path:path parameters:parameters]; + [operation setCompletionBlockWithSuccess:success failure:failure]; + [self enqueueObjectRequestOperation:operation]; +} + +- (void)deleteObject:(id)object + path:(NSString *)path + parameters:(NSDictionary *)parameters + success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure +{ + RKObjectRequestOperation *operation = [self appropriateObjectRequestOperationWithObject:object method:RKRequestMethodDELETE path:path parameters:parameters]; + [operation setCompletionBlockWithSuccess:success failure:failure]; + [self enqueueObjectRequestOperation:operation]; +} + +- (NSArray *)requestDescriptors +{ + return [NSArray arrayWithArray:self.mutableRequestDescriptors]; +} + +- (void)addRequestDescriptor:(RKRequestDescriptor *)requestDescriptor +{ + NSParameterAssert(requestDescriptor); + NSAssert([requestDescriptor isKindOfClass:[RKRequestDescriptor class]], @"Expected an object of type RKRequestDescriptor, got '%@'", [requestDescriptor class]); + [self.mutableRequestDescriptors addObject:requestDescriptor]; +} + +- (void)addRequestDescriptorsFromArray:(NSArray *)requestDescriptors +{ + for (RKRequestDescriptor *requestDescriptor in requestDescriptors) { + [self addRequestDescriptor:requestDescriptor]; + } +} + +- (void)removeRequestDescriptor:(RKRequestDescriptor *)requestDescriptor +{ + NSParameterAssert(requestDescriptor); + NSAssert([requestDescriptor isKindOfClass:[RKRequestDescriptor class]], @"Expected an object of type RKRequestDescriptor, got '%@'", [requestDescriptor class]); + [self.mutableRequestDescriptors removeObject:requestDescriptor]; +} + +- (NSArray *)responseDescriptors +{ + return [NSArray arrayWithArray:self.mutableResponseDescriptors]; +} + +- (void)addResponseDescriptor:(RKResponseDescriptor *)responseDescriptor +{ + NSParameterAssert(responseDescriptor); + NSAssert([responseDescriptor isKindOfClass:[RKResponseDescriptor class]], @"Expected an object of type RKResponseDescriptor, got '%@'", [responseDescriptor class]); + responseDescriptor.baseURL = self.baseURL; + [self.mutableResponseDescriptors addObject:responseDescriptor]; +} + +- (void)addResponseDescriptorsFromArray:(NSArray *)responseDescriptors +{ + for (RKResponseDescriptor *responseDescriptor in responseDescriptors) { + [self addResponseDescriptor:responseDescriptor]; + } +} + +- (void)removeResponseDescriptor:(RKResponseDescriptor *)responseDescriptor +{ + NSParameterAssert(responseDescriptor); + NSAssert([responseDescriptor isKindOfClass:[RKResponseDescriptor class]], @"Expected an object of type RKResponseDescriptor, got '%@'", [responseDescriptor class]); + [self.mutableResponseDescriptors removeObject:responseDescriptor]; +} + +- (NSArray *)fetchRequestBlocks +{ + return [NSArray arrayWithArray:self.mutableFetchRequestBlocks]; +} + +- (void)addFetchRequestBlock:(RKFetchRequestBlock)block +{ + NSParameterAssert(block); + [self.mutableFetchRequestBlocks addObject:block]; +} + +- (void)enqueueObjectRequestOperation:(RKObjectRequestOperation *)objectRequestOperation +{ + [self.operationQueue addOperation:objectRequestOperation]; +} + +- (void)cancelAllObjectRequestOperationsWithMethod:(RKRequestMethod)method matchingPathPattern:(NSString *)pathPattern +{ + NSString *methodName = RKStringFromRequestMethod(method); + RKPathMatcher *pathMatcher = [RKPathMatcher pathMatcherWithPattern:pathPattern]; + for (NSOperation *operation in [self.operationQueue operations]) { + if (![operation isKindOfClass:[RKObjectRequestOperation class]]) { + continue; + } + + NSURLRequest *request = [(RKObjectRequestOperation *)operation HTTPRequestOperation].request; + NSString *pathAndQueryString = RKPathAndQueryStringFromURLRelativeToURL([request URL], self.baseURL); + if ((!methodName || [methodName isEqualToString:[request HTTPMethod]]) && [pathMatcher matchesPath:pathAndQueryString tokenizeQueryStrings:NO parsedArguments:nil]) { + [operation cancel]; + } + } +} + +- (void)enqueueBatchOfObjectRequestOperationsWithRoute:(RKRoute *)route + objects:(NSArray *)objects + progress:(void (^)(NSUInteger numberOfFinishedOperations, + NSUInteger totalNumberOfOperations))progress + completion:(void (^)(NSArray *operations))completion { + NSMutableArray *operations = [[NSMutableArray alloc] initWithCapacity:objects.count]; + for (id object in objects) { + RKObjectRequestOperation *operation = nil; + NSURL *URL = [self.router URLWithRoute:route object:object]; + NSAssert(URL, @"Failed to generate URL for route %@ with object %@", route, object); + if ([route isClassRoute]) { + operation = [self appropriateObjectRequestOperationWithObject:object method:route.method path:[URL relativeString] parameters:nil]; + } else { + operation = [self appropriateObjectRequestOperationWithObject:nil method:route.method path:[URL relativeString] parameters:nil]; + } + [operations addObject:operation]; + } + return [self enqueueBatchOfObjectRequestOperations:operations progress:progress completion:completion]; +} + +- (void)enqueueBatchOfObjectRequestOperations:(NSArray *)operations + progress:(void (^)(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations))progress + completion:(void (^)(NSArray *operations))completion { + + __block dispatch_group_t dispatchGroup = dispatch_group_create(); + NSBlockOperation *batchedOperation = [NSBlockOperation blockOperationWithBlock:^{ + dispatch_group_notify(dispatchGroup, dispatch_get_main_queue(), ^{ + if (completion) { + completion(operations); + } + }); + }]; + + for (RKObjectRequestOperation *operation in operations) { + void (^originalCompletionBlock)(void) = [operation.completionBlock copy]; + [operation setCompletionBlock:^{ + dispatch_queue_t queue = operation.successCallbackQueue ?: dispatch_get_main_queue(); + dispatch_group_async(dispatchGroup, queue, ^{ + if (originalCompletionBlock) { + originalCompletionBlock(); + } + + __block NSUInteger numberOfFinishedOperations = 0; + [operations enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { + if ([(NSOperation *)obj isFinished]) { + numberOfFinishedOperations++; + } + }]; + + if (progress) { + progress(numberOfFinishedOperations, [operations count]); + } + + dispatch_group_leave(dispatchGroup); + }); + }]; + + dispatch_group_enter(dispatchGroup); + [batchedOperation addDependency:operation]; + + [self enqueueObjectRequestOperation:operation]; + } + [self.operationQueue addOperation:batchedOperation]; +} + +@end + +#ifdef _SYSTEMCONFIGURATION_H +NSString *RKStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus networkReachabilityStatus) +{ + switch (networkReachabilityStatus) { + case AFNetworkReachabilityStatusNotReachable: return @"Not Reachable"; + case AFNetworkReachabilityStatusReachableViaWiFi: return @"Reachable via WiFi"; + case AFNetworkReachabilityStatusReachableViaWWAN: return @"Reachable via WWAN"; + case AFNetworkReachabilityStatusUnknown: return @"Reachability Unknown"; + default: break; + } + return nil; +} +#endif diff --git a/Pods/RestKit/Code/Network/RKObjectPaginator.h b/Pods/RestKit/Code/Network/RKObjectPaginator.h new file mode 100644 index 00000000..6098ad34 --- /dev/null +++ b/Pods/RestKit/Code/Network/RKObjectPaginator.h @@ -0,0 +1,278 @@ +// +// RKObjectPaginator.h +// RestKit +// +// Created by Blake Watters on 12/29/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKManagedObjectStore.h" + +//@protocol RKObjectPaginatorDelegate; +// +//typedef void(^RKObjectPaginatorDidLoadObjectsForPageBlock)(NSArray *objects, NSUInteger page); +//typedef void(^RKObjectPaginatorDidFailWithErrorBlock)(NSError *error, RKObjectLoader *loader); +// +///** +// Instances of RKObjectPaginator retrieve paginated collections of mappable data +// from remote systems via HTTP. Paginators perform GET requests and use a patterned +// URL to construct a full URL reflecting the state of the paginator. Paginators rely +// on an instance of RKObjectMappingProvider to determine how to perform object mapping +// on the retrieved data. Paginators can load Core Data backed models provided that an +// instance of RKManagedObjectStore is assigned to the paginator. +// */ +//@interface RKObjectPaginator : NSObject +// +///** +// Creates and returns a RKObjectPaginator object with the a provided patternURL and mappingProvider. +// +// @param patternURL A RKURL containing a dynamic pattern for constructing a URL to the paginated +// resource collection. +// @param mappingProvider An RKObjectMappingProvider containing object mapping configurations for mapping the +// paginated resource collection. +// @see patternURL +// @return A paginator object initialized with patterned URL and mapping provider. +// */ +//+ (id)paginatorWithPatternURL:(RKURL *)patternURL mappingProvider:(RKObjectMappingProvider *)mappingProvider; +// +///** +// Initializes a RKObjectPaginator object with the a provided patternURL and mappingProvider. +// +// @param patternURL A RKURL containing a dynamic pattern for constructing a URL to the paginated +// resource collection. +// @param mappingProvider An RKObjectMappingProvider containing object mapping configurations for mapping the +// paginated resource collection. +// @see patternURL +// @return The receiver, initialized with patterned URL and mapping provider. +// */ +//- (id)initWithPatternURL:(RKURL *)patternURL mappingProvider:(RKObjectMappingProvider *)mappingProvider; +// +///** +// A RKURL with a path pattern for building a complete URL from +// which to load the paginated resource collection. The patterned resource +// path will be evaluated against the state of the paginator object itself. +// +// For example, given a paginated collection of data at the /articles path, +// the path pattern may look like: +// +// /articles?per_page=:perPage&page_number=:currentPage +// +// When the pattern is evaluated against the state of the paginator, this will +// yield a complete path that can be used to load the specified page. Given +// a paginator configured with 100 objects per page and a current page number of 3, +// the path portion of the pagination URL would become: +// +// /articles?per_page=100&page_number=3 +// +// @see [RKURL URLByInterpolatingResourcePathWithObject:] +// */ +//@property (nonatomic, copy) RKURL *patternURL; +// +///** +// Returns a complete RKURL to the paginated resource collection by interpolating +// the state of the paginator object against the resource +// */ +//@property (nonatomic, readonly) RKURL *URL; +// +///** +// The object that acts as the delegate of the receiving paginator. +// */ +//@property (nonatomic, assign) id<RKObjectPaginatorDelegate> delegate; +// +///** +// The block to invoke when the paginator has loaded a page of objects from the collection. +// +// @see [RKObjectPaginatorDelegate paginator:didLoadObjects:forPage] +// */ +//@property (nonatomic, copy) RKObjectPaginatorDidLoadObjectsForPageBlock onDidLoadObjectsForPage; +// +///** +// The block to invoke when the paginator has failed loading due to an error. +// +// @see [RKObjectPaginatorDelegate paginator:didFailWithError:objectLoader:] +// */ +//@property (nonatomic, copy) RKObjectPaginatorDidFailWithErrorBlock onDidFailWithError; +// +///** +// The object that acts as the configuration delegate for RKObjectLoader instances built +// and utilized by the paginator. +// +// **Default**: nil +// @see RKClient +// @see RKObjectManager +// */ +//@property (nonatomic, assign) id<RKConfigurationDelegate> configurationDelegate; +// +///** @name Object Mapping Configuration */ +// +///** +// The mapping provider to use when performing object mapping on the data +// loaded from the remote system. The provider will be assigned to the RKObjectLoader +// instance built to retrieve the paginated resource collection. +// */ +//@property (nonatomic, retain) RKObjectMappingProvider *mappingProvider; +// +///** +// An object store for accessing Core Data. Required if the objects being paginated +// are stored into Core Data. +// */ +//@property (nonatomic, retain) RKManagedObjectStore *managedObjectStore; +// +///** @name Pagination Metadata */ +// +///** +// The number of objects to load per page +// */ +//@property (nonatomic, assign) NSUInteger perPage; +// +///** +// A Boolean value indicating if the paginator has loaded a page of objects +// +// @returns YES when the paginator has loaded a page of objects +// */ +//@property (nonatomic, readonly, getter = isLoaded) BOOL loaded; +// +///** +// Returns the page number for the most recently loaded page of objects. +// +// @return The page number for the current page of objects. +// @exception NSInternalInconsistencyException Raised if isLoaded is NO. +// */ +//@property (nonatomic, readonly) NSUInteger currentPage; +// +///** +// Returns the number of pages in the total resource collection. +// +// @return A count of the number of pages in the resource collection. +// @exception NSInternalInconsistencyException Raised if hasPageCount is NO. +// */ +//@property (nonatomic, readonly) NSUInteger pageCount; +// +///** +// Returns the total number of objects in the collection +// +// @return A count of the number of objects in the resource collection. +// @exception NSInternalInconsistencyException Raised if hasObjectCount is NO. +// */ +//@property (nonatomic, readonly) NSUInteger objectCount; +// +///** +// Returns a Boolean value indicating if the total number of pages in the collection +// is known by the paginator. +// +// @return YES if the paginator knows the page count, otherwise NO +// */ +//- (BOOL)hasPageCount; +// +///** +// Returns a Boolean value indicating if the total number of objects in the collection +// is known by the paginator. +// +// @return YES if the paginator knows the number of objects in the paginated collection, otherwise NO. +// */ +//- (BOOL)hasObjectCount; +// +///** +// Returns a Boolean value indicating if there is a next page in the collection. +// +// @return YES if there is a next page, otherwise NO. +// @exception NSInternalInconsistencyException Raised if isLoaded or hasPageCount is NO. +// */ +//- (BOOL)hasNextPage; +// +///** +// Returns a Boolean value indicating if there is a previous page in the collection. +// +// @return YES if there is a previous page, otherwise NO. +// @exception NSInternalInconsistencyException Raised if isLoaded is NO. +// */ +//- (BOOL)hasPreviousPage; +// +///** @name Paginator Actions */ +// +///** +// Loads the next page of data by incrementing the current page, constructing an object +// loader to fetch the data, and object mapping the results. +// */ +//- (void)loadNextPage; +// +///** +// Loads the previous page of data by decrementing the current page, constructing an object +// loader to fetch the data, and object mapping the results. +// */ +//- (void)loadPreviousPage; +// +///** +// Loads a specific page of data by mutating the current page, constructing an object +// loader to fetch the data, and object mapping the results. +// +// @param pageNumber The page of objects to load from the remote backend +// */ +//- (void)loadPage:(NSUInteger)pageNumber; +// +//@end +// +///** +// The RKObjectPaginatorDelegate formal protocol defines +// RKObjectPaginator delegate methods that can be implemented by +// objects to receive informational callbacks about paginated loading +// of mapping objects through RestKit. +// */ +//@protocol RKObjectPaginatorDelegate <NSObject> +// +///** +// Tells the delegate the paginator has loaded a page of objects from the collection. +// +// @param paginator The paginator that loaded the objects. +// @param objects An array of objects mapped from the remote JSON/XML representation. +// @param page The page number that was loaded. +// */ +//- (void)paginator:(RKObjectPaginator *)paginator didLoadObjects:(NSArray *)objects forPage:(NSUInteger)page; +// +///** +// Tells the delegate the paginator has failed loading due to an error. +// +// @param paginator The paginator that failed loading due to an error. +// @param error An NSError indicating the cause of the failure. +// @param loader The loader request that resulted in the failure. +// */ +//- (void)paginator:(RKObjectPaginator *)paginator didFailWithError:(NSError *)error objectLoader:(RKObjectLoader *)loader; +// +//@optional +// +///** +// Tells the delegate that the paginator is about to begin loading a page of objects. +// +// @param paginator The paginator performing the load. +// @param page The numeric page number being loaded. +// @param loader The object loader request used to load the page. +// */ +//- (void)paginator:(RKObjectPaginator *)paginator willLoadPage:(NSUInteger)page objectLoader:(RKObjectLoader *)loader; +// +///** +// Tells the delegate the paginator has loaded the first page of objects in the collection. +// +// @param paginator The paginator instance that has loaded the first page. +// */ +//- (void)paginatorDidLoadFirstPage:(RKObjectPaginator *)paginator; +// +///** +// Tells the delegate the paginator has loaded the last page of objects in the collection. +// +// @param paginator The paginator instance that has loaded the last page. +// */ +//- (void)paginatorDidLoadLastPage:(RKObjectPaginator *)paginator; +// +//@end diff --git a/Pods/RestKit/Code/Network/RKObjectPaginator.m b/Pods/RestKit/Code/Network/RKObjectPaginator.m new file mode 100644 index 00000000..6061337f --- /dev/null +++ b/Pods/RestKit/Code/Network/RKObjectPaginator.m @@ -0,0 +1,232 @@ +// +// RKObjectPaginator.m +// RestKit +// +// Created by Blake Watters on 12/29/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +//#import "RKObjectPaginator.h" +//#import "RKMappingOperation.h" +//#import "SOCKit.h" +//#import "RKLog.h" +// +//static NSUInteger RKObjectPaginatorDefaultPerPage = 25; +// +//// Private interface +//@interface RKObjectPaginator () <RKObjectLoaderDelegate> +//@property (nonatomic, retain) RKObjectLoader *objectLoader; +//@property (nonatomic, assign, readwrite) NSUInteger currentPage; +//@property (nonatomic, assign, readwrite) NSUInteger pageCount; +//@property (nonatomic, assign, readwrite) NSUInteger objectCount; +//@property (nonatomic, assign, readwrite) BOOL loaded; +//@end +// +//@implementation RKObjectPaginator +// +//////////////////////////// +//+ (id)paginatorWithPatternURL:(RKURL *)aPatternURL mappingProvider:(RKObjectMappingProvider *)aMappingProvider +//{ +// return [[[self alloc] initWithPatternURL:aPatternURL mappingProvider:aMappingProvider] autorelease]; +//} +// +//- (id)initWithPatternURL:(RKURL *)aPatternURL mappingProvider:(RKObjectMappingProvider *)aMappingProvider +//{ +// self = [super init]; +// if (self) { +// self.patternURL = [aPatternURL copy]; +// self.mappingProvider = [aMappingProvider retain]; +// self.currentPage = NSUIntegerMax; +// self.pageCount = NSUIntegerMax; +// self.objectCount = NSUIntegerMax; +// self.perPage = RKObjectPaginatorDefaultPerPage; +// self.loaded = NO; +// } +// +// return self; +//} +// +//- (void)dealloc +//{ +// _delegate = nil; +// _configurationDelegate = nil; +// _objectLoader.delegate = nil; +// [_patternURL release]; +// _patternURL = nil; +// [_mappingProvider release]; +// _mappingProvider = nil; +// [_managedObjectStore release]; +// _managedObjectStore = nil; +// [_objectLoader cancel]; +// _objectLoader.delegate = nil; +// [_objectLoader release]; +// _objectLoader = nil; +// [_onDidLoadObjectsForPage release]; +// _onDidLoadObjectsForPage = nil; +// [_onDidFailWithError release]; +// _onDidFailWithError = nil; +// +// [super dealloc]; +//} +// +//- (RKObjectMapping *)paginationMapping +//{ +// return [self.mappingProvider paginationMapping]; +//} +// +//- (RKURL *)URL +//{ +// return [self.patternURL URLByInterpolatingResourcePathWithObject:self]; +//} +// +//// Private. Public consumers can rely on isLoaded +//- (BOOL)hasCurrentPage +//{ +// return _currentPage != NSUIntegerMax; +//} +// +//- (BOOL)hasPageCount +//{ +// return _pageCount != NSUIntegerMax; +//} +// +//- (BOOL)hasObjectCount +//{ +// return _objectCount != NSUIntegerMax; +//} +// +//- (NSUInteger)currentPage +//{ +// // Referenced during initial load, so we don't rely on isLoaded. +// NSAssert([self hasCurrentPage], @"Current page has not been initialized."); +// return _currentPage; +//} +// +//- (NSUInteger)pageCount +//{ +// NSAssert([self hasPageCount], @"Page count not available."); +// return _pageCount; +//} +// +//- (BOOL)hasNextPage +//{ +// NSAssert(self.isLoaded, @"Cannot determine hasNextPage: paginator is not loaded."); +// NSAssert([self hasPageCount], @"Cannot determine hasNextPage: page count is not known."); +// +// return self.currentPage < self.pageCount; +//} +// +//- (BOOL)hasPreviousPage +//{ +// NSAssert(self.isLoaded, @"Cannot determine hasPreviousPage: paginator is not loaded."); +// return self.currentPage > 1; +//} +// +//#pragma mark - RKObjectLoaderDelegate methods +// +//- (void)objectLoader:(RKObjectLoader *)objectLoader didLoadObjects:(NSArray *)objects +//{ +// self.objectLoader = nil; +// self.loaded = YES; +// RKLogInfo(@"Loaded objects: %@", objects); +// [self.delegate paginator:self didLoadObjects:objects forPage:self.currentPage]; +// +// if (self.onDidLoadObjectsForPage) { +// self.onDidLoadObjectsForPage(objects, self.currentPage); +// } +// +// if ([self hasPageCount] && self.currentPage == 1) { +// if ([self.delegate respondsToSelector:@selector(paginatorDidLoadFirstPage:)]) { +// [self.delegate paginatorDidLoadFirstPage:self]; +// } +// } +// +// if ([self hasPageCount] && self.currentPage == self.pageCount) { +// if ([self.delegate respondsToSelector:@selector(paginatorDidLoadLastPage:)]) { +// [self.delegate paginatorDidLoadLastPage:self]; +// } +// } +//} +// +//- (void)objectLoader:(RKObjectLoader *)objectLoader didFailWithError:(NSError *)error +//{ +// RKLogError(@"Paginator error %@", error); +// [self.delegate paginator:self didFailWithError:error objectLoader:self.objectLoader]; +// if (self.onDidFailWithError) { +// self.onDidFailWithError(error, self.objectLoader); +// } +// self.objectLoader = nil; +//} +// +//- (void)objectLoader:(RKObjectLoader *)loader willMapData:(inout id *)mappableData +//{ +// NSError *error = nil; +// RKMappingOperation *mappingOperation = [RKMappingOperation mappingOperationFromObject:*mappableData toObject:self withMapping:[self paginationMapping]]; +// BOOL success = [mappingOperation performMapping:&error]; +// if (!success) { +// self.pageCount = 0; +// self.currentPage = 0; +// RKLogError(@"Paginator didn't map info to compute page count. Assuming no pages."); +// } else if (self.perPage && [self hasObjectCount]) { +// float objectCountFloat = self.objectCount; +// self.pageCount = ceilf(objectCountFloat / self.perPage); +// RKLogInfo(@"Paginator objectCount: %ld pageCount: %ld", (long)self.objectCount, (long)self.pageCount); +// } else { +// NSAssert(NO, @"Paginator perPage set is 0."); +// RKLogError(@"Paginator perPage set is 0."); +// } +//} +// +//#pragma mark - Action methods +// +//- (void)loadNextPage +//{ +// [self loadPage:self.currentPage + 1]; +//} +// +//- (void)loadPreviousPage +//{ +// [self loadPage:self.currentPage - 1]; +//} +// +//- (void)loadPage:(NSUInteger)pageNumber +//{ +// NSAssert(self.mappingProvider, @"Cannot perform a load with a nil mappingProvider."); +// NSAssert(! self.objectLoader, @"Cannot perform a load while one is already in progress."); +// self.currentPage = pageNumber; +// +// if (self.managedObjectStore) { +// RKManagedObjectLoader *managedObjectLoader = [[[RKManagedObjectLoader alloc] initWithURL:self.URL mappingProvider:self.mappingProvider] autorelease]; +// managedObjectLoader.managedObjectContext = self.managedObjectStore.persistentStoreManagedObjectContext; +// managedObjectLoader.mainQueueManagedObjectContext = self.managedObjectStore.mainQueueManagedObjectContext; +// self.objectLoader = managedObjectLoader; +// } else { +// self.objectLoader = [[[RKObjectLoader alloc] initWithURL:self.URL mappingProvider:self.mappingProvider] autorelease]; +// } +// +// if ([self.configurationDelegate respondsToSelector:@selector(configureObjectLoader:)]) { +// [self.configurationDelegate configureObjectLoader:self.objectLoader]; +// } +// self.objectLoader.method = RKRequestMethodGET; +// self.objectLoader.delegate = self; +// +// if ([self.delegate respondsToSelector:@selector(paginator:willLoadPage:objectLoader:)]) { +// [self.delegate paginator:self willLoadPage:pageNumber objectLoader:self.objectLoader]; +// } +// +// [self.objectLoader send]; +//} +// +//@end diff --git a/Pods/RestKit/Code/Network/RKObjectParameterization.h b/Pods/RestKit/Code/Network/RKObjectParameterization.h new file mode 100644 index 00000000..5e9c68f9 --- /dev/null +++ b/Pods/RestKit/Code/Network/RKObjectParameterization.h @@ -0,0 +1,44 @@ +// +// RKObjectParameterization.h +// RestKit +// +// Created by Blake Watters on 5/2/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKRequestDescriptor.h" + +/** + The `RKObjectParameterization` class provides an interface for mapping a local domain object into an `NSDictionary` representation suitable for use as the parameters of an HTTP request. + */ +@interface RKObjectParameterization : NSObject + +///------------------------------- +/// @name Parameterizing an Object +///------------------------------- + +/** + Returns a dictionary representation of the given object by performing object mapping using the mapping + from the given request descriptor. If the request descriptor specifies a root key path, the mapped parameters + will be nested within the dictionary under the specified root key path. + + @param object The object to be parameterized. + @param requestDescriptor The request descriptor describing how the object is to be mapped into an `NSDictionary` of parameters. + @param error If there is a problem mapping the parameters, upon return contains a pointer to an instance of `NSError` that describes the problem. + @return A new dictionary containing the mapped parameters or nil if an error has occurred. + */ ++ (NSDictionary *)parametersWithObject:(id)object requestDescriptor:(RKRequestDescriptor *)requestDescriptor error:(NSError **)error; + +@end diff --git a/Pods/RestKit/Code/Network/RKObjectParameterization.m b/Pods/RestKit/Code/Network/RKObjectParameterization.m new file mode 100644 index 00000000..48b457cc --- /dev/null +++ b/Pods/RestKit/Code/Network/RKObjectParameterization.m @@ -0,0 +1,124 @@ +// +// RKObjectParameterization.m +// RestKit +// +// Created by Blake Watters on 5/2/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKMIMETypes.h" +#import "RKSerialization.h" +#import "RKObjectParameterization.h" +#import "RKMIMETypeSerialization.h" +#import "RKLog.h" +#import "RKObjectMappingOperationDataSource.h" +#import "RKObjectMapping.h" +#import "RKMappingOperation.h" +#import "RKMappingErrors.h" + +// Set Logging Component +#undef RKLogComponent +#define RKLogComponent RKlcl_cRestKitNetwork + +@interface RKObjectParameterization () <RKMappingOperationDelegate> +@property (nonatomic, strong) id object; +@property (nonatomic, strong) RKRequestDescriptor *requestDescriptor; + +- (id)initWithObject:(id)object requestDescriptor:(RKRequestDescriptor *)requestDescriptor; +- (NSDictionary *)mapObjectToParameters:(NSError **)error; + +// Convenience methods +@property (nonatomic, readonly) RKObjectMapping *mapping; +@property (nonatomic, readonly) NSString *rootKeyPath; +@end + +@implementation RKObjectParameterization + ++ (NSDictionary *)parametersWithObject:(id)object requestDescriptor:(RKRequestDescriptor *)requestDescriptor error:(NSError **)error +{ + RKObjectParameterization *parameterization = [[self alloc] initWithObject:object requestDescriptor:requestDescriptor]; + return [parameterization mapObjectToParameters:error]; +} + +- (id)initWithObject:(id)object requestDescriptor:(RKRequestDescriptor *)requestDescriptor +{ + NSParameterAssert(object); + NSParameterAssert(requestDescriptor); + + self = [super init]; + if (self) { + self.object = object; + self.requestDescriptor = requestDescriptor; + } + return self; +} + +- (RKMapping *)mapping +{ + return self.requestDescriptor.mapping; +} + +- (NSString *)rootKeyPath +{ + return self.requestDescriptor.rootKeyPath; +} + +- (NSDictionary *)mapObjectToParameters:(NSError **)error +{ + RKObjectMappingOperationDataSource *dataSource = [RKObjectMappingOperationDataSource new]; + NSMutableDictionary *dictionary = [NSMutableDictionary dictionary]; + RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:self.object destinationObject:dictionary mapping:self.mapping]; + operation.dataSource = dataSource; + operation.delegate = self; + [operation start]; + if (operation.error) { + if (operation.error.code == RKMappingErrorUnmappableRepresentation) { + // If the mapped object is empty, return an empty dictionary and no error + return self.rootKeyPath ? @{ self.rootKeyPath: @{} } : @{}; + } + + if (error) *error = operation.error; + return nil; + } + + // Optionally enclose the serialized object within a container... + return self.rootKeyPath ? [NSMutableDictionary dictionaryWithObject:dictionary forKey:self.rootKeyPath] : dictionary; +} + +#pragma mark - RKMappingOperationDelegate + +- (void)mappingOperation:(RKMappingOperation *)operation didSetValue:(id)value forKeyPath:(NSString *)keyPath usingMapping:(RKAttributeMapping *)mapping +{ + id transformedValue = nil; + if ([value isKindOfClass:[NSDate class]]) { + // Date's are not natively serializable, must be encoded as a string + @synchronized(mapping.objectMapping.preferredDateFormatter) { + transformedValue = [mapping.objectMapping.preferredDateFormatter stringForObjectValue:value]; + } + } else if ([value isKindOfClass:[NSDecimalNumber class]]) { + // Precision numbers are serialized as strings to work around Javascript notation limits + transformedValue = [(NSDecimalNumber *)value stringValue]; + } else if ([value isKindOfClass:[NSOrderedSet class]]) { + // NSOrderedSets are not natively serializable, so let's just turn it into an NSArray + transformedValue = [value array]; + } + + if (transformedValue) { + RKLogDebug(@"Serialized %@ value at keyPath to %@ (%@)", NSStringFromClass([value class]), NSStringFromClass([transformedValue class]), value); + [operation.destinationObject setValue:transformedValue forKey:keyPath]; + } +} + +@end diff --git a/Pods/RestKit/Code/Network/RKObjectRequestOperation.h b/Pods/RestKit/Code/Network/RKObjectRequestOperation.h new file mode 100644 index 00000000..a10e861a --- /dev/null +++ b/Pods/RestKit/Code/Network/RKObjectRequestOperation.h @@ -0,0 +1,184 @@ +// +// RKObjectRequestOperation.h +// RestKit +// +// Created by Blake Watters on 8/9/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKHTTPRequestOperation.h" +#import "RKMappingResult.h" + +/** + `RKObjectRequestOperation` is an `NSOperation` subclass that implements object mapping on the response body of an `NSHTTPResponse` loaded via an `RKHTTPRequestOperation`. + + Object request operations are initialized with a fully configured `NSURLRequest` object and an array of `RKResponseDescriptor` objects. `RKObjectRequestOperation` is internally implemented as an aggregate operation that constructs and starts an `RKHTTPRequestOperation` to perform the network access and retrieve the mappable data. If an error occurs during HTTP transport, the object request operation is failed with the transport error. Once response data is loaded for the request, the object request operation creates and starts an `RKObjectResponseMapperOperation` to perform the object mapping on the response body. If the mapping operation fails, then object request operation is failed and the `error` property is set. If mapping is successful, then the `mappingResult` property is set and the operation is finished successfully. + + ## Acceptable Content Types and Status Codes + + Instances of `RKObjectRequestOperation` determine the acceptability of status codes and content types differently than is typical for `AFNetworking` derived network opertations. The `RKHTTPRequestOperation` (which is a subclass of the AFNetworking `AFHTTPRequestOperation` class) supports the dynamic assigning of acceptable status codes and content types. This facility is utilized during the configuration of the network operation for an object request operation. The set of acceptable content types is determined by consulting the `RKMIMETypeSerialization` via an invocation of `[RKMIMETypeSerialization registeredMIMETypes]`. The `registeredMIMETypes` method returns an `NSSet` containing either `NSString` or `NSRegularExpression` objects that specify the content types for which `RKSerialization` classes have been registered to handle. The set of acceptable status codes is determined by aggregating the value of the `statusCodes` property from all registered `RKResponseDescriptor` objects. + + ## Error Mapping + + If the HTTP request returned a response in the Client Error (400-499 range) or Server Error (500-599 range) class and an appropriate `RKResponseDescriptor` is provided to perform mapping on the response, then the object mapping result is considered to contain a server returned error. In this case, an `NSError` object is created in the `RKErrorDomain` with an error code of `RKMappingErrorFromMappingResult` and the object request operation is failed. In the event that an a response is returned in an error class and no `RKResponseDescriptor` has been provided to the operation to handle it, then an `NSError` object in the `AFNetworkingErrorDomain` with an error code of `NSURLErrorBadServerResponse` will be returned by the underlying `RKHTTPRequestOperation` indicating that an unexpected status code was returned. + + ## Prioritization and Cancellation + + Object request operations support prioritization and cancellation of the underlying `RKHTTPRequestOperation` and `RKResponseMapperOperation` operations that perform the network transport and object mapping duties on their behalf. The queue priority of the object request operation, as set via the `[NSOperation setQueuePriority:]` method, is applied to the underlying response mapping operation when it is enqueued onto the `responseMappingQueue`. If the object request operation is cancelled, then the underlying HTTP request operation and response mapping operation are also cancelled. + + ## Caching + + Instances of `RKObjectRequestOperation` support all the HTTP caching facilities available via the `NSURLConnection` family of API's. For caching to be enabled, the remote web server that the application is communicating with must emit the appropriate `Cache-Control`, `Expires`, and/or `ETag` headers. When the response headers include the appropriate caching information, the shared `NSURLCache` instance will manage responses and transparently add conditional GET support to cachable requests. HTTP caching is a deep topic explored in depth across the web and detailed in RFC 2616: http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html + + The `RKObjectRequestOperation` class also provides support for utilizing the `NSURLCache` to satisfy requests without hitting the network. This support enables applications to display views presenting data retrieved via a cachable `GET` request without revalidating with the server and incurring any overhead. The optimization is controlled via `avoidsNetworkAccess` property. When enabled, the operation will skip the network transport portion of the object request operation and proceed directly to object mapping the cached response data. When the object request operation is an instance of `RKManagedObjectRequestOperation`, the deserialization and mapping portion of the process can be skipped entirely and the operation will fetch the appropriate object directly from Core Data, falling back to network transport once the cache entry has expired. Please refer to the documentation accompanying `RKManagedObjectRequestOperation` for more details. + + ## Core Data + + `RKObjectRequestOperation` is not able to perform object mapping that targets Core Data destination entities. Please refer to the `RKManagedObjectRequestOperation` subclass for details regarding performing a Core Data object request operation. + + @see `RKResponseDescriptor` + @see `RKHTTPRequestOperation` + @see `RKMIMETypeSerialization` + @see `RKManagedObjectRequestOperation` + */ +@interface RKObjectRequestOperation : NSOperation + +///----------------------------------------------- +/// @name Initializing an Object Request Operation +///----------------------------------------------- + +/** + Initializes an object request operation with an HTTP request operation and a set of response descriptors. + + This is the designated initializer. + + @param request The request object to be used with the underlying network operation. + @param responseDescriptors An array of `RKResponseDescriptor` objects specifying how object mapping is to be performed on the response loaded by the network operation. + @return The receiver, initialized with the given request and response descriptors. + */ +- (id)initWithHTTPRequestOperation:(RKHTTPRequestOperation *)requestOperation responseDescriptors:(NSArray *)responseDescriptors; + +/** + Initializes an object request operation with a request object and a set of response descriptors. + + This method is a convenience initializer for initializing an object request operation from a URL request with the default HTTP operation class `RKHTTPRequestOperation`. This method is functionally equivalent to the following example code: + + RKHTTPRequestOperation *requestOperation = [[RKHTTPRequestOperation alloc] initWithRequest:request]; + RKObjectRequestOperation *objectRequestOperation = [[RKObjectRequestOperation alloc] initWithHTTPRequestOperation:requestOperation responseDescriptors:responseDescriptors]; + + @param request The request object to be used with the underlying network operation. + @param responseDescriptors An array of `RKResponseDescriptor` objects specifying how object mapping is to be performed on the response loaded by the network operation. + @return The receiver, initialized with the given request and response descriptors. + */ +- (id)initWithRequest:(NSURLRequest *)request responseDescriptors:(NSArray *)responseDescriptors; + +///--------------------------------- +/// @name Configuring Object Mapping +///--------------------------------- + +/** + The array of `RKResponseDescriptor` objects that specify how the deserialized `responseData` is to be object mapped. + */ +@property (nonatomic, strong, readonly) NSArray *responseDescriptors; + +/** + The target object for the object mapping operation. + + @see `[RKObjectResponseMapperOperation targetObject]` + */ +@property (nonatomic, strong) id targetObject; + +///---------------------------------- +/// @name Accessing Operation Results +///---------------------------------- + +/** + The mapping result returned by the underlying `RKObjectResponseMapperOperation`. + + This property is `nil` if the operation is failed due to a network transport error. + */ +@property (nonatomic, strong, readonly) RKMappingResult *mappingResult; + +/** + The error, if any, that occurred during execution of the operation. + + Errors may originate during the network transport or object mapping phases of the object request operation. A `nil` error value indicates that the operation completed successfully. + */ +@property (nonatomic, strong, readonly) NSError *error; + +///------------------------------------------- +/// @name Accessing the HTTP Request Operation +///------------------------------------------- + +/** + The underlying `RKHTTPRequestOperation` object used to manage the HTTP request/response lifecycle of the object request operation. + */ +@property (nonatomic, strong, readonly) RKHTTPRequestOperation *HTTPRequestOperation; + +///------------------------------------------------------- +/// @name Setting the Completion Block and Callback Queues +///------------------------------------------------------- + +/** + Sets the `completionBlock` property with a block that executes either the specified success or failure block, depending on the state of the object request on completion. If `error` returns a value, which can be set during HTTP transport by the underlying `HTTPRequestOperation` or during object mapping by the `RKResponseMapperOperation` object, then `failure` is executed. If the object request operation is cancelled, then neither success nor failure will be executed. Otherwise, `success` is executed. + + @param success The block to be executed on the completion of a successful operation. This block has no return value and takes two arguments: the receiver operation and the mapping result from object mapping the response data of the request. + @param failure The block to be executed on the completion of an unsuccessful operation. This block has no return value and takes two arguments: the receiver operation and the error that occurred during the execution of the operation. + */ +- (void)setCompletionBlockWithSuccess:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure; + +/** + The callback dispatch queue on success. If `NULL` (default), the main queue is used. + + The queue is retained while this operation is living + */ +@property (nonatomic, assign) dispatch_queue_t successCallbackQueue; + +/** + The callback dispatch queue on failure. If `NULL` (default), the main queue is used. + + The queue is retained while this operation is living + */ +@property (nonatomic, assign) dispatch_queue_t failureCallbackQueue; + +///------------------------------------------- +/// @name Accessing the Response Mapping Queue +///------------------------------------------- + +/** + Returns the operation queue used by all object request operations when object mapping the body of a response loaded via HTTP. + + By default, the response mapping queue is configured with a maximum concurrent operation count of 1, ensuring that only one HTTP response is mapped at a time. + + @return The response mapping queue. + */ ++ (NSOperationQueue *)responseMappingQueue; + +@end + +///-------------------- +/// @name Notifications +///-------------------- + +/** + Posted when an object request operation begin executing. + */ +extern NSString * const RKObjectRequestOperationDidStartNotification; + +/** + Posted when an object request operation finishes. + */ +extern NSString * const RKObjectRequestOperationDidFinishNotification; diff --git a/Pods/RestKit/Code/Network/RKObjectRequestOperation.m b/Pods/RestKit/Code/Network/RKObjectRequestOperation.m new file mode 100644 index 00000000..daf74145 --- /dev/null +++ b/Pods/RestKit/Code/Network/RKObjectRequestOperation.m @@ -0,0 +1,292 @@ +// +// RKObjectRequestOperation.m +// RestKit +// +// Created by Blake Watters on 8/9/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKObjectRequestOperation.h" +#import "RKResponseMapperOperation.h" +#import "RKMIMETypeSerialization.h" +#import "RKHTTPUtilities.h" +#import "RKLog.h" + +#import <Availability.h> + +#if __IPHONE_OS_VERSION_MIN_REQUIRED +#import "AFNetworkActivityIndicatorManager.h" +#endif + +// Set Logging Component +#undef RKLogComponent +#define RKLogComponent RKlcl_cRestKitNetwork + +NSString * const RKObjectRequestOperationDidStartNotification = @"RKObjectRequestOperationDidStartNotification"; +NSString * const RKObjectRequestOperationDidFinishNotification = @"RKObjectRequestOperationDidFinishNotification"; + +static void RKIncrementNetworkActivityIndicator() +{ + #if __IPHONE_OS_VERSION_MIN_REQUIRED + [[AFNetworkActivityIndicatorManager sharedManager] incrementActivityCount]; + #endif +} + +static void RKDecrementNetworkAcitivityIndicator() +{ + #if __IPHONE_OS_VERSION_MIN_REQUIRED + [[AFNetworkActivityIndicatorManager sharedManager] decrementActivityCount]; + #endif +} + +static inline NSString *RKDescriptionForRequest(NSURLRequest *request) +{ + return [NSString stringWithFormat:@"%@ '%@'", request.HTTPMethod, [request.URL absoluteString]]; +} + +static NSIndexSet *RKObjectRequestOperationAcceptableMIMETypes() +{ + static NSMutableIndexSet *statusCodes = nil; + if (! statusCodes) { + statusCodes = [NSMutableIndexSet indexSet]; + [statusCodes addIndexesInRange:RKStatusCodeRangeForClass(RKStatusCodeClassSuccessful)]; + [statusCodes addIndexesInRange:RKStatusCodeRangeForClass(RKStatusCodeClassClientError)]; + } + return statusCodes; +} + +static NSString *RKStringForStateOfObjectRequestOperation(RKObjectRequestOperation *operation) +{ + if ([operation isExecuting]) { + return @"Executing"; + } else if ([operation isFinished]) { + if (operation.error) { + return @"Failed"; + } else { + return @"Successful"; + } + } else { + return @"Ready"; + } +} + +static NSString *RKStringDescribingURLResponseWithData(NSURLResponse *response, NSData *data) +{ + if ([response isKindOfClass:[NSHTTPURLResponse class]]) { + NSHTTPURLResponse *HTTPResponse = (NSHTTPURLResponse *)response; + return [NSString stringWithFormat:@"<%@: %p statusCode=%ld MIMEType=%@ length=%ld>", [response class], response, (long) [HTTPResponse statusCode], [HTTPResponse MIMEType], (long) [data length]]; + } else { + return [response description]; + } +} + +@interface RKObjectRequestOperation () +@property (nonatomic, strong, readwrite) RKHTTPRequestOperation *HTTPRequestOperation; +@property (nonatomic, strong, readwrite) NSArray *responseDescriptors; +@property (nonatomic, strong, readwrite) RKMappingResult *mappingResult; +@property (nonatomic, strong, readwrite) NSError *error; +@property (nonatomic, strong) RKObjectResponseMapperOperation *responseMapperOperation; +@end + +@implementation RKObjectRequestOperation + ++ (NSOperationQueue *)responseMappingQueue +{ + static NSOperationQueue *responseMappingQueue = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + responseMappingQueue = [NSOperationQueue new]; + [responseMappingQueue setName:@"RKObjectRequestOperation Response Mapping Queue" ]; + [responseMappingQueue setMaxConcurrentOperationCount:1]; + }); + + return responseMappingQueue; +} + +- (void)dealloc +{ +#if !OS_OBJECT_USE_OBJC + if(_failureCallbackQueue) dispatch_release(_failureCallbackQueue); + if(_successCallbackQueue) dispatch_release(_successCallbackQueue); +#endif +} + +// Designated initializer +- (id)initWithHTTPRequestOperation:(RKHTTPRequestOperation *)requestOperation responseDescriptors:(NSArray *)responseDescriptors +{ + NSParameterAssert(requestOperation); + NSParameterAssert(responseDescriptors); + + self = [self init]; + if (self) { + self.responseDescriptors = responseDescriptors; + self.HTTPRequestOperation = requestOperation; + self.HTTPRequestOperation.acceptableContentTypes = [RKMIMETypeSerialization registeredMIMETypes]; + self.HTTPRequestOperation.acceptableStatusCodes = RKObjectRequestOperationAcceptableMIMETypes(); + } + + return self; +} + +- (id)initWithRequest:(NSURLRequest *)request responseDescriptors:(NSArray *)responseDescriptors +{ + NSParameterAssert(request); + NSParameterAssert(responseDescriptors); + return [self initWithHTTPRequestOperation:[[RKHTTPRequestOperation alloc] initWithRequest:request] responseDescriptors:responseDescriptors]; +} + +- (void)setSuccessCallbackQueue:(dispatch_queue_t)successCallbackQueue +{ + if (successCallbackQueue != _successCallbackQueue) { + if (_successCallbackQueue) { +#if !OS_OBJECT_USE_OBJC + dispatch_release(_successCallbackQueue); +#endif + _successCallbackQueue = NULL; + } + + if (successCallbackQueue) { +#if !OS_OBJECT_USE_OBJC + dispatch_retain(successCallbackQueue); +#endif + _successCallbackQueue = successCallbackQueue; + } + } +} + +- (void)setFailureCallbackQueue:(dispatch_queue_t)failureCallbackQueue +{ + if (failureCallbackQueue != _failureCallbackQueue) { + if (_failureCallbackQueue) { +#if !OS_OBJECT_USE_OBJC + dispatch_release(_failureCallbackQueue); +#endif + _failureCallbackQueue = NULL; + } + + if (failureCallbackQueue) { +#if !OS_OBJECT_USE_OBJC + dispatch_retain(failureCallbackQueue); +#endif + _failureCallbackQueue = failureCallbackQueue; + } + } +} + +- (void)setCompletionBlockWithSuccess:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success + failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure +{ + __block RKObjectRequestOperation *_blockSelf = self; + self.completionBlock = ^ { + if ([_blockSelf isCancelled]) { + return; + } + + if (_blockSelf.error) { + if (failure) { + dispatch_async(_blockSelf.failureCallbackQueue ? _blockSelf.failureCallbackQueue : dispatch_get_main_queue(), ^{ + failure(_blockSelf, _blockSelf.error); + }); + } + } else { + if (success) { + dispatch_async(self.successCallbackQueue ? _blockSelf.successCallbackQueue : dispatch_get_main_queue(), ^{ + success(_blockSelf, _blockSelf.mappingResult); + }); + } + } + }; +} + +- (RKMappingResult *)performMappingOnResponse:(NSError **)error +{ + // Spin up an RKObjectResponseMapperOperation + self.responseMapperOperation = [[RKObjectResponseMapperOperation alloc] initWithResponse:self.HTTPRequestOperation.response + data:self.HTTPRequestOperation.responseData + responseDescriptors:self.responseDescriptors]; + self.responseMapperOperation.targetObject = self.targetObject; + [self.responseMapperOperation setQueuePriority:[self queuePriority]]; + [[RKObjectRequestOperation responseMappingQueue] addOperation:self.responseMapperOperation]; + [self.responseMapperOperation waitUntilFinished]; + if ([self isCancelled]) return nil; + if (self.responseMapperOperation.error) { + if (error) *error = self.responseMapperOperation.error; + return nil; + } + return self.responseMapperOperation.mappingResult; +} + +- (void)willFinish +{ + // Default implementation does nothing +} + +- (void)cancel +{ + [super cancel]; + [self.HTTPRequestOperation cancel]; + [self.responseMapperOperation cancel]; +} + +- (void)execute +{ + // Send the request + [self.HTTPRequestOperation start]; + [self.HTTPRequestOperation waitUntilFinished]; + + if (self.HTTPRequestOperation.error) { + RKLogError(@"Object request failed: Underlying HTTP request operation failed with error: %@", self.HTTPRequestOperation.error); + self.error = self.HTTPRequestOperation.error; + return; + } + + if (self.isCancelled) return; + + // Map the response + NSError *error; + RKMappingResult *mappingResult = [self performMappingOnResponse:&error]; + if (self.isCancelled) { + return; + } + + // If there is no mapping result but no error, there was no mapping to be performed, + // which we do not treat as an error condition + if (! mappingResult && error) { + self.error = error; + return; + } + self.mappingResult = mappingResult; + [self willFinish]; +} + +- (void)main +{ + if (self.isCancelled) return; + + [[NSNotificationCenter defaultCenter] postNotificationName:RKObjectRequestOperationDidStartNotification object:self]; + RKIncrementNetworkActivityIndicator(); + [self execute]; + RKDecrementNetworkAcitivityIndicator(); + [[NSNotificationCenter defaultCenter] postNotificationName:RKObjectRequestOperationDidFinishNotification object:self]; +} + +- (NSString *)description { + return [NSString stringWithFormat:@"<%@: %p, state: %@, isCancelled=%@, request: %@, response: %@>", + NSStringFromClass([self class]), self, RKStringForStateOfObjectRequestOperation(self), [self isCancelled] ? @"YES" : @"NO", + self.HTTPRequestOperation.request, RKStringDescribingURLResponseWithData(self.HTTPRequestOperation.response, self.HTTPRequestOperation.responseData)]; +} + + +@end diff --git a/Pods/RestKit/Code/Network/RKRequestDescriptor.h b/Pods/RestKit/Code/Network/RKRequestDescriptor.h new file mode 100644 index 00000000..1bc20bf7 --- /dev/null +++ b/Pods/RestKit/Code/Network/RKRequestDescriptor.h @@ -0,0 +1,84 @@ +// +// RKRequestDescriptor.h +// RestKit +// +// Created by Blake Watters on 8/24/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import <Foundation/Foundation.h> + +@class RKMapping; + +/** + An `RKRequestDescriptor` object describes an object mapping configuration that is used to construct the parameters of an HTTP request for an object. Request descriptors are defined by specifying the `RKMapping` object that is to be used when object mapping an object into an `NSDictionary` of parameters, the class of the type of object for which the mapping is to be applied, and an optional root key path under which the paramters are to be nested. Response descriptors are only utilized when construct parameters for an `NSURLRequest` with an HTTP method of `POST`, `PUT`, or `PATCH`. + + @see RKObjectParameterization + @see [RKObjectMapping requestMapping] + @see [RKObjectManager requestWithObject:method:path:parameters:] + */ +@interface RKRequestDescriptor : NSObject + +///------------------------------------- +/// @name Creating a Response Descriptor +///------------------------------------- + +/** + Creates and returns a new `RKRequestDescriptor` object. + + @param mapping The mapping to be used when parameterizing an object using the request descriptor. Cannot be nil and must have an objectClass equal to `[NSMutableDictionary class]`. + @param objectClass The class of objects for which the request descriptor should be used. Cannot be nil. + @param rootKeyPath The root key path under which paramters constructed using the response descriptor will be nested. If nil, the parameters will not be nested and returned as a flat dictionary object. + @return A new `RKRequestDescriptor` object. + + @see [RKObjectMapping requestMapping] + @warning An exception will be raised if the objectClass of the given mapping is not `[NSMutableDictionary class]`. + */ ++ (id)requestDescriptorWithMapping:(RKMapping *)mapping + objectClass:(Class)objectClass + rootKeyPath:(NSString *)rootKeyPath; + +///----------------------------------------------------- +/// @name Getting Information About a Request Descriptor +///----------------------------------------------------- + +/** + The mapping specifying how the object being parameterized is to be mapped into an `NSDictionary` representation. The mapping must have an objectClass equal to `[NSMutableDictionary class]`. + */ +@property (nonatomic, strong, readonly) RKMapping *mapping; + +/** + The class of objects that the request descriptor is appropriate for use in parameterizing. + */ +@property (nonatomic, strong, readonly) Class objectClass; + +/** + The root key path that the paramters for the object are to be nested under. May be nil. + */ +@property (nonatomic, copy, readonly) NSString *rootKeyPath; + +///-------------------------------- +/// @name Using Request Descriptors +///-------------------------------- + +/** + Returns `YES` if the given object is instance of objectClass or any class that inherits from objectClass, else `NO`. + + @param object The object to be matched against the receiver. + @return `YES` if the given object matches objectClass, else `NO`. + */ +- (BOOL)matchesObject:(id)object; + +@end diff --git a/Pods/RestKit/Code/Network/RKRequestDescriptor.m b/Pods/RestKit/Code/Network/RKRequestDescriptor.m new file mode 100644 index 00000000..6eb6c65f --- /dev/null +++ b/Pods/RestKit/Code/Network/RKRequestDescriptor.m @@ -0,0 +1,79 @@ +// +// RKRequestDescriptor.m +// RestKit +// +// Created by Blake Watters on 8/24/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Created by Blake Watters on 8/24/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKRequestDescriptor.h" +#import "RKObjectMapping.h" +#import "RKDynamicMapping.h" + +static void RKAssertValidMappingForRequestDescriptor(RKMapping *mapping) +{ + if ([mapping isKindOfClass:[RKObjectMapping class]]) { + if (! [[(RKObjectMapping *)mapping objectClass] isEqual:[NSMutableDictionary class]]) { + [NSException raise:NSInvalidArgumentException format:@"`RKRequestDescriptor` objects must be initialized with a mapping whose target class is `NSMutableDictionary`, got '%@' (see `[RKObjectMapping requestMapping]`)", [(RKObjectMapping *)mapping objectClass]]; + } + } else if ([mapping isKindOfClass:[RKDynamicMapping class]]) { + [[(RKDynamicMapping *)mapping objectMappings] enumerateObjectsUsingBlock:^(RKObjectMapping *objectMapping, NSUInteger idx, BOOL *stop) { + if (! [objectMapping.objectClass isEqual:[NSMutableDictionary class]]) { + [NSException raise:NSInvalidArgumentException format:@"`RKRequestDescriptor` objects may only be initialized with `RKDynamicMapping` objects containing `RKObjectMapping` objects whose target class is `NSMutableDictionary`, got '%@' (see `[RKObjectMapping requestMapping]`)", objectMapping.objectClass]; + } + }]; + } else { + [NSException raise:NSInvalidArgumentException format:@"Expected an instance of `RKObjectMapping` or `RKDynamicMapping`, instead got '%@'", [mapping class]]; + } +} + +@interface RKRequestDescriptor () + +@property (nonatomic, strong, readwrite) RKMapping *mapping; +@property (nonatomic, strong, readwrite) Class objectClass; +@property (nonatomic, copy, readwrite) NSString *rootKeyPath; + +@end + +@implementation RKRequestDescriptor + ++ (id)requestDescriptorWithMapping:(RKMapping *)mapping objectClass:(Class)objectClass rootKeyPath:(NSString *)rootKeyPath +{ + NSParameterAssert(mapping); + NSParameterAssert(objectClass); + RKAssertValidMappingForRequestDescriptor(mapping); + + RKRequestDescriptor *requestDescriptor = [self new]; + requestDescriptor.mapping = mapping; + requestDescriptor.objectClass = objectClass; + requestDescriptor.rootKeyPath = rootKeyPath; + return requestDescriptor; +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"<%@: %p objectClass=%@ rootKeyPath=%@ : %@>", + NSStringFromClass([self class]), self, NSStringFromClass(self.objectClass), self.rootKeyPath, self.mapping]; +} + +- (BOOL)matchesObject:(id)object +{ + return [object isKindOfClass:self.objectClass]; +} + +@end diff --git a/Pods/RestKit/Code/Network/RKRequestOperationSubclass.h b/Pods/RestKit/Code/Network/RKRequestOperationSubclass.h new file mode 100644 index 00000000..77e4a67d --- /dev/null +++ b/Pods/RestKit/Code/Network/RKRequestOperationSubclass.h @@ -0,0 +1,45 @@ +// +// RKRequestOperationSubclass.h +// RestKit +// +// Created by Blake Watters on 9/16/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/* + The extensions to the `RKObjectRequestOperation` class declared in the `ForSubclassEyesOnly` category are to be used by subclasses implementations only. Code that uses `RKObjectRequestOperation` objects must never call these methods. + */ +@interface RKObjectRequestOperation (ForSubclassEyesOnly) + +///---------------------------- +/// @name Subclassing Overrides +///---------------------------- + +/** + Performs object mapping using the `response` and `responseData` properties. + + The `RKObjectRequestOperation` superclass is responsible for the invocation of this method and the subsequent handling of the mapping result or error. + + @param error A pointer to an `NSError` object to be set in the event that the object mapping process has failed. + @return A mapping result or `nil` if an error has occurred. + */ +- (RKMappingResult *)performMappingOnResponse:(NSError **)error; + +/** + Invoked to tell the receiver that the object request operation is finishing its work and is about to transition into the finished state. Used to perform any necessary cleanup before the operation is finished. + */ +- (void)willFinish; + +@end diff --git a/Pods/RestKit/Code/Network/RKResponseDescriptor.h b/Pods/RestKit/Code/Network/RKResponseDescriptor.h new file mode 100644 index 00000000..48f85cae --- /dev/null +++ b/Pods/RestKit/Code/Network/RKResponseDescriptor.h @@ -0,0 +1,132 @@ +// +// RKResponseDescriptor.h +// RestKit +// +// Created by Blake Watters on 8/16/12. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +@class RKMapping; + +/** + An `RKResponseDescriptor` object describes an object mapping configuration that is applicable to an HTTP response. Response descriptors are defined by specifying the `RKMapping` object that is to be used when performing object mapping on the deserialized response body and the URL path pattern, key path, and status codes for which the mapping is appropriate. The path pattern is a SOCKit `SOCPattern` string that will be matched against the URL of the request that loaded the response being mapped. If the path pattern is nil, the response descriptor is considered to be appropriate for a response loaded from any URL. The key path specifies the location of data within the deserialized response body for which the mapping is appropriate. If nil, the mapping is considered to apply to the entire response body. The status codes specify a set of HTTP response status codes for which the mapping is appropriate. It is common to constrain a response descriptor to the HTTP Successful status code class (status codes in the 200-299 range). Object mapping for error responses can be configured by configuring a response descriptor to handle the Client Error status code class (status codes in the 400-499 range). Instances of `RKResponseDescriptor` are immutable. + + @see RKPathMatcher + @see RKStatusCodeIndexSetFromClass + */ +@interface RKResponseDescriptor : NSObject + +///------------------------------------- +/// @name Creating a Response Descriptor +///------------------------------------- + +/** + Creates and returns a new `RKResponseDescriptor` object. + + @param mapping The mapping for the response descriptor. + @param pathPattern A path pattern that matches against URLs for which the mapping should be used. + @param keyPath A key path specifying the subset of the parsed response for which the mapping is to be used. + @param statusCodes A set of HTTP status codes for which the mapping is to be used. + @return A new `RKResponseDescriptor` object. + */ ++ (RKResponseDescriptor *)responseDescriptorWithMapping:(RKMapping *)mapping + pathPattern:(NSString *)pathPattern + keyPath:(NSString *)keyPath + statusCodes:(NSIndexSet *)statusCodes; + +///------------------------------------------------------ +/// @name Getting Information About a Response Descriptor +///------------------------------------------------------ + +/** + The mapping to be used when object mapping the deserialized HTTP response body. Cannot be nil. + */ +@property (nonatomic, strong, readonly) RKMapping *mapping; + +/** + The path pattern to match against the request URL. If nil, the response descriptor matches any URL. + + @see `RKPathMatcher` + */ +@property (nonatomic, copy, readonly) NSString *pathPattern; + +/** + The key path to match against the deserialized response body. If nil, the response descriptor matches the entire response body. + + When evaluating a key path match, the Foundation object parsed from the response body is sent `valueForKeyPath:` with the keyPath of the receiver. If the value returned is non-nil, object mapping is performed using the response descriptor's mapping. + */ +@property (nonatomic, copy, readonly) NSString *keyPath; + +/** + The set of status codes for which response descriptor matches. If nil, the the response descriptor matches any status code. + + @see RKStatusCodeClass + */ +@property (nonatomic, copy, readonly) NSIndexSet *statusCodes; + +///--------------------------- +/// @name Setting the Base URL +///--------------------------- + +/** + The base URL that the `pathPattern` is to be evaluated relative to. + + The base URL is set to the base URL of the object manager when a response descriptor is added to an object manager. + + @see `matchesURL:` + */ +@property (nonatomic, copy) NSURL *baseURL; + +///--------------------------------- +/// @name Using Response Descriptors +///--------------------------------- + +/** + Returns a Boolean value that indicates if the receiver's path pattern matches the given path. + + Path matching is performed using an `RKPathMatcher` object. If the receiver has a `nil` path pattern or the given path is `nil`, `YES` is returned. + + @param path The path to compare with the path pattern of the receiver. + @return `YES` if the path matches the receiver's pattern, else `NO`. + @see `RKPathMatcher` + */ +- (BOOL)matchesPath:(NSString *)path; + +/** + Returns a Boolean value that indicates if the given URL object matches the base URL and path pattern of the receiver. + + This method considers both the `baseURL` and `pathPattern` of the receiver when evaluating the given URL object. The results evaluate in the following ways: + + 1. If the `baseURL` and `pathPattern` of the receiver are both `nil`, then `YES` is returned. + 1. If the `baseURL` of the receiver is `nil`, but the path pattern is not, then the entire path and query string of the given URL will be evaluated against the path pattern of the receiver using `matchesPath:`. + 1. If the `baseURL` and the `pathPattern` are both non-nil, then the given URL is first checked to verify that it is relative to the base URL using a string prefix comparison. If the absolute string value of the given URL is prefixed with the string value of the base URL, then the URL is considered relative. If the given URL is found not to be relative to the receiver's baseURL, then `NO` is returned. If the URL is found to be relative to the base URL, then the path and query string of the URL are evaluated against the path pattern of the receiver using `matchesPath:`. + + @param URL The URL to compare with the base URL and path pattern of the receiver. + @return `YES` if the URL matches the base URL and path pattern of the receiver, else `NO`. + */ +- (BOOL)matchesURL:(NSURL *)URL; + +/** + Returns a Boolean value that indicates if the given URL response object matches the receiver. + + The match is evaluated by checking if the URL of the response matches the base URL and path pattern of the receiver via the `matchesURL:` method. If the URL is found to match, then the status code of the response is checked for inclusion in the receiver's set of status codes. + + @param response The HTTP response object to compare with the base URL, path pattern, and status codes set of the receiver. + @return `YES` if the response matches the base URL, path pattern, and status codes set of the receiver, else `NO`. + @see `matchesURL:` + */ +- (BOOL)matchesResponse:(NSHTTPURLResponse *)response; + +@end diff --git a/Pods/RestKit/Code/Network/RKResponseDescriptor.m b/Pods/RestKit/Code/Network/RKResponseDescriptor.m new file mode 100644 index 00000000..f9e908ba --- /dev/null +++ b/Pods/RestKit/Code/Network/RKResponseDescriptor.m @@ -0,0 +1,117 @@ +// +// RKResponseDescriptor.m +// RestKit +// +// Created by Blake Watters on 8/16/12. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKPathMatcher.h" +#import "RKResponseDescriptor.h" +#import "RKHTTPUtilities.h" + +// Cloned from AFStringFromIndexSet -- method should be non-static for reuse +static NSString *RKStringFromIndexSet(NSIndexSet *indexSet) { + NSMutableString *string = [NSMutableString string]; + + NSRange range = NSMakeRange([indexSet firstIndex], 1); + while (range.location != NSNotFound) { + NSUInteger nextIndex = [indexSet indexGreaterThanIndex:range.location]; + while (nextIndex == range.location + range.length) { + range.length++; + nextIndex = [indexSet indexGreaterThanIndex:nextIndex]; + } + + if (string.length) { + [string appendString:@","]; + } + + if (range.length == 1) { + [string appendFormat:@"%lu", (unsigned long) range.location]; + } else { + NSUInteger firstIndex = range.location; + NSUInteger lastIndex = firstIndex + range.length - 1; + [string appendFormat:@"%lu-%lu", (unsigned long) firstIndex, (unsigned long) lastIndex]; + } + + range.location = nextIndex; + range.length = 1; + } + + return string; +} + +@interface RKResponseDescriptor () +@property (nonatomic, strong, readwrite) RKMapping *mapping; +@property (nonatomic, copy, readwrite) NSString *pathPattern; +@property (nonatomic, copy, readwrite) NSString *keyPath; +@property (nonatomic, copy, readwrite) NSIndexSet *statusCodes; +@end + +@implementation RKResponseDescriptor + ++ (RKResponseDescriptor *)responseDescriptorWithMapping:(RKMapping *)mapping + pathPattern:(NSString *)pathPattern + keyPath:(NSString *)keyPath + statusCodes:(NSIndexSet *)statusCodes +{ + NSParameterAssert(mapping); + RKResponseDescriptor *mappingDescriptor = [self new]; + mappingDescriptor.mapping = mapping; + mappingDescriptor.pathPattern = pathPattern; + mappingDescriptor.keyPath = keyPath; + mappingDescriptor.statusCodes = statusCodes; + + return mappingDescriptor; +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"<%@: %p pathPattern=%@ keyPath=%@ statusCodes=%@ : %@>", + NSStringFromClass([self class]), self, self.pathPattern, self.keyPath, RKStringFromIndexSet(self.statusCodes), self.mapping]; +} + +- (BOOL)matchesPath:(NSString *)path +{ + if (!self.pathPattern || !path) return YES; + RKPathMatcher *pathMatcher = [RKPathMatcher pathMatcherWithPattern:self.pathPattern]; + return [pathMatcher matchesPath:path tokenizeQueryStrings:NO parsedArguments:nil]; +} + +- (BOOL)matchesURL:(NSURL *)URL +{ + NSString *pathAndQueryString = RKPathAndQueryStringFromURLRelativeToURL(URL, self.baseURL); + if (self.baseURL) { + if (! RKURLIsRelativeToURL(URL, self.baseURL)) return NO; + return [self matchesPath:pathAndQueryString]; + } else { + return [self matchesPath:pathAndQueryString]; + } +} + +- (BOOL)matchesResponse:(NSHTTPURLResponse *)response +{ + if (! [self matchesURL:response.URL]) return NO; + + if (self.statusCodes) { + if (! [self.statusCodes containsIndex:response.statusCode]) { + return NO; + } + } + + return YES; +} + +@end diff --git a/Pods/RestKit/Code/Network/RKResponseMapperOperation.h b/Pods/RestKit/Code/Network/RKResponseMapperOperation.h new file mode 100644 index 00000000..66d3e6cb --- /dev/null +++ b/Pods/RestKit/Code/Network/RKResponseMapperOperation.h @@ -0,0 +1,195 @@ +// +// RKResponseMapperOperation.h +// RestKit +// +// Created by Blake Watters on 8/16/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKMappingOperationDataSource.h" +#import "RKMapperOperation.h" +#import "RKManagedObjectCaching.h" +#import "RKMappingResult.h" + +/** + `RKResponseMapperOperation` is an `NSOperation` that provides support for performing object mapping on an `NSHTTPURLResponse` and its associated response data. + + This is an abstract base class encapsulating the common interface API for its concrete subclasses `RKObjectResponseMapperOperation` and `RKManagedObjectResponseMapperOperation`. + + The common behaviors encapsulated within `RKResponseMapperOperation` include: + + 1. **Handling Empty Responses**: Empty response data (see note below) requires special handling depending on the status code of the HTTP response. If an empty response is loaded with a status code in 4xx (Client Error) range, an `NSError` in the `RKErrorDomain` is created with the `NSURLErrorBadServerResponse` code to indicate that the response was not processable. If an empty response is loaded with a status code in 2xx (Successful) range, the interpretation of the response is dependent on the value of `treatsEmptyResponseAsSuccess`. When `YES`, empty responses result in the successful completion of the operation with an `RKMappingResult` containing the targetObject of the operation, if any. + 1. **Deserializing Response Data**: When started, the operation attempts to deserialize the response data into a Foundation object representation using the `RKMIMETypeSerialization` class. This deserialized representation is then made available to subclass implementations that perform the actual object mapping work. + + ## How 'Empty' Responses are Evaluated + + Any `nil` response or `NSData` object with a length equal to zero is considered empty. To support a common behavior of the widely deployed Ruby on Rails Framework, `RKResponseMapperOperation` also considers a response containing a single space character to be empty. This type of response is generated by Rails whe `render :nothing => true` is invoked. + + @see `RKMapperOperation` + */ +@interface RKResponseMapperOperation : NSOperation + +///------------------------------------------------ +/// @name Initializing a Response Mapping Operation +///------------------------------------------------ + +/** + Initializes and returns a newly created response mapper operation with the given response object, response data, and an array of `RKResponseDescriptor` objects. + + @param response The HTTP response object to be used for object mapping. + @param data The data loaded for the response body. + @param responseDescriptors An array whose elements are `RKResponseDescriptor` objects specifying object mapping configurations that may be applied to the response. + @return The receiver, initialized with the response, data, and response descriptor objects. + */ +- (id)initWithResponse:(NSHTTPURLResponse *)response + data:(NSData *)data + responseDescriptors:(NSArray *)responseDescriptors; + +///------------------------------ +/// @name Accessing Response Data +///------------------------------ + +/** + The response object that loaded the data that is to be object mapped by the operation. Cannot be `nil`. + */ +@property (nonatomic, strong, readonly) NSHTTPURLResponse *response; + +/** + The response data that is to be deserialized and mapped by the operation. May be `nil`. + */ +@property (nonatomic, strong, readonly) NSData *data; + +///--------------------------------- +/// @name Configuring Object Mapping +///--------------------------------- + +/** + An array of `RKResponseDescriptor` objects that specify object mapping configurations that may be applied to the deserialized response data if they are found to match the response. + + @see `RKResponseDescriptor` + */ +@property (nonatomic, strong, readonly) NSArray *responseDescriptors; + +/** + The target object for the object mapping operation performed on the deserialized response data. May be `nil`. + + When object mapping is being performed against a known object, the targetObject is set to ensure that the mapping is applied to the appropriate object reference. When `nil`, the mapping operation will result in the fetching or creation of new objects as necessary to satisfy the mapping configuration. + */ +@property (nonatomic, strong) id targetObject; + +/** + The delegate for the `RKMapperOperation` created by the receiver to perform object mapping on the deserialized response data. May be `nil`. + + The delegate provides access to the details of the mapping process as it is executing. Be aware that the delegate will be invoked from the thread on which the mapping is executing. + */ +@property (nonatomic, weak) id<RKMapperOperationDelegate> mapperDelegate; + +/** + A Boolean value that indicates if the receiver should consider empty responses as being successfully mapped even though no mapping is actually performed. + + When `YES` and the response data is empty (see below), a mapping result will be returned containing the target object (if any). Otherwise, the response data will be pass through to the parser which may generate an error. + + **Default:** `YES` + + @warning To support the Ruby on Rails behavior of rendering a single space character on invocation of `render :nothing => true`, a response body's containing only a single space is treated as empty. + */ +@property (nonatomic, assign) BOOL treatsEmptyResponseAsSuccess; + +/** + Returns a dictionary of key path to `RKMapping` objects that are applicable to mapping the response. This is determined by evaluating the URL and status codes of the response against the set of `responseDescriptors`. + + @see `RKResponseDescriptor` + */ +@property (nonatomic, strong, readonly) NSDictionary *responseMappingsDictionary; + +///-------------------------------- +/// @name Accessing Mapping Results +///-------------------------------- + +/** + The results of performing object mapping on the deserialized response data. In the event that the operation has failed, the value will is `nil`. + + The `keyPath` of each `RKResponseDescriptor` from the `responseDescriptors` set that was successfully mapped from the response data will appear as an entry in the mapping result. + */ +@property (nonatomic, strong, readonly) RKMappingResult *mappingResult; + +/** + The error, if any, that occured during execution of the operation. + */ +@property (nonatomic, strong, readonly) NSError *error; + +@end + +/** + `RKObjectResponseMapperOperation` is an `RKResponseMapperOperation` subclass that provides support for performing object mapping for mappings that target `NSObject` derived classes. It does not require a data source to perform its work. + */ +@interface RKObjectResponseMapperOperation : RKResponseMapperOperation +@end + +/** + `RKManagedObjectResponseMapperOperation` is an `RKResponseMapperOperation` subclass that provides support for performing object mapping using `RKEntityMapping` objects that target `NSManagedObject` derived classes. It requires an `NSManagedObjectContext` and a configured `RKManagedObjectMappingOperationDataSource` data source to execute successfully. + + Performing response mapping that targets Core Data managed objects imposes some additional constraints on the process that the developer should understand thoroughly: + + 1. **Permanent Managed Object IDs**: When using managed object contexts in a parent-child configuration, it is important to obtain a permanent `NSManagedObjectID` for any existing objects that are to be mapped. Mapping that occur against objecs with temporary managedObjectID's cannot be retrieved across contexts by ID. If executing an `RKManagedObjectResponseMapperOperation` against a `NSManagedObject` targetObject with a temporary ID. + 1. **Persisting Mapped Objects**: Instances of `RKManagedObjectResponseMapperOperation` do **NOT** perform any persistence on the `NSManagedObject` in which the mapping occurs. This is by design and ensures that the operation can be used to compose higher level components that handle persistence. It is the developer's responsibility to ensure that the mapped managed objects are eventually persisted. + + @see `RKManagedObjectMappingOperationDataSource` + @see `[NSManagedObjectContext obtainPermanentIDsForObjects:error:]` + */ +@interface RKManagedObjectResponseMapperOperation : RKResponseMapperOperation + +///---------------------------- +/// @name Configuring Core Data +///---------------------------- + +/** + The managed object context in which the mapping will be performed. + + @warning The `NSManagedObjectContext` given **must** have a `concurrencyType` of either `NSPrivateQueueConcurrencyType` or `NSMainQueueConcurrencyType`. Thread confined contexts are not supported. + */ +@property (nonatomic, strong) NSManagedObjectContext *managedObjectContext; + +/** + An object implementing the `RKManagedObjectCaching` protocol to be used for retrieving existing `NSManagedObject` instances by primary key. If `nil`, existing object cannot be retrieved and new objects will be created for all mappable content within the response data, likely resulting in the creation of duplicate objects. + + @see `RKManagedObjectCaching` + */ +@property (nonatomic, weak) id<RKManagedObjectCaching> managedObjectCache; + +/** + The permanent `NSManagedObjectID` for the target object of the mapping operation. During mapping, an instance local to the `managedObjectContext` is fetched and used to perform the mapping operation. + + If `nil` and the `targetObject` is a managed object, the `objectID` of the target object will be used. + */ +@property (nonatomic, copy) NSManagedObjectID *targetObjectID; + +@end + +///---------------- +/// @name Functions +///---------------- + +/** + Returns a representation of a mapping result as an `NSError` value. + + The returned `NSError` object is in the `RKErrorDomain` domain and has the `RKMappingErrorFromMappingResult` code. The value for the `NSLocalizedDescriptionKey` is computed by retrieving the objects in the mapping result as an array, evaluating `valueForKeyPath:@"errorMessage"` against the array, and joining the returned error messages by comma to form a single string value. The source error objects are returned with the `NSError` in the `userInfo` dictionary under the `RKObjectMapperErrorObjectsKey` key. + + The `errorMessage` property is significant as it is an informal protocol that must be adopted by objects wishing to representing response errors. + + @return An error object representing the objects contained in the mapping result. + @see `RKErrorMessage` + */ +NSError *RKErrorFromMappingResult(RKMappingResult *mappingResult); diff --git a/Pods/RestKit/Code/Network/RKResponseMapperOperation.m b/Pods/RestKit/Code/Network/RKResponseMapperOperation.m new file mode 100644 index 00000000..d7aa224d --- /dev/null +++ b/Pods/RestKit/Code/Network/RKResponseMapperOperation.m @@ -0,0 +1,323 @@ +// +// RKResponseMapperOperation.m +// RestKit +// +// Created by Blake Watters on 8/16/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKObjectMappingOperationDataSource.h" +#import "RKManagedObjectMappingOperationDataSource.h" +#import "RKLog.h" +#import "RKResponseDescriptor.h" +#import "RKPathMatcher.h" +#import "RKHTTPUtilities.h" +#import "RKResponseMapperOperation.h" +#import "RKMappingErrors.h" +#import "RKMIMETypeSerialization.h" + +// Set Logging Component +#undef RKLogComponent +#define RKLogComponent RKlcl_cRestKitNetwork + +NSError *RKErrorFromMappingResult(RKMappingResult *mappingResult) +{ + NSArray *collection = [mappingResult array]; + NSString *description = nil; + if ([collection count] > 0) { + description = [[collection valueForKeyPath:@"errorMessage"] componentsJoinedByString:@", "]; + } else { + RKLogWarning(@"Expected mapping result to contain at least one object to construct an error"); + } + NSDictionary *userInfo = [NSDictionary dictionaryWithObjectsAndKeys:collection, RKObjectMapperErrorObjectsKey, + description, NSLocalizedDescriptionKey, nil]; + + NSError *error = [NSError errorWithDomain:RKErrorDomain code:RKMappingErrorFromMappingResult userInfo:userInfo]; + return error; +} + +static NSError *RKUnprocessableClientErrorFromResponse(NSHTTPURLResponse *response) +{ + NSCAssert(NSLocationInRange(response.statusCode, RKStatusCodeRangeForClass(RKStatusCodeClassClientError)), @"Expected response status code to be in the 400-499 range, instead got %ld", (long) response.statusCode); + NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; + [userInfo setValue:[NSString stringWithFormat:@"Loaded an unprocessable client error response (%ld)", (long) response.statusCode] forKey:NSLocalizedDescriptionKey]; + [userInfo setValue:[response URL] forKey:NSURLErrorFailingURLErrorKey]; + + return [[NSError alloc] initWithDomain:RKErrorDomain code:NSURLErrorBadServerResponse userInfo:userInfo]; +} + +/** + A serial dispatch queue used for all deserialization of response bodies + */ +static dispatch_queue_t RKResponseMapperSerializationQueue() { + static dispatch_queue_t serializationQueue; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + serializationQueue = dispatch_queue_create("org.restkit.response-mapper.serialization", DISPATCH_QUEUE_SERIAL); + }); + + return serializationQueue; +} + +@interface RKResponseMapperOperation () +@property (nonatomic, strong, readwrite) NSHTTPURLResponse *response; +@property (nonatomic, strong, readwrite) NSData *data; +@property (nonatomic, strong, readwrite) NSArray *responseDescriptors; +@property (nonatomic, strong, readwrite) RKMappingResult *mappingResult; +@property (nonatomic, strong, readwrite) NSError *error; +@property (nonatomic, strong, readwrite) NSDictionary *responseMappingsDictionary; +@property (nonatomic, strong) RKMapperOperation *mapperOperation; +@end + +@interface RKResponseMapperOperation (ForSubclassEyesOnly) +- (id)parseResponseData:(NSError **)error; +- (RKMappingResult *)performMappingWithObject:(id)sourceObject error:(NSError **)error; +- (BOOL)hasEmptyResponse; +@end + +@implementation RKResponseMapperOperation + +- (id)initWithResponse:(NSHTTPURLResponse *)response data:(NSData *)data responseDescriptors:(NSArray *)responseDescriptors +{ + NSParameterAssert(response); + NSParameterAssert(responseDescriptors); + + self = [super init]; + if (self) { + self.response = response; + self.data = data; + self.responseDescriptors = responseDescriptors; + self.responseMappingsDictionary = [self buildResponseMappingsDictionary]; + self.treatsEmptyResponseAsSuccess = YES; + } + + return self; +} + +- (id)parseResponseData:(NSError **)error +{ + NSString *MIMEType = [self.response MIMEType]; + __block NSError *underlyingError = nil; + __block id object; + dispatch_sync(RKResponseMapperSerializationQueue(), ^{ + object = [RKMIMETypeSerialization objectFromData:self.data MIMEType:MIMEType error:&underlyingError]; + }); + if (! object) { + NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; + [userInfo setValue:[NSString stringWithFormat:@"Loaded an unprocessable response (%ld) with content type '%@'", (long) self.response.statusCode, MIMEType] + forKey:NSLocalizedDescriptionKey]; + [userInfo setValue:[self.response URL] forKey:NSURLErrorFailingURLErrorKey]; + [userInfo setValue:underlyingError forKey:NSUnderlyingErrorKey]; + NSError *HTTPError = [[NSError alloc] initWithDomain:RKErrorDomain code:NSURLErrorCannotParseResponse userInfo:userInfo]; + + if (error) *error = HTTPError; + + return nil; + } + return object; +} + +- (NSDictionary *)buildResponseMappingsDictionary +{ + NSMutableDictionary *dictionary = [NSMutableDictionary dictionary]; + for (RKResponseDescriptor *responseDescriptor in self.responseDescriptors) { + if ([responseDescriptor matchesResponse:self.response]) { + id key = responseDescriptor.keyPath ? responseDescriptor.keyPath : [NSNull null]; + [dictionary setObject:responseDescriptor.mapping forKey:key]; + } + } + + return dictionary; +} + +- (RKMappingResult *)performMappingWithObject:(id)sourceObject error:(NSError **)error +{ + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"%@ is an abstract operation.", + NSStringFromClass([self class])] + userInfo:nil]; +} + +- (BOOL)hasEmptyResponse +{ + // NOTE: Comparison to single string whitespace character to support Ruby on Rails `render :nothing => true` + static NSData *whitespaceData = nil; + if (! whitespaceData) whitespaceData = [[NSData alloc] initWithBytes:" " length:1]; + + NSUInteger length = [self.data length]; + return (length == 0 || (length == 1 && [self.data isEqualToData:whitespaceData])); +} + +- (void)cancel +{ + [super cancel]; + [self.mapperOperation cancel]; +} + +- (void)main +{ + if (self.isCancelled) return; + + BOOL isClientError = NSLocationInRange(self.response.statusCode, RKStatusCodeRangeForClass(RKStatusCodeClassClientError)); + + // If we are an error response and empty, we emit an error that the content is unmappable + if (isClientError && [self hasEmptyResponse]) { + self.error = RKUnprocessableClientErrorFromResponse(self.response); + return; + } + + // If we are successful and empty, we may optionally consider the response mappable (i.e. 204 response or 201 with no body) + if ([self hasEmptyResponse] && self.treatsEmptyResponseAsSuccess) { + if (self.targetObject) { + self.mappingResult = [[RKMappingResult alloc] initWithDictionary:[NSDictionary dictionaryWithObject:self.targetObject forKey:[NSNull null]]]; + } else { + self.mappingResult = [[RKMappingResult alloc] initWithDictionary:[NSDictionary dictionary]]; + } + + return; + } + + // Parse the response + NSError *error; + id parsedBody = [self parseResponseData:&error]; + if (self.isCancelled) return; + if (! parsedBody) { + RKLogError(@"Failed to parse response data: %@", [error localizedDescription]); + self.error = error; + return; + } + if (self.isCancelled) return; + + // Object map the response + self.mappingResult = [self performMappingWithObject:parsedBody error:&error]; + + // If the response is a client error return either the mapping error or the mapped result to the caller as the error + if (isClientError) { + if ([self.mappingResult count] > 0) { + error = RKErrorFromMappingResult(self.mappingResult); + } else { + // We encountered a client error that we could not map, throw unprocessable error + if (! error) error = RKUnprocessableClientErrorFromResponse(self.response); + } + self.error = error; + return; + } + + if (! self.mappingResult) { + self.error = error; + return; + } +} + +@end + +@implementation RKObjectResponseMapperOperation + +- (RKMappingResult *)performMappingWithObject:(id)sourceObject error:(NSError **)error +{ + RKObjectMappingOperationDataSource *dataSource = [RKObjectMappingOperationDataSource new]; + self.mapperOperation = [[RKMapperOperation alloc] initWithObject:sourceObject mappingsDictionary:self.responseMappingsDictionary]; + self.mapperOperation.mappingOperationDataSource = dataSource; + [self.mapperOperation start]; + if (error) *error = self.mapperOperation.error; + return self.mapperOperation.mappingResult; +} + +@end + +static inline NSManagedObjectID *RKObjectIDFromObjectIfManaged(id object) +{ + return [object isKindOfClass:[NSManagedObject class]] ? [object objectID] : nil; +} + +@interface RKManagedObjectResponseMapperOperation () +@property (nonatomic, strong) NSOperationQueue *operationQueue; +@end + +@implementation RKManagedObjectResponseMapperOperation + +- (void)cancel +{ + [super cancel]; + [self.operationQueue cancelAllOperations]; +} + +- (RKMappingResult *)performMappingWithObject:(id)sourceObject error:(NSError **)error +{ + NSParameterAssert(self.managedObjectContext); + + __block NSError *blockError = nil; + __block RKMappingResult *mappingResult = nil; + self.operationQueue = [NSOperationQueue new]; + [self.managedObjectContext performBlockAndWait:^{ + // Configure the mapper + self.mapperOperation = [[RKMapperOperation alloc] initWithObject:sourceObject mappingsDictionary:self.responseMappingsDictionary]; + self.mapperOperation.delegate = self.mapperDelegate; + + // Configure a data source to defer execution of connection operations until mapping is complete + RKManagedObjectMappingOperationDataSource *dataSource = [[RKManagedObjectMappingOperationDataSource alloc] initWithManagedObjectContext:self.managedObjectContext + cache:self.managedObjectCache]; + [self.operationQueue setMaxConcurrentOperationCount:1]; + [self.operationQueue setName:[NSString stringWithFormat:@"Relationship Connection Queue for '%@'", self.mapperOperation]]; + dataSource.operationQueue = self.operationQueue; + dataSource.parentOperation = self.mapperOperation; + self.mapperOperation.mappingOperationDataSource = dataSource; + + if (NSLocationInRange(self.response.statusCode, RKStatusCodeRangeForClass(RKStatusCodeClassSuccessful))) { + self.mapperOperation.targetObject = self.targetObject; + + if (self.targetObjectID || self.targetObject) { + NSManagedObjectID *objectID = self.targetObjectID ?: RKObjectIDFromObjectIfManaged(self.targetObject); + if (objectID) { + if ([objectID isTemporaryID]) RKLogWarning(@"Performing object mapping to temporary target objectID. Results may not be accessible without obtaining a permanent object ID."); + NSManagedObject *localObject = [self.managedObjectContext existingObjectWithID:objectID error:&blockError]; + NSAssert([localObject.managedObjectContext isEqual:self.managedObjectContext], @"Serious Core Data error: requested existing object with ID %@ in context %@, instead got an object reference in context %@. This may indicate that the objectID for your target managed object was obtained using `obtainPermanentIDsForObjects:error:` in the wrong context.", objectID, self.managedObjectContext, [localObject managedObjectContext]); + if (! localObject) { + RKLogWarning(@"Failed to retrieve existing object with ID: %@", objectID); + RKLogCoreDataError(blockError); + } + self.mapperOperation.targetObject = localObject; + } else { + if (self.mapperOperation.targetObject) RKLogDebug(@"Mapping HTTP response to unmanaged target object with `RKManagedObjectResponseMapperOperation`: %@", self.mapperOperation.targetObject); + } + } else { + RKLogTrace(@"Mapping HTTP response to nil target object..."); + } + } else { + RKLogInfo(@"Non-successful state code encountered: performing mapping with nil target object."); + } + + [self.mapperOperation start]; + blockError = self.mapperOperation.error; + mappingResult = self.mapperOperation.mappingResult; + }]; + + if (self.isCancelled) return nil; + + if (! mappingResult) { + if (error) *error = blockError; + return nil; + } + + // Mapping completed without error, allow the connection operations to execute + if ([self.operationQueue operationCount]) { + RKLogTrace(@"Awaiting execution of %ld enqueued connection operations: %@", (long) [self.operationQueue operationCount], [self.operationQueue operations]); + [self.operationQueue waitUntilAllOperationsAreFinished]; + } + + return mappingResult; +} + +@end diff --git a/Pods/RestKit/Code/Network/RKRoute.h b/Pods/RestKit/Code/Network/RKRoute.h new file mode 100644 index 00000000..d7536bf3 --- /dev/null +++ b/Pods/RestKit/Code/Network/RKRoute.h @@ -0,0 +1,140 @@ +// +// RKRoute.h +// RestKit +// +// Created by Blake Watters on 5/31/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKHTTPUtilities.h" + +/** + The `RKRoute` class models a single routable path pattern in use by the application. A route can be combined with an `NSURL` base URL and interpolated with an object to produce a new fully hydrated URL object. Routes are always instantiated with a path pattern and metadata to provide for the subsequent identification of the defined route. + + There are three types of routes modeled by the RKRoute class: + + 1. **Named Routes**: A named route represents a single path and optional request method within the application. The route is not affiliated with any particular class. For example, one might define a route with the name `@"airlines_list"` as a GET to the path '/airlines.json'. + 1. **Class Routes**: An class route represents a single path that is identified by object class and request method for which it is appropriate. For example, one might define a route for the class `RKArticle` for a POST to the path '/articles.json'. + 1. **Relationship Routes**: A relationship route represents a single path through which the relationship of a parent object can be manipulated. For example, given an `RKArticle` and `RKComment` class, one might define a relationship route for the `RKArticle` class's `@"comments"` relationship as pointing to a GET to the path `@"/articles/:articleID/comments". + + The RKRoute class is internally implemented as a class cluster and is not to be directly instantiated via alloc and init. + + @see RKRouter + @see RKRouteSet + */ +@interface RKRoute : NSObject + +///--------------------------- +/// @name Instantiating Routes +///--------------------------- + +/** + Creates and returns a new named route object with the given name, path pattern and method. + + @param name A unique identifying name for the route. + @param pathPattern A SOCKit pattern describing the format of URL paths generated from the route. + @param method The request method of the route. + @return A new named route object with the given name, path pattern and request method. + */ ++ (id)routeWithName:(NSString *)name pathPattern:(NSString *)pathPattern method:(RKRequestMethod)method; + +/** + Creates and returns a new class route object with the given object class, path pattern and method. + + @param objectClass The class that is represented by the route. + @param pathPattern A SOCKit pattern describing the format of URL paths generated from the route. + @param method The request method of the route. + @return A new class route object with the given object class, path pattern and request method. + */ ++ (id)routeWithClass:(Class)objectClass pathPattern:(NSString *)pathPattern method:(RKRequestMethod)method; + +/** + Creates and returns a new relationship route object with the given relationship name, object class, path pattern and method. + + @param name The name of the relationship represented by the route. + @param objectClass The class containing the relationship represented by the route. + @param pathPattern A SOCKit pattern describing the format of URL paths generated from the route. + @param method The request method of the route. + @return A new class route object with the given object class, path pattern and request method. + */ ++ (id)routeWithRelationshipName:(NSString *)name objectClass:(Class)objectClass pathPattern:(NSString *)pathPattern method:(RKRequestMethod)method; + +///--------------------------------- +/// @name Accessing Route Attributes +///--------------------------------- + +/** + The name of the receiver. + + The name is used to identify named and relationship routes and is always `nil` for object routes. + */ +@property (nonatomic, strong, readonly) NSString *name; + +/** + The object class of the receiver. + + Defines the class for which the route is appropriate. Always returns `nil` for named routes. + */ +@property (nonatomic, strong, readonly) Class objectClass; + +/** + The request method of the receiver. + + Appropriate for all route types. If the route is appropriate for any HTTP request method, then the `RKRequestMethodAny` value is used. + */ +@property (nonatomic, assign, readonly) RKRequestMethod method; + +/** + The path pattern of the receiver. + + A SOCKit pattern that describes the format of the path portion of URL's generated from the receiver. Required and used by all route types. + + @see `SOCPattern` + */ +@property (nonatomic, strong, readonly) NSString *pathPattern; + +/** + A Boolean value that determines if the path pattern should be escaped when evaluated. + + *Default*: `NO` + */ +@property (nonatomic, assign) BOOL shouldEscapePath; + +///----------------------------- +/// @name Inspecting Route Types +///----------------------------- + +/** + Determines if the receiver is a named route. + + @return YES if the receiver is a named route, else NO. + */ +- (BOOL)isNamedRoute; + +/** + Determines if the receiver is a class route. + + @return YES if the receiver is a class route, else NO. + */ +- (BOOL)isClassRoute; + +/** + Determines if the receiver is a relationship route. + + @return YES if the receiver is a relationship route, else NO. + */ +- (BOOL)isRelationshipRoute; + +@end diff --git a/Pods/RestKit/Code/Network/RKRoute.m b/Pods/RestKit/Code/Network/RKRoute.m new file mode 100644 index 00000000..e29e98a8 --- /dev/null +++ b/Pods/RestKit/Code/Network/RKRoute.m @@ -0,0 +1,153 @@ +// +// RKRoute.m +// RestKit +// +// Created by Blake Watters on 5/31/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKRoute.h" + +@interface RKRoute () +@property (nonatomic, strong, readwrite) NSString *name; +@property (nonatomic, strong, readwrite) Class objectClass; +@property (nonatomic, assign, readwrite) RKRequestMethod method; +@property (nonatomic, strong, readwrite) NSString *pathPattern; +@end + +@interface RKNamedRoute : RKRoute +@end + +@interface RKClassRoute : RKRoute +@end + +@interface RKRelationshipRoute : RKRoute +@end + +@implementation RKRoute + ++ (id)routeWithName:(NSString *)name pathPattern:(NSString *)pathPattern method:(RKRequestMethod)method +{ + NSParameterAssert(name); + NSParameterAssert(pathPattern); + RKNamedRoute *route = [RKNamedRoute new]; + route.name = name; + route.pathPattern = pathPattern; + route.method = method; + return route; +} + ++ (id)routeWithClass:(Class)objectClass pathPattern:(NSString *)pathPattern method:(RKRequestMethod)method +{ + NSParameterAssert(objectClass); + NSParameterAssert(pathPattern); + RKClassRoute *route = [RKClassRoute new]; + route.objectClass = objectClass; + route.pathPattern = pathPattern; + route.method = method; + return route; +} + ++ (id)routeWithRelationshipName:(NSString *)relationshipName objectClass:(Class)objectClass pathPattern:(NSString *)pathPattern method:(RKRequestMethod)method +{ + NSParameterAssert(relationshipName); + NSParameterAssert(objectClass); + NSParameterAssert(pathPattern); + RKRelationshipRoute *route = [RKRelationshipRoute new]; + route.name = relationshipName; + route.objectClass = objectClass; + route.pathPattern = pathPattern; + route.method = method; + return route; +} + +- (id)init +{ + self = [super init]; + if (self) { + if ([self isMemberOfClass:[RKRoute class]]) { + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"%@ is not meant to be directly instantiated. Use one of the initializer methods instead.", + NSStringFromClass([self class])] + userInfo:nil]; + } + } + + return self; +} + +- (BOOL)isNamedRoute +{ + return NO; +} + +- (BOOL)isClassRoute +{ + return NO; +} + +- (BOOL)isRelationshipRoute +{ + return NO; +} + +@end + +@implementation RKNamedRoute + +- (BOOL)isNamedRoute +{ + return YES; +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"<%@: %p name=%@ method=%@ pathPattern=%@>", + NSStringFromClass([self class]), self, self.name, RKStringFromRequestMethod(self.method), self.pathPattern]; +} + +@end + +@implementation RKClassRoute + +- (BOOL)isClassRoute +{ + return YES; +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"<%@: %p objectClass=%@ method=%@ pathPattern=%@>", + NSStringFromClass([self class]), self, NSStringFromClass(self.objectClass), + RKStringFromRequestMethod(self.method), self.pathPattern]; +} + +@end + +@implementation RKRelationshipRoute + +- (BOOL)isRelationshipRoute +{ + return YES; +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"<%@: %p relationshipName=%@ objectClass=%@ method=%@ pathPattern=%@>", + NSStringFromClass([self class]), self, self.name, NSStringFromClass(self.objectClass), + RKStringFromRequestMethod(self.method), self.pathPattern]; +} + +@end diff --git a/Pods/RestKit/Code/Network/RKRouteSet.h b/Pods/RestKit/Code/Network/RKRouteSet.h new file mode 100644 index 00000000..82ab9ee0 --- /dev/null +++ b/Pods/RestKit/Code/Network/RKRouteSet.h @@ -0,0 +1,155 @@ +// +// RKRouteSet.h +// RestKit +// +// Created by Blake Watters on 5/31/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKRoute.h" + +// Wildcard matches on objects +extern RKRequestMethod const RKRequestMethodAny; + +/** + The `RKRouteSet` class provides for the storage and retrieval of `RKRoute` objects. Route objects are added and removed the route set to manipulate the routing table of the application. + + @see `RKRouter` + */ +@interface RKRouteSet : NSObject + +///--------------------------------- +/// @name Adding and Removing Routes +///--------------------------------- + +/** + Adds a route to the receiver. + + @param route The route to be added. + @raises NSInvalidArgumentException Raised if the route already exists in the receiver or overlaps an existing name. + */ +- (void)addRoute:(RKRoute *)route; + +/** + Removes a route from the receiver. + + @param route The route to be removed. + @raises NSInvalidArgumentException Raised if the route does not exist in the receiver. + */ +- (void)removeRoute:(RKRoute *)route; + +///--------------------------- +/// @name Querying a Route Set +///--------------------------- + +/** + Determines if a given route exists within the receiver. + + @param route The route to be tested for containement. + @return `YES` if the route is contained within the route set, else `NO`. + */ +- (BOOL)containsRoute:(RKRoute *)route; + +/** + Returns all routes from the receiver in an array. + + @return An array containing all the routes in the receiver. + */ +- (NSArray *)allRoutes; + +/** + Returns all named routes from the receiver in an array. + + @return An array containing all the named routes in the receiver. + */ +- (NSArray *)namedRoutes; + +/** + Returns all class routes from the receiver in an array. + + @return An array containing all the class routes in the receiver. + */ +- (NSArray *)classRoutes; + +/** + Returns all relationship routes from the receiver in an array. + + @return An array containing all the relationship routes in the receiver. + */ +- (NSArray *)relationshipRoutes; + +/** + Retrieves a route with the given name. + + @param name The name of the named route to be found. + @return A route with the given name or nil if none was found. + */ +- (RKRoute *)routeForName:(NSString *)name; + +/** + Retrieves a route for the given object class and request method. + + @param objectClass The object class of the route to be retrieved. + @param method The request method of the route to be retrieved. + @return A route with the given object class and method or nil if none was found. + */ +- (RKRoute *)routeForClass:(Class)objectClass method:(RKRequestMethod)method; + +/** + Retrieves a route for a given relationship of a class with a given request method. + + @param relationship The name of the relationship of the route to be retrieved. + @param method The request method of the route to be retrieved. + @return A route with the given relationship name, object class and method or nil if none was found. + */ +- (RKRoute *)routeForRelationship:(NSString *)relationship ofClass:(Class)objectClass method:(RKRequestMethod)method; + +/** + Retrieves all class routes with a given object class. + + Class matches are determined by direct comparison of the class objects. The inheritance hierarchy is not consulted. + + @param objectClass The object class of the routes to be retrieved. + @return An array containing all class routes with the given class. + */ +- (NSArray *)routesForClass:(Class)objectClass; + +/** + Retrieves all object routes for a given object. + + All object routes are searched and returned if they target a class or superclass of the given object (using `- [NSObject isKindOfClass:]`). + + @param object An object for which all object routes are to be retrieved. + @return An array containing all object routes where the target class is included in the given object's class hierarchy. + */ +- (NSArray *)routesForObject:(id)object; + +/** + Retrieves all routes for a given relationship name and object class. + + @param relationshipName The name of the relationship of the routes to be retrieved. + @param objectClass The object class of the routes to be retrieved. + @return An array containing all relationship routes with the given relationship name and object class. + */ +- (NSArray *)routesForRelationship:(NSString *)relationshipName ofClass:(Class)objectClass; + +/** + Retrieves a route for a given object and request method. + + The object routes are first searched for an exact match with the given object's class and request method. If no exact match is found for the given request method, but a route is found for the `RKRequestMethodAny` method, it is returned. If neither are found, the search process begins again and traverses up the inheritance hierarchy. + */ +- (RKRoute *)routeForObject:(id)object method:(RKRequestMethod)method; + +@end diff --git a/Pods/RestKit/Code/Network/RKRouteSet.m b/Pods/RestKit/Code/Network/RKRouteSet.m new file mode 100644 index 00000000..80bcac24 --- /dev/null +++ b/Pods/RestKit/Code/Network/RKRouteSet.m @@ -0,0 +1,201 @@ +// +// RKRouteSet.m +// RestKit +// +// Created by Blake Watters on 5/31/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKRouteSet.h" +#import "RKPathMatcher.h" + +RKRequestMethod const RKRequestMethodAny = RKRequestMethodInvalid; + +@interface RKRouteSet () + +@property (nonatomic, strong) NSMutableArray *routes; + +@end + +@implementation RKRouteSet + + +- (id)init +{ + self = [super init]; + if (self) { + self.routes = [NSMutableArray array]; + } + + return self; +} + + +- (NSArray *)allRoutes +{ + return [NSArray arrayWithArray:self.routes]; +} + +- (NSArray *)namedRoutes +{ + NSMutableArray *routes = [NSMutableArray array]; + for (RKRoute *route in self.routes) { + if ([route isNamedRoute]) [routes addObject:route]; + } + + return [NSArray arrayWithArray:routes]; +} + +- (NSArray *)classRoutes +{ + NSMutableArray *routes = [NSMutableArray array]; + for (RKRoute *route in self.routes) { + if ([route isClassRoute]) [routes addObject:route]; + } + + return [NSArray arrayWithArray:routes]; +} + +- (NSArray *)relationshipRoutes +{ + NSMutableArray *routes = [NSMutableArray array]; + for (RKRoute *route in self.routes) { + if ([route isRelationshipRoute]) [routes addObject:route]; + } + + return [NSArray arrayWithArray:routes]; +} + +- (void)addRoute:(RKRoute *)route +{ + NSAssert(![self containsRoute:route], @"Cannot add a route that is already added to the router."); + NSAssert(![route isNamedRoute] || [self routeForName:route.name] == nil, @"Cannot add a route with the same name as an existing route."); + if ([route isClassRoute]) { + RKRoute *existingRoute = [self routeForClass:route.objectClass method:route.method]; + NSAssert(existingRoute == nil || (existingRoute.method == RKRequestMethodAny && route.method != RKRequestMethodAny), @"Cannot add a route with the same class and method as an existing route."); + } else if ([route isRelationshipRoute]) { + NSArray *routes = [self routesForRelationship:route.name ofClass:route.objectClass]; + for (RKRoute *existingRoute in routes) { + NSAssert(existingRoute.method != route.method, @"Cannot add a relationship route with the same name and class as an existing route."); + } + } + [self.routes addObject:route]; +} + +- (void)removeRoute:(RKRoute *)route +{ + NSAssert([self containsRoute:route], @"Cannot remove a route that is not added to the router."); + [self.routes removeObject:route]; +} + +- (BOOL)containsRoute:(RKRoute *)route +{ + return [self.routes containsObject:route]; +} + +- (RKRoute *)routeForName:(NSString *)name +{ + for (RKRoute *route in [self namedRoutes]) { + if ([route.name isEqualToString:name]) { + return route; + } + } + + return nil; +} + +- (RKRoute *)routeForClass:(Class)objectClass method:(RKRequestMethod)method +{ + // Check for an exact match + for (RKRoute *route in [self classRoutes]) { + if ([route.objectClass isEqual:objectClass] && route.method == method) { + return route; + } + } + + // Check for wildcard match + for (RKRoute *route in [self classRoutes]) { + if ([route.objectClass isEqual:objectClass] && route.method == RKRequestMethodAny) { + return route; + } + } + + return nil; +} + +- (RKRoute *)routeForRelationship:(NSString *)relationshipName ofClass:(Class)objectClass method:(RKRequestMethod)method +{ + for (RKRoute *route in [self relationshipRoutes]) { + + if ([route.name isEqualToString:relationshipName] && [route.objectClass isEqual:objectClass] && route.method == method) { + return route; + } + } + + return nil; +} + +- (NSArray *)routesForClass:(Class)objectClass +{ + NSMutableArray *routes = [NSMutableArray array]; + for (RKRoute *route in [self classRoutes]) { + if ([route.objectClass isEqual:objectClass]) { + [routes addObject:route]; + } + } + + return [NSArray arrayWithArray:routes]; +} + +- (NSArray *)routesForObject:(id)object +{ + NSMutableArray *routes = [NSMutableArray array]; + for (RKRoute *route in [self classRoutes]) { + if ([object isKindOfClass:route.objectClass]) { + [routes addObject:route]; + } + } + + return [NSArray arrayWithArray:routes]; +} + +- (NSArray *)routesForRelationship:(NSString *)relationshipName ofClass:(Class)objectClass +{ + NSIndexSet *indexes = [self.relationshipRoutes indexesOfObjectsPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) { + return [[(RKRoute *)obj objectClass] isEqual:objectClass] && [[(RKRoute *)obj name] isEqualToString:relationshipName]; + }]; + + return [self.relationshipRoutes objectsAtIndexes:indexes]; +} + +- (RKRoute *)routeForObject:(id)object method:(RKRequestMethod)method +{ + Class searchClass = [object class]; + while (searchClass) { + NSArray *routes = [self routesForClass:searchClass]; + RKRoute *wildcardRoute = nil; + for (RKRoute *route in routes) { + if (route.method == RKRequestMethodAny) wildcardRoute = route; + if (route.method == method) return route; + } + + if (wildcardRoute) return wildcardRoute; + searchClass = [searchClass superclass]; + } + + return nil; +} + +@end diff --git a/Pods/RestKit/Code/Network/RKRouter.h b/Pods/RestKit/Code/Network/RKRouter.h new file mode 100644 index 00000000..5e1e4263 --- /dev/null +++ b/Pods/RestKit/Code/Network/RKRouter.h @@ -0,0 +1,116 @@ +// +// RKRouter.h +// RestKit +// +// Created by Blake Watters on 6/20/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKHTTPUtilities.h" + +@class RKRouteSet; +@class RKRoute; + +/** + An `RKRouter` instance is responsible for generating `NSURL` objects with a given base URL and a route set. It is used to centralize the knowledge about the URL's that are used by the application. + + ## Route Generation + + URL's can be generated by the router in three ways: + + 1. **By name**. Named routes link a symbolic name with a path and an HTTP request method. (see `URLForRouteNamed:method:object:`) + 2. **By object**. Routes can be defined by class and HTTP request method. When a URL is requested from the router for an object, the router will identify the most appropriate route for the object and instantiate an `NSURL` with the route's path pattern and interpolate it against the object. (see `URLForObject:method:`) + 3. **By object relationship**. Routes can be defined for relationships to other objects. When a URL is requested from the router for a relationship, the router will retrieve the appropriate route for the relationship from the route set and interpolate the route's path pattern against the source object. (see `URLForRelationship:ofObject:method:`) + + @see `RKRoute` + @see `RKRouteSet` + */ +@interface RKRouter : NSObject + +///---------------------------- +/// @name Initializing a Router +///---------------------------- + +/** + Initializes a router with a given base URL. + + @param baseURL The base URL with which to initialize the receiver. + @return The receiver, initialized with the given base URL. + */ +- (id)initWithBaseURL:(NSURL *)baseURL; + +///---------------------- +/// @name Generating URLs +///---------------------- + +/** + Generates a URL for the route with the given name. + + The route set is searched for a route with the given name and a new `NSURL` object is instantiated with the baseURL of the receiver and the path pattern of the route, optionally interpolated with a given object. If a pointer to an `RKRequestMethod` variable is provided, the HTTP method for the route will be assigned to the reference. + + @param routeName The name of the route for which a URL is to be generated. + @param method A pointer to an `RKRequestMethod` variable in which to store the HTTP method associated with the named route. May be nil. + @param object An optional object against which to interpolate the path pattern. + @return A new `NSURL` object constructed by appending the path pattern to the baseURL of the receiver and interpolating against a given object; or nil if no route was found with the given name. + */ +- (NSURL *)URLForRouteNamed:(NSString *)routeName method:(out RKRequestMethod *)method object:(id)object; + +/** + Generates a URL for a given object and HTTP method. + + The route set is searched for a route that matches the HTTP method and class of the object being routed. If there is not an exact match for the object's class, the inheritance hierarchy is searched until a match is found or all possible routes are exhausted. Exact HTTP request matches are favored over the wildcard method (`RKRequestMethodAny`). Once the appropriate route is identified, a new `NSURL` object is instantiated with the baseURL of the receiver and the path pattern of the route, interpolated against the object being routed. + + @param object The object for which a URL is to be generated. + @param method The HTTP method for which the URL is to be generated. + @return A new URL object constructed by appending the path pattern of the route for the object an HTTP method to the baseURL of the receiver, interpolated against the routed object; or nil if no route was found for the given object and HTTP method. + */ +- (NSURL *)URLForObject:(id)object method:(RKRequestMethod)method; + +/** + Generates a URL for a relationship of a given object with a given HTTP method. + + The route set is searched for a route that matches the relationship of the given object's class and the given HTTP method. If a matching route is found, a new `NSURL` object is instantiated with the baseURL of the receiver and the path pattern of the route, interpolated against the object being routed. + + @param relationshipName The name of the relationship for which a URL is to be generated. + @param object The object for which the URL is to be generated. + @param method The HTTP method for which the URL is to be generated. + @return A new URL object constructed by appending the path pattern of the route for the given object's relationship and HTTP method to the baseURL of the receiver, interpolated against the routed object; or nil if no route was found for the given relationship, object and HTTP method. + */ +- (NSURL *)URLForRelationship:(NSString *)relationshipName ofObject:(id)object method:(RKRequestMethod)method; + +/** + Generates a URL with a given route and object. + + @param route The route to generate the URL with. + @param object The object with which to interpolate the path pattern of the given route. + @return A new URL object constructed by interpolating the path pattern of the given route with the given object to construct a path and constructing an `NSURL` object relative to the `baseURL` of the receiver. + */ +- (NSURL *)URLWithRoute:(RKRoute *)route object:(id)object; + +///--------------------------------------------- +/// @name Configuring the Base URL and Route Set +///--------------------------------------------- + +/** + The base URL that all URLs constructed by the receiver are relative to. + */ +@property (nonatomic, strong, readonly) NSURL *baseURL; + +/** + A route set defining all the routes addressable through the receiver. + */ +@property (nonatomic, strong, readonly) RKRouteSet *routeSet; + +@end diff --git a/Pods/RestKit/Code/Network/RKRouter.m b/Pods/RestKit/Code/Network/RKRouter.m new file mode 100644 index 00000000..dfbe52d4 --- /dev/null +++ b/Pods/RestKit/Code/Network/RKRouter.m @@ -0,0 +1,86 @@ +// +// RKRouter.m +// RestKit +// +// Created by Blake Watters on 6/20/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKRouter.h" +#import "RKRouteSet.h" +#import "RKRoute.h" +#import "RKPathMatcher.h" +#import <objc/runtime.h> + +@interface RKRouter () +@property (nonatomic, strong, readwrite) NSURL *baseURL; +@property (nonatomic, strong, readwrite) RKRouteSet *routeSet; +@end + +@implementation RKRouter + +- (id)initWithBaseURL:(NSURL *)baseURL +{ + self = [super init]; + if (self) { + NSParameterAssert(baseURL); + self.baseURL = baseURL; + self.routeSet = [[RKRouteSet alloc] init]; + } + + return self; +} + +- (id)init +{ + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"%@ Failed to call designated initializer. Invoke initWithBaseURL: instead.", NSStringFromClass([self class])] + userInfo:nil]; +} + +- (NSURL *)URLForRouteNamed:(NSString *)routeName method:(out RKRequestMethod *)method object:(id)object +{ + RKRoute *route = [self.routeSet routeForName:routeName]; + if (method) *method = route.method; + return [self URLWithRoute:route object:object]; +} + +- (NSURL *)URLForObject:(id)object method:(RKRequestMethod)method +{ + RKRoute *route = [self.routeSet routeForObject:object method:method]; + return [self URLWithRoute:route object:object]; +} + +- (NSURL *)URLForRelationship:(NSString *)relationshipName ofObject:(id)object method:(RKRequestMethod)method +{ + RKRoute *route = [self.routeSet routeForRelationship:relationshipName ofClass:[object class] method:method]; + return [self URLWithRoute:route object:object]; +} + +- (NSURL *)URLWithRoute:(RKRoute *)route object:(id)object +{ + NSParameterAssert(route); + NSURL *URL = [NSURL URLWithString:[self pathFromRoute:route forObject:object] relativeToURL:self.baseURL]; + return URL; +} + +- (NSString *)pathFromRoute:(RKRoute *)route forObject:(id)object +{ + if (! object) return route.pathPattern; + RKPathMatcher *pathMatcher = [RKPathMatcher pathMatcherWithPattern:route.pathPattern]; + return [pathMatcher pathFromObject:object addingEscapes:route.shouldEscapePath]; +} + +@end diff --git a/Pods/RestKit/Code/ObjectMapping.h b/Pods/RestKit/Code/ObjectMapping.h new file mode 100644 index 00000000..9bff91a5 --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping.h @@ -0,0 +1,27 @@ +// +// ObjectMapping.h +// RestKit +// +// Created by Blake Watters on 9/30/10. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKObjectManager.h" +#import "RKObjectMapping.h" +#import "RKAttributeMapping.h" +#import "RKRelationshipMapping.h" +#import "RKObjectParameterization.h" +#import "RKMappingResult.h" +#import "RKMapperOperation.h" diff --git a/Pods/RestKit/Code/ObjectMapping/RKAttributeMapping.h b/Pods/RestKit/Code/ObjectMapping/RKAttributeMapping.h new file mode 100644 index 00000000..deb461f4 --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKAttributeMapping.h @@ -0,0 +1,60 @@ +// +// RKAttributeMapping.h +// RestKit +// +// Created by Blake Watters on 4/30/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKPropertyMapping.h" + +/** + Instances of `RKAttributeMapping` define a transformation of data between an attribute value on source object and an attribute value on a destination object within an object mapping. + */ +@interface RKAttributeMapping : RKPropertyMapping + +/** + Creates and returns a new attribute mapping specifying that data is to be read from a given key path on a source object + and set to a given key path on a destination object. + + Attribute mappings define transformation between key paths in the source and destination object beings mapped. In the simplest + case, an attribute mapping may simply specify that data from one object is to be copied to another. A common example of this + type of transformation is copying the `name` key from a JSON payload onto a local object. In this case, the source and + destination key paths are identical, as are the source and destination types (`NSString`), so a simple get and set operation + has been defined. + + The next most common use-case is the transformation of identical data between two different key paths in the + source and destination objects. This is typically encountered when you wish to transform inbound data to conform with the naming + conventions of the platform or the data model of your application. An example of this type of transformation would be from the + source key path of `first_name` to the destination key path of `firstName`. In this transformation, the key paths have diverged + but both sides of the mapping correspond to NSString properties. + + The final type of transformation to be specified via an attribute mapping involves the transformation between types in the mapping. + By far, the most common example of this use-case is the transformation of a inbound string or numeric property into a date on + the target object. For example, consider a backend system that returns the creation date of a piece of content in a JSON payload. + This data might be returned in JSON as `{"created_on": "2012-08-27"}`. In a given application, the developer may wish to model this + data as an NSDate `createdOn` property on the target object. An attribute mapping to support this mapping would specify a source + key path of `created_on` and a destination key path of `createdOn`. On the destination object, the `createdOn` property would be defined + as `@property (nonatomic, strong) NSDate *createdOn;`. At mapping time, the mapping operation inspects the type of the content being + mapped and attempts to transform the source content into the type of the desination property specified by the mapping. In this case, + an NSDateFormatter object would be used to process the inbound `NSString` into an outbound `NSDate` object. + + @param sourceKeyPath The key path on the source object from which to read the data being mapped. + @param destinationKeyPath The key path on the destination object on which to set the mapped data. + @return A newly created attribute mapping object that is ready to be added to an object mapping. + */ ++ (RKAttributeMapping *)attributeMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath; + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKAttributeMapping.m b/Pods/RestKit/Code/ObjectMapping/RKAttributeMapping.m new file mode 100644 index 00000000..3a479f32 --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKAttributeMapping.m @@ -0,0 +1,40 @@ +// +// RKAttributeMapping.m +// RestKit +// +// Created by Blake Watters on 4/30/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKAttributeMapping.h" + +@interface RKAttributeMapping () +@property (nonatomic, strong, readwrite) NSString *sourceKeyPath; +@property (nonatomic, strong, readwrite) NSString *destinationKeyPath; +@end + +@implementation RKAttributeMapping + ++ (RKAttributeMapping *)attributeMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath +{ + NSParameterAssert(sourceKeyPath); + NSParameterAssert(destinationKeyPath); + RKAttributeMapping *attributeMapping = [self new]; + attributeMapping.sourceKeyPath = sourceKeyPath; + attributeMapping.destinationKeyPath = destinationKeyPath; + return attributeMapping; +} + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKConnectionMapping.h b/Pods/RestKit/Code/ObjectMapping/RKConnectionMapping.h new file mode 100644 index 00000000..e83aa88e --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKConnectionMapping.h @@ -0,0 +1,135 @@ +// +// RKConnectionMapping.h +// RestKit +// +// Created by Charlie Savage on 5/15/12. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import <Foundation/Foundation.h> +#import <CoreData/CoreData.h> +#import "RKMapping.h" +#import "RKPropertyMapping.h" + +@class RKConnectionMapping, RKDynamicMappingMatcher; +@protocol RKManagedObjectCaching; + +// Defines the rules for connecting relationsips +/** + Instructs RestKit to connect a relationship of the object being mapped to the + appropriate target object(s). It does this by using the value of the object's + fromKeyPath attribute to query instances of the target entity that have the + same value in their toKeyPath attribute. + + Note that connectRelationship runs *after* an object's attributes have been + mapped and is dependent upon the results of those mappings. Also, connectRelationship + will never create a new object - it simply looks up existing objects. In effect, + connectRelationship allows foreign key relationships between managed objects + to be automatically maintained from the server to the underlying Core Data object graph. + + For example, given a Project object associated with a User, where the 'user' relationship is + specified by a userID property on the managed object: + + [mapping connectRelationship:@"user" withMapping:userMapping fromKeyPath:@"userId" toKeyPath:@"id"]; + + Will hydrate the 'user' association on the managed object with the object + in the local object graph having the primary key specified in the managed object's + userID property. + + You can also do the reverse. Given a User object associated with a Project, with a + 'project' relationship: + + [mapping connectRelationship:@"project" fromKeyPath:@"id" toKeyPath:@"userId" withMapping:projectMapping]; + */ +//- (void)connectRelationship:(NSString *)relationshipName fromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath withMapping:(RKMapping *)objectOrDynamicMapping DEPRECATED_ATTRIBUTE; + +/** + Conditionally connect a relationship of the object being mapped when the object being mapped has + keyPath equal to a specified value. + + For example, given a Project object associated with a User, where the 'admin' relationship is + specified by a adminID property on the managed object: + + [mapping connectRelationship:@"admin" fromKeyPath:@"adminId" toKeyPath:@"id" withMapping:userMapping whenValueOfKeyPath:@"userType" isEqualTo:@"Admin"]; + + Will hydrate the 'admin' association on the managed object with the object + in the local object graph having the primary key specified in the managed object's + userID property. Note that this connection will only occur when the Product's 'userType' + property equals 'Admin'. In cases where no match occurs, the relationship connection is skipped. + + @see connectRelationship:withObjectForPrimaryKeyAttribute: + */ +// - (void)connectRelationship:(NSString *)relationshipName fromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath withMapping:(RKMapping *)objectOrDynamicMapping whenValueOfKeyPath:(NSString *)keyPath isEqualTo:(id)value DEPRECATED_ATTRIBUTE; +/** + Conditionally connect a relationship of the object being mapped when the object being mapped has + block evaluate to YES. This variant is useful in cases where you want to execute an arbitrary + block to determine whether or not to connect a relationship. + + For example, given a Project object associated with a User, where the 'admin' relationship is + specified by a adminID property on the managed object: + + [mapping connectRelationship:@"admin" fromKeyPath:@"adminId" toKeyPath:@"adminID" withMapping:userMapping usingEvaluationBlock:^(id data) { + return [User isAuthenticated]; + }]; + + Will hydrate the 'admin' association on the managed object with the object + in the local object graph having the primary key specified in the managed object's + userID property. Note that this connection will only occur when the provided block evalutes to YES. + In cases where no match occurs, the relationship connection is skipped. + + @see connectRelationship:withObjectForPrimaryKeyAttribute: + */ + +@interface RKConnectionMapping : RKPropertyMapping + +@property (nonatomic, strong, readonly) NSRelationshipDescription *relationship; + +@property (nonatomic, strong, readonly) RKDynamicMappingMatcher *matcher; // Can be nil + +// Returns YES if the receiver describes a connection between entities that is established +// using Foreign Key lookup via a Core Data Fetch Request +- (BOOL)isForeignKeyConnection; + +// Returns YES if the receiver describes a connection between entities that is established +// using Key Path traversal of the receiver's object graph +- (BOOL)isKeyPathConnection; +/** + Initializes the receiver with a relationship name, source key path, destination key path, mapping, and matcher. + */ +///** +// Defines a mapping that is used to connect a source object relationship to +// the appropriate target object(s). +// +// @param relationshipName The name of the relationship on the source object. +// @param sourceKeyPath Specifies the path to an attribute on the source object that +// contains the value that should be used to connect the relationship. This will generally +// be a primary key or a foreign key value. +// @param targetKeyPath Specifies the path to an attribute on the target object(s) that +// must match the value of the sourceKeyPath attribute. +// @param withMapping The mapping for the target object. +// +// @return A new instance of a RKObjectConnectionMapping. +// */ +///** +// Defines a mapping that is used to connect a source object relationship to +// the appropriate target object(s). This is similar to mapping:fromKeyPath:toKeyPath:withMapping: +// (@see mapping:fromKeyPath:toKeyPath:withMapping:) but adds in an additional matcher parameter +// that can be used to filter source objects. +// +// @return A new instance of a RKObjectConnectionMapping. +// */ +- (id)initWithRelationship:(NSRelationshipDescription *)relationship sourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath matcher:(RKDynamicMappingMatcher *)matcher; + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKConnectionMapping.m b/Pods/RestKit/Code/ObjectMapping/RKConnectionMapping.m new file mode 100644 index 00000000..bd2f7989 --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKConnectionMapping.m @@ -0,0 +1,136 @@ +// +// RKConnectionMapping.m +// RestKit +// +// Created by Charlie Savage on 5/15/12. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKConnectionMapping.h" +#import "RKEntityMapping.h" +#import "RKObjectManager.h" +#import "RKManagedObjectCaching.h" +#import "RKDynamicMappingMatcher.h" + +// Provides support for connecting a relationship by +@interface RKForeignKeyConnectionMapping : RKConnectionMapping +@end + +// Provides support for connecting a relationship by traversing the object graph +@interface RKKeyPathConnectionMapping : RKConnectionMapping +@end + +@interface RKConnectionMapping () +@property (nonatomic, strong, readwrite) NSRelationshipDescription *relationship; +@property (nonatomic, strong, readwrite) NSString *sourceKeyPath; +@property (nonatomic, strong, readwrite) NSString *destinationKeyPath; +@property (nonatomic, strong, readwrite) RKDynamicMappingMatcher *matcher; +@end + +@implementation RKConnectionMapping + +- (Class)connectionMappingClassForRelationship:(NSRelationshipDescription *)relationship sourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath +{ + NSEntityDescription *sourceEntity = relationship.entity; + NSEntityDescription *destinationEntity = relationship.destinationEntity; + + if ([[sourceEntity attributesByName] objectForKey:sourceKeyPath] && [[destinationEntity attributesByName] objectForKey:destinationKeyPath]) { + return [RKForeignKeyConnectionMapping class]; + } else { + return [RKKeyPathConnectionMapping class]; + } +} + +- (id)initWithRelationship:(NSRelationshipDescription *)relationship sourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath matcher:(RKDynamicMappingMatcher *)matcher +{ + NSParameterAssert(relationship); + NSParameterAssert(sourceKeyPath); + NSParameterAssert(destinationKeyPath); + + Class connectionClass = [self connectionMappingClassForRelationship:relationship sourceKeyPath:sourceKeyPath destinationKeyPath:destinationKeyPath]; + self = [[connectionClass alloc] init]; + if (self) { + self.relationship = relationship; + self.sourceKeyPath = sourceKeyPath; + self.destinationKeyPath = destinationKeyPath; + self.matcher = matcher; + } + + return self; +} + +- (id)init +{ + if ([self class] == [RKConnectionMapping class]) { + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"%@ Failed to call designated initializer. " + "Invoke initWithRelationship:sourceKeyPath:destinationKeyPath:matcher: instead.", + NSStringFromClass([self class])] + userInfo:nil]; + } + return [super init]; +} + +- (id)copyWithZone:(NSZone *)zone +{ + return [[[self class] allocWithZone:zone] initWithRelationship:self.relationship + sourceKeyPath:self.sourceKeyPath + destinationKeyPath:self.destinationKeyPath + matcher:self.matcher]; +} + +- (BOOL)isForeignKeyConnection +{ + return NO; +} + +- (BOOL)isKeyPathConnection +{ + return NO; +} + +@end + + +@implementation RKForeignKeyConnectionMapping + +- (BOOL)isForeignKeyConnection +{ + return YES; +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"<%@:%p connecting Relationship '%@' from Entity '%@' with sourceKeyPath=%@ to Destination Entity '%@' with destinationKeyPath=%@>", + NSStringFromClass([self class]), self, self.relationship.name, self.relationship.entity.name, self.sourceKeyPath, + self.relationship.destinationEntity.name, self.self.destinationKeyPath]; +} + +@end + +@implementation RKKeyPathConnectionMapping + +- (BOOL)isKeyPathConnection +{ + return YES; +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"<%@:%p connecting Relationship '%@' of Entity '%@' with keyPath=%@>", + NSStringFromClass([self class]), self, self.relationship.name, self.relationship.entity.name, self.sourceKeyPath]; +} + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKDynamicMapping.h b/Pods/RestKit/Code/ObjectMapping/RKDynamicMapping.h new file mode 100644 index 00000000..48d3f5cb --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKDynamicMapping.h @@ -0,0 +1,76 @@ +// +// RKDynamicMapping.h +// RestKit +// +// Created by Blake Watters on 7/28/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKMapping.h" +#import "RKObjectMapping.h" + +typedef RKObjectMapping *(^RKDynamicMappingDelegateBlock)(id representation); + +/** + Defines a dynamic object mapping that determines the appropriate concrete object mapping to apply at mapping time. This allows you to map very similar payloads differently depending on the type of data contained therein. + */ +@interface RKDynamicMapping : RKMapping + +///------------------------------------ +/// @name Configuring Mapping Selection +///------------------------------------ + +/** + Sets a block to be invoked to determine the appropriate concrete object mapping with which to map an object representation. + + @param block The block object to invoke to select the object mapping with which to map the given object representation. + */ +- (void)setObjectMappingForRepresentationBlock:(RKDynamicMappingDelegateBlock)block; + +/** + Defines a dynamic mapping rule stating that when the value of the key property matches the specified value, the given mapping should be used to map the representation. + + For example, suppose that we have a JSON fragment for a person that we want to map differently based on the gender of the person. When the gender is 'male', we want to use the Boy class and when then the gender is 'female' we want to use the Girl class. We might define our dynamic mapping like so: + + RKDynamicMapping *mapping = [RKDynamicMapping new]; + [mapping setObjectMapping:boyMapping whenValueOfKeyPath:@"gender" isEqualTo:@"male"]; + [mapping setObjectMapping:boyMapping whenValueOfKeyPath:@"gender" isEqualTo:@"female"]; + + @param objectMapping The mapping to be used when the value at the given key path is equal to the given value. + @param keyPath The key path to retrieve the comparison value from in the object representation being mapped. + @param value The value to be compared with the value at `keyPath`. If they are equal, the `objectMapping` will be used to map the representation. + */ +- (void)setObjectMapping:(RKObjectMapping *)objectMapping whenValueOfKeyPath:(NSString *)keyPath isEqualTo:(id)value; + +/** + Returns an array of object mappings that have been registered with the receiver. + + @return An array of `RKObjectMapping` objects registered with the receiver. + */ +@property (nonatomic, readonly) NSArray *objectMappings; + +///----------------------------------------------------------------- +/// @name Retrieving the Object Mapping for an Object Representation +///----------------------------------------------------------------- + +/** + Invoked by the `RKMapperOperation` and `RKMappingOperation` to determine the appropriate `RKObjectMapping` to use when mapping the given object representation. + + @param representation The object representation that being mapped dynamically for which to determine the appropriate concrete mapping. + @return The object mapping to be used to map the given object representation. + */ +- (RKObjectMapping *)objectMappingForRepresentation:(id)representation; + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKDynamicMapping.m b/Pods/RestKit/Code/ObjectMapping/RKDynamicMapping.m new file mode 100644 index 00000000..76f99bd6 --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKDynamicMapping.m @@ -0,0 +1,87 @@ +// +// RKDynamicMapping.m +// RestKit +// +// Created by Blake Watters on 7/28/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKDynamicMapping.h" +#import "RKDynamicMappingMatcher.h" +#import "RKLog.h" + +// Set Logging Component +#undef RKLogComponent +#define RKLogComponent RKlcl_cRestKitObjectMapping + +@interface RKDynamicMapping () +@property (nonatomic, strong) NSMutableArray *matchers; +@property (nonatomic, copy) RKDynamicMappingDelegateBlock objectMappingForRepresentationBlock; +@end + +@implementation RKDynamicMapping + +- (id)init +{ + self = [super init]; + if (self) { + self.matchers = [NSMutableArray new]; + } + + return self; +} + +- (NSArray *)objectMappings +{ + return [self.matchers valueForKey:@"objectMapping"]; +} + +- (void)setObjectMapping:(RKObjectMapping *)objectMapping whenValueOfKeyPath:(NSString *)keyPath isEqualTo:(id)expectedValue +{ + RKLogDebug(@"Adding dynamic object mapping for key '%@' with value '%@' to destination class: %@", keyPath, expectedValue, NSStringFromClass(objectMapping.objectClass)); + RKDynamicMappingMatcher *matcher = [[RKDynamicMappingMatcher alloc] initWithKeyPath:keyPath expectedValue:expectedValue objectMapping:objectMapping]; + [_matchers addObject:matcher]; +} + +- (RKObjectMapping *)objectMappingForRepresentation:(id)representation +{ + RKObjectMapping *mapping = nil; + + RKLogTrace(@"Performing dynamic object mapping for object representation: %@", representation); + + // Consult the declarative matchers first + for (RKDynamicMappingMatcher *matcher in _matchers) { + if ([matcher matches:representation]) { + RKLogTrace(@"Found declarative match for matcher: %@.", matcher); + return matcher.objectMapping; + } + } + + // Otherwise consult the block + if (self.objectMappingForRepresentationBlock) { + mapping = self.objectMappingForRepresentationBlock(representation); + if (mapping) RKLogTrace(@"Determined concrete `RKObjectMapping` using object mapping for representation block"); + } + + return mapping; +} + +- (BOOL)isEqualToMapping:(RKMapping *)otherMapping +{ + // Comparison of dynamic mappings is not currently supported + return NO; +} + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKDynamicMappingMatcher.h b/Pods/RestKit/Code/ObjectMapping/RKDynamicMappingMatcher.h new file mode 100644 index 00000000..cd9367ef --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKDynamicMappingMatcher.h @@ -0,0 +1,67 @@ +// +// RKDynamicMappingMatcher.h +// RestKit +// +// Created by Jeff Arena on 8/2/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// + +#import <Foundation/Foundation.h> +#import "RKObjectMapping.h" + +/** + The `RKDynamicMappingMatcher` class provides an interface for encapsulating the selection of an object mapping based on the runtime value of a property at a given key path. A matcher object is initialized with a key path, an expected value to be read from the key path, and an object mapping that is to be applied if the match evaluates to `YES`. When evaluating the match, the matcher invokes `valueForKeyPath:` on the object being matched and compares the value returned with the `expectedValue` via the `RKObjectIsEqualToObject` function. + + @see `RKObjectIsEqualToObject()` + */ +// TODO: better name? RKKeyPathMappingMatcher | RKMappingMatcher | RKKeyPathMatcher | RKMatcher | RKValueMatcher | RKPropertyMatcher +@interface RKDynamicMappingMatcher : NSObject + +///----------------------------- +/// @name Initializing a Matcher +///----------------------------- + +/** + Initializes the receiver with a given key path, expected value, and an object mapping that applies in the event of a positive match. + + @param keyPath The key path to obtain the comparison value from the object being matched via `valueForKeyPath:`. + @param expectedValue The value that is expected to be read from `keyPath` if there is a match. + @param objectMapping The object mapping object that applies if the comparison value is equal to the expected value. + @return The receiver, initialized with the given key path, expected value, and object mapping. + */ +- (id)initWithKeyPath:(NSString *)keyPath expectedValue:(id)expectedValue objectMapping:(RKObjectMapping *)objectMapping; + +///----------------------------- +/// @name Initializing a Matcher +///----------------------------- + +/** + The key path to obtain the comparison value from the object being matched via `valueForKeyPath:`. + */ +@property (nonatomic, copy, readonly) NSString *keyPath; + +/** + The value that is expected to be read from `keyPath` if there is a match. + */ +@property (nonatomic, strong, readonly) id expectedValue; + +/** + The object mapping object that applies if the comparison value read from `keyPath` is equal to the `expectedValue`. + */ +@property (nonatomic, strong, readonly) RKObjectMapping *objectMapping; + +///------------------------- +/// @name Evaluating a Match +///------------------------- + +/** + Returns a Boolean value that indicates if the given object matches the expectations of the receiver. + + The match is evaluated by invoking `valueForKeyPath:` on the give object with the value of the `keyPath` property and comparing the returned value with the `expectedValue` using the `RKObjectIsEqualToObject` function. + + @param object The object to be evaluated. + @return `YES` if the object matches the expectations of the receiver, else `NO`. + */ +- (BOOL)matches:(id)object; + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKDynamicMappingMatcher.m b/Pods/RestKit/Code/ObjectMapping/RKDynamicMappingMatcher.m new file mode 100644 index 00000000..424f8e1e --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKDynamicMappingMatcher.m @@ -0,0 +1,44 @@ +// +// RKDynamicMappingMatcher.m +// RestKit +// +// Created by Jeff Arena on 8/2/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// + +#import "RKDynamicMappingMatcher.h" +#import "RKObjectUtilities.h" + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@interface RKDynamicMappingMatcher () +@property (nonatomic, copy) NSString *keyPath; +@property (nonatomic, strong, readwrite) id expectedValue; +@property (nonatomic, strong, readwrite) RKObjectMapping *objectMapping; +@end + +@implementation RKDynamicMappingMatcher + +- (id)initWithKeyPath:(NSString *)keyPath expectedValue:(id)expectedValue objectMapping:(RKObjectMapping *)objectMapping +{ + self = [super init]; + if (self) { + self.keyPath = keyPath; + self.expectedValue = expectedValue; + self.objectMapping = objectMapping; + } + + return self; +} + +- (BOOL)matches:(id)object +{ + return RKObjectIsEqualToObject([object valueForKeyPath:self.keyPath], self.expectedValue); +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"<%@: %p when `%@` == '%@' objectMapping: %@>", NSStringFromClass([self class]), self, self.keyPath, self.expectedValue, self.objectMapping]; +} + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKErrorMessage.h b/Pods/RestKit/Code/ObjectMapping/RKErrorMessage.h new file mode 100644 index 00000000..929d1fde --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKErrorMessage.h @@ -0,0 +1,48 @@ +// +// RKError.h +// RestKit +// +// Created by Jeremy Ellison on 5/10/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import <Foundation/Foundation.h> + +/** + The `RKErrorMessage` is a simple class used for representing error messages returned by a remote backend system with which the client application is communicating. Error messages are typically returned in a response body in the Client Error class (status code 4xx range). + + ## Error Message Informal Protocol + + The `errorMessage` property method is the sole method of an informal protocol that must be adopted by objects wishing to represent error messages within RestKit. This protocol is by the `RKErrorFromMappingResult` function when constructing `NSError` messages from a mapped response body. + + @see `RKErrorFromMappingResult` + */ +@interface RKErrorMessage : NSObject + +///----------------------------------- +/// @name Accessing Errror Information +///----------------------------------- + +/** + The error message to be presented to the user. + */ +@property (nonatomic, copy) NSString *errorMessage; + +/** + A dictionary of application specific information that accompanies the error message. + */ +@property (nonatomic, copy) NSDictionary *userInfo; + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKErrorMessage.m b/Pods/RestKit/Code/ObjectMapping/RKErrorMessage.m new file mode 100644 index 00000000..6ff7bc85 --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKErrorMessage.m @@ -0,0 +1,31 @@ +// +// RKError.m +// RestKit +// +// Created by Jeremy Ellison on 5/10/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKErrorMessage.h" + +@implementation RKErrorMessage + +- (NSString *)description +{ + return [NSString stringWithFormat:@"<%@:%p error message = \"%@\" userInfo = %@>", + NSStringFromClass([self class]), self, self.errorMessage, self.userInfo]; +} + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKHTTPUtilities.h b/Pods/RestKit/Code/ObjectMapping/RKHTTPUtilities.h new file mode 100644 index 00000000..2fdca7d3 --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKHTTPUtilities.h @@ -0,0 +1,119 @@ +// +// RKHTTPUtilities.h +// RestKit +// +// Created by Blake Watters on 8/24/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import <Foundation/Foundation.h> + +/** + HTTP methods for requests + */ +typedef enum RKRequestMethod { + RKRequestMethodInvalid = -1, + RKRequestMethodGET, + RKRequestMethodPOST, + RKRequestMethodPUT, + RKRequestMethodDELETE, + RKRequestMethodHEAD, + RKRequestMethodPATCH, + RKRequestMethodOPTIONS +} RKRequestMethod; // RKHTTPMethod? RKStringFromHTTPMethod... RKHTTPMethodFromString + +/** + Returns the corresponding string for value for a given HTTP request method. + + For example, given `RKRequestMethodGET` would return `@"GET"`. + */ +NSString * RKStringFromRequestMethod(RKRequestMethod); + +/** + Returns the corresponding request method value for a given string. + + For example, given `@"PUT"` would return `@"RKRequestMethodPUT"` + */ +RKRequestMethod RKRequestMethodFromString(NSString *); + +/** + The HTTP status code classes + + See http://tools.ietf.org/html/rfc2616#section-10 + */ +enum { + RKStatusCodeClassInformational = 100, + RKStatusCodeClassSuccessful = 200, + RKStatusCodeClassRedirection = 300, + RKStatusCodeClassClientError = 400, + RKStatusCodeClassServerError = 500 +}; +typedef NSUInteger RKStatusCodeClass; + +/** + Creates a new range covering the status codes in the given class. + + @param statusCodeClass The status code class to create a range covering. + @return A new range covering the status codes in the given class. + */ +NSRange RKStatusCodeRangeForClass(RKStatusCodeClass statusCodeClass); + +/** + Creates a new index set covering the status codes in the given class. + + @param statusCodeClass The status code class to create an index set covering. + @return A new index set covering the status codes in the given class. + */ +NSIndexSet *RKStatusCodeIndexSetForClass(RKStatusCodeClass statusCodeClass); + +// TODO: Implement these guys... +//NSString * RKStringFromStatusCode(NSInteger statusCode); +//NSInteger RKStatusCodeFromString(NSString *statusCode); + +/** + Parse HTTP Date: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 + */ +NSDate *RKDateFromHTTPDateString(NSString *); + +/** + Returns the cache expiration data from a dictionary of HTTP response headers as appropriate for the given status code. If the status code is not cachable, `nil` is returned. + + @param headers The HTTP response headers from which to extract the cache expiration date. + @param statusCode The HTTP response status code of the response. + @return The expiration date as specified by the cache headers or `nil` if none was found. + */ +NSDate *RKHTTPCacheExpirationDateFromHeadersWithStatusCode(NSDictionary *headers, NSInteger statusCode); + +/** + Returns a Boolean value that indicates if a given URL is relative to another URL. + + This method does not rely on the `baseURL` method of `NSURL` as it only indicates a relationship between the initialization of two URL objects. The relativity of the given URL is assessed by evaluating a prefix match of the URL's absolute string value with the absolute string value of the potential base URL. + + @param URL The URL to assess the relativity of. + @param baseURL The base URL to determine if the given URL is relative to. + @return `YES` is URL is relative to the base URL, else `NO`. + */ +BOOL RKURLIsRelativeToURL(NSURL *URL, NSURL *baseURL); + +/** + Returns a string object containing the relative path and query string of a given URL object and a base URL that the given URL is relative to. + + If the given URL is found not to be relative to the baseURL, `nil` is returned. + + @param URL The URL to retrieve the relative path and query string of. + @param baseURL The base URL to be omitted from the returned path and query string. + @return A string containing the relative path and query parameters. + */ +NSString *RKPathAndQueryStringFromURLRelativeToURL(NSURL *URL, NSURL *baseURL); diff --git a/Pods/RestKit/Code/ObjectMapping/RKHTTPUtilities.m b/Pods/RestKit/Code/ObjectMapping/RKHTTPUtilities.m new file mode 100644 index 00000000..08005e44 --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKHTTPUtilities.m @@ -0,0 +1,423 @@ +// +// RKHTTPUtilities.m +// RestKit +// +// Created by Blake Watters on 8/24/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKHTTPUtilities.h" + +NSUInteger RKStatusCodeRangeLength = 100; + +NSRange RKStatusCodeRangeForClass(RKStatusCodeClass statusCodeClass) +{ + return NSMakeRange(statusCodeClass, RKStatusCodeRangeLength); +} + +NSIndexSet *RKStatusCodeIndexSetForClass(RKStatusCodeClass statusCodeClass) +{ + return [NSIndexSet indexSetWithIndexesInRange:RKStatusCodeRangeForClass(statusCodeClass)]; +} + +NSString *RKStringFromRequestMethod(RKRequestMethod method) +{ + switch (method) { + case RKRequestMethodGET: return @"GET"; + case RKRequestMethodPOST: return @"POST"; + case RKRequestMethodPUT: return @"PUT"; + case RKRequestMethodPATCH: return @"PATCH"; + case RKRequestMethodDELETE: return @"DELETE"; + case RKRequestMethodHEAD: return @"HEAD"; + case RKRequestMethodOPTIONS: return @"OPTIONS"; + default: break; + } + return nil; +} + +RKRequestMethod RKRequestMethodFromString(NSString *methodName) +{ + if ([methodName isEqualToString:@"GET"]) return RKRequestMethodGET; + else if ([methodName isEqualToString:@"POST"]) return RKRequestMethodPOST; + else if ([methodName isEqualToString:@"PUT"]) return RKRequestMethodPUT; + else if ([methodName isEqualToString:@"DELETE"]) return RKRequestMethodDELETE; + else if ([methodName isEqualToString:@"HEAD"]) return RKRequestMethodHEAD; + else if ([methodName isEqualToString:@"PATCH"]) return RKRequestMethodPATCH; + else if ([methodName isEqualToString:@"OPTIONS"]) return RKRequestMethodOPTIONS; + else return RKRequestMethodInvalid; +} + +/** + Below is ragel source used to compile those tables. The output was polished / pretty-printed and tweaked from ragel. + As the generated code is "hard" to debug, we store the code in http-date.r1 + + shell% ragel -F1 http-date.rl + shell% gcc -o http-date http-date.c + shell% ./http-date 'Sun, 06 Nov 1994 08:49:37 GMT' 'Sunday, 06-Nov-94 08:49:37 GMT' 'Sun Nov 6 08:49:37 1994' 'Sat Dec 24 14:34:26 2037' 'Sunday, 06-Nov-94 08:49:37 GMT' 'Sun, 06 Nov 1994 08:49:37 GMT' + */ +static const char _httpDate_trans_keys[] = { + 0, 0, 70, 87, 114, 114, 105, 105, 32, 100, 65, 83, 112, 117, 114, 114, 32, + 32, 32, 57, 48, 57, 32, 32, 48, 57, 48, 57, 58, 58, 48, 57, 48, 57, + 58, 58, 48, 57, 48, 57, 32, 32, 48, 57, 48, 57, 48, 57, 48, 57, 103, + 103, 101, 101, 99, 99, 101, 101, 98, 98, 97, 117, 110, 110, 108, 110, 97, 97, + 114, 121, 111, 111, 118, 118, 99, 99, 116, 116, 101, 101, 112, 112, 32, 32, 48, + 57, 48, 57, 32, 32, 65, 83, 112, 117, 114, 114, 32, 32, 48, 57, 48, 57, + 48, 57, 48, 57, 32, 32, 48, 57, 48, 57, 58, 58, 48, 57, 48, 57, 58, + 58, 48, 57, 48, 57, 32, 32, 71, 71, 77, 77, 84, 84, 103, 103, 101, 101, + 99, 99, 101, 101, 98, 98, 97, 117, 110, 110, 108, 110, 97, 97, 114, 121, 111, + 111, 118, 118, 99, 99, 116, 116, 101, 101, 112, 112, 97, 97, 121, 121, 44, 44, + 32, 32, 48, 57, 48, 57, 45, 45, 65, 83, 112, 117, 114, 114, 45, 45, 48, + 57, 48, 57, 32, 32, 48, 57, 48, 57, 58, 58, 48, 57, 48, 57, 58, 58, + 48, 57, 48, 57, 32, 32, 71, 71, 77, 77, 84, 84, 103, 103, 101, 101, 99, + 99, 101, 101, 98, 98, 97, 117, 110, 110, 108, 110, 97, 97, 114, 121, 111, 111, + 118, 118, 99, 99, 116, 116, 101, 101, 112, 112, 111, 111, 110, 110, 97, 117, 116, + 116, 32, 117, 114, 114, 100, 100, 104, 117, 117, 117, 32, 114, 115, 115, 101, 101, + 32, 115, 101, 101, 100, 100, 32, 110, 101, 101, 0, 0, 0, 0, 0, 0, 0 +}; + +static const char _httpDate_key_spans[] = { + 0, 18, 1, 1, 69, 19, 6, 1, 1, 26, 10, 1, 10, 10, 1, 10, 10, + 1, 10, 10, 1, 10, 10, 10, 10, 1, 1, 1, 1, 1, 21, 1, 3, 1, + 8, 1, 1, 1, 1, 1, 1, 1, 10, 10, 1, 19, 6, 1, 1, 10, 10, + 10, 10, 1, 10, 10, 1, 10, 10, 1, 10, 10, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 21, 1, 3, 1, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 10, 10, 1, 19, 6, 1, 1, 10, 10, 1, 10, 10, 1, 10, 10, 1, + 10, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 21, 1, 3, 1, 8, 1, + 1, 1, 1, 1, 1, 1, 1, 21, 1, 86, 1, 1, 14, 1, 83, 1, 1, + 84, 1, 1, 79, 1, 0, 0, 0 +}; + +static const short _httpDate_index_offsets[] = { + 0, 0, 19, 21, 23, 93, 113, 120, 122, 124, 151, 162, 164, 175, 186, 188, 199, + 210, 212, 223, 234, 236, 247, 258, 269, 280, 282, 284, 286, 288, 290, 312, 314, 318, + 320, 329, 331, 333, 335, 337, 339, 341, 343, 354, 365, 367, 387, 394, 396, 398, 409, + 420, 431, 442, 444, 455, 466, 468, 479, 490, 492, 503, 514, 516, 518, 520, 522, 524, + 526, 528, 530, 532, 554, 556, 560, 562, 571, 573, 575, 577, 579, 581, 583, 585, 587, + 589, 591, 602, 613, 615, 635, 642, 644, 646, 657, 668, 670, 681, 692, 694, 705, 716, + 718, 729, 740, 742, 744, 746, 748, 750, 752, 754, 756, 758, 780, 782, 786, 788, 797, + 799, 801, 803, 805, 807, 809, 811, 813, 835, 837, 924, 926, 928, 943, 945, 1029, 1031, + 1033, 1118, 1120, 1122, 1202, 1204, 1205, 1206 +}; + +static const unsigned char _httpDate_indicies[] = { + 0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 4, 1, 1, + 5, 1, 6, 1, 7, 1, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 10, 1, 11, 1, 1, 12, 1, 13, 1, 1, 1, + 14, 1, 1, 15, 16, 17, 1, 1, 1, 18, 1, 19, 1, 1, 1, 1, 20, + 1, 21, 1, 22, 1, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 1, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 1, 26, 1, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 1, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 1, 29, + 1, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 1, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 1, 32, 1, 33, 33, 33, 33, 33, 33, 33, 33, 33, + 33, 1, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 1, 35, 1, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 36, 1, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 1, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 1, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 1, 40, 1, 41, 1, 42, 1, 43, 1, 44, + 1, 45, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 46, 1, 47, 1, 48, 1, 49, 1, 50, 1, 51, 1, 1, + 1, 1, 1, 1, 52, 1, 53, 1, 54, 1, 55, 1, 56, 1, 57, 1, 58, + 1, 59, 1, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 1, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 1, 62, 1, 63, 1, 1, 64, 1, 65, 1, + 1, 1, 66, 1, 1, 67, 68, 69, 1, 1, 1, 70, 1, 71, 1, 1, 1, + 1, 72, 1, 73, 1, 74, 1, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, + 1, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 1, 77, 77, 77, 77, 77, + 77, 77, 77, 77, 77, 1, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 1, + 79, 1, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 1, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 1, 82, 1, 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 1, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 1, 85, 1, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 1, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 1, 88, 1, 89, 1, 90, 1, 91, 1, 92, 1, 93, 1, 94, + 1, 95, 1, 96, 1, 97, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 98, 1, 99, 1, 100, 1, 101, 1, 102, + 1, 103, 1, 1, 1, 1, 1, 1, 104, 1, 105, 1, 106, 1, 107, 1, 108, + 1, 109, 1, 110, 1, 111, 1, 112, 1, 113, 1, 114, 1, 115, 115, 115, 115, + 115, 115, 115, 115, 115, 115, 1, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 1, 117, 1, 118, 1, 1, 119, 1, 120, 1, 1, 1, 121, 1, 1, 122, 123, + 124, 1, 1, 1, 125, 1, 126, 1, 1, 1, 1, 127, 1, 128, 1, 129, 1, + 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 1, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 1, 132, 1, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, + 1, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 1, 135, 1, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 1, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 1, 138, 1, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 1, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 1, 141, 1, 142, 1, 143, 1, 144, 1, + 145, 1, 146, 1, 147, 1, 148, 1, 149, 1, 150, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 151, 1, 152, 1, + 153, 1, 154, 1, 155, 1, 156, 1, 1, 1, 1, 1, 1, 157, 1, 158, 1, + 159, 1, 160, 1, 161, 1, 162, 1, 163, 1, 164, 1, 7, 1, 165, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 164, 1, 166, 1, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 167, 1, 168, 1, 10, 1, 169, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 170, 1, 171, 1, 8, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 172, 1, 168, 1, 173, 1, 8, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 168, 1, 174, 1, 175, 1, + 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 176, 1, 172, 1, 1, 1, 1, + 0 +}; + +static const unsigned char _httpDate_trans_targs[] = { + 2, 0, 124, 126, 131, 137, 3, 4, 5, 41, 82, 6, 26, 28, 30, 33, 35, + 37, 39, 7, 25, 8, 9, 10, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 141, 8, 27, 8, 29, 8, 31, 32, 8, 8, 8, 34, + 8, 8, 36, 8, 38, 8, 40, 8, 42, 43, 44, 45, 46, 67, 69, 71, 74, + 76, 78, 80, 47, 66, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 142, 48, 68, 48, 70, 48, 72, 73, 48, 48, 48, + 75, 48, 48, 77, 48, 79, 48, 81, 48, 83, 84, 85, 86, 87, 88, 89, 90, + 109, 111, 113, 116, 118, 120, 122, 91, 108, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 143, 92, 110, 92, 112, 92, 114, 115, 92, + 92, 92, 117, 92, 92, 119, 92, 121, 92, 123, 92, 125, 127, 128, 129, 130, 132, + 135, 133, 134, 136, 138, 139, 140 +}; + +static const char _httpDate_trans_actions[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 2, 2, 0, 3, 3, 0, 4, 4, 0, 5, + 5, 0, 6, 6, 6, 6, 7, 0, 8, 0, 9, 0, 0, 10, 11, 12, 0, + 13, 14, 0, 15, 0, 16, 0, 17, 0, 2, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 6, 6, 6, 6, 0, 3, 3, 0, 4, 4, + 0, 5, 5, 0, 0, 0, 0, 7, 0, 8, 0, 9, 0, 0, 10, 11, 12, + 0, 13, 14, 0, 15, 0, 16, 0, 17, 0, 0, 0, 0, 2, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 6, 18, 0, 3, 3, 0, + 4, 4, 0, 5, 5, 0, 0, 0, 0, 7, 0, 8, 0, 9, 0, 0, 10, + 11, 12, 0, 13, 14, 0, 15, 0, 16, 0, 17, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0 +}; + +static const char _httpDate_eof_actions[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 19, 20, 21 +}; + +static NSDate *_parseHTTPDate(const char *buf, size_t bufLen) { + const char *p = buf, *pe = p + bufLen, *eof = pe; + int parsed = 0, cs = 1; + NSDate *date = NULL; + + CFGregorianDate gdate; + memset(&gdate, 0, sizeof(CFGregorianDate)); + + { + int _slen, _trans; + const char *_keys; + const unsigned char *_inds; + if(p == pe) { goto _test_eof; } + _resume: + _keys = _httpDate_trans_keys + (cs << 1); + _inds = _httpDate_indicies + _httpDate_index_offsets[cs]; + _slen = _httpDate_key_spans[cs]; + _trans = _inds[(_slen > 0) && (_keys[0] <= (*p)) && ((*p) <= _keys[1]) ? (*p) - _keys[0] : _slen]; + cs = _httpDate_trans_targs[_trans]; + + if(_httpDate_trans_actions[_trans] == 0) { goto _again; } + + switch(_httpDate_trans_actions[_trans]) { + case 6: gdate.year = gdate.year * 10 + ((*p) - '0'); break; + case 18: gdate.year = gdate.year * 10 + ((*p) - '0'); gdate.year += 1900; break; + case 10: gdate.month = 1; break; + case 9: gdate.month = 2; break; + case 13: gdate.month = 3; break; + case 1: gdate.month = 4; break; + case 14: gdate.month = 5; break; + case 12: gdate.month = 6; break; + case 11: gdate.month = 7; break; + case 7: gdate.month = 8; break; + case 17: gdate.month = 9; break; + case 16: gdate.month = 10; break; + case 15: gdate.month = 11; break; + case 8: gdate.month = 12; break; + case 2: gdate.day = gdate.day * 10 + ((*p) - '0'); break; + case 3: gdate.hour = gdate.hour * 10 + ((*p) - '0'); break; + case 4: gdate.minute = gdate.minute * 10 + ((*p) - '0'); break; + case 5: gdate.second = gdate.second * 10.0 + ((*p) - '0'); break; + } + + _again: + if( cs == 0) { goto _out; } + if(++p != pe) { goto _resume; } + _test_eof: {} + if(p == eof) { + switch(_httpDate_eof_actions[cs]) { + case 19: parsed = 1; break; + case 20: parsed = 1; break; + case 21: parsed = 1; break; + } + } + + _out: {} + } + + static CFTimeZoneRef gmtTimeZone; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ gmtTimeZone = CFTimeZoneCreateWithTimeIntervalFromGMT(NULL, 0.0); }); + + if(parsed == 1) { date = [NSDate dateWithTimeIntervalSinceReferenceDate:CFGregorianDateGetAbsoluteTime(gdate, gmtTimeZone)]; } + + return(date); +} + +/* + * Parse HTTP Date: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 + */ +NSDate * RKDateFromHTTPDateString(NSString *httpDate) +{ + char stringBuffer[256]; + size_t stringLength = (size_t)CFStringGetLength((__bridge CFStringRef)httpDate); + const char *cStringPtr = (const char *)CFStringGetCStringPtr((__bridge CFStringRef)httpDate, kCFStringEncodingMacRoman); + if(cStringPtr == NULL) { + CFIndex usedBytes = 0L, convertedCount = 0L; + convertedCount = CFStringGetBytes((__bridge CFStringRef)httpDate, CFRangeMake(0L, (CFIndex)stringLength), kCFStringEncodingUTF8, '?', NO, (UInt8 *)stringBuffer, sizeof(stringBuffer) - 1L, &usedBytes); + if(((size_t)convertedCount != stringLength) || (usedBytes < 0L)) { return(NULL); } + stringBuffer[usedBytes] = '\0'; + cStringPtr = (const char *)stringBuffer; + } + return(_parseHTTPDate(cStringPtr, stringLength)); +} + +static float const kRKURLCacheLastModFraction = 0.1f; // 10% since Last-Modified suggested by RFC2616 section 13.2.4 +static float const kRKURLCacheDefault = 3600.0f; // Default cache expiration delay if none defined (1 hour) + +/* + * This method tries to determine the expiration date based on a response headers dictionary. + */ +NSDate * RKHTTPCacheExpirationDateFromHeadersWithStatusCode(NSDictionary *headers, NSInteger statusCode) +{ + if (statusCode != 200 && statusCode != 203 && statusCode != 300 && statusCode != 301 && statusCode != 302 && statusCode != 307 && statusCode != 410) { + // Uncacheable response status code + return nil; + } + + // Check Pragma: no-cache + NSString *pragma = [headers objectForKey:@"Pragma"]; + if (pragma && [pragma isEqualToString:@"no-cache"]) { + // Uncacheable response + return nil; + } + + // Define "now" based on the request + NSString *date = [headers objectForKey:@"Date"]; + // If no Date: header, define now from local clock + NSDate *now = date ? RKDateFromHTTPDateString(date) : [NSDate date]; + + // Look at info from the Cache-Control: max-age=n header + NSString *cacheControl = [[headers objectForKey:@"Cache-Control"] lowercaseString]; + if (cacheControl) + { + NSRange foundRange = [cacheControl rangeOfString:@"no-store"]; + if (foundRange.length > 0) { + // If no-store, the content cannot be cached at all + // See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.2 + return nil; + } + + foundRange = [cacheControl rangeOfString:@"no-cache"]; + if (foundRange.length > 0) { + // If no-cache, we must revalidate with the origin server + // See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.1 + return nil; + } + + NSInteger maxAge; + foundRange = [cacheControl rangeOfString:@"max-age"]; + if (foundRange.length > 0) { + NSScanner *cacheControlScanner = [NSScanner scannerWithString:cacheControl]; + [cacheControlScanner setScanLocation:foundRange.location + foundRange.length]; + [cacheControlScanner scanString:@"=" intoString:nil]; + if ([cacheControlScanner scanInteger:&maxAge]) { + return maxAge > 0 ? [[NSDate alloc] initWithTimeInterval:maxAge sinceDate:now] : nil; + } + } + } + + // If not Cache-Control found, look at the Expires header + NSString *expires = [headers objectForKey:@"Expires"]; + if (expires) { + NSTimeInterval expirationInterval = 0; + NSDate *expirationDate = RKDateFromHTTPDateString(expires); + if (expirationDate) { + expirationInterval = [expirationDate timeIntervalSinceDate:now]; + } + if (expirationInterval > 0) { + // Convert remote expiration date to local expiration date + return [NSDate dateWithTimeIntervalSinceNow:expirationInterval]; + } + else { + // If the Expires header can't be parsed or is expired, do not cache + return nil; + } + } + + if (statusCode == 302 || statusCode == 307) { + // If not explict cache control defined, do not cache those status + return nil; + } + + // If no cache control defined, try some heristic to determine an expiration date + NSString *lastModified = [headers objectForKey:@"Last-Modified"]; + if (lastModified) { + NSTimeInterval age = 0; + NSDate *lastModifiedDate = RKDateFromHTTPDateString(lastModified); + if (lastModifiedDate) { + // Define the age of the document by comparing the Date header with the Last-Modified header + age = [now timeIntervalSinceDate:lastModifiedDate]; + } + return age > 0 ? [NSDate dateWithTimeIntervalSinceNow:(age * kRKURLCacheLastModFraction)] : nil; + } + + // If nothing permitted to define the cache expiration delay nor to restrict its cacheability, use a default cache expiration delay + return [[NSDate alloc] initWithTimeInterval:kRKURLCacheDefault sinceDate:now]; +} + +BOOL RKURLIsRelativeToURL(NSURL *URL, NSURL *baseURL) +{ + return [[URL absoluteString] hasPrefix:[baseURL absoluteString]]; +} + +NSString *RKPathAndQueryStringFromURLRelativeToURL(NSURL *URL, NSURL *baseURL) +{ + if (baseURL) { + if (! RKURLIsRelativeToURL(URL, baseURL)) return nil; + return [[URL absoluteString] substringFromIndex:[[baseURL absoluteString] length]]; + } else { + // NOTE: [URL relativeString] would return the same value as `absoluteString` if URL is not relative to a baseURL + NSString *query = [URL query]; + return (query && [query length]) ? [NSString stringWithFormat:@"%@?%@", [URL path], query] : [URL path]; + } +} diff --git a/Pods/RestKit/Code/ObjectMapping/RKMapperOperation.h b/Pods/RestKit/Code/ObjectMapping/RKMapperOperation.h new file mode 100644 index 00000000..eb5bfff7 --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKMapperOperation.h @@ -0,0 +1,224 @@ +// +// RKMapperOperation.h +// RestKit +// +// Created by Blake Watters on 5/6/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import <CoreData/CoreData.h> +#import <Foundation/Foundation.h> +#import "RKObjectMapping.h" +#import "RKMappingOperation.h" +#import "RKMappingResult.h" +#import "RKMappingOperationDataSource.h" +#import "RKErrors.h" + +@protocol RKMapperOperationDelegate; + +/** + `RKMapperOperation` is an `NSOperation` subclass that implements object mapping for opaque object representations. Given a dictionary or an array of dictionaries that represent objects and a dictionary describing how to map the representations, the mapper will transform the source representations into `NSObject` or `NSManagedObject` instances. Mapper operations are used to map object representations from Foundation object representations, such as those deserialized from a JSON or XML document or loaded from a file. Not all the mappings specified in the mappings dictionary are required to match content in the source object for the operation to succeed. However, if none of the mappable key paths in the mappings dictionary match the source object then the operation will fail and the `error` property will be set to an `NSError` object in the `RKErrorDomain` domain with an error code value of `RKMappingErrorNotFound`. + + `RKMapperOperation` does not actually perform any mapping work. Instead, it instantiates and starts `RKMappingOperation` objects to process the mappable object representations it encounters. + + `RKMapperOperation` is a non-concurrent operation. Execution will occur synchronously on the calling thread unless the operation is enqueued onto an `NSOperationQueue`. + + ## Mappings Dictionary + + The mappings dictionary describes how to object map the source object. The keys of the dictionary are key paths into the `sourceObject` and the values are `RKMapping` objects describing how to map the representations at the corresponding key path. This dictionary based approach enables a single document to contain an arbitrary number of object representations that can be mapped independently. Consider the following example JSON structure: + + { "tags": [ "hacking", "phreaking" ], "authors": [ "Captain Crunch", "Emmanuel Goldstein" ], "magazine": { "title": "2600 The Hacker Quarterly" } } + + Each key in the document could be mapped independently by providing a mapping for the key paths: + + RKObjectMapping *tagMapping = [RKObjectMapping mappingForClass:[Tag class]]; + RKObjectMapping *authorMapping = [RKObjectMapping mappingForClass:[Author class]]; + RKObjectMapping *magazineMapping = [RKObjectMapping mappingForClass:[Magazine class]]; + NSDictionary *mappingsDictionary = @{ @"tag": tagMapping, @"author": authorMapping, @"magazine": magazine }; + + Note that the keys of the dictionary are **key paths**. Deeply nested content can be mapped by specifying the full key path as the key of the mappings dictionary. + + ### The NSNull Key + + A mapping set for the key `[NSNull null]` value has special significance to the mapper operation. When a mapping is encountered with the a null key, the entire `sourceObject` is processed using the given mapping. This provides support for mapping content that does not have an outer nesting attribute. + + ## Data Source + + The data source is used to instantiate new objects or find existing objects to be updated during the mapping process. The object set as the `mappingOperationDataSource` will be set as the `dataSource` for the `RKMappingOperation` objects created by the mapper. + + ## Target Object + + If a `targetObject` is configured on the mapper operation, all mapping work on the `sourceObject` will target the specified object. For transient `NSObject` mappings, this ensures that the properties of an existing object are updated rather than an new object being created for the mapped representation. If an array of representations is being processed and a `targetObject` is provided, it must be a mutable collection object else an exception will be raised. + + ## Core Data + + `RKMapperOperation` supports mapping to Core Data target entities. To do so, it must be configured with an `RKManagedObjectMappingOperationDataSource` object as the data source. + */ +@interface RKMapperOperation : NSOperation + +///-------------------------------------- +/// @name Initializing a Mapper Operation +///-------------------------------------- + +/** + Initializes the operation with a source object and a mappings dictionary. + + @param object An `NSDictionary` or `NSArray` of `NSDictionary` object representations to be mapped into local domain objects. + @param mappingsDictionary An `NSDictionary` wherein the keys are mappable key paths in `object` and the values are `RKMapping` objects specifying how the representations at its key path are to be mapped. + @return The receiver, initialized with the given object and and dictionary of key paths to mappings. + */ +- (id)initWithObject:(id)object mappingsDictionary:(NSDictionary *)mappingsDictionary; + +///------------------------------------------ +/// @name Accessing Mapping Result and Errors +///------------------------------------------ + +/** + The error, if any, that occurred during the mapping process. + */ +@property (nonatomic, strong, readonly) NSError *error; + +/** + The result of the mapping process. A `nil` value indicates that no mappable object representations were found and no mapping was performed. + */ +@property (nonatomic, strong, readonly) RKMappingResult *mappingResult; + +///------------------------------------- +/// @name Managing Mapping Configuration +///------------------------------------- + +/** + The source object representation against which the mapping is performed. + + Either an `NSDictionary` or an `NSArray` of `NSDictionary` objects. + */ +@property (nonatomic, strong, readonly) id sourceObject; + +/** + A dictionary of key paths to `RKMapping` objects specifying how object representations in the `sourceObject` are to be mapped. + + Please see the above discussion for in-depth details about the mappings dictionary. + */ +@property (nonatomic, strong, readonly) NSDictionary *mappingsDictionary; + +/** + The target object of the mapper. When configured, all object mapping will target the specified object. + + Please see the above discussion for details about target objects. + */ +@property (nonatomic, weak) id targetObject; + +/** + The data source for the underlying `RKMappingOperation` objects that perform the mapping work configured by the mapper. + */ +@property (nonatomic, strong) id<RKMappingOperationDataSource> mappingOperationDataSource; + +/** + The delegate for the mapper operation. + */ +@property (nonatomic, weak) id<RKMapperOperationDelegate> delegate; + +@end + +///-------------------------------------- +/// @name Mapper Operation Delegate +///-------------------------------------- + +/** + Objects wishing to act as the delegate for `RKMapperOperation` objects must adopt the `RKMapperOperationDelegate` protocol. The protocol provides a rich set of optional callback methods that provides insight into the lifecycle of a mapper operation. + */ +@protocol RKMapperOperationDelegate <NSObject> + +@optional + +///----------------------------- +/// @name Tracking Mapper Status +///----------------------------- + +/** + Tells the delegate that the mapper operation is about to start mapping. + + @param mapper The mapper operation that is about to start mapping. + */ +- (void)mapperWillStartMapping:(RKMapperOperation *)mapper; + +/** + Tells the delegate that the mapper has finished. + + @param mapper The mapper operation that has finished mapping. + */ +- (void)mapperDidFinishMapping:(RKMapperOperation *)mapper; + +/** + Tells the delegate that the mapper has been cancelled. + + @param mapper The mapper operation that was cancelled. + */ +- (void)mapperDidCancelMapping:(RKMapperOperation *)mapper; + +///------------------------------- +/// @name Key Path Search Messages +///------------------------------- + +/** + Tells the delegate that the mapper has found one or more mappable object representations at a key path specified in the `mappingsDictionary`. + + @param mapper The mapper operation performing the mapping. + @param dictionaryOrArrayOfDictionaries The `NSDictictionary` or `NSArray` of `NSDictionary` object representations that was found at the `keyPath`. + @param keyPath The key path that the representation was read from in the `sourceObject`. If the `keyPath` was `[NSNull null]` in the `mappingsDictionary`, it will be given as `nil` to the delegate. + */ +- (void)mapper:(RKMapperOperation *)mapper didFindRepresentationOrArrayOfRepresentations:(id)dictionaryOrArrayOfDictionaries atKeyPath:(NSString *)keyPath; + +/** + Tells the delegate that the mapper failed to find any mappable object representations at a key path specified in the `mappingsDictionary`. + + @param mapper The mapper operation performing the mapping. + @param keyPath The key path that was searched for a mappable object representation. + */ +- (void)mapper:(RKMapperOperation *)mapper didNotFindRepresentationOrArrayOfRepresentationsAtKeyPath:(NSString *)keyPath; + +///---------------------------------------------- +/// @name Tracking Child Mapping Operation Status +///---------------------------------------------- + +/** + Tells the delegate that the mapper is about to start a mapping operation to map a representation found in the `sourceObject`. + + @param mapper The mapper operation performing the mapping. + @param mappingOperation The mapping operation that is about to be started. + @param keyPath The key path that was mapped. A `nil` key path indicates that the mapping matched the entire `sourceObject`. + */ +- (void)mapper:(RKMapperOperation *)mapper willStartMappingOperation:(RKMappingOperation *)mappingOperation forKeyPath:(NSString *)keyPath; + +/** + Tells the delegate that a mapping operation that was started by the mapper has finished executing. + + @param mapper The mapper operation performing the mapping. + @param mappingOperation The mapping operation that has finished. + @param keyPath The key path that was mapped. A `nil` key path indicates that the mapping matched the entire `sourceObject`. + */ +- (void)mapper:(RKMapperOperation *)mapper didFinishMappingOperation:(RKMappingOperation *)mappingOperation forKeyPath:(NSString *)keyPath; + +/** + Tells the delegate that a mapping operation that was started by the mapper has failed with an error. + + @param mapper The mapper operation performing the mapping. + @param mappingOperation The mapping operation that has failed. + @param keyPath The key path that was mapped. A `nil` key path indicates that the mapping matched the entire `sourceObject`. + @param error The error that occurred during the execution of the mapping operation. + */ +- (void)mapper:(RKMapperOperation *)mapper didFailMappingOperation:(RKMappingOperation *)mappingOperation forKeyPath:(NSString *)keyPath withError:(NSError *)error; + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKMapperOperation.m b/Pods/RestKit/Code/ObjectMapping/RKMapperOperation.m new file mode 100644 index 00000000..fd57b971 --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKMapperOperation.m @@ -0,0 +1,373 @@ +// +// RKMapperOperation.m +// RestKit +// +// Created by Blake Watters on 5/6/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKMapperOperation.h" +#import "RKMapperOperation_Private.h" +#import "RKObjectMappingOperationDataSource.h" +#import "RKMappingErrors.h" +#import "RKResponseDescriptor.h" +#import "RKDynamicMapping.h" +#import "RKLog.h" + +NSString * const RKMappingErrorKeyPathErrorKey = @"keyPath"; + +// Set Logging Component +#undef RKLogComponent +#define RKLogComponent RKlcl_cRestKitObjectMapping + +static NSString *RKDelegateKeyPathFromKeyPath(NSString *keyPath) +{ + return ([keyPath isEqual:[NSNull null]]) ? nil : keyPath; +} + +@interface RKMapperOperation () + +@property (nonatomic, strong, readwrite) NSError *error; +@property (nonatomic, strong, readwrite) RKMappingResult *mappingResult; +@property (nonatomic, strong) NSMutableArray *mappingErrors; +@property (nonatomic, strong) id sourceObject; +@property (nonatomic, strong, readwrite) NSDictionary *mappingsDictionary; + +@end + +@implementation RKMapperOperation + +- (id)initWithObject:(id)object mappingsDictionary:(NSDictionary *)mappingsDictionary; +{ + self = [super init]; + if (self) { + self.sourceObject = object; + self.mappingsDictionary = mappingsDictionary; + self.mappingErrors = [NSMutableArray new]; + self.mappingOperationDataSource = [RKObjectMappingOperationDataSource new]; + } + + return self; +} + +#pragma mark - Errors + +- (NSArray *)errors +{ + return [NSArray arrayWithArray:self.mappingErrors]; +} + +- (void)addError:(NSError *)error +{ + NSAssert(error, @"Cannot add a nil error"); + [self.mappingErrors addObject:error]; + RKLogWarning(@"Adding mapping error: %@", [error localizedDescription]); +} + +- (void)addErrorWithCode:(RKMappingErrorCode)errorCode message:(NSString *)errorMessage keyPath:(NSString *)keyPath userInfo:(NSDictionary *)otherInfo +{ + NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithObjectsAndKeys: + errorMessage, NSLocalizedDescriptionKey, + keyPath ? keyPath : [NSNull null], RKMappingErrorKeyPathErrorKey, + nil]; + [userInfo addEntriesFromDictionary:otherInfo]; + NSError *error = [NSError errorWithDomain:RKErrorDomain code:errorCode userInfo:userInfo]; + [self addError:error]; + self.error = error; +} + +- (void)addErrorForUnmappableKeyPath:(NSString *)keyPath +{ + NSString *errorMessage = [NSString stringWithFormat:@"Could not find an object mapping for keyPath: '%@'", keyPath]; + [self addErrorWithCode:RKMappingErrorNotFound message:errorMessage keyPath:keyPath userInfo:nil]; +} + +- (BOOL)isNullCollection:(id)object +{ + // The purpose of this method is to guard against the case where we perform valueForKeyPath: on an array + // and it returns NSNull for each element in the array. + + // We consider an empty array/dictionary mappable, but a collection that contains only NSNull + // values is unmappable + if ([object respondsToSelector:@selector(objectForKey:)]) { + return NO; + } + + if ([object respondsToSelector:@selector(countForObject:)] && [object count] > 0) { + if ([object countForObject:[NSNull null]] == [object count]) { + RKLogDebug(@"Found a collection containing only NSNull values, considering the collection unmappable..."); + return YES; + } + } + + return NO; +} + +#pragma mark - Mapping Primitives + +- (id)mapObject:(id)mappableObject atKeyPath:(NSString *)keyPath usingMapping:(RKMapping *)mapping +{ + NSAssert([mappableObject respondsToSelector:@selector(setValue:forKeyPath:)], @"Expected self.object to be KVC compliant"); + id destinationObject = nil; + + if (self.targetObject) { + destinationObject = self.targetObject; + RKObjectMapping *objectMapping = nil; + if ([mapping isKindOfClass:[RKDynamicMapping class]]) { + objectMapping = [(RKDynamicMapping *)mapping objectMappingForRepresentation:mappableObject]; + } else if ([mapping isKindOfClass:[RKObjectMapping class]]) { + objectMapping = (RKObjectMapping *)mapping; + } else { + NSAssert(objectMapping, @"Encountered unknown mapping type '%@'", NSStringFromClass([mapping class])); + } + if (NO == [[self.targetObject class] isSubclassOfClass:objectMapping.objectClass]) { + NSString *errorMessage = [NSString stringWithFormat: + @"Expected an object mapping for class of type '%@', provider returned one for '%@'", + NSStringFromClass([self.targetObject class]), NSStringFromClass(objectMapping.objectClass)]; + [self addErrorWithCode:RKMappingErrorTypeMismatch message:errorMessage keyPath:keyPath userInfo:nil]; + return nil; + } + } else { + destinationObject = [self objectWithMapping:mapping andData:mappableObject]; + } + + if (mapping && destinationObject) { + BOOL success = [self mapFromObject:mappableObject toObject:destinationObject atKeyPath:keyPath usingMapping:mapping]; + if (success) { + return destinationObject; + } + } else { + // Attempted to map an object but couldn't find a mapping for the keyPath + [self addErrorForUnmappableKeyPath:keyPath]; + return nil; + } + + return nil; +} + +- (NSArray *)mapCollection:(NSArray *)mappableObjects atKeyPath:(NSString *)keyPath usingMapping:(RKMapping *)mapping +{ + NSAssert(mappableObjects != nil, @"Cannot map without an collection of mappable objects"); + NSAssert(mapping != nil, @"Cannot map without a mapping to consult"); + + NSArray *objectsToMap = mappableObjects; + if (mapping.forceCollectionMapping) { + // If we have forced mapping of a dictionary, map each subdictionary + if ([mappableObjects isKindOfClass:[NSDictionary class]]) { + RKLogDebug(@"Collection mapping forced for NSDictionary, mapping each key/value independently..."); + objectsToMap = [NSMutableArray arrayWithCapacity:[mappableObjects count]]; + for (id key in mappableObjects) { + NSDictionary *dictionaryToMap = [NSDictionary dictionaryWithObject:[mappableObjects valueForKey:key] forKey:key]; + [(NSMutableArray *)objectsToMap addObject:dictionaryToMap]; + } + } else { + RKLogWarning(@"Collection mapping forced but mappable objects is of type '%@' rather than NSDictionary", NSStringFromClass([mappableObjects class])); + } + } + + // Ensure we are mapping onto a mutable collection if there is a target + NSMutableArray *mappedObjects = self.targetObject ? self.targetObject : [NSMutableArray arrayWithCapacity:[mappableObjects count]]; + if (NO == [mappedObjects respondsToSelector:@selector(addObject:)]) { + NSString *errorMessage = [NSString stringWithFormat: + @"Cannot map a collection of objects onto a non-mutable collection. Unexpected destination object type '%@'", + NSStringFromClass([mappedObjects class])]; + [self addErrorWithCode:RKMappingErrorTypeMismatch message:errorMessage keyPath:keyPath userInfo:nil]; + return nil; + } + + for (id mappableObject in objectsToMap) { + id destinationObject = [self objectWithMapping:mapping andData:mappableObject]; + if (! destinationObject) { + continue; + } + + BOOL success = [self mapFromObject:mappableObject toObject:destinationObject atKeyPath:keyPath usingMapping:mapping]; + if (success) { + [mappedObjects addObject:destinationObject]; + } + } + + return mappedObjects; +} + +// The workhorse of this entire process. Emits object loading operations +- (BOOL)mapFromObject:(id)mappableObject toObject:(id)destinationObject atKeyPath:(NSString *)keyPath usingMapping:(RKMapping *)mapping +{ + NSAssert(destinationObject != nil, @"Cannot map without a target object to assign the results to"); + NSAssert(mappableObject != nil, @"Cannot map without a collection of attributes"); + NSAssert(mapping != nil, @"Cannot map without an mapping"); + + RKLogDebug(@"Asked to map source object %@ with mapping %@", mappableObject, mapping); + + RKMappingOperation *mappingOperation = [[RKMappingOperation alloc] initWithSourceObject:mappableObject destinationObject:destinationObject mapping:mapping]; + mappingOperation.dataSource = self.mappingOperationDataSource; + if ([self.delegate respondsToSelector:@selector(mapper:willStartMappingOperation:forKeyPath:)]) { + [self.delegate mapper:self willStartMappingOperation:mappingOperation forKeyPath:RKDelegateKeyPathFromKeyPath(keyPath)]; + } + [mappingOperation start]; + if (mappingOperation.error) { + if ([self.delegate respondsToSelector:@selector(mapper:didFailMappingOperation:forKeyPath:withError:)]) { + [self.delegate mapper:self didFailMappingOperation:mappingOperation forKeyPath:RKDelegateKeyPathFromKeyPath(keyPath) withError:mappingOperation.error]; + } + [self addError:mappingOperation.error]; + + return NO; + } else { + if ([self.delegate respondsToSelector:@selector(mapper:didFinishMappingOperation:forKeyPath:)]) { + [self.delegate mapper:self didFinishMappingOperation:mappingOperation forKeyPath:RKDelegateKeyPathFromKeyPath(keyPath)]; + } + + return YES; + } +} + +- (id)objectWithMapping:(RKMapping *)mapping andData:(id)mappableData +{ + NSAssert([mapping isKindOfClass:[RKMapping class]], @"Expected an RKMapping object"); + NSAssert(self.mappingOperationDataSource, @"Cannot find or instantiate objects without a data source"); + + RKObjectMapping *objectMapping = nil; + if ([mapping isKindOfClass:[RKDynamicMapping class]]) { + objectMapping = [(RKDynamicMapping *)mapping objectMappingForRepresentation:mappableData]; + if (! objectMapping) { + RKLogDebug(@"Mapping %@ declined mapping for data %@: returned nil objectMapping", mapping, mappableData); + } + } else if ([mapping isKindOfClass:[RKObjectMapping class]]) { + objectMapping = (RKObjectMapping *)mapping; + } else { + NSAssert(objectMapping, @"Encountered unknown mapping type '%@'", NSStringFromClass([mapping class])); + } + + if (objectMapping) { + return [self.mappingOperationDataSource mappingOperation:nil targetObjectForRepresentation:mappableData withMapping:objectMapping]; + } + + return nil; +} + +- (id)performMappingForObject:(id)mappableValue atKeyPath:(NSString *)keyPath usingMapping:(RKMapping *)mapping +{ + id mappingResult; + if (mapping.forceCollectionMapping || [mappableValue isKindOfClass:[NSArray class]] || [mappableValue isKindOfClass:[NSSet class]]) { + RKLogDebug(@"Found mappable collection at keyPath '%@': %@", keyPath, mappableValue); + mappingResult = [self mapCollection:mappableValue atKeyPath:keyPath usingMapping:mapping]; + } else { + RKLogDebug(@"Found mappable data at keyPath '%@': %@", keyPath, mappableValue); + mappingResult = [self mapObject:mappableValue atKeyPath:keyPath usingMapping:mapping]; + } + + return mappingResult; +} + +- (NSMutableDictionary *)performKeyPathMappingUsingMappingDictionary:(NSDictionary *)mappingsByKeyPath +{ + BOOL foundMappable = NO; + NSMutableDictionary *results = [NSMutableDictionary dictionary]; + for (NSString *keyPath in mappingsByKeyPath) { + if ([self isCancelled]) return nil; + + id mappingResult = nil; + id mappableValue = nil; + + RKLogTrace(@"Examining keyPath '%@' for mappable content...", keyPath); + + if ([keyPath isEqual:[NSNull null]] || [keyPath isEqualToString:@""]) { + mappableValue = self.sourceObject; + } else { + mappableValue = [self.sourceObject valueForKeyPath:keyPath]; + } + + // Not found... + if (mappableValue == nil || mappableValue == [NSNull null] || [self isNullCollection:mappableValue]) { + RKLogDebug(@"Found unmappable value at keyPath: %@", keyPath); + + if ([self.delegate respondsToSelector:@selector(mapper:didNotFindRepresentationOrArrayOfRepresentationsAtKeyPath:)]) { + [self.delegate mapper:self didNotFindRepresentationOrArrayOfRepresentationsAtKeyPath:RKDelegateKeyPathFromKeyPath(keyPath)]; + } + + continue; + } + + // Found something to map + foundMappable = YES; + RKMapping *mapping = [mappingsByKeyPath objectForKey:keyPath]; + if ([self.delegate respondsToSelector:@selector(mapper:didFindRepresentationOrArrayOfRepresentations:atKeyPath:)]) { + [self.delegate mapper:self didFindRepresentationOrArrayOfRepresentations:mappableValue atKeyPath:RKDelegateKeyPathFromKeyPath(keyPath)]; + } + + mappingResult = [self performMappingForObject:mappableValue atKeyPath:keyPath usingMapping:mapping]; + + if (mappingResult) { + [results setObject:mappingResult forKey:keyPath]; + } + } + + if (NO == foundMappable) return nil; + return results; +} + +- (void)cancel +{ + [super cancel]; + RKLogDebug(@"%@:%p received `cancel` message: cancelling mapping...", [self class], self); + + if ([self.delegate respondsToSelector:@selector(mapperDidCancelMapping:)]) { + [self.delegate mapperDidCancelMapping:self]; + } +} + +- (void)main +{ + NSAssert(self.sourceObject != nil, @"Cannot perform object mapping without a source object to map from"); + NSAssert(self.mappingsDictionary, @"Cannot perform object mapping without a dictionary of mappings"); + + if ([self isCancelled]) return; + + RKLogDebug(@"Performing object mapping sourceObject: %@\n and targetObject: %@", self.sourceObject, self.targetObject); + + if ([self.delegate respondsToSelector:@selector(mapperWillStartMapping:)]) { + [self.delegate mapperWillStartMapping:self]; + } + + // Perform the mapping + BOOL foundMappable = NO; + NSMutableDictionary *results = [self performKeyPathMappingUsingMappingDictionary:self.mappingsDictionary]; + if ([self isCancelled]) return; + foundMappable = (results != nil); + + if ([self.delegate respondsToSelector:@selector(mapperDidFinishMapping:)]) { + [self.delegate mapperDidFinishMapping:self]; + } + + // If we found nothing eligible for mapping in the content, add an unmappable key path error and fail mapping + // If the content is empty, we don't consider it an error + BOOL isEmpty = [self.sourceObject respondsToSelector:@selector(count)] && ([self.sourceObject count] == 0); + if (foundMappable == NO && !isEmpty) { + NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithObjectsAndKeys: + NSLocalizedString(@"Unable to find any mappings for the given content", nil), NSLocalizedDescriptionKey, + [NSNull null], RKMappingErrorKeyPathErrorKey, + self.errors, RKDetailedErrorsKey, + nil]; + NSError *compositeError = [[NSError alloc] initWithDomain:RKErrorDomain code:RKMappingErrorNotFound userInfo:userInfo]; + self.error = compositeError; + return; + } + + RKLogDebug(@"Finished performing object mapping. Results: %@", results); + + if (results) self.mappingResult = [[RKMappingResult alloc] initWithDictionary:results]; +} + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKMapperOperation_Private.h b/Pods/RestKit/Code/ObjectMapping/RKMapperOperation_Private.h new file mode 100644 index 00000000..1be7fd9c --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKMapperOperation_Private.h @@ -0,0 +1,28 @@ +// +// RKMapperOperation_Private.h +// RestKit +// +// Created by Blake Watters on 5/9/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +@interface RKMapperOperation (Private) + +- (id)mapObject:(id)mappableObject atKeyPath:(NSString *)keyPath usingMapping:(RKMapping *)mapping; +- (NSArray *)mapCollection:(NSArray *)mappableObjects atKeyPath:(NSString *)keyPath usingMapping:(RKMapping *)mapping; +- (BOOL)mapFromObject:(id)mappableObject toObject:(id)destinationObject atKeyPath:(NSString *)keyPath usingMapping:(RKMapping *)mapping; +- (id)objectWithMapping:(RKMapping *)objectMapping andData:(id)mappableData; + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKMapping.h b/Pods/RestKit/Code/ObjectMapping/RKMapping.h new file mode 100644 index 00000000..4bbf70f0 --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKMapping.h @@ -0,0 +1,60 @@ +// +// RKMapping.h +// RestKit +// +// Created by Blake Watters on 7/31/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + `RKMapping` is an abstract class for objects defining RestKit object mappings. Its interface is common to all object mapping classes, including its concrete subclasses `RKObjectMapping` and `RKDynamicMapping`. + */ +@interface RKMapping : NSObject + +///--------------------------------- +/// @name Forcing Collection Mapping +///--------------------------------- + +/** + Forces the mapper to treat the mapped keyPath as a collection even if it does not return an array or a set of objects. This permits mapping where a dictionary identifies a collection of objects. + + When enabled, each key/value pair in the resolved dictionary will be mapped as a separate entity. This is useful when you have a JSON structure similar to: + + { "users": { + "blake": { "id": 1234, "email": "blake@restkit.org" }, + "rachit": { "id": 5678", "email": "rachit@restkit.org" } + } + } + + By enabling `forceCollectionMapping`, RestKit will map "blake" => attributes and "rachit" => attributes as independent objects. This can be combined with `mapKeyOfNestedDictionaryToAttribute:` to properly map these sorts of structures. + + @default `NO` + @see `mapKeyOfNestedDictionaryToAttribute` + */ +@property (nonatomic, assign) BOOL forceCollectionMapping; + + +///------------------------- +/// @name Comparing Mappings +///------------------------- + +/** + Returns `YES` if the receiver and the specified mapping are considered equivalent. + + **NOTE**: Must be implemented in subclass. + */ +- (BOOL)isEqualToMapping:(RKMapping *)otherMapping; + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKMapping.m b/Pods/RestKit/Code/ObjectMapping/RKMapping.m new file mode 100644 index 00000000..9f60f3b9 --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKMapping.m @@ -0,0 +1,22 @@ +// +// RKMapping.m +// RestKit +// +// Created by Blake Watters on 2/15/12. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// + +#import "RKMapping.h" + +@implementation RKMapping + +@synthesize forceCollectionMapping; + +- (BOOL)isEqualToMapping:(RKMapping *)otherMapping +{ + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)] + userInfo:nil]; +} + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKMappingErrors.h b/Pods/RestKit/Code/ObjectMapping/RKMappingErrors.h new file mode 100644 index 00000000..988e6a5d --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKMappingErrors.h @@ -0,0 +1,35 @@ +// +// RKMappingErrors.h +// RestKit +// +// Created by Blake Watters on 5/31/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKErrors.h" + +typedef UInt32 RKMappingErrorCode; +enum { + RKMappingErrorNotFound = 1001, // No mapping found + RKMappingErrorTypeMismatch = 1002, // Target class and object mapping are in disagreement + RKMappingErrorUnmappableRepresentation = 1003, // No values were found at the key paths of any attribute or relationship mappings in the given representation + RKMappingErrorFromMappingResult = 1004, // The error was returned from the mapping result + RKMappingErrorValidationFailure = 1005, // Generic error code for use when constructing validation errors + RKMappingErrorUnableToDetermineMapping = 1006, // The mapping operation was unable to obtain a concrete object mapping from a given dynamic mapping + RKMappingErrorNilDestinationObject = 1007, // The mapping operation failed due to a nil destination object. + RKMappingErrorNilManagedObjectCache = 1008 // A managed object cache is required to satisfy the mapping, but none was given. +}; + +extern NSString * const RKMappingErrorKeyPathErrorKey; // The key path the error is associated with diff --git a/Pods/RestKit/Code/ObjectMapping/RKMappingOperation.h b/Pods/RestKit/Code/ObjectMapping/RKMappingOperation.h new file mode 100644 index 00000000..0752f05e --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKMappingOperation.h @@ -0,0 +1,191 @@ +// +// RKMappingOperation.h +// RestKit +// +// Created by Blake Watters on 4/30/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKObjectMapping.h" +#import "RKAttributeMapping.h" + +@class RKMappingOperation, RKDynamicMapping, RKConnectionMapping; +@protocol RKMappingOperationDataSource; + +/** + Objects acting as the delegate for `RKMappingOperation` objects must adopt the `RKMappingOperationDelegate` protocol. These methods enable the delegate to be notified of events such as the application of attribute and relationship mappings during a mapping operation. + */ +@protocol RKMappingOperationDelegate <NSObject> + +@optional + +/** + Tells the delegate that an attribute or relationship mapping was found for a given key path within the data being mapped. + + @param operation The object mapping operation being performed. + @param keyPath The key path in the source object for which the mapping is to be applied. + @param value The value that was found at the given key path in the source object representation. + @param propertyMapping The `RKAttributeMapping` or `RKRelationshipMapping` for which the mappable value was found within the source object representation. + */ +- (void)mappingOperation:(RKMappingOperation *)operation didFindValue:(id)value forKeyPath:(NSString *)keyPath mapping:(RKPropertyMapping *)propertyMapping; + +/** + Tells the delegate that no attribute or relationships mapping was found for a given key path within the data being mapped. + + @param operation The object mapping operation being performed. + @param keyPath The key path in the source object for which no mappable value was found. + @param propertyMapping The `RKAttributeMapping` or `RKRelationshipMapping` for which no mappable value could be found within the source object representation. + */ +- (void)mappingOperation:(RKMappingOperation *)operation didNotFindValueForKeyPath:(NSString *)keyPath mapping:(RKPropertyMapping *)propertyMapping; + +/** + Tells the delegate that the mapping operation has set a value for a given key path with an attribute or relationship mapping. + + @param operation The object mapping operation being performed. + @param value A new value that was set on the destination object. + @param keyPath The key path in the destination object for which a new value has been set. + @param propertyMapping The `RKAttributeMapping` or `RKRelationshipMapping` found for the key path. + */ +- (void)mappingOperation:(RKMappingOperation *)operation didSetValue:(id)value forKeyPath:(NSString *)keyPath usingMapping:(RKPropertyMapping *)propertyMapping; + +/** + Tells the delegate that the mapping operation has declined to set a value for a given key path because the value has not changed. + + @param operation The object mapping operation being performed. + @param value A unchanged value for the key path in the destination object. + @param keyPath The key path in the destination object for which a unchanged value was not set. + @param propertyMapping The `RKAttributeMapping` or `RKRelationshipMapping` found for the key path. + */ +- (void)mappingOperation:(RKMappingOperation *)operation didNotSetUnchangedValue:(id)value forKeyPath:(NSString *)keyPath usingMapping:(RKPropertyMapping *)propertyMapping; + +/** + Tells the delegate that the mapping operation has failed due to an error. + + @param operation The object mapping operation that has failed. + @param error An error object indicating the reason for the failure. + */ +- (void)mappingOperation:(RKMappingOperation *)operation didFailWithError:(NSError *)error; + +/** + Tells the delegate that the mapping operation has selected a concrete object mapping with which to map the source object. + + Only sent if the receiver was initialized with an instance of `RKDynamicMapping` as the mapping. + + @param operation The mapping operation. + @param objectMapping The concrete object mapping with which to perform the mapping. + @param dynamicMapping The dynamic source mapping from which the object mapping was determined. + */ +- (void)mappingOperation:(RKMappingOperation *)operation didSelectObjectMapping:(RKObjectMapping *)objectMapping forDynamicMapping:(RKDynamicMapping *)dynamicMapping; + +#ifdef _COREDATADEFINES_H + +/** + Tells the delegate that the mapping operation has connected a relationship. + + Only sent when mapping an `RKEntityMapping` object that contains connection mappings. + + @param operation The mapping operation. + @param relationship The relationship that was connected. + @param connectionMapping The mappings that was used to connect the relationship. + */ +- (void)mappingOperation:(RKMappingOperation *)operation didConnectRelationship:(NSRelationshipDescription *)relationship usingMapping:(RKConnectionMapping *)connectionMapping; + +#endif + +@end + +/** + Instances of `RKMappingOperation` perform transformation between object representations according to the rules expressed in `RKObjectMapping` objects. Mapping operations provide the foundation for the RestKit object mapping engine and perform the work of inspecting the attributes and relationships of a source object and determining how to map them into new representations on a destination object. + */ +@interface RKMappingOperation : NSOperation + +///--------------------------------------- +/// @name Initializing a Mapping Operation +///--------------------------------------- + +/** + Initializes the receiver with a source object, a destination object and an object mapping with which to perform an object mapping. + + @param sourceObject The source object to be mapped. Cannot be `nil`. + @param destinationObject The destination object the results are to be mapped onto. May be `nil`, in which case a new object target object will be obtained from the `dataSource`. + @param objectOrDynamicMapping An instance of `RKObjectMapping` or `RKDynamicMapping` defining how the mapping is to be performed. + @return The receiver, initialized with a source object, a destination object, and a mapping. + */ +- (id)initWithSourceObject:(id)sourceObject destinationObject:(id)destinationObject mapping:(RKMapping *)objectOrDynamicMapping; + +///-------------------------------------- +/// @name Accessing Mapping Configuration +///-------------------------------------- + +/** + A dictionary of mappable elements containing simple values or nested object structures. + */ +@property (nonatomic, strong, readonly) id sourceObject; + +/** + The target object for this operation. Mappable values in the source object will be applied to the destination object using key-value coding. + + If initialized with a `nil` destination object, the mapping operation will attempt to find or create a destination object via the data source and will populate the value of the `destinationObject` property. + */ +@property (nonatomic, strong, readonly) id destinationObject; + +/** + The mapping defining how values contained in the source object should be transformed to the destination object via key-value coding. + + Will either be an instance of `RKObjectMapping` or `RKDynamicMapping`. + */ +@property (nonatomic, strong, readonly) RKMapping *mapping; + +/** + The concrete object mapping for the operation. + + If the value of `mapping` is an `RKObjectMapping`, returns the same value as `mapping`. If `mapping` is an `RKDynamicMapping`, then returns the concrete `RKObjectMapping` object selected for mapping `sourceObject`. + */ +@property (nonatomic, strong, readonly) RKObjectMapping *objectMapping; + +///------------------------------------------- +/// @name Configuring Delegate and Data Source +///------------------------------------------- + +/** + The delegate to inform of interesting events during the mapping operation lifecycle. + */ +@property (nonatomic, weak) id<RKMappingOperationDelegate> delegate; + +/** + The data source is responsible for providing the mapping operation with an appropriate target object for mapping when the `destinationObject` is `nil`. + + @see `RKMappingOperationDataSource` + */ +@property (nonatomic, weak) id<RKMappingOperationDataSource> dataSource; + +/** + The error, if any, that occurred during the execution of the mapping operation. + */ +@property (nonatomic, strong, readonly) NSError *error; + +///------------------------- +/// @name Performing Mapping +///------------------------- + +/** + Process all mappable values from the mappable dictionary and assign them to the target object according to the rules expressed in the object mapping definition + + @param error A pointer to an `NSError` reference to capture any error that occurs during the mapping. May be `nil`. + @return A Boolean value indicating if the mapping operation was successful. + */ +- (BOOL)performMapping:(NSError **)error; + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKMappingOperation.m b/Pods/RestKit/Code/ObjectMapping/RKMappingOperation.m new file mode 100644 index 00000000..5f78822b --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKMappingOperation.m @@ -0,0 +1,737 @@ +// +// RKMappingOperation.m +// RestKit +// +// Created by Blake Watters on 4/30/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKMappingOperation.h" +#import "RKMappingErrors.h" +#import "RKPropertyInspector.h" +#import "RKAttributeMapping.h" +#import "RKRelationshipMapping.h" +#import "RKErrors.h" +#import "RKLog.h" +#import "RKMappingOperationDataSource.h" +#import "RKObjectMappingOperationDataSource.h" +#import "RKDynamicMapping.h" +#import "RKObjectUtilities.h" + +// Set Logging Component +#undef RKLogComponent +#define RKLogComponent RKlcl_cRestKitObjectMapping + +extern NSString * const RKObjectMappingNestingAttributeKeyName; + +@interface RKMappingOperation () +@property (nonatomic, strong, readwrite) RKMapping *mapping; +@property (nonatomic, strong, readwrite) id sourceObject; +@property (nonatomic, strong, readwrite) id destinationObject; +@property (nonatomic, strong) NSDictionary *nestedAttributeSubstitution; +@property (nonatomic, strong, readwrite) NSError *error; +@property (nonatomic, strong, readwrite) RKObjectMapping *objectMapping; // The concrete mapping +@end + +// Defined in RKObjectMapping.h +NSDate *RKDateFromStringWithFormatters(NSString *dateString, NSArray *formatters); + +/** + This method ensures that attribute mappings apply cleanly to an `NSMutableDictionary` target class to support mapping to nested keyPaths. See issue #882 + */ +static void RKSetIntermediateDictionaryValuesOnObjectForKeyPath(id object, NSString *keyPath) +{ + if (! [object isKindOfClass:[NSMutableDictionary class]]) return; + NSArray *keyPathComponents = [keyPath componentsSeparatedByString:@"."]; + if ([keyPathComponents count] > 1) { + for (NSUInteger index = 0; index < [keyPathComponents count] - 1; index++) { + NSString *intermediateKeyPath = [[keyPathComponents subarrayWithRange:NSMakeRange(0, index + 1)] componentsJoinedByString:@"."]; + if (! [object valueForKeyPath:intermediateKeyPath]) { + [object setValue:[NSMutableDictionary dictionary] forKeyPath:intermediateKeyPath]; + } + } + } +} + +static BOOL RKIsManagedObject(id object) +{ + Class managedObjectClass = NSClassFromString(@"NSManagedObject"); + return managedObjectClass && [object isKindOfClass:managedObjectClass]; +} + +@implementation RKMappingOperation + +- (id)initWithSourceObject:(id)sourceObject destinationObject:(id)destinationObject mapping:(RKMapping *)objectOrDynamicMapping +{ + NSAssert(sourceObject != nil, @"Cannot perform a mapping operation without a sourceObject object"); + NSAssert(objectOrDynamicMapping != nil, @"Cannot perform a mapping operation without a mapping"); + + self = [super init]; + if (self) { + self.sourceObject = sourceObject; + self.destinationObject = destinationObject; + self.mapping = objectOrDynamicMapping; + } + + return self; +} + +- (id)destinationObjectForMappingRepresentation:(id)representation withMapping:(RKMapping *)mapping +{ + RKObjectMapping *concreteMapping = nil; + if ([mapping isKindOfClass:[RKDynamicMapping class]]) { + concreteMapping = [(RKDynamicMapping *)mapping objectMappingForRepresentation:representation]; + if (! concreteMapping) { + RKLogDebug(@"Unable to determine concrete object mapping from dynamic mapping %@ with which to map object representation: %@", mapping, representation); + return nil; + } + } else if ([mapping isKindOfClass:[RKObjectMapping class]]) { + concreteMapping = (RKObjectMapping *)mapping; + } + + return [self.dataSource mappingOperation:self targetObjectForRepresentation:representation withMapping:concreteMapping]; +} + +- (NSDate *)parseDateFromString:(NSString *)string +{ + RKLogTrace(@"Transforming string value '%@' to NSDate...", string); + return RKDateFromStringWithFormatters(string, self.objectMapping.dateFormatters); +} + +- (id)transformValue:(id)value atKeyPath:(NSString *)keyPath toType:(Class)destinationType +{ + RKLogTrace(@"Found transformable value at keyPath '%@'. Transforming from type '%@' to '%@'", keyPath, NSStringFromClass([value class]), NSStringFromClass(destinationType)); + Class sourceType = [value class]; + + if ([sourceType isSubclassOfClass:[NSString class]]) { + if ([destinationType isSubclassOfClass:[NSDate class]]) { + // String -> Date + return [self parseDateFromString:(NSString *)value]; + } else if ([destinationType isSubclassOfClass:[NSURL class]]) { + // String -> URL + return [NSURL URLWithString:(NSString *)value]; + } else if ([destinationType isSubclassOfClass:[NSDecimalNumber class]]) { + // String -> Decimal Number + return [NSDecimalNumber decimalNumberWithString:(NSString *)value]; + } else if ([destinationType isSubclassOfClass:[NSNumber class]]) { + // String -> Number + NSString *lowercasedString = [(NSString *)value lowercaseString]; + NSSet *trueStrings = [NSSet setWithObjects:@"true", @"t", @"yes", nil]; + NSSet *booleanStrings = [trueStrings setByAddingObjectsFromSet:[NSSet setWithObjects:@"false", @"f", @"no", nil]]; + if ([booleanStrings containsObject:lowercasedString]) { + // Handle booleans encoded as Strings + return [NSNumber numberWithBool:[trueStrings containsObject:lowercasedString]]; + } else { + return [NSNumber numberWithDouble:[(NSString *)value doubleValue]]; + } + } + } else if (value == [NSNull null]) { + // Transform NSNull -> nil for simplicity + return nil; + } else if ([sourceType isSubclassOfClass:[NSSet class]]) { + // Set -> Array + if ([destinationType isSubclassOfClass:[NSArray class]]) { + return [(NSSet *)value allObjects]; + } + } else if ([sourceType isSubclassOfClass:[NSOrderedSet class]]) { + // OrderedSet -> Array + if ([destinationType isSubclassOfClass:[NSArray class]]) { + return [value array]; + } + } else if ([sourceType isSubclassOfClass:[NSArray class]]) { + // Array -> Set + if ([destinationType isSubclassOfClass:[NSSet class]]) { + return [NSSet setWithArray:value]; + } + // Array -> OrderedSet + if ([destinationType isSubclassOfClass:[NSOrderedSet class]]) { + return [[NSOrderedSet class] orderedSetWithArray:value]; + } + } else if ([sourceType isSubclassOfClass:[NSNumber class]] && [destinationType isSubclassOfClass:[NSDate class]]) { + // Number -> Date + if ([destinationType isSubclassOfClass:[NSDate class]]) { + return [NSDate dateWithTimeIntervalSince1970:[(NSNumber *)value intValue]]; + } else if ([sourceType isSubclassOfClass:NSClassFromString(@"__NSCFBoolean")] && [destinationType isSubclassOfClass:[NSString class]]) { + return ([value boolValue] ? @"true" : @"false"); + } + return [NSDate dateWithTimeIntervalSince1970:[(NSNumber *)value doubleValue]]; + } else if ([sourceType isSubclassOfClass:[NSNumber class]] && [destinationType isSubclassOfClass:[NSDecimalNumber class]]) { + // Number -> Decimal Number + return [NSDecimalNumber decimalNumberWithDecimal:[value decimalValue]]; + } else if ( ([sourceType isSubclassOfClass:NSClassFromString(@"__NSCFBoolean")] || + [sourceType isSubclassOfClass:NSClassFromString(@"NSCFBoolean")] ) && + [destinationType isSubclassOfClass:[NSString class]]) { + return ([value boolValue] ? @"true" : @"false"); + if ([destinationType isSubclassOfClass:[NSDate class]]) { + return [NSDate dateWithTimeIntervalSince1970:[(NSNumber *)value intValue]]; + } else if (([sourceType isSubclassOfClass:NSClassFromString(@"__NSCFBoolean")] || [sourceType isSubclassOfClass:NSClassFromString(@"NSCFBoolean")]) && [destinationType isSubclassOfClass:[NSString class]]) { + return ([value boolValue] ? @"true" : @"false"); + } + } else if ([destinationType isSubclassOfClass:[NSString class]] && [value respondsToSelector:@selector(stringValue)]) { + return [value stringValue]; + } else if ([destinationType isSubclassOfClass:[NSString class]] && [value isKindOfClass:[NSDate class]]) { + // NSDate -> NSString + // Transform using the preferred date formatter + NSString *dateString = nil; + @synchronized(self.objectMapping.preferredDateFormatter) { + dateString = [self.objectMapping.preferredDateFormatter stringForObjectValue:value]; + } + return dateString; + } + + RKLogWarning(@"Failed transformation of value at keyPath '%@'. No strategy for transforming from '%@' to '%@'", keyPath, NSStringFromClass([value class]), NSStringFromClass(destinationType)); + + return nil; +} + +- (BOOL)isValue:(id)sourceValue equalToValue:(id)destinationValue +{ + return RKObjectIsEqualToObject(sourceValue, destinationValue); +} + +- (BOOL)validateValue:(id *)value atKeyPath:(NSString *)keyPath +{ + BOOL success = YES; + + if (self.objectMapping.performKeyValueValidation && [self.destinationObject respondsToSelector:@selector(validateValue:forKeyPath:error:)]) { + NSError *validationError; + success = [self.destinationObject validateValue:value forKeyPath:keyPath error:&validationError]; + if (!success) { + self.error = validationError; + if (validationError) { + RKLogError(@"Validation failed while mapping attribute at key path '%@' to value %@. Error: %@", keyPath, *value, [validationError localizedDescription]); + RKLogValidationError(validationError); + } else { + RKLogWarning(@"Destination object %@ rejected attribute value %@ for keyPath %@. Skipping...", self.destinationObject, *value, keyPath); + } + } + } + + return success; +} + +- (BOOL)shouldSetValue:(id *)value atKeyPath:(NSString *)keyPath +{ + id currentValue = [self.destinationObject valueForKeyPath:keyPath]; + if (currentValue == [NSNull null]) { + currentValue = nil; + } + + /* + WTF - This workaround should not be necessary, but I have been unable to replicate + the circumstances that trigger it in a unit test to fix elsewhere. The proper place + to handle it is in transformValue:atKeyPath:toType: + + See issue & pull request: https://github.com/RestKit/RestKit/pull/436 + */ + if (*value == [NSNull null]) { + RKLogWarning(@"Coercing NSNull value to nil in shouldSetValue:atKeyPath: -- should be fixed."); + *value = nil; + } + + if (nil == currentValue && nil == *value) { + // Both are nil + return NO; + } else if (nil == *value || nil == currentValue) { + // One is nil and the other is not + return [self validateValue:value atKeyPath:keyPath]; + } + + if (! [self isValue:*value equalToValue:currentValue]) { + // Validate value for key + return [self validateValue:value atKeyPath:keyPath]; + } + return NO; +} + +- (NSArray *)applyNestingToMappings:(NSArray *)mappings +{ + if (_nestedAttributeSubstitution) { + NSString *searchString = [NSString stringWithFormat:@"(%@)", [[_nestedAttributeSubstitution allKeys] lastObject]]; + NSString *replacementString = [[_nestedAttributeSubstitution allValues] lastObject]; + NSMutableArray *array = [NSMutableArray arrayWithCapacity:[self.objectMapping.attributeMappings count]]; + for (RKPropertyMapping *mapping in mappings) { + NSString *sourceKeyPath = [mapping.sourceKeyPath stringByReplacingOccurrencesOfString:searchString withString:replacementString]; + NSString *destinationKeyPath = [mapping.destinationKeyPath stringByReplacingOccurrencesOfString:searchString withString:replacementString]; + RKPropertyMapping *nestedMapping = nil; + if ([mapping isKindOfClass:[RKAttributeMapping class]]) { + nestedMapping = [RKAttributeMapping attributeMappingFromKeyPath:sourceKeyPath toKeyPath:mapping.destinationKeyPath]; + } else if ([mapping isKindOfClass:[RKRelationshipMapping class]]) { + nestedMapping = [RKRelationshipMapping relationshipMappingFromKeyPath:sourceKeyPath + toKeyPath:destinationKeyPath + withMapping:[(RKRelationshipMapping *)mapping mapping]]; + } + [array addObject:nestedMapping]; + } + + return array; + } + + return mappings; +} + +- (NSArray *)simpleAttributeMappings +{ + NSMutableArray *mappings = [NSMutableArray array]; + for (RKAttributeMapping *mapping in [self applyNestingToMappings:self.objectMapping.attributeMappings]) { + if ([mapping.sourceKeyPath rangeOfString:@"."].location == NSNotFound) { + [mappings addObject:mapping]; + } + } + + return mappings; +} + +- (NSArray *)keyPathAttributeMappings +{ + NSMutableArray *mappings = [NSMutableArray array]; + for (RKAttributeMapping *mapping in [self applyNestingToMappings:self.objectMapping.attributeMappings]) { + if ([mapping.sourceKeyPath rangeOfString:@"."].location != NSNotFound) { + [mappings addObject:mapping]; + } + } + + return mappings; +} + +- (NSArray *)relationshipMappings +{ + return [self applyNestingToMappings:self.objectMapping.relationshipMappings]; +} + +- (void)applyAttributeMapping:(RKAttributeMapping *)attributeMapping withValue:(id)value +{ + if ([self.delegate respondsToSelector:@selector(mappingOperation:didFindValue:forKeyPath:mapping:)]) { + [self.delegate mappingOperation:self didFindValue:value forKeyPath:attributeMapping.sourceKeyPath mapping:attributeMapping]; + } + RKLogTrace(@"Mapping attribute value keyPath '%@' to '%@'", attributeMapping.sourceKeyPath, attributeMapping.destinationKeyPath); + + // Inspect the property type to handle any value transformations + Class type = [self.objectMapping classForKeyPath:attributeMapping.destinationKeyPath]; + if (type && NO == [[value class] isSubclassOfClass:type]) { + value = [self transformValue:value atKeyPath:attributeMapping.sourceKeyPath toType:type]; + } + + RKSetIntermediateDictionaryValuesOnObjectForKeyPath(self.destinationObject, attributeMapping.destinationKeyPath); + + // Ensure that the value is different + if ([self shouldSetValue:&value atKeyPath:attributeMapping.destinationKeyPath]) { + RKLogTrace(@"Mapped attribute value from keyPath '%@' to '%@'. Value: %@", attributeMapping.sourceKeyPath, attributeMapping.destinationKeyPath, value); + + [self.destinationObject setValue:value forKeyPath:attributeMapping.destinationKeyPath]; + if ([self.delegate respondsToSelector:@selector(mappingOperation:didSetValue:forKeyPath:usingMapping:)]) { + [self.delegate mappingOperation:self didSetValue:value forKeyPath:attributeMapping.destinationKeyPath usingMapping:attributeMapping]; + } + } else { + RKLogTrace(@"Skipped mapping of attribute value from keyPath '%@ to keyPath '%@' -- value is unchanged (%@)", attributeMapping.sourceKeyPath, attributeMapping.destinationKeyPath, value); + if ([self.delegate respondsToSelector:@selector(mappingOperation:didNotSetUnchangedValue:forKeyPath:usingMapping:)]) { + [self.delegate mappingOperation:self didNotSetUnchangedValue:value forKeyPath:attributeMapping.destinationKeyPath usingMapping:attributeMapping]; + } + } +} + +// Return YES if we mapped any attributes +- (BOOL)applyAttributeMappings:(NSArray *)attributeMappings +{ + // If we have a nesting substitution value, we have already succeeded + BOOL appliedMappings = (_nestedAttributeSubstitution != nil); + + if (!self.objectMapping.performKeyValueValidation) { + RKLogDebug(@"Key-value validation is disabled for mapping, skipping..."); + } + + for (RKAttributeMapping *attributeMapping in attributeMappings) { + if ([self isCancelled]) return NO; + + if ([attributeMapping.sourceKeyPath isEqualToString:RKObjectMappingNestingAttributeKeyName]) { + RKLogTrace(@"Skipping attribute mapping for special keyPath '%@'", attributeMapping.sourceKeyPath); + continue; + } + + if (self.objectMapping.ignoreUnknownKeyPaths && ![self.sourceObject respondsToSelector:NSSelectorFromString(attributeMapping.sourceKeyPath)]) { + RKLogDebug(@"Source object is not key-value coding compliant for the keyPath '%@', skipping...", attributeMapping.sourceKeyPath); + continue; + } + + id value = nil; + @try { + if ([attributeMapping.sourceKeyPath isEqualToString:@""]) { + value = self.sourceObject; + } else { + value = [self.sourceObject valueForKeyPath:attributeMapping.sourceKeyPath]; + } + } + @catch (NSException *exception) { + if ([[exception name] isEqualToString:NSUndefinedKeyException] && self.objectMapping.ignoreUnknownKeyPaths) { + RKLogWarning(@"Encountered an undefined attribute mapping for keyPath '%@' that generated NSUndefinedKeyException exception. Skipping due to objectMapping.ignoreUnknownKeyPaths = YES", + attributeMapping.sourceKeyPath); + continue; + } + + @throw; + } + + if (value) { + appliedMappings = YES; + [self applyAttributeMapping:attributeMapping withValue:value]; + } else { + if ([self.delegate respondsToSelector:@selector(mappingOperation:didNotFindValueForKeyPath:mapping:)]) { + [self.delegate mappingOperation:self didNotFindValueForKeyPath:attributeMapping.sourceKeyPath mapping:attributeMapping]; + } + RKLogTrace(@"Did not find mappable attribute value keyPath '%@'", attributeMapping.sourceKeyPath); + + // Optionally set the default value for missing values + if ([self.objectMapping shouldSetDefaultValueForMissingAttributes]) { + [self.destinationObject setValue:[self.objectMapping defaultValueForMissingAttribute:attributeMapping.destinationKeyPath] + forKeyPath:attributeMapping.destinationKeyPath]; + RKLogTrace(@"Setting nil for missing attribute value at keyPath '%@'", attributeMapping.sourceKeyPath); + } + } + + // Fail out if an error has occurred + if (self.error) break; + } + + return appliedMappings; +} + +- (BOOL)mapNestedObject:(id)anObject toObject:(id)anotherObject withRelationshipMapping:(RKRelationshipMapping *)relationshipMapping +{ + NSAssert(anObject, @"Cannot map nested object without a nested source object"); + NSAssert(anotherObject, @"Cannot map nested object without a destination object"); + NSAssert(relationshipMapping, @"Cannot map a nested object relationship without a relationship mapping"); + NSError *error = nil; + + RKLogTrace(@"Performing nested object mapping using mapping %@ for data: %@", relationshipMapping, anObject); + RKMappingOperation *subOperation = [[RKMappingOperation alloc] initWithSourceObject:anObject destinationObject:anotherObject mapping:relationshipMapping.mapping]; + subOperation.dataSource = self.dataSource; + subOperation.delegate = self.delegate; + [subOperation start]; + + if (subOperation.error) { + RKLogWarning(@"WARNING: Failed mapping nested object: %@", [error localizedDescription]); + } + + return YES; +} + +- (BOOL)mapOneToOneRelationshipWithValue:(id)value mapping:(RKRelationshipMapping *)relationshipMapping +{ + // One to one relationship + RKLogDebug(@"Mapping one to one relationship value at keyPath '%@' to '%@'", relationshipMapping.sourceKeyPath, relationshipMapping.destinationKeyPath); + + id destinationObject = [self destinationObjectForMappingRepresentation:value withMapping:relationshipMapping.mapping]; + if (! destinationObject) { + RKLogDebug(@"Mapping %@ declined mapping for representation %@: returned `nil` destination object.", relationshipMapping.mapping, destinationObject); + return NO; + } + [self mapNestedObject:value toObject:destinationObject withRelationshipMapping:relationshipMapping]; + + // If the relationship has changed, set it + if ([self shouldSetValue:&destinationObject atKeyPath:relationshipMapping.destinationKeyPath]) { + RKLogTrace(@"Mapped relationship object from keyPath '%@' to '%@'. Value: %@", relationshipMapping.sourceKeyPath, relationshipMapping.destinationKeyPath, destinationObject); + [self.destinationObject setValue:destinationObject forKey:relationshipMapping.destinationKeyPath]; + } else { + if ([self.delegate respondsToSelector:@selector(mappingOperation:didNotSetUnchangedValue:forKeyPath:usingMapping:)]) { + [self.delegate mappingOperation:self didNotSetUnchangedValue:destinationObject forKeyPath:relationshipMapping.destinationKeyPath usingMapping:relationshipMapping]; + } + } + + return YES; +} + +- (BOOL)mapCoreDataToManyRelationshipValue:(id)valueForRelationship withMapping:(RKRelationshipMapping *)relationshipMapping +{ + if (! RKIsManagedObject(self.destinationObject)) return NO; + + RKLogTrace(@"Mapping a to-many relationship for an `NSManagedObject`. About to apply value via mutable[Set|Array]ValueForKey"); + if ([valueForRelationship isKindOfClass:[NSSet class]]) { + RKLogTrace(@"Mapped `NSSet` relationship object from keyPath '%@' to '%@'. Value: %@", relationshipMapping.sourceKeyPath, relationshipMapping.destinationKeyPath, valueForRelationship); + NSMutableSet *destinationSet = [self.destinationObject mutableSetValueForKeyPath:relationshipMapping.destinationKeyPath]; + [destinationSet setSet:valueForRelationship]; + } else if ([valueForRelationship isKindOfClass:[NSArray class]]) { + RKLogTrace(@"Mapped `NSArray` relationship object from keyPath '%@' to '%@'. Value: %@", relationshipMapping.sourceKeyPath, relationshipMapping.destinationKeyPath, valueForRelationship); + NSMutableArray *destinationArray = [self.destinationObject mutableArrayValueForKeyPath:relationshipMapping.destinationKeyPath]; + [destinationArray setArray:valueForRelationship]; + } else if ([valueForRelationship isKindOfClass:[NSOrderedSet class]]) { + RKLogTrace(@"Mapped `NSOrderedSet` relationship object from keyPath '%@' to '%@'. Value: %@", relationshipMapping.sourceKeyPath, relationshipMapping.destinationKeyPath, valueForRelationship); + [self.destinationObject setValue:valueForRelationship forKeyPath:relationshipMapping.destinationKeyPath]; + } + + return YES; +} + +- (BOOL)mapOneToManyRelationshipWithValue:(id)value mapping:(RKRelationshipMapping *)relationshipMapping +{ + // One to many relationship + RKLogDebug(@"Mapping one to many relationship value at keyPath '%@' to '%@'", relationshipMapping.sourceKeyPath, relationshipMapping.destinationKeyPath); + + NSMutableArray *relationshipCollection = [NSMutableArray arrayWithCapacity:[value count]]; + id collectionSanityCheckObject = nil; + if ([value respondsToSelector:@selector(anyObject)]) collectionSanityCheckObject = [value anyObject]; + if ([value respondsToSelector:@selector(lastObject)]) collectionSanityCheckObject = [value lastObject]; + if (RKObjectIsCollection(collectionSanityCheckObject)) { + RKLogWarning(@"WARNING: Detected a relationship mapping for a collection containing another collection. This is probably not what you want. Consider using a KVC collection operator (such as @unionOfArrays) to flatten your mappable collection."); + RKLogWarning(@"Key path '%@' yielded collection containing another collection rather than a collection of objects: %@", relationshipMapping.sourceKeyPath, value); + } + for (id nestedObject in value) { + id mappableObject = [self destinationObjectForMappingRepresentation:nestedObject withMapping:relationshipMapping.mapping]; + if (! mappableObject) { + RKLogDebug(@"Mapping %@ declined mapping for representation %@: returned `nil` destination object.", relationshipMapping.mapping, nestedObject); + continue; + } + if ([self mapNestedObject:nestedObject toObject:mappableObject withRelationshipMapping:relationshipMapping]) { + [relationshipCollection addObject:mappableObject]; + } + } + + id valueForRelationship = relationshipCollection; + // Transform from NSSet <-> NSArray if necessary + Class type = [self.objectMapping classForKeyPath:relationshipMapping.destinationKeyPath]; + if (type && NO == [[relationshipCollection class] isSubclassOfClass:type]) { + valueForRelationship = [self transformValue:relationshipCollection atKeyPath:relationshipMapping.sourceKeyPath toType:type]; + } + + // If the relationship has changed, set it + if ([self shouldSetValue:&valueForRelationship atKeyPath:relationshipMapping.destinationKeyPath]) { + if (! [self mapCoreDataToManyRelationshipValue:valueForRelationship withMapping:relationshipMapping]) { + RKLogTrace(@"Mapped relationship object from keyPath '%@' to '%@'. Value: %@", relationshipMapping.sourceKeyPath, relationshipMapping.destinationKeyPath, valueForRelationship); + [self.destinationObject setValue:valueForRelationship forKeyPath:relationshipMapping.destinationKeyPath]; + } + } else { + if ([self.delegate respondsToSelector:@selector(mappingOperation:didNotSetUnchangedValue:forKeyPath:usingMapping:)]) { + [self.delegate mappingOperation:self didNotSetUnchangedValue:valueForRelationship forKeyPath:relationshipMapping.destinationKeyPath usingMapping:relationshipMapping]; + } + + return NO; + } + + return YES; +} + +- (BOOL)applyRelationshipMappings +{ + NSAssert(self.dataSource, @"Cannot perform relationship mapping without a data source"); + NSMutableArray *mappingsApplied = [NSMutableArray array]; + id destinationObject = nil; + + for (RKRelationshipMapping *relationshipMapping in [self relationshipMappings]) { + if ([self isCancelled]) return NO; + + id value = nil; + @try { + value = [self.sourceObject valueForKeyPath:relationshipMapping.sourceKeyPath]; + } + @catch (NSException *exception) { + if ([[exception name] isEqualToString:NSUndefinedKeyException] && self.objectMapping.ignoreUnknownKeyPaths) { + RKLogWarning(@"Encountered an undefined relationship mapping for keyPath '%@' that generated NSUndefinedKeyException exception. Skipping due to objectMapping.ignoreUnknownKeyPaths = YES", + relationshipMapping.sourceKeyPath); + continue; + } + + @throw; + } + + // Track that we applied this mapping + [mappingsApplied addObject:relationshipMapping]; + + if (value == nil) { + RKLogDebug(@"Did not find mappable relationship value keyPath '%@'", relationshipMapping.sourceKeyPath); + + // Optionally nil out the property + id nilReference = nil; + if ([self.objectMapping setNilForMissingRelationships] && [self shouldSetValue:&nilReference atKeyPath:relationshipMapping.destinationKeyPath]) { + RKLogTrace(@"Setting nil for missing relationship value at keyPath '%@'", relationshipMapping.sourceKeyPath); + [self.destinationObject setValue:nil forKeyPath:relationshipMapping.destinationKeyPath]; + } + + continue; + } + + if (value == [NSNull null]) { + RKLogDebug(@"Found null value at keyPath '%@'", relationshipMapping.sourceKeyPath); + + // Optionally nil out the property + id nilReference = nil; + if ([self shouldSetValue:&nilReference atKeyPath:relationshipMapping.destinationKeyPath]) { + RKLogTrace(@"Setting nil for null relationship value at keyPath '%@'", relationshipMapping.sourceKeyPath); + [self.destinationObject setValue:nil forKeyPath:relationshipMapping.destinationKeyPath]; + } + + continue; + } + + // Handle case where incoming content is collection represented by a dictionary + if (relationshipMapping.mapping.forceCollectionMapping) { + // If we have forced mapping of a dictionary, map each subdictionary + if ([value isKindOfClass:[NSDictionary class]]) { + RKLogDebug(@"Collection mapping forced for NSDictionary, mapping each key/value independently..."); + NSArray *objectsToMap = [NSMutableArray arrayWithCapacity:[value count]]; + for (id key in value) { + NSDictionary *dictionaryToMap = [NSDictionary dictionaryWithObject:[value valueForKey:key] forKey:key]; + [(NSMutableArray *)objectsToMap addObject:dictionaryToMap]; + } + value = objectsToMap; + } else { + RKLogWarning(@"Collection mapping forced but mappable objects is of type '%@' rather than NSDictionary", NSStringFromClass([value class])); + } + } + + // Handle case where incoming content is a single object, but we want a collection + Class relationshipClass = [self.objectMapping classForKeyPath:relationshipMapping.destinationKeyPath]; + BOOL mappingToCollection = RKClassIsCollection(relationshipClass); + if (mappingToCollection && !RKObjectIsCollection(value)) { + Class orderedSetClass = NSClassFromString(@"NSOrderedSet"); + RKLogDebug(@"Asked to map a single object into a collection relationship. Transforming to an instance of: %@", NSStringFromClass(relationshipClass)); + if ([relationshipClass isSubclassOfClass:[NSArray class]]) { + value = [relationshipClass arrayWithObject:value]; + } else if ([relationshipClass isSubclassOfClass:[NSSet class]]) { + value = [relationshipClass setWithObject:value]; + } else if (orderedSetClass && [relationshipClass isSubclassOfClass:orderedSetClass]) { + value = [relationshipClass orderedSetWithObject:value]; + } else { + RKLogWarning(@"Failed to transform single object"); + } + } + + BOOL setValueForRelationship; + if (RKObjectIsCollection(value)) { + setValueForRelationship = [self mapOneToManyRelationshipWithValue:value mapping:relationshipMapping]; + } else { + setValueForRelationship = [self mapOneToOneRelationshipWithValue:value mapping:relationshipMapping]; + } + + if (! setValueForRelationship) continue; + + // Notify the delegate + if ([self.delegate respondsToSelector:@selector(mappingOperation:didSetValue:forKeyPath:usingMapping:)]) { + [self.delegate mappingOperation:self didSetValue:destinationObject forKeyPath:relationshipMapping.destinationKeyPath usingMapping:relationshipMapping]; + } + + // Fail out if a validation error has occurred + if (self.error) break; + } + + return [mappingsApplied count] > 0; +} + +- (void)applyNestedMappings +{ + RKAttributeMapping *attributeMapping = [self.objectMapping attributeMappingForKeyOfNestedDictionary]; + if (attributeMapping) { + RKLogDebug(@"Found nested mapping definition to attribute '%@'", attributeMapping.destinationKeyPath); + id attributeValue = [[self.sourceObject allKeys] lastObject]; + if (attributeValue) { + RKLogDebug(@"Found nesting value of '%@' for attribute '%@'", attributeValue, attributeMapping.destinationKeyPath); + _nestedAttributeSubstitution = [[NSDictionary alloc] initWithObjectsAndKeys:attributeValue, attributeMapping.destinationKeyPath, nil]; + [self applyAttributeMapping:attributeMapping withValue:attributeValue]; + } else { + RKLogWarning(@"Unable to find nesting value for attribute '%@'", attributeMapping.destinationKeyPath); + } + } +} + +- (void)cancel +{ + [super cancel]; + RKLogDebug(@"Mapping operation cancelled: %@", self); +} + +- (void)main +{ + if ([self isCancelled]) return; + + RKLogDebug(@"Starting mapping operation..."); + RKLogTrace(@"Performing mapping operation: %@", self); + + if (! self.destinationObject) { + self.destinationObject = [self destinationObjectForMappingRepresentation:self.sourceObject withMapping:self.mapping]; + if (! self.destinationObject) { + RKLogDebug(@"Mapping operation failed: Given nil destination object and unable to instantiate a destination object for mapping."); + NSDictionary *userInfo = @{ NSLocalizedDescriptionKey: @"Cannot perform a mapping operation with a nil destination object." }; + self.error = [NSError errorWithDomain:RKErrorDomain code:RKMappingErrorNilDestinationObject userInfo:userInfo]; + return; + } + } + + // Determine the concrete mapping if we were initialized with a dynamic mapping + if ([self.mapping isKindOfClass:[RKDynamicMapping class]]) { + self.objectMapping = [(RKDynamicMapping *)self.mapping objectMappingForRepresentation:self.sourceObject]; + if (! self.objectMapping) { + NSDictionary *userInfo = @{ NSLocalizedDescriptionKey: @"A dynamic mapping failed to return a concrete object mapping matching the representation being mapped." }; + self.error = [NSError errorWithDomain:RKErrorDomain code:RKMappingErrorUnableToDetermineMapping userInfo:userInfo]; + return; + } + RKLogDebug(@"RKObjectMappingOperation was initialized with a dynamic mapping. Determined concrete mapping = %@", self.objectMapping); + + if ([self.delegate respondsToSelector:@selector(mappingOperation:didSelectObjectMapping:forDynamicMapping:)]) { + [self.delegate mappingOperation:self didSelectObjectMapping:self.objectMapping forDynamicMapping:(RKDynamicMapping *)self.mapping]; + } + } else if ([self.mapping isKindOfClass:[RKObjectMapping class]]) { + self.objectMapping = (RKObjectMapping *)self.mapping; + } + + [self applyNestedMappings]; + if ([self isCancelled]) return; + BOOL mappedSimpleAttributes = [self applyAttributeMappings:[self simpleAttributeMappings]]; + if ([self isCancelled]) return; + BOOL mappedRelationships = [[self relationshipMappings] count] ? [self applyRelationshipMappings] : NO; + if ([self isCancelled]) return; + // NOTE: We map key path attributes last to allow you to map across the object graphs for objects created/updated by the relationship mappings + BOOL mappedKeyPathAttributes = [self applyAttributeMappings:[self keyPathAttributeMappings]]; + + if (!mappedSimpleAttributes && !mappedRelationships && !mappedKeyPathAttributes) { + // We did not find anything to do + RKLogDebug(@"Mapping operation did not find any mappable values for the attribute and relationship mappings in the given object representation"); + NSDictionary *userInfo = @{ NSLocalizedDescriptionKey: @"No mappable values found for any of the attributes or relationship mappings" }; + self.error = [NSError errorWithDomain:RKErrorDomain code:RKMappingErrorUnmappableRepresentation userInfo:userInfo]; + } + + // We did some mapping work, if there's no error let's commit our changes to the data source + if (self.error == nil) { + if ([self.dataSource respondsToSelector:@selector(commitChangesForMappingOperation:error:)]) { + NSError *error = nil; + BOOL success = [self.dataSource commitChangesForMappingOperation:self error:&error]; + if (! success) { + self.error = error; + } + } + } + + if (self.error) { + if ([self.delegate respondsToSelector:@selector(mappingOperation:didFailWithError:)]) { + [self.delegate mappingOperation:self didFailWithError:self.error]; + } + + RKLogError(@"Failed mapping operation: %@", [self.error localizedDescription]); + } else { + RKLogDebug(@"Finished mapping operation successfully..."); + } +} + +- (BOOL)performMapping:(NSError **)error +{ + [self start]; + if (error) *error = self.error; + return self.error == nil; +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"<%@ %p> for '%@' object. Mapping values from object %@ to object %@ with object mapping %@", + [self class], self, NSStringFromClass([self.destinationObject class]), self.sourceObject, self.destinationObject, self.objectMapping]; +} + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKMappingOperationDataSource.h b/Pods/RestKit/Code/ObjectMapping/RKMappingOperationDataSource.h new file mode 100644 index 00000000..de2d4267 --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKMappingOperationDataSource.h @@ -0,0 +1,59 @@ +// +// RKMappingOperationDataSource.h +// RestKit +// +// Created by Blake Watters on 7/3/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import <Foundation/Foundation.h> + +@class RKObjectMapping, RKMappingOperation; + +/** + An object that adopts the `RKMappingOperationDataSource` protocol is responsible for the retrieval or creation of target objects within an `RKMapperOperation` or `RKMappingOperation`. A data source is responsible for meeting the requirements of the underlying data store implementation and must return a key-value coding compliant object instance that can be used as the target object of a mapping operation. It is also responsible for commiting any changes necessary to the underlying data store once a mapping operation has completed its work. + + At a minimum, a data source must implement the `mappingOperation:targetObjectForRepresentation:withMapping:` method. This method is responsible for finding an existing object instance to be updated or creating a new object if no existing object could be found or the underlying data store does not support persistence. Object mapping operations which target `NSObject` derived classes will always result in mapping to new transient objects, while persistent data stores such as Core Data can be queried to retrieve existing objects for update. + + @see `RKManagedObjectMappingOperationDataSource` + */ +@protocol RKMappingOperationDataSource <NSObject> + +@required + +/** + Asks the data source for the target object for an object mapping operation given an `NSDictionary` representation of the object's properties and the mapping object that will be used to perform the mapping. + + The `representation` value is a fragment of content from a deserialized response that has been identified as containing content that is mappable using the given mapping. + + @param mappingOperation The mapping operation requesting the target object. + @param representation A dictionary representation of the properties to be mapped onto the retrieved target object. + @param mapping The object mapping to be used to perform a mapping from the representation to the target object. + @return A key-value coding compliant object to perform the mapping on to. + */ +- (id)mappingOperation:(RKMappingOperation *)mappingOperation targetObjectForRepresentation:(NSDictionary *)representation withMapping:(RKObjectMapping *)mapping; + +@optional + +/** + Tells the data source to commit any changes to the underlying data store. + + @param mappingOperation The mapping operation that has completed its work. + @param error A pointer to an error to be set in the event that the mapping operation could not be committed. + @return A Boolean value indicating if the changes for the mapping operation were committed successfully. + */ +- (BOOL)commitChangesForMappingOperation:(RKMappingOperation *)mappingOperation error:(NSError **)error; + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKMappingResult.h b/Pods/RestKit/Code/ObjectMapping/RKMappingResult.h new file mode 100644 index 00000000..de53e4db --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKMappingResult.h @@ -0,0 +1,91 @@ +// +// RKMappingResult.h +// RestKit +// +// Created by Blake Watters on 5/7/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import <Foundation/Foundation.h> + +/** + The `RKMappingResult` class represents the aggregate object mapping results returned by an `RKMapperOperation` object. The mapping result provides a thin interface on top of an `NSDictionary` and provides convenient interfaces for accessing the mapping results in various representations. + */ +@interface RKMappingResult : NSObject + +///---------------------------------------- +/// @name Creating a Mapping Result +///---------------------------------------- + +/** + Initializes the receiver with a dictionary of mapped key paths and object values. + + @param dictionary A dictionary wherein the keys represent mapped key paths and the values represent the objects mapped at those key paths. Cannot be nil. + @return The receiver, initialized with the given dictionary. + */ +- (id)initWithDictionary:(NSDictionary *)dictionary; + +///---------------------------------------- +/// @name Retrieving Result Representations +///---------------------------------------- + +/** + Returns a representation of the mapping result as a dictionary. + + The keys of the returned dictionary will correspond to the mapped key paths in the source object representation and the values will be the mapped objects. The returned value is a copy of the dictionary that was used to initialize the mapping result. + + @return A dictionary containing the mapping results. + */ +- (NSDictionary *)dictionary; + +/** + Returns a representation of the mapping result as a single object by returning the first mapped value from the aggregate array of mapped objects. + + The mapping result is coerced into a single object by retrieving all mapped objects and returning the first object. If the mapping result is empty, `nil` is returned. + + @return The first object contained in the mapping result. + */ +- (id)firstObject; + +/** + Returns a representation of the mapping result as an array of objects. + + The array returned is a flattened collection of all mapped object values contained in the underlying dictionary result representation. No guarantee is made as to the ordering of objects within the returned collection when more than one key path was mapped, as `NSDictionary` objects are unordered, + + @return An array containing the objects contained in the mapping result. + */ +- (NSArray *)array; + +/** + Returns a representation of the mapping result as a set of objects. + + The set returned is a flattened collection of all mapped object values contained in the underlying dictionary result representation. + + @return A set containing the objects contained in the mapping result. + */ +- (NSSet *)set; + +///---------------------------------------- +/// @name Counting Entries +///---------------------------------------- + +/** + Returns a count of the number of objects contained in the mapping result. This is an aggregate count of all objects across all mapped key paths in the result. + + @return A count of the number of mapped objects in the mapping result. + */ +- (NSUInteger)count; + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKMappingResult.m b/Pods/RestKit/Code/ObjectMapping/RKMappingResult.m new file mode 100644 index 00000000..d65a2164 --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKMappingResult.m @@ -0,0 +1,87 @@ +// +// RKMappingResult.m +// RestKit +// +// Created by Blake Watters on 5/7/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKMappingResult.h" + +@interface RKMappingResult () +@property (nonatomic, strong) NSDictionary *keyPathToMappedObjects; +@end + +@implementation RKMappingResult + +- (id)initWithDictionary:(id)dictionary +{ + NSParameterAssert(dictionary); + self = [self init]; + if (self) { + self.keyPathToMappedObjects = dictionary; + } + + return self; +} + +- (NSDictionary *)dictionary +{ + return [self.keyPathToMappedObjects copy]; +} + +- (NSArray *)array +{ + // Flatten results down into a single array + NSMutableArray *collection = [NSMutableArray array]; + for (id object in [self.keyPathToMappedObjects allValues]) { + // We don't want to strip the keys off of a mapped dictionary result + if (NO == [object isKindOfClass:[NSDictionary class]] && [object respondsToSelector:@selector(allObjects)]) { + [collection addObjectsFromArray:[object allObjects]]; + } else { + [collection addObject:object]; + } + } + + return collection; +} + +- (NSSet *)set +{ + return [NSSet setWithArray:[self array]]; +} + +- (id)firstObject +{ + NSArray *collection = [self array]; + NSUInteger count = [collection count]; + if (count == 0) { + return nil; + } + + return [collection objectAtIndex:0]; +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"<%@: %p, results=%@>", NSStringFromClass([self class]), self, self.keyPathToMappedObjects]; +} + +- (NSUInteger)count +{ + return [[self array] count]; +} + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKObjectMapping.h b/Pods/RestKit/Code/ObjectMapping/RKObjectMapping.h new file mode 100644 index 00000000..0b72bc23 --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKObjectMapping.h @@ -0,0 +1,374 @@ +// +// RKObjectMapping.h +// RestKit +// +// Created by Blake Watters on 4/30/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKMacros.h" +#import "RKMapping.h" + +@class RKPropertyMapping, RKAttributeMapping, RKRelationshipMapping; + +/** + An `RKObjectMapping` object describes a transformation between object represenations using key-value coding and run-time type introspection. The mapping is defined in terms of a source object class and a collection of `RKPropertyMapping` objects describing how key paths in the source representation should be transformed into attributes and relationships on the target object. Object mappings are provided to instances of `RKMapperOperation` and `RKMappingOperation` to perform the transformations they describe. + + Object mappings are containers of property mappings that describe the actual key path transformations. There are two types of property mappings: + + 1. `RKAttributeMapping`: An attribute mapping describes a transformation between a single value from a source key path to a destination key path. The value to be mapped is read from the source object representation using `valueForKeyPath:` and then set to the destination key path using `setValueForKeyPath:`. Before the value is set, the `RKObjecMappingOperation` performing the mapping performs runtime introspection on the destination property to determine what, if any, type transformation is to be performed. Typical type transformations include reading an `NSString` value representation and mapping it to an `NSDecimalNumber` destination key path or reading an `NSString` and transforming it into an `NSDate` value before assigning to the destination. + 1. `RKRelationshipMapping`: A relationship mapping describes a transformation between a nested child object or objects from a source key path to a destination key path using another `RKObjectMapping`. The child objects to be mapped are read from the source object representation using `valueForKeyPath:`, then mapped recursively using the object mapping associated with the relationship mapping, and then finally assigned to the destination key path. Before assignment to the destination key path runtime type introspection is performed to determine if any type transformation is necessary. For relationship mappings, common type transformations include transforming a single object value in an `NSArray` or transforming an `NSArray` of object values into an `NSSet`. + + All type transformations available are discussed in detail in the documentation for `RKObjectMappingOperation`. + + @see `RKAttributeMapping` + @see `RKRelationshipMapping` + @see `RKConnectionMapping` + @see `RKMappingOperation` + @see `RKPropertyInspector` + */ +@interface RKObjectMapping : RKMapping <NSCopying> + +///--------------------------------- +/// @name Creating an Object Mapping +///--------------------------------- + +/** + Returns an object mapping for the specified class that is ready for configuration + + @param objectClass The class that the mapping targets. + @return A new mapping object. + */ ++ (id)mappingForClass:(Class)objectClass; + +/** + Initializes the receiver with a given object class. This is the designated initializer. + + @param objectClass The class that the mapping targets. Cannot be `nil`. + @return The receiver, initialized with the given class. + */ +- (id)initWithClass:(Class)objectClass; + +/** + Returns an object mapping with an `objectClass` of `NSMutableDictionary`. + + Request mappings are used when configuring mappings that are to be used for transforming local objects into HTTP parameters using the `RKObjectParameterization` class. + + @return An object mapping with an object class of `NSMutableDictionary`. + @see `RKObjectParameterization` + @see `RKObjectManager` + */ ++ (id)requestMapping; + +///--------------------------------- +/// @name Managing Property Mappings +///--------------------------------- + +/** + The aggregate collection of attribute and relationship mappings within this object mapping. + */ +@property (nonatomic, strong, readonly) NSArray *propertyMappings; + +/** + Returns the property mappings of the receiver in a dictionary, where the keys are the source key paths and the values are instances of `RKAttributeMapping` or `RKRelationshipMapping`. + + @return The property mappings of the receiver in a dictionary, where the keys are the source key paths and the values are instances of `RKAttributeMapping` or `RKRelationshipMapping`. + */ +@property (nonatomic, readonly) NSDictionary *propertyMappingsBySourceKeyPath; + +/** + Returns the property mappings of the receiver in a dictionary, where the keys are the destination key paths and the values are instances of `RKAttributeMapping` or `RKRelationshipMapping`. + + @return The property mappings of the receiver in a dictionary, where the keys are the destination key paths and the values are instances of `RKAttributeMapping` or `RKRelationshipMapping`. + */ +@property (nonatomic, readonly) NSDictionary *propertyMappingsByDestinationKeyPath; + +/** + The collection of attribute mappings within this object mapping. + */ +@property (nonatomic, readonly) NSArray *attributeMappings; + +/** + The collection of relationship mappings within this object mapping. + */ +@property (nonatomic, readonly) NSArray *relationshipMappings; + +/** + Adds a property mapping to the receiver. + + @param propertyMapping The property mapping to be added to the object mapping. + */ +- (void)addPropertyMapping:(RKPropertyMapping *)propertyMapping; + +/** + Adds an array of `RKAttributeMapping` or `RKRelationshipMapping` objects to the receiver. + + @param propertyMappings The array of property mappings to be added to the object mapping. + */ +- (void)addPropertyMappingsFromArray:(NSArray *)arrayOfPropertyMappings; + +/** + Removes an `RKAttributeMapping` or `RKRelationshipMapping` from the receiver. + + @param propertyMapping The attribute or relationship mapping to remove. + */ +- (void)removePropertyMapping:(RKPropertyMapping *)propertyMapping; + +/** + Adds attribute mappings from a given dictionary wherein the keys represent the source key path and the values represent the names of the target attributes on the destination object. + + @param keyPathToAttributeNames A dictionary keyed by source key to destination attribute name. + */ +- (void)addAttributeMappingsFromDictionary:(NSDictionary *)keyPathToAttributeNames; + +/** + Adds attribute mappings to the receiver from a given array. + + The array can contain `RKAttributeMapping` objects or `NSString` values. If an `NSString` is given, then a new `RKAttributeMapping` object is instantiated with a `sourceKeyPath` and `destinationKeyPath` equal to the string value. + + @param An array of `RKAttributeMapping` or `NSString` values to be added to the receiver's set of attribute mappings, + */ +- (void)addAttributeMappingsFromArray:(NSArray *)arrayOfAttributeNamesOrMappings; + +///---------------------------------- +/// @name Mapping Nested Dictionaries +///---------------------------------- + +/** + Configures a sub-key mapping for cases where JSON has been nested underneath a key named after an attribute. + + For example, consider the following JSON: + + { "users": + { + "blake": { "id": 1234, "email": "blake@restkit.org" }, + "rachit": { "id": 5678", "email": "rachit@restkit.org" } + } + } + + We can configure our mappings to handle this in the following form: + + RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[User class]]; + mapping.forceCollectionMapping = YES; // RestKit cannot infer this is a collection, so we force it + [mapping mapKeyOfNestedDictionaryToAttribute:@"firstName"]; + [mapping mapFromKeyPath:@"(firstName).id" toAttribute:"userID"]; + [mapping mapFromKeyPath:@"(firstName).email" toAttribute:"email"]; + + [[RKObjectManager sharedManager].mappingProvider setObjectMapping:mapping forKeyPath:@"users"]; + + */ +- (void)mapKeyOfNestedDictionaryToAttribute:(NSString *)attributeName; +// TODO: Can we eliminate this API??? + +/** + Returns the attribute mapping targeting the key of a nested dictionary in the source JSON. + + This attribute mapping corresponds to the attributeName configured via `mapKeyOfNestedDictionaryToAttribute:` + + @return An attribute mapping for the key of a nested dictionary being mapped or nil + @see `mapKeyOfNestedDictionaryToAttribute:` + */ +- (RKAttributeMapping *)attributeMappingForKeyOfNestedDictionary; + +///---------------------------------- +/// @name Configuring Mapping Options +///---------------------------------- + +/** + The target class that the receiver describes a mapping for. + */ +@property (nonatomic, weak, readonly) Class objectClass; + +/** + When `YES`, any attributes that have mappings defined but are not present within the source object will be set to nil, clearing any existing value. + */ +@property (nonatomic, assign, getter = shouldSetDefaultValueForMissingAttributes) BOOL setDefaultValueForMissingAttributes; + +/** + When `YES`, any relationships that have mappings defined but are not present within the source object will be set to `nil`, clearing any existing value. + */ +@property (nonatomic, assign) BOOL setNilForMissingRelationships; + +/** + When `YES`, key-value validation will be invoked at object mapping time. + + **Default**: `YES` + @see `validateValue:forKey:error:` + */ +@property (nonatomic, assign) BOOL performKeyValueValidation; + +/** + When `YES`, the mapping operation will check that the object being mapped is key-value coding compliant for the mapped key. If it is not, the attribute/relationship mapping will be ignored and mapping will continue. When `NO`, property mappings for unknown key paths will trigger `NSUnknownKeyException` exceptions for the unknown keyPath. + + Defaults to `NO` to help the developer catch incorrect mapping configurations during development. + + **Default**: `NO` + */ +@property (nonatomic, assign) BOOL ignoreUnknownKeyPaths; + +/** + Returns the default value to be assigned to the specified attribute when it is missing from a mappable payload. + + The default implementation returns nil for transient object mappings. On an entity mapping, the default value returned from the Entity definition will be used. + + @see `[RKEntityMapping defaultValueForMissingAttribute:]` + */ +- (id)defaultValueForMissingAttribute:(NSString *)attributeName; + +///---------------------------------- +/// @name Configuring Date Formatters +///---------------------------------- + +/** + An array of `NSFormatter` objects to use when mapping string values into `NSDate` attributes on the target `objectClass`. Each date formatter will be invoked with the string value being mapped until one of the date formatters does not return nil. + + Defaults to the application-wide collection of date formatters configured via `[RKObjectMapping setDefaultDateFormatters:]` + + @see `[RKObjectMapping defaultDateFormatters]` + */ +@property (nonatomic, strong) NSArray *dateFormatters; + +/** + The `NSFormatter` object for your application's preferred date and time configuration. This date formatter will be used when generating string representations of NSDate attributes (i.e. during serialization to URL form encoded or JSON format). + + Defaults to the application-wide preferred date formatter configured via: `[RKObjectMapping setPreferredDateFormatter:]` + + @see `[RKObjectMapping preferredDateFormatter]` + */ +@property (nonatomic, strong) NSFormatter *preferredDateFormatter; + +/** + Generates an inverse mapping for the rules specified within this object mapping. This can be used to + quickly generate a corresponding serialization mapping from a configured object mapping. The inverse + mapping will have the source and destination keyPaths swapped for all attribute and relationship mappings. + */ +- (RKObjectMapping *)inverseMapping; +// TODO: Keep or kill inverse??? + +///--------------------------------------------------- +/// @name Obtaining Information About the Target Class +///--------------------------------------------------- + +/** + Returns the class of the attribute or relationship property of the target `objectClass` with the given name. + + Given the name of a string property, this will return an `NSString`, etc. + + @param propertyName The name of the property we would like to retrieve the type of. + @return The class of the property. + */ +- (Class)classForProperty:(NSString *)propertyName; +// TODO: Can I eliminate this and just use classForKeyPath:???? + +/** + Returns the class of the attribute or relationship property of the target `objectClass` at the given key path. + + Given a key path to a string property, this will return an `NSString`, etc. + + @param propertyName The name of the property we would like to retrieve the type of. + @return The class of the property at the given key path. + */ +- (Class)classForKeyPath:(NSString *)keyPath; + +@end + +///////////////////////////////////////////////////////////////////////////// + +/** + Defines the interface for configuring time and date formatting handling within RestKit object mappings. For performance reasons, RestKit reuses a pool of date formatters rather than constructing them at mapping time. This collection of date formatters can be configured on a per-object mapping or application-wide basis using the static methods exposed in this category. + */ +@interface RKObjectMapping (DateAndTimeFormatting) + +/** + Returns the collection of default date formatters that will be used for all object mappings that have not been configured specifically. + + Out of the box, RestKit initializes default date formatters for you in the UTC time zone with the following format strings: + + * `yyyy-MM-dd'T'HH:mm:ss'Z'` + * `MM/dd/yyyy` + + @return An array of `NSFormatter` objects used when mapping strings into NSDate attributes + */ ++ (NSArray *)defaultDateFormatters; + +/** + Sets the collection of default date formatters to the specified array. The array should contain configured instances of NSDateFormatter in the order in which you want them applied during object mapping operations. + + @param dateFormatters An array of date formatters to replace the existing defaults. + @see `defaultDateFormatters` + */ ++ (void)setDefaultDateFormatters:(NSArray *)dateFormatters; + +/** + Adds a date formatter instance to the default collection + + @param dateFormatter An `NSFormatter` object to prepend to the default formatters collection + @see `defaultDateFormatters` + */ ++ (void)addDefaultDateFormatter:(NSFormatter *)dateFormatter; + +/** + Convenience method for quickly constructing a date formatter and adding it to the collection of default date formatters. The locale is auto-configured to `en_US_POSIX`. + + @param dateFormatString The dateFormat string to assign to the newly constructed `NSDateFormatter` instance + @param nilOrTimeZone The NSTimeZone object to configure on the `NSDateFormatter` instance. Defaults to UTC time. + @return A new `NSDateFormatter` will be prepended to the `defaultDateFormatters` with the specified date format and time zone + @see `NSDateFormatter` + */ ++ (void)addDefaultDateFormatterForString:(NSString *)dateFormatString inTimeZone:(NSTimeZone *)nilOrTimeZone; + +/** + Returns the preferred date formatter to use when generating NSString representations from NSDate attributes. This type of transformation occurs when RestKit is mapping local objects into JSON or form encoded serializations that do not have a native time construct. + + Defaults to a date formatter configured for the UTC Time Zone with a format string of "yyyy-MM-dd HH:mm:ss Z" + + @return The preferred NSFormatter object to use when serializing dates into strings + */ ++ (NSFormatter *)preferredDateFormatter; + +/** + Sets the preferred date formatter to use when generating NSString representations from NSDate attributes. This type of transformation occurs when RestKit is mapping local objects into JSON or form encoded serializations that do not have a native time construct. + + @param dateFormatter The NSFormatter object to designate as the new preferred instance + */ ++ (void)setPreferredDateFormatter:(NSFormatter *)dateFormatter; + +@end + +///---------------- +/// @name Functions +///---------------- + +/** + Returns an date representation of a given string value by attempting to parse the string with all default date formatters in turn. + + @param dateString A string object encoding a date value. + @return An `NSDate` object parsed from the given string, or `nil` if the string was found to be unparsable by all default date formatters. + @see [RKObjectMapping defaultDateFormatters] + */ +NSDate *RKDateFromString(NSString *dateString); + +/** + Returns a string representation of a given date formatted with the preferred date formatter. + + This is a convenience function that is equivalent to the following example code: + + NSString *string = [[RKObjectMapping preferredDateFormatter] stringForObjectValue:date] + + @param date The date object to be formatted. + @return An `NSString` object representation of the given date formatted by the preferred date formatter. + @see [RKObjectMapping preferredDateFormatter] + */ +NSString *RKStringFromDate(NSDate *date); diff --git a/Pods/RestKit/Code/ObjectMapping/RKObjectMapping.m b/Pods/RestKit/Code/ObjectMapping/RKObjectMapping.m new file mode 100644 index 00000000..96934ace --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKObjectMapping.m @@ -0,0 +1,465 @@ +// +// RKObjectMapping.m +// RestKit +// +// Created by Blake Watters on 4/30/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKObjectMapping.h" +#import "RKRelationshipMapping.h" +#import "RKPropertyInspector.h" +#import "RKLog.h" +#import "RKISO8601DateFormatter.h" +#import "RKAttributeMapping.h" +#import "RKRelationshipMapping.h" + +// Constants +NSString * const RKObjectMappingNestingAttributeKeyName = @"<RK_NESTING_ATTRIBUTE>"; +static NSUInteger RKObjectMappingMaximumInverseMappingRecursionDepth = 100; + +// Private declaration +NSDate *RKDateFromStringWithFormatters(NSString *dateString, NSArray *formatters); + +@interface RKPropertyMapping () +@property (nonatomic, weak, readwrite) RKObjectMapping *objectMapping; +@end + +@interface RKObjectMapping () +@property (nonatomic, weak, readwrite) Class objectClass; +@property (nonatomic, strong) NSMutableArray *mutablePropertyMappings; + +@property (weak, nonatomic, readonly) NSArray *mappedKeyPaths; +@end + +@implementation RKObjectMapping + ++ (id)mappingForClass:(Class)objectClass +{ + return [[self alloc] initWithClass:objectClass]; +} + ++ (id)requestMapping +{ + return [self mappingForClass:[NSMutableDictionary class]]; +} + +- (id)initWithClass:(Class)objectClass +{ + self = [super init]; + if (self) { + self.objectClass = objectClass; + self.mutablePropertyMappings = [NSMutableArray new]; + self.setDefaultValueForMissingAttributes = NO; + self.setNilForMissingRelationships = NO; + self.forceCollectionMapping = NO; + self.performKeyValueValidation = YES; + self.ignoreUnknownKeyPaths = NO; + } + + return self; +} + +- (id)copyWithZone:(NSZone *)zone +{ + RKObjectMapping *copy = [[[self class] allocWithZone:zone] init]; + copy.objectClass = self.objectClass; + copy.setDefaultValueForMissingAttributes = self.setDefaultValueForMissingAttributes; + copy.setNilForMissingRelationships = self.setNilForMissingRelationships; + copy.forceCollectionMapping = self.forceCollectionMapping; + copy.performKeyValueValidation = self.performKeyValueValidation; + copy.dateFormatters = self.dateFormatters; + copy.preferredDateFormatter = self.preferredDateFormatter; + copy.mutablePropertyMappings = [NSMutableArray new]; + + for (RKPropertyMapping *propertyMapping in self.propertyMappings) { + [copy addPropertyMapping:propertyMapping]; + } + + return copy; +} + +- (NSArray *)propertyMappings +{ + return [NSArray arrayWithArray:_mutablePropertyMappings]; +} + +- (NSDictionary *)propertyMappingsBySourceKeyPath +{ + NSMutableDictionary *dictionary = [NSMutableDictionary dictionaryWithCapacity:[self.propertyMappings count]]; + for (RKPropertyMapping *propertyMapping in self.propertyMappings) { + [dictionary setObject:propertyMapping forKey:propertyMapping.sourceKeyPath]; + } + + return dictionary; +} + +- (NSDictionary *)propertyMappingsByDestinationKeyPath +{ + NSMutableDictionary *dictionary = [NSMutableDictionary dictionaryWithCapacity:[self.propertyMappings count]]; + for (RKPropertyMapping *propertyMapping in self.propertyMappings) { + [dictionary setObject:propertyMapping forKey:propertyMapping.destinationKeyPath]; + } + + return dictionary; +} + +- (NSArray *)mappedKeyPaths +{ + return [self.propertyMappings valueForKey:@"destinationKeyPath"]; +} + +- (NSArray *)attributeMappings +{ + NSMutableArray *mappings = [NSMutableArray array]; + for (RKAttributeMapping *mapping in self.propertyMappings) { + if ([mapping isMemberOfClass:[RKAttributeMapping class]]) { + [mappings addObject:mapping]; + } + } + + return mappings; +} + +- (NSArray *)relationshipMappings +{ + NSMutableArray *mappings = [NSMutableArray array]; + for (RKAttributeMapping *mapping in self.propertyMappings) { + if ([mapping isMemberOfClass:[RKRelationshipMapping class]]) { + [mappings addObject:mapping]; + } + } + + return mappings; +} + +- (void)addPropertyMapping:(RKPropertyMapping *)propertyMapping +{ + NSAssert1([[self mappedKeyPaths] containsObject:propertyMapping.destinationKeyPath] == NO, + @"Unable to add mapping for keyPath %@, one already exists...", propertyMapping.destinationKeyPath); + NSAssert(self.mutablePropertyMappings, @"self.mutablePropertyMappings is nil"); + NSAssert(propertyMapping.objectMapping == nil, @"Cannot add a property mapping object that has already been added to another `RKObjectMapping` object. You probably want to obtain a copy of the mapping: `[propertyMapping copy]`"); + propertyMapping.objectMapping = self; + [self.mutablePropertyMappings addObject:propertyMapping]; +} + +- (void)addPropertyMappingsFromArray:(NSArray *)arrayOfPropertyMappings +{ + NSAssert([[arrayOfPropertyMappings valueForKeyPath:@"@distinctUnionOfObjects.objectMapping"] count] == 0, @"One or more of the property mappings in the given array has already been added to another `RKObjectMapping` object. You probably want to obtain a copy of the array of mappings: `[[NSArray alloc] initWithArray:arrayOfPropertyMappings copyItems:YES]`"); + for (RKPropertyMapping *propertyMapping in arrayOfPropertyMappings) { + [self addPropertyMapping:propertyMapping]; + } +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"<%@:%p objectClass=%@ propertyMappings=%@>", + NSStringFromClass([self class]), self, NSStringFromClass(self.objectClass), self.propertyMappings]; +} + +- (id)mappingForKeyPath:(NSString *)keyPath +{ + return [self mappingForSourceKeyPath:keyPath]; +} + +- (id)mappingForSourceKeyPath:(NSString *)sourceKeyPath +{ + for (RKPropertyMapping *mapping in self.propertyMappings) { + if ([mapping.sourceKeyPath isEqualToString:sourceKeyPath]) { + return mapping; + } + } + + return nil; +} + +- (id)mappingForDestinationKeyPath:(NSString *)destinationKeyPath +{ + for (RKPropertyMapping *mapping in self.propertyMappings) { + if ([mapping.destinationKeyPath isEqualToString:destinationKeyPath]) { + return mapping; + } + } + + return nil; +} + +- (void)addAttributeMappingsFromDictionary:(NSDictionary *)keyPathToAttributeNames +{ + for (NSString *attributeKeyPath in keyPathToAttributeNames) { + [self addPropertyMapping:[RKAttributeMapping attributeMappingFromKeyPath:attributeKeyPath toKeyPath:[keyPathToAttributeNames objectForKey:attributeKeyPath]]]; + } +} + +- (void)addAttributeMappingsFromArray:(NSArray *)arrayOfAttributeNamesOrMappings +{ + NSMutableArray *arrayOfAttributeMappings = [NSMutableArray arrayWithCapacity:[arrayOfAttributeNamesOrMappings count]]; + for (id entry in arrayOfAttributeNamesOrMappings) { + if ([entry isKindOfClass:[NSString class]]) { + [arrayOfAttributeMappings addObject:[RKAttributeMapping attributeMappingFromKeyPath:entry toKeyPath:entry]]; + } else if ([entry isKindOfClass:[RKAttributeMapping class]]) { + [arrayOfAttributeMappings addObject:entry]; + } else { + [NSException raise:NSInvalidArgumentException + format:@"*** - [%@ %@]: Unable to attribute mapping from unsupported entry of type '%@' (%@).", NSStringFromClass([self class]), NSStringFromSelector(_cmd), NSStringFromClass([entry class]), entry]; + } + } + + [self addPropertyMappingsFromArray:arrayOfAttributeMappings]; +} + +- (void)removePropertyMapping:(RKPropertyMapping *)attributeOrRelationshipMapping +{ + if ([self.mutablePropertyMappings containsObject:attributeOrRelationshipMapping]) { + attributeOrRelationshipMapping.objectMapping = nil; + [self.mutablePropertyMappings removeObject:attributeOrRelationshipMapping]; + } +} + +- (RKObjectMapping *)inverseMappingAtDepth:(NSInteger)depth +{ + NSAssert(depth < RKObjectMappingMaximumInverseMappingRecursionDepth, @"Exceeded max recursion level in inverseMapping. This is likely due to a loop in the serialization graph. To break this loop, specify one-way relationships by setting serialize to NO in mapKeyPath:toRelationship:withObjectMapping:serialize:"); + RKObjectMapping *inverseMapping = [RKObjectMapping mappingForClass:[NSMutableDictionary class]]; + for (RKAttributeMapping *attributeMapping in self.attributeMappings) { + [inverseMapping addPropertyMapping:[RKAttributeMapping attributeMappingFromKeyPath:attributeMapping.destinationKeyPath toKeyPath:attributeMapping.sourceKeyPath]]; + } + + for (RKRelationshipMapping *relationshipMapping in self.relationshipMappings) { +// if (relationshipMapping.reversible) { + RKMapping *mapping = relationshipMapping.mapping; + if (! [mapping isKindOfClass:[RKObjectMapping class]]) { + RKLogWarning(@"Unable to generate inverse mapping for relationship '%@': %@ relationships cannot be inversed.", relationshipMapping.sourceKeyPath, NSStringFromClass([mapping class])); + continue; + } + [inverseMapping addPropertyMapping:[RKRelationshipMapping relationshipMappingFromKeyPath:relationshipMapping.destinationKeyPath toKeyPath:relationshipMapping.sourceKeyPath withMapping:[(RKObjectMapping *)mapping inverseMappingAtDepth:depth+1]]]; +// } + } + + return inverseMapping; +} + +- (RKObjectMapping *)inverseMapping +{ + return [self inverseMappingAtDepth:0]; +} + +- (void)mapKeyOfNestedDictionaryToAttribute:(NSString *)attributeName +{ + [self addPropertyMapping:[RKAttributeMapping attributeMappingFromKeyPath:RKObjectMappingNestingAttributeKeyName toKeyPath:attributeName]]; +} + +- (RKAttributeMapping *)attributeMappingForKeyOfNestedDictionary +{ + return [self mappingForKeyPath:RKObjectMappingNestingAttributeKeyName]; +} + +- (RKAttributeMapping *)mappingForAttribute:(NSString *)attributeKey +{ + for (RKAttributeMapping *mapping in [self attributeMappings]) { + if ([mapping.destinationKeyPath isEqualToString:attributeKey]) { + return mapping; + } + } + + return nil; +} + +- (RKRelationshipMapping *)mappingForRelationship:(NSString *)relationshipKey +{ + for (RKRelationshipMapping *mapping in [self relationshipMappings]) { + if ([mapping.destinationKeyPath isEqualToString:relationshipKey]) { + return mapping; + } + } + + return nil; +} + +- (id)defaultValueForMissingAttribute:(NSString *)attributeName +{ + return nil; +} + +- (Class)classForProperty:(NSString *)propertyName +{ + return [[RKPropertyInspector sharedInspector] typeForProperty:propertyName ofClass:self.objectClass]; +} + +- (Class)classForKeyPath:(NSString *)keyPath +{ + NSArray *components = [keyPath componentsSeparatedByString:@"."]; + Class propertyClass = self.objectClass; + for (NSString *property in components) { + propertyClass = [[RKPropertyInspector sharedInspector] typeForProperty:property ofClass:propertyClass]; + if (! propertyClass) break; + } + + return propertyClass; +} + +#pragma mark - Date and Time + +- (NSFormatter *)preferredDateFormatter +{ + return _preferredDateFormatter ?: [RKObjectMapping preferredDateFormatter]; +} + +- (NSArray *)dateFormatters +{ + return _dateFormatters ?: [RKObjectMapping defaultDateFormatters]; +} + +- (BOOL)isEqualToMapping:(RKObjectMapping *)otherMapping +{ + if (! [otherMapping isKindOfClass:[RKObjectMapping class]]) return NO; + if ((self.objectClass && otherMapping.objectClass) && + ! [otherMapping.objectClass isEqual:self.objectClass]) { + return NO; + } else if (self.objectClass != nil && otherMapping.objectClass == nil) { + return NO; + } else if (self.objectClass == nil && otherMapping.objectClass != nil) { + return NO; + } + + // Check that the number of attribute/relationship mappings is equal and compare all + if ([self.propertyMappings count] != [otherMapping.propertyMappings count]) return NO; + + for (RKPropertyMapping *propertyMapping in self.propertyMappings) { + RKPropertyMapping *otherPropertyMapping = [otherMapping mappingForSourceKeyPath:propertyMapping.sourceKeyPath]; + if (! [propertyMapping isEqualToMapping:otherPropertyMapping]) return NO; + } + + return YES; +} + +@end + +///////////////////////////////////////////////////////////////////////////// + +static NSMutableArray *defaultDateFormatters = nil; +static NSDateFormatter *preferredDateFormatter = nil; + +@implementation RKObjectMapping (DateAndTimeFormatting) + ++ (NSArray *)defaultDateFormatters +{ + if (!defaultDateFormatters) [self resetDefaultDateFormatters]; + + return defaultDateFormatters; +} + ++ (void)resetDefaultDateFormatters +{ + defaultDateFormatters = [[NSMutableArray alloc] init]; + + //NSNumberFormatter which creates dates from Unix timestamps + NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init]; + numberFormatter.numberStyle = NSNumberFormatterDecimalStyle; + [self addDefaultDateFormatter:numberFormatter]; + + RKISO8601DateFormatter *isoFormatter = [[RKISO8601DateFormatter alloc] init]; + isoFormatter.parsesStrictly = YES; + [self addDefaultDateFormatter:isoFormatter]; + + [self addDefaultDateFormatterForString:@"MM/dd/yyyy" inTimeZone:nil]; + [self addDefaultDateFormatterForString:@"yyyy-MM-dd'T'HH:mm:ss'Z'" inTimeZone:nil]; + [self addDefaultDateFormatterForString:@"yyyy-MM-dd" inTimeZone:nil]; +} + ++ (void)setDefaultDateFormatters:(NSArray *)dateFormatters +{ + defaultDateFormatters = dateFormatters ? [[NSMutableArray alloc] initWithArray:dateFormatters] : [NSMutableArray array]; +} + ++ (void)addDefaultDateFormatter:(id)dateFormatter +{ + [self defaultDateFormatters]; + [defaultDateFormatters insertObject:dateFormatter atIndex:0]; +} + ++ (void)addDefaultDateFormatterForString:(NSString *)dateFormatString inTimeZone:(NSTimeZone *)nilOrTimeZone +{ + NSDateFormatter *dateFormatter = [NSDateFormatter new]; + dateFormatter.dateFormat = dateFormatString; + dateFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]; + if (nilOrTimeZone) { + dateFormatter.timeZone = nilOrTimeZone; + } else { + dateFormatter.timeZone = [NSTimeZone timeZoneWithAbbreviation:@"UTC"]; + } + + [self addDefaultDateFormatter:dateFormatter]; +} + ++ (NSFormatter *)preferredDateFormatter +{ + if (!preferredDateFormatter) { + // A date formatter that matches the output of [NSDate description] + preferredDateFormatter = [NSDateFormatter new]; + [preferredDateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss Z"]; + preferredDateFormatter.timeZone = [NSTimeZone timeZoneWithAbbreviation:@"UTC"]; + preferredDateFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]; + } + + return preferredDateFormatter; +} + ++ (void)setPreferredDateFormatter:(NSDateFormatter *)dateFormatter +{ + preferredDateFormatter = dateFormatter; +} + +@end + +#pragma mark - Functions + +NSDate *RKDateFromStringWithFormatters(NSString *dateString, NSArray *formatters) +{ + NSDate *date = nil; + for (NSFormatter *dateFormatter in formatters) { + BOOL success; + @synchronized(dateFormatter) { + if ([dateFormatter isKindOfClass:[NSDateFormatter class]]) { + RKLogTrace(@"Attempting to parse string '%@' with format string '%@' and time zone '%@'", dateString, [(NSDateFormatter *)dateFormatter dateFormat], [(NSDateFormatter *)dateFormatter timeZone]); + } + NSString *errorDescription = nil; + success = [dateFormatter getObjectValue:&date forString:dateString errorDescription:&errorDescription]; + } + + if (success && date) { + if ([dateFormatter isKindOfClass:[NSDateFormatter class]]) { + RKLogTrace(@"Successfully parsed string '%@' with format string '%@' and time zone '%@' and turned into date '%@'", + dateString, [(NSDateFormatter *)dateFormatter dateFormat], [(NSDateFormatter *)dateFormatter timeZone], date); + } else if ([dateFormatter isKindOfClass:[NSNumberFormatter class]]) { + NSNumber *formattedNumber = (NSNumber *)date; + date = [NSDate dateWithTimeIntervalSince1970:[formattedNumber doubleValue]]; + } + + break; + } + } + + return date; +} + +NSDate *RKDateFromString(NSString *dateString) +{ + return RKDateFromStringWithFormatters(dateString, [RKObjectMapping defaultDateFormatters]); +} + +NSString *RKStringFromDate(NSDate *date) +{ + return [[RKObjectMapping preferredDateFormatter] stringForObjectValue:date]; +} diff --git a/Pods/RestKit/Code/ObjectMapping/RKObjectMappingOperationDataSource.h b/Pods/RestKit/Code/ObjectMapping/RKObjectMappingOperationDataSource.h new file mode 100644 index 00000000..3daf2166 --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKObjectMappingOperationDataSource.h @@ -0,0 +1,27 @@ +// +// RKObjectMappingOperationDataSource.h +// RestKit +// +// Created by Blake Watters on 7/3/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKMappingOperationDataSource.h" + +/** + The `RKObjectMappingOperationDataSource` class is an implementation of the `RKMappingOperationDataSource` protocol for use in performing object mappings that target plain old `NSObject` derived classes (as opposed to `NSManagedObject` derived persistent entities). + */ +@interface RKObjectMappingOperationDataSource : NSObject <RKMappingOperationDataSource> +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKObjectMappingOperationDataSource.m b/Pods/RestKit/Code/ObjectMapping/RKObjectMappingOperationDataSource.m new file mode 100644 index 00000000..c8b53f61 --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKObjectMappingOperationDataSource.m @@ -0,0 +1,31 @@ +// +// RKObjectMappingOperationDataSource.m +// RestKit +// +// Created by Blake Watters on 7/3/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKObjectMappingOperationDataSource.h" +#import "RKObjectMapping.h" + +@implementation RKObjectMappingOperationDataSource + +- (id)mappingOperation:(RKMappingOperation *)mappingOperation targetObjectForRepresentation:(NSDictionary *)representation withMapping:(RKObjectMapping *)mapping +{ + return [mapping.objectClass new]; +} + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKObjectUtilities.h b/Pods/RestKit/Code/ObjectMapping/RKObjectUtilities.h new file mode 100644 index 00000000..be567fab --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKObjectUtilities.h @@ -0,0 +1,70 @@ +// +// RKObjectUtilities.h +// RestKit +// +// Created by Blake Watters on 9/30/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import <Foundation/Foundation.h> + +///---------------- +/// @name Functions +///---------------- + +/** + Returns a Boolean value that indicates whether the given objects are equal. + + The actual method of comparison is dependendent upon the class of the objects given. For example, given two `NSString` objects equality would be tested using `isEqualToString:`. + + @param object The first object to compare. + @param anotherObject The second object to compare. + @return `YES` if the objects are equal, otherwise `NO`. + */ +BOOL RKObjectIsEqualToObject(id object, id anotherObject); + +/** + Returns a Boolean value that indicates if the given class is a collection. + + The following classes are considered collections: + + 1. `NSSet` + 1. `NSArray` + 1. `NSOrderedSet` + + `NSDictionary` objects are **not** considered collections as they are typically object representations. + + @param aClass The class to check. + @return `YES` if the given class is a collection. + */ +BOOL RKClassIsCollection(Class aClass); + +/** + Returns a Boolean value that indicates if the given object is a collection. + + Implemented by invoking `RKClassIsCollection` with the class of the given object. + @param object The object to be tested. + @return `YES` if the given object is a collection, else `NO`. + @see `RKClassIsCollection` + */ +BOOL RKObjectIsCollection(id object); + +/** + Returns a Boolean value that indicates if the given object is collection containing only instances of `NSManagedObject` or a class that inherits from `NSManagedObject`. + + @param object The object to be tested. + @return `YES` if the object is a collection containing only `NSManagedObject` derived objects. + */ +BOOL RKObjectIsCollectionContainingOnlyManagedObjects(id object); diff --git a/Pods/RestKit/Code/ObjectMapping/RKObjectUtilities.m b/Pods/RestKit/Code/ObjectMapping/RKObjectUtilities.m new file mode 100644 index 00000000..3e7ec416 --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKObjectUtilities.m @@ -0,0 +1,73 @@ +// +// RKObjectUtilities.m +// RestKit +// +// Created by Blake Watters on 9/30/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import <objc/message.h> +#import "RKObjectUtilities.h" + +BOOL RKObjectIsEqualToObject(id object, id anotherObject) { + NSCAssert(object, @"Expected object not to be nil"); + NSCAssert(anotherObject, @"Expected anotherObject not to be nil"); + + SEL comparisonSelector; + if ([object isKindOfClass:[NSString class]] && [anotherObject isKindOfClass:[NSString class]]) { + comparisonSelector = @selector(isEqualToString:); + } else if ([object isKindOfClass:[NSNumber class]] && [anotherObject isKindOfClass:[NSNumber class]]) { + comparisonSelector = @selector(isEqualToNumber:); + } else if ([object isKindOfClass:[NSDate class]] && [anotherObject isKindOfClass:[NSDate class]]) { + comparisonSelector = @selector(isEqualToDate:); + } else if ([object isKindOfClass:[NSArray class]] && [anotherObject isKindOfClass:[NSArray class]]) { + comparisonSelector = @selector(isEqualToArray:); + } else if ([object isKindOfClass:[NSDictionary class]] && [anotherObject isKindOfClass:[NSDictionary class]]) { + comparisonSelector = @selector(isEqualToDictionary:); + } else if ([object isKindOfClass:[NSSet class]] && [anotherObject isKindOfClass:[NSSet class]]) { + comparisonSelector = @selector(isEqualToSet:); + } else { + comparisonSelector = @selector(isEqual:); + } + + // Comparison magic using function pointers. See this page for details: http://www.red-sweater.com/blog/320/abusing-objective-c-with-class + // Original code courtesy of Greg Parker + // This is necessary because isEqualToNumber will return negative integer values that aren't coercable directly to BOOL's without help [sbw] + BOOL (*ComparisonSender)(id, SEL, id) = (BOOL (*)(id, SEL, id))objc_msgSend; + return ComparisonSender(object, comparisonSelector, anotherObject); +} + +BOOL RKClassIsCollection(Class aClass) +{ + return (aClass && ([aClass isSubclassOfClass:[NSSet class]] || + [aClass isSubclassOfClass:[NSArray class]] || + [aClass isSubclassOfClass:[NSOrderedSet class]])); +} + +BOOL RKObjectIsCollection(id object) +{ + return RKClassIsCollection([object class]); +} + +BOOL RKObjectIsCollectionContainingOnlyManagedObjects(id object) +{ + if (! RKObjectIsCollection(object)) return NO; + Class managedObjectClass = NSClassFromString(@"NSManagedObject"); + if (! managedObjectClass) return NO; + for (id instance in object) { + if (! [object isKindOfClass:managedObjectClass]) return NO; + } + return YES; +} diff --git a/Pods/RestKit/Code/ObjectMapping/RKPropertyInspector.h b/Pods/RestKit/Code/ObjectMapping/RKPropertyInspector.h new file mode 100644 index 00000000..ad9173bc --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKPropertyInspector.h @@ -0,0 +1,77 @@ +// +// RKPropertyInspector.h +// RestKit +// +// Created by Blake Watters on 3/4/10. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import <Foundation/Foundation.h> + +@class NSEntityDescription; + +/** + The `RKPropertyInspector` class provides an interface for introspecting the properties and attributes of classes using the reflection capabilities of the Objective-C runtime. Once inspected, the properties and types are cached. + */ +@interface RKPropertyInspector : NSObject { + @protected + NSCache *_propertyNamesToTypesCache; +} + +///----------------------------------------------- +/// @name Retrieving the Shared Inspector Instance +///----------------------------------------------- + +/** + Returns the shared property inspector singleton instance. + + @return The shared `RKPropertyInspector` instance. + */ ++ (RKPropertyInspector *)sharedInspector; + +///------------------------------------------------------ +/// @name Retrieving the Properties and Types for a Class +///------------------------------------------------------ + +/** + Returns a dictionary of names and types for the properties of a given class. + + @param objectClass The class to retrieve the property name and types for. + @return A dictionary containing metadata about the properties of the given class, where the keys in the dictionary are the property names and the values are `Class` objects specifying the type of the property. + */ +- (NSDictionary *)propertyNamesAndTypesForClass:(Class)objectClass; + +/** + Returns the `Class` object specifying the type of the property with given name on a class. + + @param propertyName The name of the property to retrieve the type of. + @param objectClass The class to retrieve the property from. + @return A `Class` object specifying the type of the requested property. + */ +- (Class)typeForProperty:(NSString *)propertyName ofClass:(Class)objectClass; + +///------------------------------------------------------ +/// @name Retrieving the Properties and Types for a Class +///------------------------------------------------------ + +/** + Returns the name of a property when provided the name of a property obtained via the `property_getAttributes` reflection API. + + @param attributeString A string object encoding attribute information. + @return The class name for the property type encoded in the given attribute string or `@"NULL"` if the property does not have an object type (the declared property is for a primitive type). + */ ++ (NSString *)propertyTypeFromAttributeString:(NSString *)attributeString; + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKPropertyInspector.m b/Pods/RestKit/Code/ObjectMapping/RKPropertyInspector.m new file mode 100644 index 00000000..9796435d --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKPropertyInspector.m @@ -0,0 +1,118 @@ +// +// RKPropertyInspector.m +// RestKit +// +// Created by Blake Watters on 3/4/10. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import <objc/message.h> +#import "RKPropertyInspector.h" +#import "RKLog.h" + +// Set Logging Component +#undef RKLogComponent +#define RKLogComponent RKlcl_cRestKitObjectMapping + +@implementation RKPropertyInspector + ++ (RKPropertyInspector *)sharedInspector +{ + static RKPropertyInspector *sharedInspector = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + sharedInspector = [RKPropertyInspector new]; + }); + + return sharedInspector; +} + +- (id)init +{ + self = [super init]; + if (self) { + _propertyNamesToTypesCache = [[NSCache alloc] init]; + } + + return self; +} + + ++ (NSString *)propertyTypeFromAttributeString:(NSString *)attributeString +{ + NSString *type = [NSString string]; + NSScanner *typeScanner = [NSScanner scannerWithString:attributeString]; + [typeScanner scanUpToCharactersFromSet:[NSCharacterSet characterSetWithCharactersInString:@"@"] intoString:NULL]; + + // we are not dealing with an object + if ([typeScanner isAtEnd]) { + return @"NULL"; + } + [typeScanner scanCharactersFromSet:[NSCharacterSet characterSetWithCharactersInString:@"\"@"] intoString:NULL]; + // this gets the actual object type + [typeScanner scanUpToCharactersFromSet:[NSCharacterSet characterSetWithCharactersInString:@"\""] intoString:&type]; + return type; +} + +- (NSDictionary *)propertyNamesAndTypesForClass:(Class)theClass +{ + NSMutableDictionary *propertyNames = [_propertyNamesToTypesCache objectForKey:theClass]; + if (propertyNames) { + return propertyNames; + } + propertyNames = [NSMutableDictionary dictionary]; + + //include superclass properties + Class currentClass = theClass; + while (currentClass != nil) { + // Get the raw list of properties + unsigned int outCount; + objc_property_t *propList = class_copyPropertyList(currentClass, &outCount); + + // Collect the property names + int i; + NSString *propName; + for (i = 0; i < outCount; i++) { + // property_getAttributes() returns everything we need to implement this... + // See: http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html#//apple_ref/doc/uid/TP40008048-CH101-SW5 + objc_property_t *prop = propList + i; + NSString *attributeString = [NSString stringWithCString:property_getAttributes(*prop) encoding:NSUTF8StringEncoding]; + propName = [NSString stringWithCString:property_getName(*prop) encoding:NSUTF8StringEncoding]; + + if (![propName isEqualToString:@"_mapkit_hasPanoramaID"]) { + const char *className = [[RKPropertyInspector propertyTypeFromAttributeString:attributeString] cStringUsingEncoding:NSUTF8StringEncoding]; + Class aClass = objc_getClass(className); + if (aClass) { + [propertyNames setObject:aClass forKey:propName]; + } + } + } + + free(propList); + currentClass = [currentClass superclass]; + } + + [_propertyNamesToTypesCache setObject:propertyNames forKey:theClass]; + RKLogDebug(@"Cached property names and types for Class '%@': %@", NSStringFromClass(theClass), propertyNames); + return propertyNames; +} + +- (Class)typeForProperty:(NSString *)propertyName ofClass:(Class)objectClass +{ + NSDictionary *dictionary = [self propertyNamesAndTypesForClass:objectClass]; + return [dictionary objectForKey:propertyName]; +} + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKPropertyMapping.h b/Pods/RestKit/Code/ObjectMapping/RKPropertyMapping.h new file mode 100644 index 00000000..bd91545f --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKPropertyMapping.h @@ -0,0 +1,67 @@ +// +// RKPropertyMapping.h +// RestKit +// +// Created by Blake Watters on 8/27/12. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import <Foundation/Foundation.h> + +@class RKObjectMapping; + +/** + `RKPropertyMapping` is an abstract class for describing the properties being mapped within an `RKObjectMapping` or `RKEntityMapping` object. It defines the common interface for its concrete subclasses `RKAttributeMapping` and `RKRelationshipMapping`. Each property mapping defines a single transformation from a source key path (often in the deserialized representation of a JSON or XML document) to a destination key path (typically on a target object). + */ +@interface RKPropertyMapping : NSObject <NSCopying> + +///------------------------------------------ +/// @name Accessing the Parent Object Mapping +///------------------------------------------ + +/** + Returns the object mapping the receiver is added to. + */ +@property (nonatomic, weak, readonly) RKObjectMapping *objectMapping; + +///----------------------------------------------------- +/// @name Accessing the Source and Destination Key Paths +///----------------------------------------------------- + +/** + A key path on the source object from which to get information that is to be mapped onto the destination object. + */ +@property (nonatomic, strong, readonly) NSString *sourceKeyPath; + +/** + A key path on the destination object on which to set information that has been mapped from the source object. + */ +@property (nonatomic, strong, readonly) NSString *destinationKeyPath; + +///---------------------------------- +/// @name Comparing Property Mappings +///---------------------------------- + +/** + Compares the receiving property mapping to another property mapping. + + Two property mappings are equal if they are of the same type (i.e. an `RKAttributeMapping` or an `RKRelatiobshipMapping` object) and specify a mapping from the same source key path to the same destination key path. + + @param otherMapping The property mapping object with which to compare the receiver. + @return `YES` if `otherMapping` specifies the same mapping as the receiver, otherwise `NO`. + */ +- (BOOL)isEqualToMapping:(RKPropertyMapping *)otherMapping; + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKPropertyMapping.m b/Pods/RestKit/Code/ObjectMapping/RKPropertyMapping.m new file mode 100644 index 00000000..09f35071 --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKPropertyMapping.m @@ -0,0 +1,52 @@ +// +// RKPropertyMapping.m +// RestKit +// +// Created by Blake Watters on 8/27/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKPropertyMapping.h" + +@interface RKPropertyMapping () +// Synthesize as read/write to allow assignment in `RKObjectMapping` +@property (nonatomic, weak, readwrite) RKObjectMapping *objectMapping; +@property (nonatomic, strong, readwrite) NSString *sourceKeyPath; +@property (nonatomic, strong, readwrite) NSString *destinationKeyPath; +@end + +@implementation RKPropertyMapping + +- (id)copyWithZone:(NSZone *)zone +{ + RKPropertyMapping *copy = [[[self class] allocWithZone:zone] init]; + copy.sourceKeyPath = self.sourceKeyPath; + copy.destinationKeyPath = self.destinationKeyPath; + return copy; +} + +- (BOOL)isEqualToMapping:(RKPropertyMapping *)otherMapping +{ + return [otherMapping isMemberOfClass:[self class]] && + [self.sourceKeyPath isEqual:otherMapping.sourceKeyPath] && + [self.destinationKeyPath isEqual:otherMapping.destinationKeyPath]; +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"<%@: %p %@ => %@>", self.class, self, self.sourceKeyPath, self.destinationKeyPath]; +} + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKRelationshipMapping.h b/Pods/RestKit/Code/ObjectMapping/RKRelationshipMapping.h new file mode 100644 index 00000000..e40db308 --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKRelationshipMapping.h @@ -0,0 +1,56 @@ +// +// RKRelationshipMapping.h +// RestKit +// +// Created by Blake Watters on 5/4/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKPropertyMapping.h" + +@class RKMapping; + +/** + The `RKRelationshipMapping` class is used to describe relationships of a class in an `RKObjectMapping` or an entity in an `RKEntityMapping` object. + + `RKRelationshipMapping` extends `RKPropertyMapping` to describe features specific to relationships, including the `RKMapping` object describing how to map the destination object. + */ +@interface RKRelationshipMapping : RKPropertyMapping + +///-------------------------------------- +/// @name Creating a Relationship Mapping +///-------------------------------------- + +/** + Creates and returns a new relationship mapping object describing how to transform a related object representation at `sourceKeyPath` to a new representation at `destinationKeyPath` using the given mapping. + + The mapping may describe a to-one or a to-many relationship. The appropriate handling of the source representation is deferred until run-time and is determined by performing reflection on the data retrieved from the source object representation by sending a `valueForKeyPath:` message where the key path is the value given in `sourceKeyPath`. If an `NSArray`, `NSSet` or `NSOrderedSet` object is returned, the related object representation is processed as a to-many collection. Otherwise the representation is considered to be a to-one. + + @param sourceKeyPath A key path from which to retrieve data in the source object representation that is to be mapped as a relationship. + @param destinationKeyPath The key path on the destination object to set the object mapped results. + @param mapping A mapping object describing how to map the data retrieved from `sourceKeyPath` that is to be set on `destinationKeyPath`. + */ ++ (RKRelationshipMapping *)relationshipMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath withMapping:(RKMapping *)mapping; + +///---------------------------------------- +/// @name Accessing the Destination Mapping +///---------------------------------------- + +/** + An `RKMapping` object describing how to map the object representation at `sourceKeyPath` to a new represenation at `destinationKeyPath`. + */ +@property (nonatomic, strong, readonly) RKMapping *mapping; + +@end diff --git a/Pods/RestKit/Code/ObjectMapping/RKRelationshipMapping.m b/Pods/RestKit/Code/ObjectMapping/RKRelationshipMapping.m new file mode 100644 index 00000000..254eda90 --- /dev/null +++ b/Pods/RestKit/Code/ObjectMapping/RKRelationshipMapping.m @@ -0,0 +1,57 @@ +// +// RKRelationshipMapping.m +// RestKit +// +// Created by Blake Watters on 5/4/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKRelationshipMapping.h" +#import "RKMapping.h" + +@interface RKRelationshipMapping () +@property (nonatomic, strong, readwrite) NSString *sourceKeyPath; +@property (nonatomic, strong, readwrite) NSString *destinationKeyPath; +@property (nonatomic, strong, readwrite) RKMapping *mapping; +@end + +@implementation RKRelationshipMapping + ++ (RKRelationshipMapping *)relationshipMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath withMapping:(RKMapping *)mapping +{ + RKRelationshipMapping *relationshipMapping = [self new]; + relationshipMapping.sourceKeyPath = sourceKeyPath; + relationshipMapping.destinationKeyPath = destinationKeyPath; + relationshipMapping.mapping = mapping; + return relationshipMapping; +} + +- (id)copyWithZone:(NSZone *)zone +{ + RKRelationshipMapping *copy = [super copyWithZone:zone]; + copy.mapping = self.mapping; + return copy; +} + +- (BOOL)isEqualToMapping:(RKRelationshipMapping *)otherMapping +{ + if (! [otherMapping isMemberOfClass:[RKRelationshipMapping class]]) return NO; + if (! [super isEqualToMapping:otherMapping]) return NO; + if (self.mapping == nil && otherMapping.mapping == nil) return YES; + + return [self.mapping isEqualToMapping:otherMapping.mapping]; +} + +@end diff --git a/Pods/RestKit/Code/RestKit.h b/Pods/RestKit/Code/RestKit.h new file mode 100644 index 00000000..4eb6625c --- /dev/null +++ b/Pods/RestKit/Code/RestKit.h @@ -0,0 +1,39 @@ +// +// RestKit.h +// RestKit +// +// Created by Blake Watters on 2/19/10. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#ifndef _RESTKIT_ +#define _RESTKIT_ + +#import "ObjectMapping.h" +#import "Network.h" +#import "Support.h" +#import "CoreData.h" + +/** + Set the App logging component. This header + file is generally only imported by apps that + are pulling in all of RestKit. By setting the + log component to App here, we allow the app developer + to use RKLog() in their own app. + */ +#undef RKLogComponent +#define RKLogComponent RKlcl_cApp + +#endif /* _RESTKIT_ */ diff --git a/Pods/RestKit/Code/Search.h b/Pods/RestKit/Code/Search.h new file mode 100644 index 00000000..2a423449 --- /dev/null +++ b/Pods/RestKit/Code/Search.h @@ -0,0 +1,24 @@ +// +// RKSearch.h +// RestKit +// +// Created by Blake Watters on 7/30/12. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKManagedObjectStore+RKSearchAdditions.h" +#import "RKSearchIndexer.h" +#import "RKSearchPredicate.h" +#import "RKSearchTokenizer.h" diff --git a/Pods/RestKit/Code/Support.h b/Pods/RestKit/Code/Support.h new file mode 100644 index 00000000..fdc85226 --- /dev/null +++ b/Pods/RestKit/Code/Support.h @@ -0,0 +1,31 @@ +// +// Support.h +// RestKit +// +// Created by Blake Watters on 9/30/10. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Load shared support code +#import "RKErrors.h" +#import "RKMIMETypes.h" +#import "RKLog.h" +#import "RKPathMatcher.h" +#import "RKDotNetDateFormatter.h" +#import "RKPathUtilities.h" +#import "RKDictionaryUtilities.h" +#import "RKURLEncodedSerialization.h" +#import "RKNSJSONSerialization.h" +#import "RKMIMETypeSerialization.h" diff --git a/Pods/RestKit/Code/Support/RKDictionaryUtilities.h b/Pods/RestKit/Code/Support/RKDictionaryUtilities.h new file mode 100644 index 00000000..9e1d68b1 --- /dev/null +++ b/Pods/RestKit/Code/Support/RKDictionaryUtilities.h @@ -0,0 +1,38 @@ +// +// RKDictionaryUtilities.h +// RestKit +// +// Created by Blake Watters on 9/11/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import <Foundation/Foundation.h> + +/** + Reverse merges two dictionary to produce a new dictionary wherein the keys in the second dictionary have taken precedence in instances where keys overlap. The merge is performed recursively such that subdictionaries are reverse merged as well. + + @param dictionary The dictionary to be reverse merged. + @param anotherDictionary A secondary dictionary to perform the reverse merging with. + @return A new `NSDicionary` object that is the product of the reverse merge. + */ +NSDictionary *RKDictionaryByMergingDictionaryWithDictionary(NSDictionary *dict1, NSDictionary *dict2); + +/** + Return a new dictionary by stripping out any percent escapes (such as %20) from the given dictionary's key and values. + + @param dictionary The dictionary from which to remove the percent escape sequences. + @return A new `NSDictionary` wherein any percent escape sequences in the key and values have been replaced with their literal values. + */ +NSDictionary *RKDictionaryByReplacingPercentEscapesInEntriesFromDictionary(NSDictionary *dictionary); diff --git a/Pods/RestKit/Code/Support/RKDictionaryUtilities.m b/Pods/RestKit/Code/Support/RKDictionaryUtilities.m new file mode 100644 index 00000000..4a31e2e2 --- /dev/null +++ b/Pods/RestKit/Code/Support/RKDictionaryUtilities.m @@ -0,0 +1,40 @@ +// +// RKDictionaryUtilities.m +// RestKit +// +// Created by Blake Watters on 9/11/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// + +#import "RKDictionaryUtilities.h" + +NSDictionary * RKDictionaryByMergingDictionaryWithDictionary(NSDictionary *dict1, NSDictionary *dict2) +{ + NSMutableDictionary *mergedDictionary = [dict1 mutableCopy]; + + [dict2 enumerateKeysAndObjectsUsingBlock:^(id key2, id obj2, BOOL *stop) { + id obj1 = dict1[key2]; + if ([obj1 isKindOfClass:[NSDictionary class]] && [obj2 isKindOfClass:[NSDictionary class]]) { + NSDictionary *mergedSubdict = RKDictionaryByMergingDictionaryWithDictionary(obj1, obj2); + mergedDictionary[key2] = mergedSubdict; + } else { + mergedDictionary[key2] = obj2; + } + }]; + + return [mergedDictionary copy]; +} + +NSDictionary * RKDictionaryByReplacingPercentEscapesInEntriesFromDictionary(NSDictionary *dictionary) +{ + NSMutableDictionary *results = [NSMutableDictionary dictionaryWithCapacity:[dictionary count]]; + [dictionary enumerateKeysAndObjectsUsingBlock:^(id key, id value, BOOL *stop) + { + NSString *escapedKey = [key stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + id escapedValue = value; + if ([value respondsToSelector:@selector(stringByReplacingPercentEscapesUsingEncoding:)]) + escapedValue = [value stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + [results setObject:escapedValue forKey:escapedKey]; + }]; + return results; +} diff --git a/Pods/RestKit/Code/Support/RKDotNetDateFormatter.h b/Pods/RestKit/Code/Support/RKDotNetDateFormatter.h new file mode 100644 index 00000000..9eaaded4 --- /dev/null +++ b/Pods/RestKit/Code/Support/RKDotNetDateFormatter.h @@ -0,0 +1,73 @@ +// +// RKDotNetDateFormatter.h +// RestKit +// +// Created by Greg Combs on 9/8/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import <Foundation/Foundation.h> + +/** + A subclass of `NSDateFormatter` that serves as translator between ASP.NET date serializations in JSON strings and NSDate objects. This is useful for properly mapping these dates from an ASP.NET driven backend. + + @warning DO NOT attempt to use `setDateFormat:` on this class. It will return invalid results. + */ +@interface RKDotNetDateFormatter : NSDateFormatter + +/** + Instantiates an autoreleased `RKDotNetDateFormatter` object with the timezone set to the given value. The default time zone is UTC. + + The supplied timeZone, such as one produced with `[NSTimeZone timeZoneWithName:@"UTC"]`, + is only used during calls to `stringFromDate:, for a detailed explanation see `dateFromString:` + + @param timeZone An NSTimeZone object. A `nil` value sets the timezone to the default value of UTC. + @return An autoreleased `RKDotNetDateFormatter` object + @see dotNetDateFormatter + */ ++ (RKDotNetDateFormatter *)dotNetDateFormatterWithTimeZone:(NSTimeZone *)timeZone; + +/** + Returns an `NSDate` object from an ASP.NET style date string respresentation, as seen in JSON. + + Acceptable examples are: + /Date(1112715000000-0500)/ + /Date(1112715000000)/ + /Date(-1112715000000)/ + Where 1112715000000 is the number of milliseconds since January 1, 1970 00:00 GMT/UTC, and -0500 represents the timezone offset from GMT in 24-hour time. Negatives milliseconds are treated as dates before January 1, 1970. + + *NOTE* `NSDate` objects do not have timezones, and you should never change an actual date value based on a timezone offset. However, timezones are important when presenting dates to the user. Therefore, If an offset is present in the ASP.NET string (it should be), we actually ignore the offset portion because we want to store the actual date value in its raw form, without any pollution of timezone information. If, on the other hand, there is no offset in the ASP.NET string, we assume GMT (+0000) anyway. In summation, for this class `setTimeZone:` is ignored except when using `stringFromDate:` + + @param string The ASP.NET style string, /Date(1112715000000-0500)/ + @return An `NSDate` object. + @see `stringFromDate` + @see `NSDateFormatter` + @see `NSTimeZone` + */ +- (NSDate *)dateFromString:(NSString *)string; + +/** + Returns an ASP.NET style date string from an NSDate, such as /Date(1112715000000+0000)/ Where 1112715000000 is the number of milliseconds since January 1, 1970 00:00 GMT/UTC, and +0000 is the timezone offset from GMT in 24-hour time. + + *NOTE *GMT (+0000) is assumed otherwise specified via `setTimeZone:` + + @param date An `NSDate` object from which to return a string value. + @return The ASP.NET style string, /Date(1112715000000-0500)/ + @see `dateFromString` + @see `NSDateFormatter` + @see `NSTimeZone` + */ +- (NSString *)stringFromDate:(NSDate *)date; +@end diff --git a/Pods/RestKit/Code/Support/RKDotNetDateFormatter.m b/Pods/RestKit/Code/Support/RKDotNetDateFormatter.m new file mode 100644 index 00000000..2a98a4e0 --- /dev/null +++ b/Pods/RestKit/Code/Support/RKDotNetDateFormatter.m @@ -0,0 +1,124 @@ +// +// RKDotNetDateFormatter.h +// RestKit +// +// Created by Greg Combs on 9/8/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKDotNetDateFormatter.h" +#import "RKLog.h" + +static BOOL RKDotNetDateFormatterIsValidRange(NSRange rangeOfMatch); +static NSTimeInterval RKDotNetDateFormatterSecondsFromMilliseconds(NSTimeInterval millisecs); +static NSTimeInterval RKDotNetDateFormatterMillisecondsFromSeconds(NSTimeInterval seconds); + +@interface RKDotNetDateFormatter () +@property (nonatomic, strong) NSRegularExpression *dotNetExpression; + +- (NSString *)millisecondsFromString:(NSString *)string; +@end + +@implementation RKDotNetDateFormatter + ++ (RKDotNetDateFormatter *)dotNetDateFormatterWithTimeZone:(NSTimeZone *)newTimeZone +{ + RKDotNetDateFormatter *formatter = [[RKDotNetDateFormatter alloc] init]; + if (newTimeZone) formatter.timeZone = newTimeZone; + return formatter; +} + +- (NSDate *)dateFromString:(NSString *)string +{ + NSString *milliseconds = [self millisecondsFromString:string]; + if (!milliseconds) { + RKLogError(@"Attempted to interpret an invalid .NET date string: %@", string); + return nil; + } + NSTimeInterval seconds = RKDotNetDateFormatterSecondsFromMilliseconds([milliseconds doubleValue]); + return [NSDate dateWithTimeIntervalSince1970:seconds]; +} + + +- (NSString *)stringFromDate:(NSDate *)date +{ + if (!date) { + RKLogError(@"Attempted to represent an invalid date: %@", date); + return nil; + } + return [self stringForObjectValue:date]; +} + +- (BOOL)getObjectValue:(id *)outValue forString:(NSString *)string errorDescription:(NSString **)error +{ + NSDate *date = [self dateFromString:string]; + if (outValue) + *outValue = date; + return (date != nil); +} + +- (NSString *)stringForObjectValue:(id)value +{ + NSParameterAssert([value isKindOfClass:[NSDate class]]); + NSString *timeZoneOffset = [super stringForObjectValue:value]; + NSTimeInterval milliseconds = RKDotNetDateFormatterMillisecondsFromSeconds([(NSDate *)value timeIntervalSince1970]); + return [NSString stringWithFormat:@"/Date(%1.0lf%@)/", milliseconds, timeZoneOffset]; +} + +- (id)init +{ + self = [super init]; + if (self) { + self.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]; + self.timeZone = [NSTimeZone timeZoneWithName:@"UTC"]; + [self setDateFormat:@"ZZ"]; // GMT offset, like "-0500" + NSString *pattern = @"\\/Date\\((-?\\d+)((?:[\\+\\-]\\d+)?)\\)\\/"; // /Date(mSecs)/ or /Date(-mSecs)/ or /Date(mSecs-0400)/ + self.dotNetExpression = [[NSRegularExpression alloc] initWithPattern:pattern options:NSRegularExpressionCaseInsensitive error:NULL]; + } + return self; +} + + + + +- (NSString *)millisecondsFromString:(NSString *)string +{ + if (!string) return nil; + NSTextCheckingResult *match = [self.dotNetExpression firstMatchInString:string options:NSMatchingCompleted range:NSMakeRange(0, [string length])]; + if (!match) return nil; + NSRange millisecRange = [match rangeAtIndex:1]; + if (!RKDotNetDateFormatterIsValidRange(millisecRange)) return nil; + NSString *milliseconds = [string substringWithRange:millisecRange]; + return milliseconds; +} +@end + + +static BOOL RKDotNetDateFormatterIsValidRange(NSRange rangeOfMatch) +{ + return (!NSEqualRanges(rangeOfMatch, NSMakeRange(NSNotFound, 0))); +} + + +static NSTimeInterval RKDotNetDateFormatterSecondsFromMilliseconds(NSTimeInterval millisecs) +{ + return millisecs / 1000.f; +} + + +static NSTimeInterval RKDotNetDateFormatterMillisecondsFromSeconds(NSTimeInterval seconds) +{ + return seconds *1000.f; +} diff --git a/Pods/RestKit/Code/Support/RKErrors.h b/Pods/RestKit/Code/Support/RKErrors.h new file mode 100644 index 00000000..ce1e65ca --- /dev/null +++ b/Pods/RestKit/Code/Support/RKErrors.h @@ -0,0 +1,64 @@ +// +// RKErrors.h +// RestKit +// +// Created by Blake Watters on 3/25/10. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import <Foundation/Foundation.h> + +///--------------------------- +/// @name Error Domain & Codes +///--------------------------- + +// The error domain for RestKit generated errors +extern NSString * const RKErrorDomain; + +typedef enum { + RKObjectLoaderRemoteSystemError = 1, + RKRequestBaseURLOfflineError = 2, + RKRequestUnexpectedResponseError = 3, + RKObjectLoaderUnexpectedResponseError = 4, + RKRequestConnectionTimeoutError = 5, + RKUnsupportedMIMETypeError = 6, + RKParserRegistryEmptyDataError = 7 +} RKRestKitError; + + +///-------------------------------------- +/// @name Error User Info Dictionary Keys +///-------------------------------------- + +/** + The key RestKit generated errors will appear at within an NSNotification + indicating an error + */ +extern NSString * const RKErrorNotificationErrorKey; + +/** + When RestKit constructs an NSError object from one or more RKErrorMessage + (or other object mapped error representations), the userInfo of the NSError + object will be populated with an array of the underlying error objects. + + These underlying errors can be accessed via RKObjectMapperErrorObjectsKey key. + + @see RKObjectMappingResult + */ +extern NSString * const RKObjectMapperErrorObjectsKey; + +extern NSString * const RKDetailedErrorsKey; // When multiple errors occur, they are stored in a composite error + +extern NSString * const RKMIMETypeErrorKey; diff --git a/Pods/RestKit/Code/Support/RKErrors.m b/Pods/RestKit/Code/Support/RKErrors.m new file mode 100644 index 00000000..ae9a1541 --- /dev/null +++ b/Pods/RestKit/Code/Support/RKErrors.m @@ -0,0 +1,28 @@ +// +// RKErrors.m +// RestKit +// +// Created by Blake Watters on 3/25/10. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKErrors.h" + +NSString * const RKErrorDomain = @"org.restkit.RestKit.ErrorDomain"; + +NSString * const RKObjectMapperErrorObjectsKey = @"RKObjectMapperErrorObjectsKey"; +NSString * const RKErrorNotificationErrorKey = @"error"; +NSString * const RKDetailedErrorsKey = @"DetailedErrors"; +NSString * const RKMIMETypeErrorKey = @"MIME Type"; diff --git a/Pods/RestKit/Code/Support/RKISO8601DateFormatter.h b/Pods/RestKit/Code/Support/RKISO8601DateFormatter.h new file mode 100644 index 00000000..70e24375 --- /dev/null +++ b/Pods/RestKit/Code/Support/RKISO8601DateFormatter.h @@ -0,0 +1,81 @@ +// This is a forked copy of the ISO8601DateFormatter + +/*ISO8601DateFormatter.h + * + *Created by Peter Hosey on 2009-04-11. + *Copyright 2009 Peter Hosey. All rights reserved. + */ + +#import <Foundation/Foundation.h> + +/*This class converts dates to and from ISO 8601 strings. A good introduction to ISO 8601: <http://www.cl.cam.ac.uk/~mgk25/iso-time.html> + * + *Parsing can be done strictly, or not. When you parse loosely, leading whitespace is ignored, as is anything after the date. + *The loose parser will return an NSDate for this string: @" \t\r\n\f\t 2006-03-02!!!" + *Leading non-whitespace will not be ignored; the string will be rejected, and nil returned. See the README that came with this addition. + * + *The strict parser will only accept a string if the date is the entire string. The above string would be rejected immediately, solely on these grounds. + *Also, the loose parser provides some extensions that the strict parser doesn't. + *For example, the standard says for "-DDD" (an ordinal date in the implied year) that the logical representation (meaning, hierarchically) would be "--DDD", but because that extra hyphen is "superfluous", it was omitted. + *The loose parser will accept the extra hyphen; the strict parser will not. + *A full list of these extensions is in the README file. + */ + +/*The format to either expect or produce. + *Calendar format is YYYY-MM-DD. + *Ordinal format is YYYY-DDD, where DDD ranges from 1 to 366; for example, 2009-32 is 2009-02-01. + *Week format is YYYY-Www-D, where ww ranges from 1 to 53 (the 'W' is literal) and D ranges from 1 to 7; for example, 2009-W05-07. + */ +enum { + RKISO8601DateFormatCalendar, + RKISO8601DateFormatOrdinal, + RKISO8601DateFormatWeek, +}; +typedef NSUInteger RKISO8601DateFormat; + +//The default separator for time values. Currently, this is ':'. +extern unichar RKISO8601DefaultTimeSeparatorCharacter; + +@interface RKISO8601DateFormatter: NSFormatter +{ + NSString *lastUsedFormatString; + NSDateFormatter *unparsingFormatter; + + NSCalendar *parsingCalendar, *unparsingCalendar; + + NSTimeZone *defaultTimeZone; + RKISO8601DateFormat format; + unichar timeSeparator; + BOOL includeTime; + BOOL parsesStrictly; +} + +//Call this if you get a memory warning. ++ (void) purgeGlobalCaches; + +@property(nonatomic, retain) NSTimeZone *defaultTimeZone; + +#pragma mark Parsing + +//As a formatter, this object converts strings to dates. + +@property BOOL parsesStrictly; + +- (NSDateComponents *) dateComponentsFromString:(NSString *)string; +- (NSDateComponents *) dateComponentsFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone; +- (NSDateComponents *) dateComponentsFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone range:(out NSRange *)outRange; + +- (NSDate *) dateFromString:(NSString *)string; +- (NSDate *) dateFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone; +- (NSDate *) dateFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone range:(out NSRange *)outRange; + +#pragma mark Unparsing + +@property RKISO8601DateFormat format; +@property BOOL includeTime; +@property unichar timeSeparator; + +- (NSString *) stringFromDate:(NSDate *)date; +- (NSString *) stringFromDate:(NSDate *)date timeZone:(NSTimeZone *)timeZone; + +@end diff --git a/Pods/RestKit/Code/Support/RKISO8601DateFormatter.m b/Pods/RestKit/Code/Support/RKISO8601DateFormatter.m new file mode 100644 index 00000000..35ccfce0 --- /dev/null +++ b/Pods/RestKit/Code/Support/RKISO8601DateFormatter.m @@ -0,0 +1,887 @@ +// This is a forked copy of the ISO8601DateFormatter + +/*ISO8601DateFormatter.m + * + *Created by Peter Hosey on 2009-04-11. + *Copyright 2009 Peter Hosey. All rights reserved. + */ + +#import <Foundation/Foundation.h> +#import "RKISO8601DateFormatter.h" +#import "RKLog.h" + +// Set Logging Component +#undef RKLogComponent +#define RKLogComponent RKlcl_cRestKitSupport + +#ifndef DEFAULT_TIME_SEPARATOR +# define DEFAULT_TIME_SEPARATOR ':' +#endif +unichar RKISO8601DefaultTimeSeparatorCharacter = DEFAULT_TIME_SEPARATOR; + +//Unicode date formats. +#define RK_ISOCALENDAR_DATE_FORMAT @"yyyy-MM-dd" +//#define RK_ISOWEEK_DATE_FORMAT @"YYYY-'W'ww-ee" //Doesn't actually work because NSDateComponents counts the weekday starting at 1. +#define RK_ISOORDINAL_DATE_FORMAT @"yyyy-DDD" +#define RK_ISOTIME_FORMAT @"HH:mm:ss" +#define RK_ISOTIME_WITH_TIMEZONE_FORMAT RK_ISOTIME_FORMAT @"Z" +//printf formats. +#define RK_ISOTIMEZONE_UTC_FORMAT @"Z" +#define RK_ISOTIMEZONE_OFFSET_FORMAT @"%+.2ld%.2ld" + +@interface RKISO8601DateFormatter(UnparsingPrivate) + +- (NSString *) replaceColonsInString:(NSString *)timeFormat withTimeSeparator:(unichar)timeSep; + +- (NSString *) stringFromDate:(NSDate *)date formatString:(NSString *)dateFormat timeZone:(NSTimeZone *)timeZone; +- (NSString *) weekDateStringForDate:(NSDate *)date timeZone:(NSTimeZone *)timeZone; + +@end + +static NSMutableDictionary *timeZonesByOffset; + +@implementation RKISO8601DateFormatter + ++ (void) initialize { + if (!timeZonesByOffset) { + timeZonesByOffset = [[NSMutableDictionary alloc] init]; + } +} + ++ (void) purgeGlobalCaches { + timeZonesByOffset = nil; +} + +- (NSCalendar *) makeCalendarWithDesiredConfiguration { + NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; + calendar.firstWeekday = 2; //Monday + calendar.timeZone = [NSTimeZone defaultTimeZone]; + return calendar; +} + +- (id) init { + if ((self = [super init])) { + parsingCalendar = [self makeCalendarWithDesiredConfiguration]; + unparsingCalendar = [self makeCalendarWithDesiredConfiguration]; + + format = RKISO8601DateFormatCalendar; + timeSeparator = RKISO8601DefaultTimeSeparatorCharacter; + includeTime = NO; + parsesStrictly = NO; + } + return self; +} + +@synthesize defaultTimeZone; +- (void) setDefaultTimeZone:(NSTimeZone *)tz { + if (defaultTimeZone != tz) { + defaultTimeZone = tz; + unparsingCalendar.timeZone = defaultTimeZone; + } +} + +//The following properties are only here because GCC doesn't like @synthesize in category implementations. + +#pragma mark Parsing + +@synthesize parsesStrictly; + +static NSUInteger read_segment(const unsigned char *str, const unsigned char **next, NSUInteger *out_num_digits); +static NSUInteger read_segment_4digits(const unsigned char *str, const unsigned char **next, NSUInteger *out_num_digits); +static NSUInteger read_segment_2digits(const unsigned char *str, const unsigned char **next); +static double read_double(const unsigned char *str, const unsigned char **next); +static BOOL is_leap_year(NSUInteger year); + +/*Valid ISO 8601 date formats: + * + *YYYYMMDD + *YYYY-MM-DD + *YYYY-MM + *YYYY + *YY //century + * //Implied century: YY is 00-99 + * YYMMDD + * YY-MM-DD + * -YYMM + * -YY-MM + * -YY + * //Implied year + * --MMDD + * --MM-DD + * --MM + * //Implied year and month + * ---DD + * //Ordinal dates: DDD is the number of the day in the year (1-366) + *YYYYDDD + *YYYY-DDD + * YYDDD + * YY-DDD + * -DDD + * //Week-based dates: ww is the number of the week, and d is the number (1-7) of the day in the week + *yyyyWwwd + *yyyy-Www-d + *yyyyWww + *yyyy-Www + *yyWwwd + *yy-Www-d + *yyWww + *yy-Www + * //Year of the implied decade + *-yWwwd + *-y-Www-d + *-yWww + *-y-Www + * //Week and day of implied year + * -Wwwd + * -Www-d + * //Week only of implied year + * -Www + * //Day only of implied week + * -W-d + */ + +- (NSDateComponents *) dateComponentsFromString:(NSString *)string { + return [self dateComponentsFromString:string timeZone:NULL]; +} +- (NSDateComponents *) dateComponentsFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone { + return [self dateComponentsFromString:string timeZone:outTimeZone range:NULL]; +} +- (NSDateComponents *) dateComponentsFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone range:(out NSRange *)outRange { + NSDate *now = [NSDate date]; + + NSDateComponents *components = [[NSDateComponents alloc] init]; + NSDateComponents *nowComponents = [parsingCalendar components:(NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit) fromDate:now]; + + NSUInteger + //Date + year, + month_or_week = 0U, + day = 0U, + //Time + hour = 0U; + NSTimeInterval + minute = 0.0, + second = 0.0; + //Time zone + NSInteger tz_hour = 0; + NSInteger tz_minute = 0; + + enum { + monthAndDate, + week, + dateOnly + } dateSpecification = monthAndDate; + + BOOL strict = self.parsesStrictly; + unichar timeSep = self.timeSeparator; + + if (strict) timeSep = RKISO8601DefaultTimeSeparatorCharacter; + NSAssert(timeSep != '\0', @"Time separator must not be NUL."); + + BOOL isValidDate = ([string length] > 0U); + NSTimeZone *timeZone = nil; + + const unsigned char *ch = (const unsigned char *)[string UTF8String]; + + NSRange range = { 0U, 0U }; + const unsigned char *start_of_date = NULL; + if (strict && isspace(*ch)) { + range.location = NSNotFound; + isValidDate = NO; + } else { + //Skip leading whitespace. + NSUInteger i = 0U; + for(NSUInteger len = strlen((const char *)ch); i < len; ++i) { + if (!isspace(ch[i])) + break; + } + + range.location = i; + ch += i; + start_of_date = ch; + + NSUInteger segment; + NSUInteger num_leading_hyphens = 0U, num_digits = 0U; + + if (*ch == 'T') { + //There is no date here, only a time. Set the date to now; then we'll parse the time. + isValidDate = isdigit(*++ch); + + year = nowComponents.year; + month_or_week = nowComponents.month; + day = nowComponents.day; + } else { + while(*ch == '-') { + ++num_leading_hyphens; + ++ch; + } + + segment = read_segment(ch, &ch, &num_digits); + switch(num_digits) { + case 0: + if (*ch == 'W') { + if ((ch[1] == '-') && isdigit(ch[2]) && ((num_leading_hyphens == 1U) || ((num_leading_hyphens == 2U) && !strict))) { + year = nowComponents.year; + month_or_week = 1U; + ch += 2; + goto parseDayAfterWeek; + } else if (num_leading_hyphens == 1U) { + year = nowComponents.year; + goto parseWeekAndDay; + } else + isValidDate = NO; + } else + isValidDate = NO; + break; + + case 8: //YYYY MM DD + if (num_leading_hyphens > 0U) + isValidDate = NO; + else { + day = segment % 100U; + segment /= 100U; + month_or_week = segment % 100U; + year = segment / 100U; + } + break; + + case 6: //YYMMDD (implicit century) + if (num_leading_hyphens > 0U) + isValidDate = NO; + else { + day = segment % 100U; + segment /= 100U; + month_or_week = segment % 100U; + year = nowComponents.year; + year -= (year % 100U); + year += segment / 100U; + } + break; + + case 4: + switch(num_leading_hyphens) { + case 0: //YYYY + year = segment; + + if (*ch == '-') ++ch; + + if (!isdigit(*ch)) { + if (*ch == 'W') + goto parseWeekAndDay; + else + month_or_week = day = 1U; + } else { + segment = read_segment(ch, &ch, &num_digits); + switch(num_digits) { + case 4: //MMDD + day = segment % 100U; + month_or_week = segment / 100U; + break; + + case 2: //MM + month_or_week = segment; + + if (*ch == '-') ++ch; + if (!isdigit(*ch)) + day = 1U; + else + day = read_segment(ch, &ch, NULL); + break; + + case 3: //DDD + day = segment % 1000U; + dateSpecification = dateOnly; + if (strict && (day > (365U + is_leap_year(year)))) + isValidDate = NO; + break; + + default: + isValidDate = NO; + } + } + break; + + case 1: //YYMM + month_or_week = segment % 100U; + year = segment / 100U; + + if (*ch == '-') ++ch; + if (!isdigit(*ch)) + day = 1U; + else + day = read_segment(ch, &ch, NULL); + + break; + + case 2: //MMDD + day = segment % 100U; + month_or_week = segment / 100U; + year = nowComponents.year; + + break; + + default: + isValidDate = NO; + } //switch(num_leading_hyphens) (4 digits) + break; + + case 1: + if (strict) { + //Two digits only - never just one. + if (num_leading_hyphens == 1U) { + if (*ch == '-') ++ch; + if (*++ch == 'W') { + year = nowComponents.year; + year -= (year % 10U); + year += segment; + goto parseWeekAndDay; + } else + isValidDate = NO; + } else + isValidDate = NO; + break; + } + case 2: + switch(num_leading_hyphens) { + case 0: + if (*ch == '-') { + //Implicit century + year = nowComponents.year; + year -= (year % 100U); + year += segment; + + if (*++ch == 'W') + goto parseWeekAndDay; + else if (!isdigit(*ch)) { + goto centuryOnly; + } else { + //Get month and/or date. + segment = read_segment_4digits(ch, &ch, &num_digits); + RKLogTrace(@"(%@) parsing month; segment is %lu and ch is %s", string, (unsigned long)segment, ch); + switch(num_digits) { + case 4: //YY-MMDD + day = segment % 100U; + month_or_week = segment / 100U; + break; + + case 1: //YY-M; YY-M-DD (extension) + if (strict) { + isValidDate = NO; + break; + } + case 2: //YY-MM; YY-MM-DD + month_or_week = segment; + if (*ch == '-') { + if (isdigit(*++ch)) + day = read_segment_2digits(ch, &ch); + else + day = 1U; + } else + day = 1U; + break; + + case 3: //Ordinal date. + day = segment; + dateSpecification = dateOnly; + break; + } + } + } else if (*ch == 'W') { + year = nowComponents.year; + year -= (year % 100U); + year += segment; + + parseWeekAndDay: //*ch should be 'W' here. + if (!isdigit(*++ch)) { + //Not really a week-based date; just a year followed by '-W'. + if (strict) + isValidDate = NO; + else + month_or_week = day = 1U; + } else { + month_or_week = read_segment_2digits(ch, &ch); + if (*ch == '-') ++ch; + parseDayAfterWeek: + day = isdigit(*ch) ? read_segment_2digits(ch, &ch) : 1U; + dateSpecification = week; + } + } else { + //Century only. Assume current year. + centuryOnly: + year = segment * 100U + nowComponents.year % 100U; + month_or_week = day = 1U; + } + break; + + case 1:; //-YY; -YY-MM (implicit century) + RKLogTrace(@"(%@) found %lu digits and one hyphen, so this is either -YY or -YY-MM; segment (year) is %lu", string, (unsigned long)num_digits, (unsigned long)segment); + NSUInteger current_year = nowComponents.year; + NSUInteger current_century = (current_year % 100U); + year = segment + (current_year - current_century); + if (num_digits == 1U) //implied decade + year += current_century - (current_year % 10U); + + if (*ch == '-') { + ++ch; + month_or_week = read_segment_2digits(ch, &ch); + RKLogTrace(@"(%@) month is %lu", string, (unsigned long)month_or_week); + } + + day = 1U; + break; + + case 2: //--MM; --MM-DD + year = nowComponents.year; + month_or_week = segment; + if (*ch == '-') { + ++ch; + day = read_segment_2digits(ch, &ch); + } + break; + + case 3: //---DD + year = nowComponents.year; + month_or_week = nowComponents.month; + day = segment; + break; + + default: + isValidDate = NO; + } //switch(num_leading_hyphens) (2 digits) + break; + + case 7: //YYYY DDD (ordinal date) + if (num_leading_hyphens > 0U) + isValidDate = NO; + else { + day = segment % 1000U; + year = segment / 1000U; + dateSpecification = dateOnly; + if (strict && (day > (365U + is_leap_year(year)))) + isValidDate = NO; + } + break; + + case 3: //--DDD (ordinal date, implicit year) + //Technically, the standard only allows one hyphen. But it says that two hyphens is the logical implementation, and one was dropped for brevity. So I have chosen to allow the missing hyphen. + if ((num_leading_hyphens < 1U) || ((num_leading_hyphens > 2U) && !strict)) + isValidDate = NO; + else { + day = segment; + year = nowComponents.year; + dateSpecification = dateOnly; + if (strict && (day > (365U + is_leap_year(year)))) + isValidDate = NO; + } + break; + + default: + isValidDate = NO; + } + } + + if (isValidDate) { + if (isspace(*ch) || (*ch == 'T')) ++ch; + + if (isdigit(*ch)) { + hour = read_segment_2digits(ch, &ch); + if (*ch == timeSep) { + ++ch; + if ((timeSep == ',') || (timeSep == '.')) { + //We can't do fractional minutes when '.' is the segment separator. + //Only allow whole minutes and whole seconds. + minute = read_segment_2digits(ch, &ch); + if (*ch == timeSep) { + ++ch; + second = read_segment_2digits(ch, &ch); + } + } else { + //Allow a fractional minute. + //If we don't get a fraction, look for a seconds segment. + //Otherwise, the fraction of a minute is the seconds. + minute = read_double(ch, &ch); + second = modf(minute, &minute); + if (second > DBL_EPSILON) + second *= 60.0; //Convert fraction (e.g. .5) into seconds (e.g. 30). + else if (*ch == timeSep) { + ++ch; + second = read_double(ch, &ch); + } + } + } + + if (!strict) { + if (isspace(*ch)) ++ch; + } + + switch(*ch) { + case 'Z': + timeZone = [NSTimeZone timeZoneWithAbbreviation:@"UTC"]; + break; + + case '+': + case '-':; + BOOL negative = (*ch == '-'); + if (isdigit(*++ch)) { + //Read hour offset. + segment = *ch - '0'; + if (isdigit(*++ch)) { + segment *= 10U; + segment += *(ch++) - '0'; + } + tz_hour = (NSInteger)segment; + if (negative) tz_hour = -tz_hour; + + //Optional separator. + if (*ch == timeSep) ++ch; + + if (isdigit(*ch)) { + //Read minute offset. + segment = *ch - '0'; + if (isdigit(*++ch)) { + segment *= 10U; + segment += *ch - '0'; + } + tz_minute = segment; + if (negative) tz_minute = -tz_minute; + } + + NSTimeInterval timeZoneOffset = (tz_hour * 3600) + (tz_minute * 60); + NSNumber *offsetNum = [NSNumber numberWithDouble:timeZoneOffset]; + timeZone = [timeZonesByOffset objectForKey:offsetNum]; + if (!timeZone) { + timeZone = [NSTimeZone timeZoneForSecondsFromGMT:timeZoneOffset]; + if (timeZone) + [timeZonesByOffset setObject:timeZone forKey:offsetNum]; + } + } + } + } + } + + if (isValidDate) { + components.year = year; + components.day = day; + components.hour = hour; + components.minute = (NSInteger)minute; + components.second = (NSInteger)second; + + switch(dateSpecification) { + case monthAndDate: + components.month = month_or_week; + break; + + case week:; + //Adapted from <http://personal.ecu.edu/mccartyr/ISOwdALG.txt>. + //This works by converting the week date into an ordinal date, then letting the next case handle it. + NSUInteger prevYear = year - 1U; + NSUInteger YY = prevYear % 100U; + NSUInteger C = prevYear - YY; + NSUInteger G = YY + YY / 4U; + NSUInteger isLeapYear = (((C / 100U) % 4U) * 5U); + NSUInteger Jan1Weekday = (isLeapYear + G) % 7U; + enum { monday, tuesday, wednesday, thursday/*, friday, saturday, sunday*/ }; + components.day = ((8U - Jan1Weekday) + (7U * (Jan1Weekday > thursday))) + (day - 1U) + (7U * (month_or_week - 2)); + + case dateOnly: //An "ordinal date". + break; + } + } + } //if (!(strict && isdigit(ch[0]))) + + if (outRange) { + if (isValidDate) + range.length = ch - start_of_date; + else + range.location = NSNotFound; + + *outRange = range; + } + if (outTimeZone) { + *outTimeZone = timeZone; + } + + return isValidDate ? components : nil; +} + +- (NSDate *) dateFromString:(NSString *)string { + return [self dateFromString:string timeZone:NULL]; +} +- (NSDate *) dateFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone { + return [self dateFromString:string timeZone:outTimeZone range:NULL]; +} +- (NSDate *)dateFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone range:(out NSRange *)outRange { + NSTimeZone *timeZone = nil; + NSDateComponents *components = [self dateComponentsFromString:string timeZone:&timeZone range:outRange]; + if (! components) return nil; + if (outTimeZone) + *outTimeZone = timeZone; + parsingCalendar.timeZone = timeZone; + + RKLogDebug(@"TIMEZONE: %@", timeZone); + + return [parsingCalendar dateFromComponents:components]; +} + +- (BOOL)getObjectValue:(id *)outValue forString:(NSString *)string errorDescription:(NSString **)error { + NSDate *date = [self dateFromString:string]; + if (outValue) + *outValue = date; + return (date != nil); +} + +#pragma mark Unparsing + +@synthesize format; +@synthesize includeTime; +@synthesize timeSeparator; + +- (NSString *) replaceColonsInString:(NSString *)timeFormat withTimeSeparator:(unichar)timeSep { + if (timeSep != ':') { + NSMutableString *timeFormatMutable = [timeFormat mutableCopy]; + [timeFormatMutable replaceOccurrencesOfString:@":" + withString:[NSString stringWithCharacters:&timeSep length:1U] + options:NSBackwardsSearch | NSLiteralSearch + range:(NSRange){ 0UL, [timeFormat length] }]; + timeFormat = timeFormatMutable; + } + return timeFormat; +} + +- (NSString *) stringFromDate:(NSDate *)date { + NSTimeZone *timeZone = self.defaultTimeZone; + if (!timeZone) timeZone = [NSTimeZone defaultTimeZone]; + return [self stringFromDate:date timeZone:timeZone]; +} + +- (NSString *) stringFromDate:(NSDate *)date timeZone:(NSTimeZone *)timeZone { + switch (self.format) { + case RKISO8601DateFormatCalendar: + return [self stringFromDate:date formatString:RK_ISOCALENDAR_DATE_FORMAT timeZone:timeZone]; + case RKISO8601DateFormatWeek: + return [self weekDateStringForDate:date timeZone:timeZone]; + case RKISO8601DateFormatOrdinal: + return [self stringFromDate:date formatString:RK_ISOORDINAL_DATE_FORMAT timeZone:timeZone]; + default: + [NSException raise:NSInternalInconsistencyException format:@"self.format was %ld, not calendar (%d), week (%d), or ordinal (%d)", (unsigned long) self.format, RKISO8601DateFormatCalendar, RKISO8601DateFormatWeek, RKISO8601DateFormatOrdinal]; + return nil; + } +} + +- (NSString *) stringFromDate:(NSDate *)date formatString:(NSString *)dateFormat timeZone:(NSTimeZone *)timeZone { + if (includeTime) + dateFormat = [dateFormat stringByAppendingFormat:@"'T'%@", [self replaceColonsInString:RK_ISOTIME_FORMAT withTimeSeparator:self.timeSeparator]]; + + if (dateFormat != lastUsedFormatString) { + unparsingFormatter = nil; + lastUsedFormatString = dateFormat; + } + + if (!unparsingFormatter) { + unparsingFormatter = [[NSDateFormatter alloc] init]; + unparsingFormatter.formatterBehavior = NSDateFormatterBehavior10_4; + unparsingFormatter.dateFormat = dateFormat; + unparsingFormatter.calendar = unparsingCalendar; + } + + unparsingCalendar.timeZone = timeZone; + unparsingFormatter.timeZone = timeZone; + NSString *str = [unparsingFormatter stringForObjectValue:date]; + + if (includeTime) { + NSInteger offset = [timeZone secondsFromGMT]; + offset /= 60; //bring down to minutes + if (offset == 0) + str = [str stringByAppendingString:RK_ISOTIMEZONE_UTC_FORMAT]; + else + str = [str stringByAppendingFormat:RK_ISOTIMEZONE_OFFSET_FORMAT, (long) (offset / 60), (long) (offset % 60)]; + } + + //Undo the change we made earlier + unparsingCalendar.timeZone = self.defaultTimeZone; + unparsingFormatter.timeZone = self.defaultTimeZone; + + return str; +} + +- (NSString *) stringForObjectValue:(id)value { + NSParameterAssert([value isKindOfClass:[NSDate class]]); + + return [self stringFromDate:(NSDate *)value]; +} + +/*Adapted from: + * Algorithm for Converting Gregorian Dates to ISO 8601 Week Date + * Rick McCarty, 1999 + * http://personal.ecu.edu/mccartyr/ISOwdALG.txt + */ +- (NSString *) weekDateStringForDate:(NSDate *)date timeZone:(NSTimeZone *)timeZone { + unparsingCalendar.timeZone = timeZone; + NSDateComponents *components = [unparsingCalendar components:NSYearCalendarUnit | NSWeekdayCalendarUnit | NSDayCalendarUnit fromDate:date]; + + //Determine the ordinal date. + NSDateComponents *startOfYearComponents = [unparsingCalendar components:NSYearCalendarUnit fromDate:date]; + startOfYearComponents.month = 1; + startOfYearComponents.day = 1; + NSDateComponents *ordinalComponents = [unparsingCalendar components:NSDayCalendarUnit fromDate:[unparsingCalendar dateFromComponents:startOfYearComponents] toDate:date options:0]; + ordinalComponents.day += 1; + + enum { + monday, tuesday, wednesday, thursday, friday, saturday, sunday + }; + enum { + january = 1, february, march, + april, may, june, + july, august, september, + october, november, december + }; + + NSInteger year = components.year; + NSInteger week = 0; + //The old unparser added 6 to [calendarDate dayOfWeek], which was zero-based; components.weekday is one-based, so we now add only 5. + NSInteger dayOfWeek = (components.weekday + 5) % 7; + NSInteger dayOfYear = ordinalComponents.day; + + NSInteger prevYear = year - 1; + + BOOL yearIsLeapYear = is_leap_year(year); + BOOL prevYearIsLeapYear = is_leap_year(prevYear); + + NSInteger YY = prevYear % 100; + NSInteger C = prevYear - YY; + NSInteger G = YY + YY / 4; + NSInteger Jan1Weekday = (((((C / 100) % 4) * 5) + G) % 7); + + NSInteger weekday = ((dayOfYear + Jan1Weekday) - 1) % 7; + + if((dayOfYear <= (7 - Jan1Weekday)) && (Jan1Weekday > thursday)) { + week = 52 + ((Jan1Weekday == friday) || ((Jan1Weekday == saturday) && prevYearIsLeapYear)); + --year; + } else { + NSInteger lengthOfYear = 365 + yearIsLeapYear; + if((lengthOfYear - dayOfYear) < (thursday - weekday)) { + ++year; + week = 1; + } else { + NSInteger J = dayOfYear + (sunday - weekday) + Jan1Weekday; + week = J / 7 - (Jan1Weekday > thursday); + } + } + + NSString *timeString; + if(includeTime) { + NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; + unichar timeSep = self.timeSeparator; + if (!timeSep) timeSep = RKISO8601DefaultTimeSeparatorCharacter; + formatter.dateFormat = [self replaceColonsInString:RK_ISOTIME_WITH_TIMEZONE_FORMAT withTimeSeparator:timeSep]; + + timeString = [formatter stringForObjectValue:date]; + } else + timeString = @""; + + return [NSString stringWithFormat:@"%lu-W%02lu-%02lu%@", (unsigned long)year, (unsigned long)week, ((unsigned long)dayOfWeek) + 1U, timeString]; +} + +@end + +static NSUInteger read_segment(const unsigned char *str, const unsigned char **next, NSUInteger *out_num_digits) { + NSUInteger num_digits = 0U; + NSUInteger value = 0U; + + while(isdigit(*str)) { + value *= 10U; + value += *str - '0'; + ++num_digits; + ++str; + } + + if (next) *next = str; + if (out_num_digits) *out_num_digits = num_digits; + + return value; +} +static NSUInteger read_segment_4digits(const unsigned char *str, const unsigned char **next, NSUInteger *out_num_digits) { + NSUInteger num_digits = 0U; + NSUInteger value = 0U; + + if (isdigit(*str)) { + value += *(str++) - '0'; + ++num_digits; + } + + if (isdigit(*str)) { + value *= 10U; + value += *(str++) - '0'; + ++num_digits; + } + + if (isdigit(*str)) { + value *= 10U; + value += *(str++) - '0'; + ++num_digits; + } + + if (isdigit(*str)) { + value *= 10U; + value += *(str++) - '0'; + ++num_digits; + } + + if (next) *next = str; + if (out_num_digits) *out_num_digits = num_digits; + + return value; +} +static NSUInteger read_segment_2digits(const unsigned char *str, const unsigned char **next) { + NSUInteger value = 0U; + + if (isdigit(*str)) + value += *str - '0'; + + if (isdigit(*++str)) { + value *= 10U; + value += *(str++) - '0'; + } + + if (next) *next = str; + + return value; +} + +//strtod doesn't support ',' as a separator. This does. +static double read_double(const unsigned char *str, const unsigned char **next) { + double value = 0.0; + + if (str) { + NSUInteger int_value = 0; + + while(isdigit(*str)) { + int_value *= 10U; + int_value += (*(str++) - '0'); + } + value = int_value; + + if (((*str == ',') || (*str == '.'))) { + ++str; + + register double multiplier, multiplier_multiplier; + multiplier = multiplier_multiplier = 0.1; + + while(isdigit(*str)) { + value += (*(str++) - '0') * multiplier; + multiplier *= multiplier_multiplier; + } + } + } + + if (next) *next = str; + + return value; +} + +static BOOL is_leap_year(NSUInteger year) { + return \ + ((year % 4U) == 0U) + && (((year % 100U) != 0U) + || ((year % 400U) == 0U)); +} diff --git a/Pods/RestKit/Code/Support/RKLog.h b/Pods/RestKit/Code/Support/RKLog.h new file mode 100644 index 00000000..07a75ad3 --- /dev/null +++ b/Pods/RestKit/Code/Support/RKLog.h @@ -0,0 +1,229 @@ +// +// RKLog.h +// RestKit +// +// Created by Blake Watters on 5/3/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + RestKit Logging is based on the LibComponentLogging framework + + @see lcl_config_components_RK.h + @see lcl_config_logger_RK.h + */ +#import "lcl_RK.h" + +/** + RKLogComponent defines the active component within any given portion of RestKit + + By default, messages will log to the base 'RestKit' log component. All other components + used by RestKit are nested under this parent, so this effectively sets the default log + level for the entire library. + + The component can be undef'd and redefined to change the active logging component. + */ +#define RKLogComponent RKlcl_cRestKit + +/** + The logging macros. These macros will log to the currently active logging component + at the log level identified in the name of the macro. + + For example, in the `RKMappingOperation` class we would redefine the RKLogComponent: + + #undef RKLogComponent + #define RKLogComponent RKlcl_cRestKitObjectMapping + + The RKlcl_c prefix is the LibComponentLogging data structure identifying the logging component + we want to target within this portion of the codebase. See lcl_config_component_RK.h for reference. + + Having defined the logging component, invoking the logger via: + + RKLogInfo(@"This is my log message!"); + + Would result in a log message similar to: + + I RestKit.ObjectMapping:RKLog.h:42 This is my log message! + + The message will only be logged if the log level for the active component is equal to or higher + than the level the message was logged at (in this case, Info). + */ +#define RKLogCritical(...) \ +RKlcl_log(RKLogComponent, RKlcl_vCritical, @"" __VA_ARGS__) + +#define RKLogError(...) \ +RKlcl_log(RKLogComponent, RKlcl_vError, @"" __VA_ARGS__) + +#define RKLogWarning(...) \ +RKlcl_log(RKLogComponent, RKlcl_vWarning, @"" __VA_ARGS__) + +#define RKLogInfo(...) \ +RKlcl_log(RKLogComponent, RKlcl_vInfo, @"" __VA_ARGS__) + +#define RKLogDebug(...) \ +RKlcl_log(RKLogComponent, RKlcl_vDebug, @"" __VA_ARGS__) + +#define RKLogTrace(...) \ +RKlcl_log(RKLogComponent, RKlcl_vTrace, @"" __VA_ARGS__) + +/** + Log Level Aliases + + These aliases simply map the log levels defined within LibComponentLogger to something more friendly + */ +#define RKLogLevelOff RKlcl_vOff +#define RKLogLevelCritical RKlcl_vCritical +#define RKLogLevelError RKlcl_vError +#define RKLogLevelWarning RKlcl_vWarning +#define RKLogLevelInfo RKlcl_vInfo +#define RKLogLevelDebug RKlcl_vDebug +#define RKLogLevelTrace RKlcl_vTrace + +/** + Alias the LibComponentLogger logging configuration method. Also ensures logging + is initialized for the framework. + + Expects the name of the component and a log level. + + Examples: + + // Log debugging messages from the Network component + RKLogConfigureByName("RestKit/Network", RKLogLevelDebug); + + // Log only critical messages from the Object Mapping component + RKLogConfigureByName("RestKit/ObjectMapping", RKLogLevelCritical); + */ +#define RKLogConfigureByName(name, level) \ +RKLogInitialize(); \ +RKlcl_configure_by_name(name, level); + +/** + Alias for configuring the LibComponentLogger logging component for the App. This + enables the end-user of RestKit to leverage RKLog() to log messages inside of + their apps. + */ +#define RKLogSetAppLoggingLevel(level) \ +RKLogInitialize(); \ +RKlcl_configure_by_name("App", level); + +/** + Temporarily changes the logging level for the specified component and executes the block. Any logging + statements executed within the body of the block against the specified component will log at the new + logging level. After the block has executed, the logging level is restored to its previous state. + */ +#define RKLogToComponentWithLevelWhileExecutingBlock(_component, _level, _block) \ + do { \ + int _currentLevel = _RKlcl_component_level[_component]; \ + RKlcl_configure_by_component(_component, _level); \ + @try { \ + _block(); \ + } \ + @catch (NSException *exception) { \ + @throw; \ + } \ + @finally { \ + RKlcl_configure_by_component(_component, _currentLevel); \ + } \ + } while (false); + +/** + Temporarily turns off logging for the given logging component during execution of the block. + After the block has finished execution, the logging level is restored to its previous state. + */ +#define RKLogSilenceComponentWhileExecutingBlock(component, _block) \ + RKLogToComponentWithLevelWhileExecutingBlock(component, RKLogLevelOff, _block) + +/** + Temporarily changes the logging level for the configured RKLogComponent and executes the block. Any logging + statements executed within the body of the block for the current logging component will log at the new + logging level. After the block has finished execution, the logging level is restored to its previous state. + */ +#define RKLogWithLevelWhileExecutingBlock(_level, _block) \ + RKLogToComponentWithLevelWhileExecutingBlock(RKLogComponent, _level, _block) + + +/** + Temporarily turns off logging for current logging component during execution of the block. + After the block has finished execution, the logging level is restored to its previous state. + */ +#define RKLogSilenceWhileExecutingBlock(_block) \ + RKLogToComponentWithLevelWhileExecutingBlock(RKLogComponent, RKLogLevelOff, _block) + + +/** + Set the Default Log Level + + Based on the presence of the DEBUG flag, we default the logging for the RestKit parent component + to Info or Warning. + + You can override this setting by defining RKLogLevelDefault as a pre-processor macro. + */ +#ifndef RKLogLevelDefault + #ifdef DEBUG + #define RKLogLevelDefault RKLogLevelInfo + #else + #define RKLogLevelDefault RKLogLevelWarning + #endif +#endif + +/** + Initialize the logging environment + */ +void RKLogInitialize(void); + +/** + Configure RestKit logging from environment variables. + (Use Option + Command + R to set Environment Variables prior to run.) + + For example to configure the equivalent of setting the following in code: + RKLogConfigureByName("RestKit/Network", RKLogLevelTrace); + + Define an environment variable named RKLogLevel.RestKit.Network and set its value to "Trace" + + See lcl_config_components_RK.h for configurable RestKit logging components. + + Valid values are the following: + Default or 0 + Critical or 1 + Error or 2 + Warning or 3 + Info or 4 + Debug or 5 + Trace or 6 + */ +void RKLogConfigureFromEnvironment(void); + +/** + Logs extensive information about an NSError generated as the results + of a failed key-value validation error. + */ +void RKLogValidationError(NSError *error); + +/** + Logs extensive information an NSError generated as the result of a + failed Core Data interaction, such as the execution of a fetch request + or the saving of a managed object context. + + The error will be logged to the RestKit/CoreData component with an + error level of RKLogLevelError regardless of the current logging context + at invocation time. + */ +void RKLogCoreDataError(NSError *error); + +/** + Logs the value of an NSUInteger as a binary string. Useful when + examining integers containing bitmasked values. + */ +void RKLogIntegerAsBinary(NSUInteger); diff --git a/Pods/RestKit/Code/Support/RKLog.m b/Pods/RestKit/Code/Support/RKLog.m new file mode 100644 index 00000000..ca160162 --- /dev/null +++ b/Pods/RestKit/Code/Support/RKLog.m @@ -0,0 +1,158 @@ +// +// RKLog.m +// RestKit +// +// Created by Blake Watters on 6/10/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKLog.h" + +int RKLogLevelForString(NSString *, NSString *); + +static BOOL loggingInitialized = NO; + +void RKLogInitialize(void) +{ + if (loggingInitialized == NO) { + RKlcl_configure_by_name("RestKit*", RKLogLevelDefault); + RKlcl_configure_by_name("App", RKLogLevelDefault); + RKLogInfo(@"RestKit initialized..."); + loggingInitialized = YES; + } +} + + +void RKLogConfigureFromEnvironment(void) +{ + static NSString *logComponentPrefix = @"RKLogLevel."; + + NSDictionary *envVars = [[NSProcessInfo processInfo] environment]; + + for (NSString *envVarName in [envVars allKeys]) { + if ([envVarName hasPrefix:logComponentPrefix]) { + NSString *logLevel = [envVars valueForKey:envVarName]; + NSString *logComponent = [envVarName stringByReplacingOccurrencesOfString:logComponentPrefix withString:@""]; + logComponent = [logComponent stringByReplacingOccurrencesOfString:@"." withString:@"/"]; + + const char *log_component_c_str = [logComponent cStringUsingEncoding:NSUTF8StringEncoding]; + int log_level_int = RKLogLevelForString(logLevel, envVarName); + RKLogConfigureByName(log_component_c_str, log_level_int); + } + } +} + + +int RKLogLevelForString(NSString *logLevel, NSString *envVarName) +{ + // Forgive the user if they specify the full name for the value i.e. "RKLogLevelDebug" instead of "Debug" + logLevel = [logLevel stringByReplacingOccurrencesOfString:@"RKLogLevel" withString:@""]; + + if ([logLevel isEqualToString:@"Off"] || + [logLevel isEqualToString:@"0"]) { + return RKLogLevelOff; + } + else if ([logLevel isEqualToString:@"Critical"] || + [logLevel isEqualToString:@"1"]) { + return RKLogLevelCritical; + } + else if ([logLevel isEqualToString:@"Error"] || + [logLevel isEqualToString:@"2"]) { + return RKLogLevelError; + } + else if ([logLevel isEqualToString:@"Warning"] || + [logLevel isEqualToString:@"3"]) { + return RKLogLevelWarning; + } + else if ([logLevel isEqualToString:@"Info"] || + [logLevel isEqualToString:@"4"]) { + return RKLogLevelInfo; + } + else if ([logLevel isEqualToString:@"Debug"] || + [logLevel isEqualToString:@"5"]) { + return RKLogLevelDebug; + } + else if ([logLevel isEqualToString:@"Trace"] || + [logLevel isEqualToString:@"6"]) { + return RKLogLevelTrace; + } + else if ([logLevel isEqualToString:@"Default"]) { + return RKLogLevelDefault; + } + else { + NSString *errorMessage = [NSString stringWithFormat:@"The value: \"%@\" for the environment variable: \"%@\" is invalid. \ + \nThe log level must be set to one of the following values \ + \n Default or 0 \ + \n Critical or 1 \ + \n Error or 2 \ + \n Warning or 3 \ + \n Info or 4 \ + \n Debug or 5 \ + \n Trace or 6\n", logLevel, envVarName]; + @throw [NSException exceptionWithName:NSInvalidArgumentException reason:errorMessage userInfo:nil]; + + return -1; + } +} + +void RKLogValidationError(NSError *error) +{ + if ([[error domain] isEqualToString:@"NSCocoaErrorDomain"]) { + NSDictionary *userInfo = [error userInfo]; + NSArray *errors = [userInfo valueForKey:@"NSDetailedErrors"]; + if (errors) { + for (NSError *detailedError in errors) { + NSDictionary *subUserInfo = [detailedError userInfo]; + RKLogError(@"Detailed Error\n \ + NSLocalizedDescription:\t\t%@\n \ + NSValidationErrorKey:\t\t\t%@\n \ + NSValidationErrorPredicate:\t%@\n \ + NSValidationErrorObject:\n%@\n", + [subUserInfo valueForKey:@"NSLocalizedDescription"], + [subUserInfo valueForKey:@"NSValidationErrorKey"], + [subUserInfo valueForKey:@"NSValidationErrorPredicate"], + [subUserInfo valueForKey:@"NSValidationErrorObject"]); + } + } else { + RKLogError(@"Validation Error\n \ + NSLocalizedDescription:\t\t%@\n \ + NSValidationErrorKey:\t\t\t%@\n \ + NSValidationErrorPredicate:\t%@\n \ + NSValidationErrorObject:\n%@\n", + [userInfo valueForKey:@"NSLocalizedDescription"], + [userInfo valueForKey:@"NSValidationErrorKey"], + [userInfo valueForKey:@"NSValidationErrorPredicate"], + [userInfo valueForKey:@"NSValidationErrorObject"]); + } + } +} + +void RKLogIntegerAsBinary(NSUInteger bitMask) +{ + NSUInteger bit = ~(NSUIntegerMax >> 1); + NSMutableString *string = [NSMutableString string]; + do { + [string appendString:(((NSUInteger)bitMask & bit) ? @"1" : @"0")]; + } while (bit >>= 1); + + NSLog(@"Value of %ld in binary: %@", (long)bitMask, string); +} + +void RKLogCoreDataError(NSError *error) +{ + RKLogToComponentWithLevelWhileExecutingBlock(RKlcl_cRestKitCoreData, RKLogLevelError, ^{ + RKLogValidationError(error); + }); +} diff --git a/Pods/RestKit/Code/Support/RKMIMETypeSerialization.h b/Pods/RestKit/Code/Support/RKMIMETypeSerialization.h new file mode 100644 index 00000000..071869af --- /dev/null +++ b/Pods/RestKit/Code/Support/RKMIMETypeSerialization.h @@ -0,0 +1,97 @@ +// +// RKMIMETypeSerialization.h +// RestKit +// +// Created by Blake Watters on 5/18/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKMIMETypes.h" +#import "RKSerialization.h" + +/** + The `RKMIMETypeSerialization` class provides support for the registration of classes conforming to the `RKSerialization` protocol by MIME Type and the serialization and deserialization of content by MIME Type. Serialization implementations may be registered by an exact string match (i.e. 'application/json' for a JSON serialization implementation) or by regular expression to match MIME Type by pattern. + */ +@interface RKMIMETypeSerialization : NSObject + +///--------------------------------------- +/// @name Managing MIME Type Registrations +///--------------------------------------- + +/** + Registers the given serialization class to handle content for the given MIME Type identifier. + + MIME Types may be given as either a string or as a regular expression that matches the MIME Types for which the given serialization should handle. Serializations are searched in the reverse order of their registration. If a registration is made for an already registered MIME Type, the new registration will take precedence. + + @param serializationClass The class conforming to the RKSerialization protocol to be registered as handling the given MIME Type. + @param MIMETypeStringOrRegularExpression A string or regular expression specifying the MIME Type(s) that given serialization implementation is to be registered as handling. + */ ++ (void)registerClass:(Class<RKSerialization>)serializationClass forMIMEType:(id)MIMETypeStringOrRegularExpression; + +/** + Unregisters the given serialization class from handling any MIME Types. + + After this method is invoked, invocations of `serializationForMIMEType:` will no longer return the unregistered serialization class. + + @param serializationClass The class conforming to the `RKSerialization` protocol to be unregistered. + */ ++ (void)unregisterClass:(Class<RKSerialization>)serializationClass; + +/** + Returns the serialization class registered to handle the given MIME Type. + + Searches the registrations in reverse order for the first serialization implementation registered to handle the given MIME Type. Matches are determined by doing a lowercase string comparison if the MIME Type was registered with a string identifier or by evaluating a regular expression match against the given MIME Type if registered with a regular expression. + + @param MIMEType The MIME Type for which to return the registered `RKSerialization` conformant class. + @return A class conforming to the RKSerialization protocol registered for the given MIME Type or nil if none was found. + */ ++ (Class<RKSerialization>)serializationClassForMIMEType:(NSString *)MIMEType; + +/** + Returns a set containing the string values for all MIME Types for which a serialization implementation has been registered. + + @return An `NSSet` object whose elements are `NSString` values enumerating the registered MIME Types. + */ ++ (NSSet *)registeredMIMETypes; + +///--------------------------------------------------------- +/// @name Serializing and Deserializing Content by MIME Type +///--------------------------------------------------------- + +/** + Deserializes and returns a Foundation object representation of the given UTF-8 encoded data in the serialization format for the given MIME Type. + + On invocation, searches the registrations by invoking `serializationClassForMIMEType:` with the given MIME Type and then invokes `objectFromData:error:` on the `RKSerialization` conformant class returned. If no serialization implementation is found to handle the given MIME Type, nil is returned and the given error pointer will be set to an NSError object with the `RKMissingSerializationForMIMETypeError` code. + + @param data The UTF-8 encoded data representation of the object to be deserialized. + @param MIMEType The MIME Type of the serialization format the data is in. + @param error A pointer to an NSError object. + @return A Foundation object from the serialized data in data, or nil if an error occurs. + */ ++ (id)objectFromData:(NSData *)data MIMEType:(NSString *)MIMEType error:(NSError **)error; + +/** + Serializes and returns a UTF-8 encoded data representation of the given Foundation object in the serialization format for the given MIME Type. + + On invocation, searches the registrations by invoking `serializationClassForMIMEType:` with the given MIME Type and then invokes `objectFromData:error:` on the `RKSerialization` conformant class returned. If no serialization implementation is found to handle the given MIME Type, nil is returned and the given error pointer will be set to an NSError object with the `RKMissingSerializationForMIMETypeError` code. + + @param object The Foundation object to serialized. + @param MIMEType The MIME Type of the serialization format the data is in. + @param error A pointer to an NSError object. + @return A Foundation object from the serialized data in data, or nil if an error occurs. + */ ++ (NSData *)dataFromObject:(id)object MIMEType:(NSString *)MIMEType error:(NSError **)error; + +@end diff --git a/Pods/RestKit/Code/Support/RKMIMETypeSerialization.m b/Pods/RestKit/Code/Support/RKMIMETypeSerialization.m new file mode 100644 index 00000000..1d8f91a3 --- /dev/null +++ b/Pods/RestKit/Code/Support/RKMIMETypeSerialization.m @@ -0,0 +1,192 @@ +// +// RKMIMETypeSerialization.m +// RestKit +// +// Created by Blake Watters on 5/18/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKMIMETypeSerialization.h" +#import "RKErrors.h" +#import "RKSerialization.h" +#import "RKLog.h" +#import "RKURLEncodedSerialization.h" + +// Define logging component +#undef RKLogComponent +#define RKLogComponent RKlcl_cRestKitSupport + +@interface RKMIMETypeSerializationRegistration : NSObject + +@property (nonatomic, strong) id MIMETypeStringOrRegularExpression; +@property (nonatomic, assign) Class<RKSerialization> serializationClass; + +- (id)initWithMIMEType:(id)MIMETypeStringOrRegularExpression serializationClass:(Class<RKSerialization>)serializationClass; +- (BOOL)matchesMIMEType:(NSString *)MIMEType; +@end + +@implementation RKMIMETypeSerializationRegistration + +- (id)initWithMIMEType:(id)MIMETypeStringOrRegularExpression serializationClass:(Class<RKSerialization>)serializationClass +{ + NSParameterAssert(MIMETypeStringOrRegularExpression); + NSParameterAssert(serializationClass); + NSAssert([MIMETypeStringOrRegularExpression isKindOfClass:[NSString class]] + || [MIMETypeStringOrRegularExpression isKindOfClass:[NSRegularExpression class]], + @"Can only register a serialization class for a MIME Type by string or regular expression."); + + self = [super init]; + if (self) { + self.MIMETypeStringOrRegularExpression = MIMETypeStringOrRegularExpression; + self.serializationClass = serializationClass; + } + + return self; +} + +- (BOOL)matchesMIMEType:(NSString *)MIMEType +{ + return RKMIMETypeInSet(MIMEType, [NSSet setWithObject:self.MIMETypeStringOrRegularExpression]); +} + +- (NSString *)description +{ + NSString *mimeTypeDescription = [self.MIMETypeStringOrRegularExpression isKindOfClass:[NSRegularExpression class]] ? + [NSString stringWithFormat:@"MIME Type =~ \"%@\"", self.MIMETypeStringOrRegularExpression] : + [NSString stringWithFormat:@"MIME Type == \"%@\"", self.MIMETypeStringOrRegularExpression]; + return [NSString stringWithFormat:@"<%@: %p, %@, serializationClass=%@>", + NSStringFromClass([self class]), self, mimeTypeDescription, NSStringFromClass(self.serializationClass)]; +} + +@end + +@interface RKMIMETypeSerialization () +@property (nonatomic, strong) NSMutableArray *registrations; +@end + +@implementation RKMIMETypeSerialization + ++ (RKMIMETypeSerialization *)sharedSerialization +{ + static RKMIMETypeSerialization *sharedInstance = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + sharedInstance = [[RKMIMETypeSerialization alloc] init]; + [sharedInstance addRegistrationsForKnownSerializations]; + }); + return sharedInstance; + +} + +- (id)init +{ + self = [super init]; + if (self) { + self.registrations = [NSMutableArray new]; + } + + return self; +} + +- (void)addRegistrationsForKnownSerializations +{ + Class serializationClass = nil; + + // URL Encoded + [self.registrations addObject:[[RKMIMETypeSerializationRegistration alloc] initWithMIMEType:RKMIMETypeFormURLEncoded + serializationClass:[RKURLEncodedSerialization class]]]; + // JSON + NSArray *JSONSerializationClassNames = @[ @"RKNSJSONSerialization", @"RKJSONKitSerialization" ]; + for (NSString *serializationClassName in JSONSerializationClassNames) { + serializationClass = NSClassFromString(serializationClassName); + if (serializationClass) { + RKLogInfo(@"JSON Serialization class '%@' detected: Registering for MIME Type '%@", serializationClassName, RKMIMETypeJSON); + [self.registrations addObject:[[RKMIMETypeSerializationRegistration alloc] initWithMIMEType:RKMIMETypeJSON + serializationClass:serializationClass]]; + } + } + + // XML +// parserClass = NSClassFromString(@"RKXMLParserXMLReader"); +// if (parserClass) { +// [self setParserClass:parserClass forMIMEType:RKMIMETypeXML]; +// [self setParserClass:parserClass forMIMEType:RKMIMETypeTextXML]; +// } +} + +#pragma mark - Public + ++ (Class<RKSerialization>)serializationClassForMIMEType:(NSString *)MIMEType +{ + for (RKMIMETypeSerializationRegistration *registration in [[self sharedSerialization].registrations reverseObjectEnumerator]) { + if ([registration matchesMIMEType:MIMEType]) { + return registration.serializationClass; + } + } + return nil; +} + ++ (void)registerClass:(Class<RKSerialization>)serializationClass forMIMEType:(id)MIMETypeStringOrRegularExpression +{ + RKMIMETypeSerializationRegistration *registration = [[RKMIMETypeSerializationRegistration alloc] initWithMIMEType:MIMETypeStringOrRegularExpression serializationClass:serializationClass]; + [[self sharedSerialization].registrations addObject:registration]; +} + ++ (void)unregisterClass:(Class<RKSerialization>)serializationClass +{ + NSArray *registrationsCopy = [[self sharedSerialization].registrations copy]; + for (RKMIMETypeSerializationRegistration *registration in registrationsCopy) { + if (registration.class == serializationClass) { + [[self sharedSerialization].registrations removeObject:registration]; + } + } +} + ++ (NSSet *)registeredMIMETypes +{ + return [NSSet setWithArray:[[self sharedSerialization].registrations valueForKey:@"MIMETypeStringOrRegularExpression"]]; +} + ++ (id)objectFromData:(NSData *)data MIMEType:(NSString *)MIMEType error:(NSError **)error +{ + Class<RKSerialization> serializationClass = [self serializationClassForMIMEType:MIMEType]; + if (!serializationClass) { + if (error) { + NSString* errorMessage = [NSString stringWithFormat:@"Cannot deserialize data: No serialization registered for MIME Type '%@'", MIMEType]; + NSDictionary *userInfo = @{ NSLocalizedDescriptionKey : errorMessage, RKMIMETypeErrorKey : MIMEType }; + *error = [NSError errorWithDomain:RKErrorDomain code:RKUnsupportedMIMETypeError userInfo:userInfo]; + } + return nil; + } + + return [serializationClass objectFromData:data error:error]; +} + ++ (id)dataFromObject:(id)object MIMEType:(NSString *)MIMEType error:(NSError **)error +{ + Class<RKSerialization> serializationClass = [self serializationClassForMIMEType:MIMEType]; + if (!serializationClass) { + if (error) { + NSString* errorMessage = [NSString stringWithFormat:@"Cannot deserialize data: No serialization registered for MIME Type '%@'", MIMEType]; + NSDictionary *userInfo = @{ NSLocalizedDescriptionKey : errorMessage, RKMIMETypeErrorKey : MIMEType }; + *error = [NSError errorWithDomain:RKErrorDomain code:RKUnsupportedMIMETypeError userInfo:userInfo]; + } + return nil; + } + + return [serializationClass dataFromObject:object error:error]; +} + +@end diff --git a/Pods/RestKit/Code/Support/RKMIMETypes.h b/Pods/RestKit/Code/Support/RKMIMETypes.h new file mode 100644 index 00000000..6119d5da --- /dev/null +++ b/Pods/RestKit/Code/Support/RKMIMETypes.h @@ -0,0 +1,44 @@ +// +// RKMIMETypes.h +// RestKit +// +// Created by Blake Watters on 5/18/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + MIME Type Constants + */ + +/// MIME Type application/json +extern NSString * const RKMIMETypeJSON; + +/// MIME Type application/x-www-form-urlencoded +extern NSString * const RKMIMETypeFormURLEncoded; + +/// MIME Type application/xml +extern NSString * const RKMIMETypeXML; + +/// MIME Type text/xml +extern NSString * const RKMIMETypeTextXML; + +/** + Returns `YES` if the given MIME Type matches any MIME Type identifiers in the given set. + + @param MIMEType The MIME Type to evaluate the match for. + @param MIMETypes An `NSSet` object who entries are `NSString` or `NSRegularExpression` objects specifying MIME Types. + @return `YES` if the given MIME Type matches any identifier in the set, else `NO`. + */ +BOOL RKMIMETypeInSet(NSString *MIMEType, NSSet *MIMETypes); diff --git a/Pods/RestKit/Code/Support/RKMIMETypes.m b/Pods/RestKit/Code/Support/RKMIMETypes.m new file mode 100644 index 00000000..c22ff5fb --- /dev/null +++ b/Pods/RestKit/Code/Support/RKMIMETypes.m @@ -0,0 +1,44 @@ +// +// RKMIMETypes.m +// RestKit +// +// Created by Blake Watters on 5/18/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKMIMETypes.h" + +NSString * const RKMIMETypeJSON = @"application/json"; +NSString * const RKMIMETypeFormURLEncoded = @"application/x-www-form-urlencoded"; +NSString * const RKMIMETypeXML = @"application/xml"; +NSString * const RKMIMETypeTextXML = @"text/xml"; + +BOOL RKMIMETypeInSet(NSString *MIMEType, NSSet *MIMETypes) +{ + for (id MIMETypeStringOrRegularExpression in MIMETypes) { + if ([MIMETypeStringOrRegularExpression isKindOfClass:[NSString class]]) { + if ([[MIMETypeStringOrRegularExpression lowercaseString] isEqualToString:[MIMEType lowercaseString]]) return YES; + } else if ([MIMETypeStringOrRegularExpression isKindOfClass:[NSRegularExpression class]]) { + NSRegularExpression *regex = (NSRegularExpression *) MIMETypeStringOrRegularExpression; + NSUInteger numberOfMatches = [regex numberOfMatchesInString:[MIMEType lowercaseString] options:0 range:NSMakeRange(0, [MIMEType length])]; + if (numberOfMatches > 0) return YES; + } else { + NSString *reason = [NSString stringWithFormat:@"Unable to evaluate match for MIME Type '%@': expected an `NSString` or `NSRegularExpression`, got a `%@`", MIMEType, NSStringFromClass([MIMEType class])]; + @throw [NSException exceptionWithName:NSInvalidArgumentException reason:reason userInfo:nil]; + } + } + + return NO; +} diff --git a/Pods/RestKit/Code/Support/RKMacros.h b/Pods/RestKit/Code/Support/RKMacros.h new file mode 100644 index 00000000..19c091fa --- /dev/null +++ b/Pods/RestKit/Code/Support/RKMacros.h @@ -0,0 +1,43 @@ +// +// RKMacros.h +// RestKit +// +// Created by Jawwad Ahmad on 7/18/12. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#ifndef RestKit_RKMacros_h +#define RestKit_RKMacros_h + +/* + Instead of using the normal DEPRECATED_ATTRIBUTE use DEPRECATED_ATTRIBUTE_MESSAGE(message) + to display a helpful recommendation message along with the deprecation message. + */ +#ifndef DEPRECATED_ATTRIBUTE_MESSAGE +#define DEPRECATED_ATTRIBUTE_MESSAGE(message) __attribute__((deprecated (message))) +#endif + +/* + Add this macro before each category implementation, so we don't have to use + -all_load or -force_load to load object files from static libraries that only contain + categories and no classes. + See http://developer.apple.com/library/mac/#qa/qa2006/qa1490.html for more info. + + Shamelessly borrowed from Three20 + */ +#define RK_FIX_CATEGORY_BUG(name) @interface RK_FIX_CATEGORY_BUG##name @end \ +@implementation RK_FIX_CATEGORY_BUG##name @end + +#endif diff --git a/Pods/RestKit/Code/Support/RKNSJSONSerialization.h b/Pods/RestKit/Code/Support/RKNSJSONSerialization.h new file mode 100644 index 00000000..598e2503 --- /dev/null +++ b/Pods/RestKit/Code/Support/RKNSJSONSerialization.h @@ -0,0 +1,29 @@ +// +// RKNSJSONSerialization.h +// RestKit +// +// Created by Blake Watters on 8/31/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKSerialization.h" + +/** + The `RKNSJSONSerialization` class conforms to the `RKSerialization` protocol and provides support for the serialization and deserialization of data in the JSON format using the Apple provided `NSJSONSerialization` class. This is the default JSON implementation for RestKit. + + @see http://www.json.org/ + */ +@interface RKNSJSONSerialization : NSObject <RKSerialization> +@end diff --git a/Pods/RestKit/Code/Support/RKNSJSONSerialization.m b/Pods/RestKit/Code/Support/RKNSJSONSerialization.m new file mode 100644 index 00000000..3b277ea2 --- /dev/null +++ b/Pods/RestKit/Code/Support/RKNSJSONSerialization.m @@ -0,0 +1,35 @@ +// +// RKNSJSONSerialization.m +// RestKit +// +// Created by Blake Watters on 8/31/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKNSJSONSerialization.h" + +@implementation RKNSJSONSerialization + ++ (id)objectFromData:(NSData *)data error:(NSError **)error +{ + return [NSJSONSerialization JSONObjectWithData:data options:0 error:error]; +} + ++ (NSData *)dataFromObject:(id)object error:(NSError **)error +{ + return [NSJSONSerialization dataWithJSONObject:object options:0 error:error]; +} + +@end diff --git a/Pods/RestKit/Code/Support/RKPathMatcher.h b/Pods/RestKit/Code/Support/RKPathMatcher.h new file mode 100644 index 00000000..2e5fb7d9 --- /dev/null +++ b/Pods/RestKit/Code/Support/RKPathMatcher.h @@ -0,0 +1,133 @@ +// +// RKPathMatcher.h +// RestKit +// +// Created by Greg Combs on 9/2/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import <Foundation/Foundation.h> +@class SOCPattern; + +/** + The `RKPathMatcher` class performs pattern matching and parameter parsing of strings, typically representing the path portion of an `NSURL` object. It provides much of the necessary tools to map a given path to local objects (the inverse of RKRouter's function). This makes it easier to implement the `RKManagedObjectCaching` protocol and generate `NSFetchRequest` objects from a given path. There are two means of instantiating and using a matcher object in order to provide more flexibility in implementations, and to improve efficiency by eliminating repetitive and costly pattern initializations. + + @see `RKManagedObjectCaching` + @see `RKPathFromPatternWithObject` + @see `RKRouter` + */ +@interface RKPathMatcher : NSObject <NSCopying> + +///--------------------------------- +/// @name Matching Paths to Patterns +///--------------------------------- + +/** + Creates a path match object starting from a path string. This method should be followed by `matchesPattern:tokenizeQueryStrings:parsedArguments:` + + @param pathString The string to evaluate and parse, such as `/districts/tx/upper/?apikey=GC5512354` + @return An instantiated `RKPathMatcher` without an established pattern. + */ ++ (RKPathMatcher *)pathMatcherWithPath:(NSString *)pathString; + +/** + Determines if the path string matches the provided pattern, and yields a dictionary with the resulting matched key/value pairs. Use of this method should be preceded by `pathMatcherWithPath:` Pattern strings should include encoded parameter keys, delimited by a single colon at the beginning of the key name. + + *NOTE 1 *- Numerous colon-encoded parameter keys can be joined in a long pattern, but each key must be separated by at least one unmapped character. For instance, `/:key1:key2:key3/` is invalid, whereas `/:key1/:key2/:key3/` is acceptable. + + *NOTE 2 *- The pattern matcher supports KVM, so `:key1.otherKey` normally resolves as it would in any other KVM + situation, ... otherKey is a sub-key on a the object represented by key1. This presents problems in circumstances where + you might want to build a pattern like /:filename.json, where the dot isn't intended as a sub-key on the filename, but rather + part of the json static string. In these instances, you need to escape the dot with two backslashes, like so: + /:filename\\.json + + @param patternString The pattern to use for evaluating, such as `/:entityName/:stateID/:chamber/` + @param shouldTokenize If YES, any query parameters will be tokenized and inserted into the parsed argument dictionary. + @param arguments A pointer to a dictionary that contains the key/values from the pattern (and parameter) matching. + @return A boolean value indicating if the path string successfully matched the pattern. + */ +- (BOOL)matchesPattern:(NSString *)patternString tokenizeQueryStrings:(BOOL)shouldTokenize parsedArguments:(NSDictionary **)arguments; + +///--------------------------------- +/// @name Matching Patterns to Paths +///--------------------------------- + +/** + Creates a path matcher object starting from a pattern string. This method should be followed by `matchesPath:tokenizeQueryStrings:parsedArguments:`. Patterns should include encoded parameter keys, delimited by a single colon at the beginning of the key name. + + *NOTE 1 *- Numerous colon-encoded parameter keys can be joined in a long pattern, but each key must be separated by at least one unmapped character. For instance, `/:key1:key2:key3/` is invalid, whereas `/:key1/:key2/:key3/` is acceptable. + + *NOTE 2 *- The pattern matcher supports KVM, so `:key1.otherKey` normally resolves as it would in any other KVM situation, ... otherKey is a sub-key on a the object represented by key1. This presents problems in circumstances where you might want to build a pattern like `/:filename.json`, where the dot isn't intended as a sub-key on the filename, but rather part of the json static string. In these instances, you need to escape the dot with two backslashes, like so: `/:filename\\.json` + + @param patternString The pattern to use for evaluating, such as `/:entityName/:stateID/:chamber/` + @return An instantiated `RKPathMatcher` with an established pattern. + */ ++ (RKPathMatcher *)pathMatcherWithPattern:(NSString *)patternString; + +/** + Determines if the given path string matches a pattern, and yields a dictionary with the resulting matched key/value pairs. Use of this method should be preceded by `pathMatcherWithPattern:`. + + @param pathString The string to evaluate and parse, such as `/districts/tx/upper/?apikey=GC5512354` + @param shouldTokenize If YES, any query parameters will be tokenized and inserted into the parsed argument dictionary. + @param arguments A pointer to a dictionary that contains the key/values from the pattern (and parameter) matching. + @return A boolean value indicating if the path string successfully matched the pattern. + */ +- (BOOL)matchesPath:(NSString *)pathString tokenizeQueryStrings:(BOOL)shouldTokenize parsedArguments:(NSDictionary **)arguments; + +///---------------------------------- +/// @name Creating Paths from Objects +///---------------------------------- + +/** + Generates a new path by interpolating the properties of the 'object' argument, assuming the existence of a previously specified pattern established via `pathMatcherWithPattern:`. Otherwise, this method is identical in function to `RKPathFromPatternWithObject` (in fact it is a shortcut for this method). + + For example, given an 'article' object with an 'articleID' property value of 12345 ... + + RKPathMatcher *matcher = [RKPathMatcher pathMatcherWithPattern:@"/articles/:articleID"]; + NSString *path = [matcher pathFromObject:article]; + + ... will produce a 'path' containing the string "/articles/12345" + + @param object The object containing the properties to interpolate. + @return A string with the object's interpolated property values inserted into the receiver's established pattern. + @see `RKPathFromPatternWithObject` + @see `RKRouter` + */ +- (NSString *)pathFromObject:(id)object DEPRECATED_ATTRIBUTE; + +/** + Generates a path by interpolating the properties of the 'object' argument, assuming the existence of a previously specified pattern established via `pathMatcherWithPattern:`. Otherwise, this method is identical in function to `RKPathFromPatternWithObject` (in fact it is a shortcut for this method). + + For example, given an 'article' object with an 'articleID' property value of 12345 and a code of "This/That"... + + RKPathMatcher *matcher = [RKPathMatcher pathMatcherWithPattern:@"/articles/:articleID/:code"]; + NSString *path = [matcher pathFromObject:article addingEscapes:YES]; + + ... will produce a 'path' containing the string `@"/articles/12345/This%2FThat"` + + @param object The object containing the properties to interpolate. + @param addEscapes Conditionally add percent escapes to the interpolated property values + @return A string with the object's interpolated property values inserted into the receiver's established pattern. + @see `RKRouter` + */ +- (NSString *)pathFromObject:(id)object addingEscapes:(BOOL)addEscapes; + +///------------------------------------------- +/// @name Accessing Tokenized Query Parameters +///------------------------------------------- + +@property (copy, readonly) NSDictionary *queryParameters; + +@end diff --git a/Pods/RestKit/Code/Support/RKPathMatcher.m b/Pods/RestKit/Code/Support/RKPathMatcher.m new file mode 100644 index 00000000..67ea618d --- /dev/null +++ b/Pods/RestKit/Code/Support/RKPathMatcher.m @@ -0,0 +1,150 @@ +// +// RKPathMatcher.m +// RestKit +// +// Created by Greg Combs on 9/2/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKPathMatcher.h" +#import "SOCKit.h" +#import "RKLog.h" +#import "RKDictionaryUtilities.h" + +static NSString *RKEncodeURLString(NSString *unencodedString); +extern NSDictionary *RKQueryParametersFromStringWithEncoding(NSString *string, NSStringEncoding stringEncoding); + +// NSString's stringByAddingPercentEscapes doesn't do a complete job (it ignores "/?&", among others) +static NSString *RKEncodeURLString(NSString *unencodedString) +{ + NSString *encodedString = (NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes( + NULL, + (__bridge CFStringRef)unencodedString, + NULL, + (CFStringRef)@"!*'();:@&=+$,/?%#[]", + kCFStringEncodingUTF8)); + return encodedString; +} + +@interface RKPathMatcher () +@property (nonatomic, strong) SOCPattern *socPattern; +@property (nonatomic, copy) NSString *patternString; // SOCPattern keeps it private +@property (nonatomic, copy) NSString *sourcePath; +@property (nonatomic, copy) NSString *rootPath; +@property (copy, readwrite) NSDictionary *queryParameters; +@end + +@implementation RKPathMatcher + +- (id)copyWithZone:(NSZone *)zone +{ + RKPathMatcher *copy = [[[self class] allocWithZone:zone] init]; + copy.socPattern = self.socPattern; + copy.sourcePath = self.sourcePath; + copy.rootPath = self.rootPath; + copy.queryParameters = self.queryParameters; + + return copy; +} + ++ (RKPathMatcher *)pathMatcherWithPattern:(NSString *)patternString +{ + NSAssert(patternString != NULL, @"Pattern string must not be empty in order to perform pattern matching."); + RKPathMatcher *matcher = [[RKPathMatcher alloc] init]; + matcher.socPattern = [SOCPattern patternWithString:patternString]; + matcher.patternString = patternString; + return matcher; +} + ++ (RKPathMatcher *)pathMatcherWithPath:(NSString *)pathString +{ + RKPathMatcher *matcher = [[RKPathMatcher alloc] init]; + matcher.sourcePath = pathString; + matcher.rootPath = pathString; + return matcher; +} + +- (BOOL)matches +{ + NSAssert((self.socPattern != NULL && self.rootPath != NULL), @"Matcher is insufficiently configured. Before attempting pattern matching, you must provide a path string and a pattern to match it against."); + return [self.socPattern stringMatches:self.rootPath]; +} + +- (BOOL)bifurcateSourcePathFromQueryParameters +{ + NSArray *components = [self.sourcePath componentsSeparatedByString:@"?"]; + if ([components count] > 1) { + self.rootPath = [components objectAtIndex:0]; + self.queryParameters = RKQueryParametersFromStringWithEncoding([components objectAtIndex:1], NSUTF8StringEncoding); + return YES; + } + return NO; +} + +- (BOOL)itMatchesAndHasParsedArguments:(NSDictionary **)arguments tokenizeQueryStrings:(BOOL)shouldTokenize +{ + NSAssert(self.socPattern != NULL, @"Matcher has no established pattern. Instantiate it using pathMatcherWithPattern: before attempting a pattern match."); + NSMutableDictionary *argumentsCollection = [NSMutableDictionary dictionary]; + if ([self bifurcateSourcePathFromQueryParameters]) { + if (shouldTokenize) { + [argumentsCollection addEntriesFromDictionary:self.queryParameters]; + } + } + if (![self matches]) + return NO; + if (!arguments) { + return YES; + } + NSDictionary *extracted = [self.socPattern parameterDictionaryFromSourceString:self.rootPath]; + if (extracted) + [argumentsCollection addEntriesFromDictionary:RKDictionaryByReplacingPercentEscapesInEntriesFromDictionary(extracted)]; + *arguments = argumentsCollection; + return YES; +} + +- (BOOL)matchesPattern:(NSString *)patternString tokenizeQueryStrings:(BOOL)shouldTokenize parsedArguments:(NSDictionary **)arguments +{ + NSAssert(patternString != NULL, @"Pattern string must not be empty in order to perform patterm matching."); + self.socPattern = [SOCPattern patternWithString:patternString]; + return [self itMatchesAndHasParsedArguments:arguments tokenizeQueryStrings:shouldTokenize]; +} + +- (BOOL)matchesPath:(NSString *)sourceString tokenizeQueryStrings:(BOOL)shouldTokenize parsedArguments:(NSDictionary **)arguments +{ + self.sourcePath = sourceString; + self.rootPath = sourceString; + return [self itMatchesAndHasParsedArguments:arguments tokenizeQueryStrings:shouldTokenize]; +} + +- (NSString *)pathFromObject:(id)object +{ + return [self pathFromObject:object addingEscapes:YES]; +} + +- (NSString *)pathFromObject:(id)object addingEscapes:(BOOL)addEscapes +{ + NSAssert(self.socPattern != NULL, @"Matcher has no established pattern. Instantiate it using pathMatcherWithPattern: before calling pathFromObject:"); + NSAssert(object != NULL, @"Object provided is invalid; cannot create a path from a NULL object"); + NSString *(^encoderBlock)(NSString *interpolatedString) = nil; + if (addEscapes) { + encoderBlock = ^NSString *(NSString *interpolatedString) { + return RKEncodeURLString(interpolatedString); + }; + } + NSString *path = [self.socPattern stringFromObject:object withBlock:encoderBlock]; + return path; +} + +@end diff --git a/Pods/RestKit/Code/Support/RKPathUtilities.h b/Pods/RestKit/Code/Support/RKPathUtilities.h new file mode 100644 index 00000000..fade3afb --- /dev/null +++ b/Pods/RestKit/Code/Support/RKPathUtilities.h @@ -0,0 +1,57 @@ +// +// RKPathUtilities.h +// RestKit +// +// Created by Blake Watters on 12/9/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// + +#import <Foundation/Foundation.h> + +/** + Returns the path to the Application Data directory for the executing application. On iOS, this is a sandboxed path specific for the executing application. On OS X, this is an application specific path under `NSApplicationSupportDirectory` (i.e. ~/Application Support). + + @return The full path to the application data directory. + */ +NSString *RKApplicationDataDirectory(void); + +/** + Returns a path to the root caches directory used by RestKit for storage. On iOS, this is a sanboxed path specific for the executing application. On OS X, this is an application specific path under NSCachesDirectory (i.e. ~/Library/Caches). + + @return The full path to the Caches directory. + */ +NSString *RKCachesDirectory(void); + +/** + Ensures that a directory exists at a given path by checking for the existence of the directory and creating it if it does not exist. + + @param path The path to ensure a directory exists at. + @param error On input, a pointer to an error object. + @returns A Boolean value indicating if the directory exists. + */ +BOOL RKEnsureDirectoryExistsAtPath(NSString *path, NSError **error); + +/** + Convenience method for generating a path against the properties of an object. Takes an `NSString` with property names prefixed with a colon and interpolates the values of the properties specified and returns the generated path. + + For example, given an `article` object with an `articleID` property whose value is `@12345`, `RKPathFromPatternWithObject(@"articles/:articleID", article)` would return `@"articles/12345"`. + + This functionality is the basis for path generation in the `RKRouter` class. + + @param pathPattern An `SOCPattern` string containing zero or more colon-prefixed property names. + @param object The object to interpolate the properties against + @return A new `NSString` object with the values of the given object interpolated for the colon-prefixed properties name in the given pattern string. + @see `RKPathMatcher` + @see `SOCPattern` + */ +NSString *RKPathFromPatternWithObject(NSString *pathPattern, id object); + +/** + Returns a MIME Type for a given path by using the Core Services framework. + + For example, given a string with the path `@"/Users/blake/Documents/monkey.json"` `@"application/json"` would be returned as the MIME Type. + + @param path The path to return the MIME Type for. + @return The expected MIME Type of the resource identified by the path or nil if unknown. + */ +NSString *RKMIMETypeFromPathExtension(NSString *path); diff --git a/Pods/RestKit/Code/Support/RKPathUtilities.m b/Pods/RestKit/Code/Support/RKPathUtilities.m new file mode 100644 index 00000000..64de2ad6 --- /dev/null +++ b/Pods/RestKit/Code/Support/RKPathUtilities.m @@ -0,0 +1,121 @@ +// +// RKPathUtilities.m +// RestKit +// +// Created by Blake Watters on 12/9/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// + +#if TARGET_OS_IPHONE +#import <MobileCoreServices/UTType.h> +#else +#import <CoreServices/CoreServices.h> +#endif +#import "RKPathUtilities.h" +#import "RKLog.h" +#import "RKPathMatcher.h" + +NSString *RKExecutableName(void); + +NSString *RKApplicationDataDirectory(void) +{ +#if TARGET_OS_IPHONE + NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); + return ([paths count] > 0) ? [paths objectAtIndex:0] : nil; +#else + NSFileManager *sharedFM = [NSFileManager defaultManager]; + + NSArray *possibleURLs = [sharedFM URLsForDirectory:NSApplicationSupportDirectory + inDomains:NSUserDomainMask]; + NSURL *appSupportDir = nil; + NSURL *appDirectory = nil; + + if ([possibleURLs count] >= 1) { + appSupportDir = [possibleURLs objectAtIndex:0]; + } + + if (appSupportDir) { + appDirectory = [appSupportDir URLByAppendingPathComponent:RKExecutableName()]; + return [appDirectory path]; + } + + return nil; +#endif +} + +NSString *RKExecutableName(void) +{ + NSString *executableName = [[[NSBundle mainBundle] executablePath] lastPathComponent]; + if (nil == executableName) { + RKLogWarning(@"Unable to determine CFBundleExecutable: storing data under RestKit directory name."); + executableName = @"RestKit"; + } + + return executableName; +} + +NSString *RKCachesDirectory(void) +{ +#if TARGET_OS_IPHONE + return [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0]; +#else + NSString *path = nil; + NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); + if ([paths count]) { + path = [[paths objectAtIndex:0] stringByAppendingPathComponent:RKExecutableName()]; + } + + return path; +#endif +} + +BOOL RKEnsureDirectoryExistsAtPath(NSString *path, NSError **error) +{ + BOOL isDirectory; + if ([[NSFileManager defaultManager] fileExistsAtPath:path isDirectory:&isDirectory]) { + if (isDirectory) { + // Exists at a path and is a directory, we're good + if (error) *error = nil; + return YES; + } + } + + // Create the directory and any intermediates + NSError *errorReference = (error == nil) ? nil : *error; + if (! [[NSFileManager defaultManager] createDirectoryAtPath:path withIntermediateDirectories:YES attributes:nil error:&errorReference]) { + RKLogError(@"Failed to create requested directory at path '%@': %@", path, errorReference); + return NO; + } + + return YES; +} + +NSString *RKPathFromPatternWithObject(NSString *pathPattern, id object) +{ + NSCAssert(object != NULL, @"Object provided is invalid; cannot create a path from a NULL object"); + RKPathMatcher *matcher = [RKPathMatcher pathMatcherWithPattern:pathPattern]; + return [matcher pathFromObject:object addingEscapes:NO]; +} + +static NSDictionary *RKDictionaryOfFileExtensionsToMIMETypes() +{ + return @{ @"json": @"application/json" }; +} + +NSString *RKMIMETypeFromPathExtension(NSString *path) +{ + NSString *pathExtension = [path pathExtension]; + CFStringRef uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)pathExtension, NULL); + if (uti != NULL) { + CFStringRef mime = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType); + CFRelease(uti); + if (mime != NULL) { + NSString *type = [NSString stringWithString:(__bridge NSString *)mime]; + CFRelease(mime); + return type; + } + } + + // Consult our internal dictionary of mappings if not found + return [RKDictionaryOfFileExtensionsToMIMETypes() valueForKey:pathExtension]; +} diff --git a/Pods/RestKit/Code/Support/RKSerialization.h b/Pods/RestKit/Code/Support/RKSerialization.h new file mode 100644 index 00000000..910caa5f --- /dev/null +++ b/Pods/RestKit/Code/Support/RKSerialization.h @@ -0,0 +1,55 @@ +// +// RKSerialization.h +// RestKit +// +// Created by Blake Watters on 10/1/10. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + The `RKSerialization` protocol declares two methods that a class must implement so that it can provide support for serializing objects to and deserializing objects from UTF-8 encoded data representations of a serialization format such as JSON or XML. Serialization implementations typically handle data in a given MIME Type (i.e. `application/json`) and may be registered with the `RKMIMETypeSerialization` class. + + @see `RKMIMETypeSerialization` + */ +@protocol RKSerialization <NSObject> + +///------------------------------ +/// @name Deserializing an Object +///------------------------------ + +/** + Deserializes and returns the given data in the format supported by the receiver (i.e. JSON, XML, etc) as a Foundation object representation. + + @param data The UTF-8 encoded data representation of the object to be deserialized. + @param error A pointer to an `NSError` object. + @return A Foundation object from the serialized data in data, or nil if an error occurs. + */ ++ (id)objectFromData:(NSData *)data error:(NSError **)error; + +///---------------------------- +/// @name Serializing an Object +///---------------------------- + +/** + Serializes and returns a UTF-8 encoded data representation of the given Foundation object in the format supported by the receiver (i.e. JSON, XML, etc). + + @param object The object to be serialized. + @param A pointer to an `NSError` object. + @param error A pointer to an NSError object. + @return A data representation of the given object in UTF-8 encoding, or nil if an error occurred. + */ ++ (NSData *)dataFromObject:(id)object error:(NSError **)error; + +@end diff --git a/Pods/RestKit/Code/Support/RKURLEncodedSerialization.h b/Pods/RestKit/Code/Support/RKURLEncodedSerialization.h new file mode 100644 index 00000000..3c109d2c --- /dev/null +++ b/Pods/RestKit/Code/Support/RKURLEncodedSerialization.h @@ -0,0 +1,74 @@ +// +// RKURLEncodedSerialization.h +// RestKit +// +// Created by Blake Watters on 9/4/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKSerialization.h" + +/** + The `RKURLEncodedSerialization` class conforms to the `RKSerialization` protocol and provides support for the serialization and deserialization of URL encoded data. URL encoding is used to replace certain characters in a string with equivalent percent escape sequences. The list of characters replaced by the implementation are designed as illegal URL characters by RFC 3986. URL encoded data is used for the submission of HTML forms with the MIME Type `application/x-www-form-urlencoded`. + + @see http://www.w3.org/TR/html401/interact/forms.html + @see http://www.ietf.org/rfc/rfc3986.txt + */ +@interface RKURLEncodedSerialization : NSObject <RKSerialization> + +@end + +/** + Creates and returns a new `NSDictionary` object from the given URL-encoded string, using the specified encoding. + + The dictionary is constructed by splitting the string into components using the `&` character as the delimiter. The results array of strings is then split again using the `=` character as the delimiter. Each resulting key and value delimited by the `=` character is then URL decoded and added a resulting dictionary. The process is across the entire string. Any extraneous `=` characters not delimiting a key and value are ignored. The corresponding values for any keys that appear multiple times within the string be coalesced into an `NSArray` of values. + + @param URLEncodedString A URL-encoded string that is to be parsed into an `NSDictionary`. + @param encoding The encoding to use when URL-decoding the components of the given string. If you are uncertain of the correct encoding, you should use UTF-8 (NSUTF8StringEncoding), which is the encoding designated by RFC 3986 as the correct encoding for use in URLs. + @return An `NSDictionary` object containing the keys and values deserialized from the URL-encoded string. + */ +NSDictionary *RKDictionaryFromURLEncodedStringWithEncoding(NSString *URLEncodedString, NSStringEncoding encoding); + +/** + Returns a URL-encoded `NSString` object containing the entries in the given `NSDictionary` object. + + The dictionary is created by collecting each key-value pair, URL-encoding a string representation of the key-value pair, and then joining the components with "&". + + @param dictionary The dictionary from to construct the URL-encoded string. + @param encoding The encoding to use in constructing the URL-encoded string. If you are uncertain of the correct encoding, you should use UTF-8 (NSUTF8StringEncoding), which is the encoding designated by RFC 3986 as the correct encoding for use in URLs. + @return A new `NSString` object in the given encoding containing a URL-encoded serialization of the entries in the given dictionary. + @see `AFQueryStringFromParametersWithEncoding` + */ +NSString *RKURLEncodedStringFromDictionaryWithEncoding(NSDictionary *dictionary, NSStringEncoding encoding); + +/** + Returns a copy of the given string with the characters that are unsafe for use in a URL query string replaced with the equivalent percent escape sequences. + + @param string The string to be escaped. + @param encoding The encoding to use in constructing the URL-encoded string. If you are uncertain of the correct encoding, you should use UTF-8 (NSUTF8StringEncoding), which is the encoding designated by RFC 3986 as the correct encoding for use in URLs. + @return A new `NSString` object in the given encoding with the query string unsafe characters replaced with percent escape sequences. + */ +NSString *RKPercentEscapedQueryStringFromStringWithEncoding(NSString *string, NSStringEncoding encoding); + +/** + Creates and returns a new `NSDictionary` object containing the keys and values in the query string of the given string. + + The given string is searched for a `?` character denoting the beginning of the query parameters. If none is found, the entire string is treated as a URL encoded query string. The parameters are extracted from the query string by invoking `RKDictionaryFromURLEncodedStringWithEncoding()` with the query string. + + @param string A string containing a query string that is to be tokenized into a dictionary of parameters. + @param encoding The encoding to use in constructing the URL-encoded string. If you are uncertain of the correct encoding, you should use UTF-8 (NSUTF8StringEncoding), which is the encoding designated by RFC 3986 as the correct encoding for use in URLs. + @return An `NSDictionary` object containing the keys and values contained in the query string of the given string. + */ +NSDictionary *RKQueryParametersFromStringWithEncoding(NSString *string, NSStringEncoding encoding); diff --git a/Pods/RestKit/Code/Support/RKURLEncodedSerialization.m b/Pods/RestKit/Code/Support/RKURLEncodedSerialization.m new file mode 100644 index 00000000..2433a91e --- /dev/null +++ b/Pods/RestKit/Code/Support/RKURLEncodedSerialization.m @@ -0,0 +1,88 @@ +// +// RKURLEncodedSerialization.m +// RestKit +// +// Created by Blake Watters on 9/4/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "RKURLEncodedSerialization.h" + +@implementation RKURLEncodedSerialization + ++ (id)objectFromData:(NSData *)data error:(NSError **)error +{ + NSString *string = [NSString stringWithUTF8String:[data bytes]]; + return RKDictionaryFromURLEncodedStringWithEncoding(string, NSUTF8StringEncoding); +} + ++ (NSData *)dataFromObject:(id)object error:(NSError **)error +{ + NSString *string = RKURLEncodedStringFromDictionaryWithEncoding(object, NSUTF8StringEncoding); + return [string dataUsingEncoding:NSUTF8StringEncoding]; +} + +@end + +NSDictionary *RKDictionaryFromURLEncodedStringWithEncoding(NSString *URLEncodedString, NSStringEncoding encoding) +{ + NSMutableDictionary *queryComponents = [NSMutableDictionary dictionary]; + for (NSString *keyValuePairString in [URLEncodedString componentsSeparatedByString:@"&"]) { + NSArray *keyValuePairArray = [keyValuePairString componentsSeparatedByString:@"="]; + if ([keyValuePairArray count] < 2) continue; // Verify that there is at least one key, and at least one value. Ignore extra = signs + NSString *key = [[keyValuePairArray objectAtIndex:0] stringByReplacingPercentEscapesUsingEncoding:encoding]; + NSString *value = [[keyValuePairArray objectAtIndex:1] stringByReplacingPercentEscapesUsingEncoding:encoding]; + + // URL spec says that multiple values are allowed per key + id results = [queryComponents objectForKey:key]; + if (results) { + if ([results isKindOfClass:[NSMutableArray class]]) { + [(NSMutableArray *)results addObject:value]; + } else { + // On second occurrence of the key, convert into an array + NSMutableArray *values = [NSMutableArray arrayWithObjects:results, value, nil]; + [queryComponents setObject:values forKey:key]; + } + } else { + [queryComponents setObject:value forKey:key]; + } + } + return queryComponents; +} + +extern NSString *AFQueryStringFromParametersWithEncoding(NSDictionary *parameters, NSStringEncoding stringEncoding); +NSString *RKURLEncodedStringFromDictionaryWithEncoding(NSDictionary *dictionary, NSStringEncoding encoding) +{ + return AFQueryStringFromParametersWithEncoding(dictionary, encoding); +} + +// This replicates `AFPercentEscapedQueryStringPairMemberFromStringWithEncoding`. Should send PR exposing non-static version +NSString *RKPercentEscapedQueryStringFromStringWithEncoding(NSString *string, NSStringEncoding encoding) +{ + // Escape characters that are legal in URIs, but have unintentional semantic significance when used in a query string parameter + static NSString * const kAFLegalCharactersToBeEscaped = @":/.?&=;+!@$()~"; + + return (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)string, NULL, (__bridge CFStringRef)kAFLegalCharactersToBeEscaped, CFStringConvertNSStringEncodingToEncoding(encoding)); +} + +NSDictionary *RKQueryParametersFromStringWithEncoding(NSString *string, NSStringEncoding encoding) +{ + NSRange chopRange = [string rangeOfString:@"?"]; + if (chopRange.length > 0) { + chopRange.location += 1; // we want inclusive chopping up *through *"?" + if (chopRange.location < [string length]) string = [string substringFromIndex:chopRange.location]; + } + return RKDictionaryFromURLEncodedStringWithEncoding(string, encoding); +} diff --git a/Pods/RestKit/Code/Support/lcl_config_components_RK.h b/Pods/RestKit/Code/Support/lcl_config_components_RK.h new file mode 100644 index 00000000..b364eb31 --- /dev/null +++ b/Pods/RestKit/Code/Support/lcl_config_components_RK.h @@ -0,0 +1,61 @@ +// +// lcl_config_components_RK.h +// RestKit +// +// Created by Blake Watters on 6/8/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// +// The lcl_config_components_RK.h file is used to define the application's log +// components. +// +// Use the code +// +// _RKlcl_component(<identifier>, <header>, <name>) +// +// for defining a log component, where +// +// - <identifier> is the unique name of a log component which is used in calls +// to RKlcl_log etc. A symbol 'RKlcl_c<identifier>' is automatically created for +// each log component. +// +// - <header> is a C string in UTF-8 which should be used by a logging back-end +// when writing a log message for the log component. The header is a technical +// key for identifying a log component's messages. It is recommended to use +// a 'Reverse ICANN' naming scheme when the header contains grouping +// information, e.g. 'example.main.component1'. +// +// - <name> is a C string in UTF-8 which contains the name of the log component +// and its grouping information in a non-technical, human-readable way +// which could be used by a user interface. Groups should be separated by the +// path separator '/', e.g. 'Example/Main/Component 1'. +// + + +// +// RestKit Logging Components +// + +_RKlcl_component(App, "app", "App") +_RKlcl_component(RestKit, "restkit", "RestKit") +_RKlcl_component(RestKitCoreData, "restkit.core_data", "RestKit/CoreData") +_RKlcl_component(RestKitCoreDataCache, "restkit.core_data.cache", "RestKit/CoreData/Cache") +_RKlcl_component(RestKitNetwork, "restkit.network", "RestKit/Network") +_RKlcl_component(RestKitObjectMapping, "restkit.object_mapping", "RestKit/ObjectMapping") +_RKlcl_component(RestKitSearch, "restkit.search", "RestKit/Search") +_RKlcl_component(RestKitSupport, "restkit.support", "RestKit/Support") +_RKlcl_component(RestKitTesting, "restkit.testing", "RestKit/Testing") +_RKlcl_component(RestKitUI, "restkit.ui", "RestKit/UI") diff --git a/Pods/RestKit/Code/Support/lcl_config_extensions_RK.h b/Pods/RestKit/Code/Support/lcl_config_extensions_RK.h new file mode 100644 index 00000000..62293431 --- /dev/null +++ b/Pods/RestKit/Code/Support/lcl_config_extensions_RK.h @@ -0,0 +1,20 @@ +// +// lcl_config_extensions_RK.h +// RestKit +// +// Created by Blake Watters on 6/8/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + diff --git a/Pods/RestKit/Code/Support/lcl_config_logger_RK.h b/Pods/RestKit/Code/Support/lcl_config_logger_RK.h new file mode 100644 index 00000000..23005026 --- /dev/null +++ b/Pods/RestKit/Code/Support/lcl_config_logger_RK.h @@ -0,0 +1,27 @@ +// +// lcl_config_logger_RK.h +// RestKit +// +// Created by Blake Watters on 6/8/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// NSLog + +#ifdef RKLOG_USE_NSLOGGER +#import "LCLNSLogger_RK.h" +#else +#import "LCLNSLog_RK.h" +#endif diff --git a/Pods/RestKit/Code/Testing.h b/Pods/RestKit/Code/Testing.h new file mode 100644 index 00000000..871002d4 --- /dev/null +++ b/Pods/RestKit/Code/Testing.h @@ -0,0 +1,13 @@ +// +// Testing.h +// RestKit +// +// Created by Blake Watters on 2/1/12. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// + +#import "RKTestFixture.h" +#import "RKTestNotificationObserver.h" +#import "RKTestFactory.h" +#import "RKTestHelpers.h" +#import "RKMappingTest.h" diff --git a/Pods/RestKit/LICENSE b/Pods/RestKit/LICENSE new file mode 100644 index 00000000..eb8d4bc3 --- /dev/null +++ b/Pods/RestKit/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2009-2012 The RestKit Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Pods/RestKit/README.md b/Pods/RestKit/README.md new file mode 100644 index 00000000..d30c2466 --- /dev/null +++ b/Pods/RestKit/README.md @@ -0,0 +1,554 @@ +# RestKit + +RestKit is a modern Objective-C framework for implementing RESTful web services clients on iOS and Mac OS X. It provides a powerful [object mapping]() engine that seamlessly integrates with [Core Data](http://developer.apple.com/library/mac/#documentation/cocoa/Conceptual/CoreData/cdProgrammingGuide.html) and a simple set of networking primitives for mapping HTTP requests and responses built on top of [AFNetworking](https://github.com/AFNetworking/AFNetworking). It has an elegant, carefully designed set of APIs that make accessing and modeling RESTful resources feel almost magical. For example, here's how to access the Twitter public timeline and turn the JSON contents into an array of Tweet objects: + +``` objective-c +@interface Tweet : NSObject +@property (nonatomic, copy) NSNumber *userID; +@property (nonatomic, copy) NSString *username; +@property (nonatomic, copy) NSString *text; +@end + +RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[RKTweet class]]; +[mapping addAttributeMappingsFromDictionary:@{ + @"user.name": @"username", + @"user.id": @"userID", + @"text": @"text" +}]; + +RKResponseDescriptor *responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:mapping pathPattern:nil keyPath:nil statusCodes:nil]; +NSURL *url = [NSURL URLWithString:@"http://api.twitter.com/1/statuses/public_timeline.json"]; +NSURLRequest *request = [NSURLRequest requestWithURL:url]; +RKObjectRequestOperation *operation = [[RKObjectRequestOperation alloc] initWithRequest:request responseDescriptors:@[responseDescriptor]]; +[operation setCompletionBlockWithSuccess:^(RKObjectRequestOperation *operation, RKMappingResult *result) { + NSLog(@"The public timeline Tweets: %@", [result array]); +} failure:nil]; +[operation start]; +``` + +## Getting Started + +- [Download RestKit](https://github.com/RestKit/RestKit/downloads) and play with the [examples](https://github.com/RestKit/RestKit/tree/development/Examples) for iPhone and Mac OS X +- First time with RestKit? Read the ["Overview"](#Overview) section below and then check out the ["Getting Acquainted with RestKit"]() tutorial and [Object Mapping Reference](https://github.com/RestKit/RestKit/wiki/Object-mapping) documents in the wiki to jump right in. +- Upgrading from RestKit 0.9.x or 0.10.x? Read the ["Upgrading to RestKit 0.20.x"]() guide in the wiki +- Adding RestKit to an existing [AFNetworking]() application? Read the [AFNetworking Integration]() document to learn details about how the frameworks fit together. +- Review the [source code API documentation](http://restkit.org/api/0.20.0) for a detailed look at the classes and API's in RestKit +- Still need some help? Get support from [Stack Overflow](), the [RestKit mailing list](http://groups.google.com/group/restkit) or ping us on [Twitter](http://twitter.com/RestKit) + +## Overview + +RestKit is designed to be modular and each module strives to maintain a minimal set of dependencies across the framework and with the host platform. At the core of library sits the object mapping engine, which is responsible for transforming objects between representations (such as JSON/XML <-> local domain objects). + +### Object Mapping Fundamentals + +The object mapping engine is built on top of the [Key-Value Coding](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/KeyValueCoding/Articles/KeyValueCoding.html) (KVC) informal protocol that is foundational to numerous Cocoa technologies such as key-value observing, bindings, and Core Data. Object mappings are expressed as pairs of KVC key paths that specify the source and destination attributes or relationships that are to be transformed. + +RestKit leverages the highly dynamic Objective-C runtime to infer the developers desired intent by examining the type of the source and destination properties and performing appropriate type transformations. For example, given a source key path of `created_at` that identifies a string within a parsed JSON document and a destination key path of `creationDate` that identifies an `NSDate` property on a target object, RestKit will transform the date from a string into an `NSDate` using an `NSDateFormatter`. Numerous other transformations are provided out of the box and the engine is pluggable to allow the developer to define new transformations or replace an existing transformation with a new implementation. + +The mapper fully supports both simple attribute as well as relationship mappings in which nested to-one or to-many child objects are mapped recursively. Through relationship mappings, one object mapping can be added to another to compose aggregate mappings that are capable of processing arbitrarily complex source documents. + +Object mapping is a deep topic and is explored in exhaustive detail in the [Object Mapping Guide](https://github.com/RestKit/RestKit/wiki/Object-mapping) on the wiki. + +### API Quickstart + +RestKit is broken into several modules that cleanly separate the mapping engine from the HTTP and Core Data integrations to provide maximum flexibility. Key classes in each module are highlighted below and each module is hyperlinked to the README.md contained within the source code. + +<table> + <tr><th colspan="2" style="text-align:center;"><a href="blob/development/Code/ObjectMapping/README.md">Object Mapping</a></th></tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKObjectMapping.html">RKObjectMapping</a></td> + <td>Encapsulates configuration for transforming object representations as expressed by key-value coding keypaths.</td> + </tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKAttributeMapping.html">RKAttributeMapping</a></td> + <td>Specifies a desired transformation between attributes within an object or entity mapping in terms of a source and destination key path.</td> + </tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKRelationshipMapping.html">RKRelationshipMapping</a></td> + <td>Specifies a desired mapping of a nested to-one or to-many child objects in in terms of a source and destination key path and an <tt>RKObjectMapping</tt> with which to map the attributes of the child object.</td> + </tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKDynamicMapping.html">RKDynamicMapping</a></td> + <td>Specifies a flexible mapping in which the decision about which <tt>RKObjectMapping</tt> is to be used to process a given document is deferred to run time.</td> + </tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKObjectMapper.html">RKObjectMapper</a></td> + <td>Provides an interface for mapping a parsed document into a set of local domain objects.</td> + </tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKObjectMappingOperation.html">RKObjectMappingOperation</a></td> + <td>An <tt>NSOperation</tt> that performs a mapping between object representations using an <tt>RKObjectMapping</tt>.</td> + </tr> + <tr><th colspan="2" style="text-align:center;"><a href="blob/development/Code/Network/README.md">Networking</a></th></tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKRequestDescriptor.html">RKRequestDescriptor</a></td> + <td>Describes a request that can be sent from the application to a remote web application for a given object type.</td> + </tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKResponseDescriptor.html">RKResponseDescriptor</a></td> + <td>Describes an object mappable response that may be returned from a remote web application in terms of an object mapping, a key path, a <a href="">SOCKit pattern</a> for matching the URL, and a set of status codes that define the circumstances in which the mapping is appropriate for a given response.</td> + </tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKObjectParameterization.html">RKObjectParameterization</a></td> + <td>Performs mapping of a given object into an <tt>NSDictionary</tt> represenation suitable for use as the parameters of an HTTP request.</td> + </tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKObjectRequestOperation.html">RKObjectRequestOperation</a></td> + <td>An <tt>NSOperation</tt> that sends an HTTP request and performs object mapping on the parsed response body using the configurations expressed in a set of <tt>RKResponseDescriptor</tt> objects.</td> + </tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKResponseMapper.html">RKResponseMapperOperation</a></td> + <td>An <tt>NSOperation</tt> that provides support for object mapping an <tt>NSHTTPURLResponse</tt> using a set of <tt>RKResponseDescriptor</tt> objects.</td> + </tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKObjectManager.html">RKObjectManager</a></td> + <td>Captures the common patterns for communicating with a RESTful web application over HTTP using object mapping including: + <ul> + <li>Centralizing <tt>RKRequestDescriptor</tt> and <tt>RKResponseDescriptor</tt> configurations</li> + <li>Describing URL configuration with an <tt>RKRouter</tt></li> + <li>Serializing objects and sending requests with the serialized representations</li> + <li>Sending requests to load remote resources and object mapping the response bodies</li> + <li>Building multi-part form requests for objects</li> + </ul> + </td> + </tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKRouter.html">RKRouter</a></td> + <td>Generates <tt>NSURL</tt> objects from a base URL and a set of <tt>RKRoute</tt> objects describing relative paths used by the application.</td> + </tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKRoute.html">RKRoute</a></td> + <td>Describes a single relative path for a given object type and HTTP method, the relationship of an object, or a symbolic name.</td> + </tr> + <tr><th colspan="2" style="text-align:center;"><a href="blob/development/Code/CoreData/README.md">Core Data</a></th></tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKManagedObjectStore.html">RKManagedObjectStore</a></td> + <td>Encapsulates Core Data configuration including an <tt>NSManagedObjectModel</tt>, a <tt>NSPersistentStoreCoordinator</tt>, and a pair of <tt>NSManagedObjectContext</tt> objects.</td> + </tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKEntityMapping.html">RKEntityMapping</a></td> + <td>Models a mapping for transforming an object representation into a <tt>NSManagedObject</tt> instance for a given <tt>NSEntityDescription</tt>.</td> + </tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKConnectionMapping.html">RKConnectionMapping</a></td> + <td>Describes a mapping for establishing a relationship between Core Data entities using foreign key attributes.</td> + </tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKManagedObjectRequestOperation.html">RKManagedObjectRequestOperation</a></td> + <td>An <tt>NSOperation</tt> subclass that sends an HTTP request and performs object mapping on the parsed response body to create <tt>NSManagedObject</tt> instances, establishes relationships between objects using <tt>RKConnectionMapping</tt> objects, and cleans up orphaned objects that no longer exist in the remote backend system.</td> + </tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKManagedObjectImporter.html">RKManagedObjectImporter</a></td> + <td>Provides support for bulk mapping of managed objects using <tt>RKEntityMapping</tt> objects for two use cases: + <ol> + <li>Bulk importing of parsed documents into an <tt>NSPersistentStore.</tt></li> + <li>Generating a <a href="Docs for database seeding">seed database</a> for initializing an application's Core Data store with an initial data set upon installation.</li> + </ol> + </td> + </tr> + <tr><th colspan="2" style="text-align:center;"><a href="blob/development/Code/Search/README.md">Search</a></th></tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKSearchIndexer.html">RKSearchIndexer</a></td> + <td>Provides support for generating a full-text searchable index within Core Data for string attributes of entities within an application.</td> + </tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKSearchPredicate.html">RKSearchPredicate</a></td> + <td>Generates an <tt>NSCompoundPredicate</tt> given a string of text that will search an index built with an <tt>RKSearchIndexer</tt> across any indexed entity.</td> + </tr> + <tr><th colspan="2" style="text-align:center;"><a href="blob/development/Code/Testing/README.md">Testing</a></th></tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKMappingTest.html">RKMappingTest</a></td> + <td>Provides support for unit testing object mapping configurations given a parsed document and an object or entity mapping. Expectations are configured in terms of expected key path mappings and/or expected transformation results.</td> + </tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKTestFixture.html">RKTestFixture</a></td> + <td>Provides an interface for easily generating test fixture data for unit testing.</td> + </tr> + <tr> + <td><a href="http://restkit.org/api/0.20.0/Classes/RKTestFactory.html">RKTestFactory</a></td> + <td>Provides support for creating objects for use in testing.</td> + </tr> +</table> + +### + +## Examples + +### Object Request +``` objective-c +// GET a single Article from /articles/1234.json and map it into an object +// JSON looks like {"article": {"title": "My Article", "author": "Blake", "body": "Very cool!!"}} +RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[Article class]]; +[mapping addAttributeMappingsFromArray:@[@"title", @"author", @"body"]]; +NSIndexSet *statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful); // Anything in 2xx +RKResponseDescriptor *responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:mapping pathPattern:@"/articles/:articleID" keyPath:@"article" statusCodes:statusCodes]; + +NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://restkit.org/articles/1234.json"]]; +RKObjectRequestOperation *operation = [[RKObjectRequestOperation alloc] initWithRequest:request responseDescriptors:@[responseDescriptor]]; +[operation setCompletionBlockWithSuccess:^(RKObjectRequestOperation *operation, RKMappingResult *result) { + Article *article = [result firstObject]; + NSLog(@"Mapped the article: %@", article); +} failure:^(RKObjectRequestOperation *operation, NSError *error) { + NSLog(@"Failed with error: %@", [error localizedDescription]); +}];] +``` + +### Managed Object Request +``` objective-c +// GET an Article and its Categories from /articles/888.json and map into Core Data entities +// JSON looks like {"article": {"title": "My Article", "author": "Blake", "body": "Very cool!!", "categories": [{"id": 1, "name": "Core Data"]} +NSManagedObjectModel *managedObjectModel = [NSManagedObjectModel mergedModelFromBundles:nil]; +RKManagedObjectStore *managedObjectStore = [[RKManagedObjectStore alloc] initWithManagedObjectModel:managedObjectModel]; +NSString *path = [RKApplicationDataDirectory() stringByAppendingPathComponent:@"Store.sqlite"]; +[managedObjectStore addSQLitePersistentStoreAtPath:path fromSeedDatabaseAtPath:nil error:nil]; +[managedObjectStore createManagedObjectContexts]; + +RKEntityMapping *categoryMapping = [RKEntityMapping mappingForEntityForName:@"Category" inManagedObjectStore:managedObjectStore]; +[categoryMapping addAttributeMappingsFromDictionary:@{ "id": "categoryID", @"name": "name" }]; +RKEntityMapping *articleMapping = [RKEntityMapping mappingForEntityForName:@"Article" inManagedObjectStore:managedObjectStore]; +[articleMapping addAttributeMappingsFromArray:@[@"title", @"author", @"body"]]; +[articleMapping addPropertyMapping:[RKRelationshipMapping relationshipMappingFromKeyPath:@"categories" toKeyPath:@"categories" withMapping:categoryMapping]]; + +NSIndexSet *statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful); // Anything in 2xx +RKResponseDescriptor *responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:articleMapping pathPattern:@"/articles/:articleID" keyPath:@"article" statusCodes:statusCodes]; + +NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://restkit.org/articles/888.json"]]; +RKManagedObjectRequestOperation *operation = [[RKManagedObjectRequestOperation alloc] initWithRequest:request responseDescriptors:@[responseDescriptor]]; +operation.managedObjectContext = managedObjectStore.mainQueueManagedObjectContext; +[operation setCompletionBlockWithSuccess:^(RKObjectRequestOperation *operation, RKMappingResult *result) { + Article *article = [result firstObject]; + NSLog(@"Mapped the article: %@", article); + NSLog(@"Mapped the category: %@", [article.categories anyObject]); +} failure:^(RKObjectRequestOperation *operation, NSError *error) { + NSLog(@"Failed with error: %@", [error localizedDescription]); +}]; +``` + +### Map a Client Error Response to an NSError +``` objective-c +// GET /articles/error.json returns a 422 (Unprocessable Entity) +// JSON looks like {"errors": "Some Error Has Occurred"} + +RKObjectMapping *errorMapping = [RKObjectMapping mappingForClass:[RKErrorMessage class]]; +// The entire value at the source key path containing the errors maps to the message +[errorMapping addPropertyMapping:[RKAttributeMapping attributeMappingFromKeyPath:[NSNull null] toKeyPath:@"message"]]; + +NSIndexSet *statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassClientError); +// Any response in the 4xx status code range with an "errors" key path uses this mapping +RKResponseDescriptor *errorDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:mapping pathPattern:nil keyPath:@"errors" statusCodes:statusCodes]; + +NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://restkit.org/articles/error.json"]]; +RKObjectRequestOperation *operation = [[RKObjectRequestOperation alloc] initWithRequest:request responseDescriptors:@[errorDescriptor]]; +[operation setCompletionBlockWithSuccess:nil failure:^(RKObjectRequestOperation *operation, NSError *error) { + NSLog(@"Loaded this error: %@", [error localizedDescription]); +}]; +``` + +### Centralize Configuration in an Object Manager +``` objective-c +// Set up Article and Error Response Descriptors +RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[Article class]]; +[mapping addAttributeMappingsFromArray:@[@"title", @"author", @"body"]]; +NSIndexSet *statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful); // Anything in 2xx +RKResponseDescriptor *articleDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:mapping pathPattern:@"/articles" keyPath:@"article" statusCodes:statusCodes]; + +RKObjectMapping *errorMapping = [RKObjectMapping mappingForClass:[RKErrorMessage class]]; +// The entire value at the source key path containing the errors maps to the message +[errorMapping addPropertyMapping:[RKAttributeMapping attributeMappingFromKeyPath:[NSNull null] toKeyPath:@"message"]]; +NSIndexSet *statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassClientError); +// Any response in the 4xx status code range with an "errors" key path uses this mapping +RKResponseDescriptor *errorDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:mapping pathPattern:nil keyPath:@"errors" statusCodes:statusCodes]; + +// Add our descriptors to the manager +RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://restkit.org"]]; +[manager addResponseDescriptorsFromArray:@[ articleDescriptor, errorDescriptor ]]; + +[manager getObjectsAtPath:@"/articles/555.json" parameters:nil success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult)) { + // Handled with articleDescriptor +} failure:^(RKObjectRequestOperation *operation, NSError *error) { + // Transport error or server error handled by errorDescriptor +}]; +``` + +### Load a Collection of Objects at a Path +``` objective-c +RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://restkit.org"]; +[manager getObjectsAtPath:@"/articles" parameters:nil success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult)) { +} failure:^(RKObjectRequestOperation *operation, NSError *error) { +}]; +``` + +### Manage a Queue of Object Request Operations +``` objective-c +RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://restkit.org"]; + +NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://restkit.org/articles/1234.json"]]; +RKObjectRequestOperation *operation = [[RKObjectRequestOperation alloc] initWithRequest:request responseDescriptors:@[responseDescriptor]]; + +[manager enqueueObjectRequestOperation:operation]; +[manager cancelAllObjectRequestOperationsWithMethod:RKRequestMethodANY matchingPathPattern:@"/articles/:articleID\\.json"]; +``` + +### POST, PATCH, and DELETE an Object +``` objective-c +RKObjectMapping *responseMapping = [RKObjectMapping mappingForClass:[Article class]]; +[responseMapping addAttributeMappingsFromArray:@[@"title", @"author", @"body"]]; +NSIndexSet *statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful); // Anything in 2xx +RKResponseDescriptor *articleDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:responseMapping pathPattern:@"/articles" keyPath:@"article" statusCodes:statusCodes]; + +RKObjectMapping *requestMapping = [RKObjectMapping requestMapping]; // objectClass == NSMutableDictionary +[requestMapping addAttributeMappingsFromArray:@[@"title", @"author", @"body"]]; + +// For any object of class Article, serialize into an NSMutableDictionary using the given mapping and nest +// under the 'article' key path +RKRequestDescriptor *requestDescriptor = [RKRequestDescriptor requestDescriptorWithMapping:requestMapping objectClass:[Article class] rootKeyPath:@"article"]; + +RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://restkit.org"]; +[manager addRequestDescriptor:requestDescriptor]; +[manager addResponseDescriptor:responseDescriptor]; + +Article *article = [Article new]; +article.title = @"Introduction to RestKit"; +article.body = @"This is some text."; +article.author = @"Blake"; + +// POST to create +[manager postObject:article path:@"/articles" parameters:nil success:nil failure:nil]; + +// PATCH to update +article.body = @"New Body"; +[manager patchObject:article path:@"/articles/1234" parameters:nil success:nil failure:nil]; + +// DELETE to destroy +[manager deleteObject:article path:@"/articles/1234" parameters:nil success:nil failure:nil]; +``` + +### Configure Logging +``` objective-c +// Log all HTTP traffic with request and response bodies +RKLogConfigureByName("RestKit/Network", RKLogLevelTrace); + +// Log debugging info about Core Data +RKLogConfigureByName("RestKit/CoreData", RKLogLevelDebug); + +// Raise logging for a block +RKLogWithLevelWhileExecutingBlock(RKLogLevelTrace, ^{ + // Do something that generates logs +}); +``` + +### Configure Routing +``` objective-c +RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://restkit.org"]; + +// Class Routing +[manager.router.routeSet addRoute:[RKRoute routeWithClass:[GGSegment class] pathPattern:@"/segments/:segmentID\\.json" method:RKRequestMethodGET]]; + +// Relationship Routing +[manager.router.routeSet addRoute:[RKRoute routeWithRelationshipName:@"amenities" objectClass:[GGAirport class] pathPattern:@"/airports/:airportID/amenities.json" method:RKRequestMethodGET]]; + +// Named Routes +[manager.router.routeSet addRoute:[RKRoute routeWithName:@"thumbs_down_review" resourcePathPattern:@"/reviews/:reviewID/thumbs_down" method:RKRequestMethodPOST]]; +``` + +### POST an Object with a File Attachment +``` objective-c +Article *article = [Article new]; +UIImage *image = [UIImage imageNamed:@"some_image.png"]; + +// Serialize the Article attributes then attach a file +NSMutableURLRequest *request = [[RKObjectManager sharedManager] multipartFormRequestForObject:article method:RKRequestMethodPOST path:nil parameters:nil constructingBodyWithBlock:^(id<AFMultipartFormData> formData) { + [formData appendPartWithFileData:UIImagePNGRepresentation(image) + name:@"article[image]" + fileName:@"photo.png" + mimeType:@"image/png"]; +}]; + +RKObjectRequestOperation *operation = [[RKObjectManager sharedManager] objectRequesOperationWithRequest:request success:nil failure:nil]; +[operation start]; +``` + +### Enqueue a Batch of Object Request Operations +``` objective-c + +RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://restkit.org"]]; + +Airport *jfk = [Airport new]; +jfk.code = @"jfk"; +Airport *lga = [Airport new]; +lga.code = @"lga"; +Airport *rdu = [Airport new]; +rdu.code = @"rdu"; + +// Enqueue a GET for '/airports/jfk/weather', '/airports/lga/weather', '/airports/rdu/weather' +RKRoute *route = [RKRoute routeWithName:@"airport_weather" resourcePathPattern:@"/airports/:code/weather" method:RKRequestMethodGET]; + +[manager enqueueBatchOfObjectRequestOperationsWithRoute:route + objects:@[ jfk, lga, rdu] + progress:^(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations) { + NSLog(@"Finished %d operations", numberOfFinishedOperations); + } completion:^ (NSArray *operations) { + NSLog(@"All Weather Reports Loaded!"); + }]; +``` + +### Generate a Seed Database +``` objective-c +NSManagedObjectModel *managedObjectModel = [NSManagedObjectModel mergedModelFromBundles:nil]; +RKManagedObjectStore *managedObjectStore = [[RKManagedObjectStore alloc] initWithManagedObjectModel:managedObjectModel]; + +RKEntityMapping *articleMapping = [RKEntityMapping mappingForEntityForName:@"Article" inManagedObjectStore:managedObjectStore]; +[articleMapping addAttributeMappingsFromArray:@[@"title", @"author", @"body"]]; + +NSString *seedPath = [RKApplicationDataDirectory() stringByAppendingPathComponent:@"MySeedDatabase.sqlite"]; +RKManagedObjectImporter *importer = [[RKManagedObjectImporter alloc] initWithManagedObjectModel:managedObjectStore.managedObjectModel storePath:seedPath]; + +// Import the files "articles.json" from the Main Bundle using our RKEntityMapping +// JSON looks like {"articles": [ {"title": "Article 1", "body": "Text", "author": "Blake" ]} +NSError *error; +NSBundle *mainBundle = [NSBundle mainBundle]; +[importer importObjectsFromItemAtPath:[mainBundle pathForResource:@"articles" ofType:@"json"] + withMapping:articleMapping + keyPath:@"articles" + error:&error]; + +BOOL success = [importer finishImporting:&error]; +if (success) { + [importer logSeedingInfo]; +} +``` + +### Index and Search an Entity +``` objective-c +NSManagedObjectModel *managedObjectModel = [NSManagedObjectModel mergedModelFromBundles:nil]; +RKManagedObjectStore *managedObjectStore = [[RKManagedObjectStore alloc] initWithManagedObjectModel:managedObjectModel]; +[managedObjectStore addSearchIndexingToEntityForName:@"Article" onAttributes:@[ @"title", @"body" ]]; +[managedObjectStore addInMemoryPersistentStore:nil]; +[managedObjectStore createManagedObjectContexts]; +[managedObjectStore startIndexingPersistentStoreManagedObjectContext]; + +Article *article1 = [NSEntityDescription insertNewObjectForEntityForName:@"Article" inManagedObjectContext:managedObjectStore.mainQueueManagedObjectContext]; +article1.title = @"First Article"; +article1.body = "This should match search"; + +Article *article2 = [NSEntityDescription insertNewObjectForEntityForName:@"Article" inManagedObjectContext:managedObjectStore.mainQueueManagedObjectContext]; +article2.title = @"Second Article"; +article2.body = "Does not"; + +BOOL success = [managedObjectStore.mainQueueManagedObjectContext saveToPersistentStore:nil]; + +RKSearchPredicate *predicate = [RKSearchPredicate searchPredicateWithText:@"Match" type:NSAndPredicateType]; +NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:@"Article"]; +fetchRequest.predicate = predicate; + +// Contains article1 due to body text containing 'match' +NSArray *matches = [managedObjectStore.mainQueueManagedObjectContext executeFetchRequest:fetchRequest error:nil]; +NSLog(@"Found the matching articls: %@", matches); +``` + +### Unit Test a Mapping +``` objective-c +// JSON looks like {"article": {"title": "My Article", "author": "Blake", "body": "Very cool!!"}} +RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[Article class]]; +[mapping addAttributeMappingsFromArray:@[@"title", @"author", @"body"]]; + +NSDictionary *article = @{ @"article": @{ @"title": @"My Title", @"body": @"The article body", @"author": @"Blake" } }; +RKMappingTest *mappingTest = [[RKMappingTest alloc] initWithMapping:mapping sourceObject:article destinationObject:nil]; + +[mappingTest expectMappingFromKeyPath:@"title" toKeyPath:@"title" value:@"My Title"]; +[mappingTest performMapping]; +[mappingTest verify]; +``` + +## Requirements + +RestKit requires [iOS 5.0](http://developer.apple.com/library/ios/#releasenotes/General/WhatsNewIniPhoneOS/Articles/iOS5.html#//apple_ref/doc/uid/TP30915195-SW1) and above or [Mac OS X 10.7](http://developer.apple.com/library/mac/#releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_7.html#//apple_ref/doc/uid/TP40010355-SW5) and above. + +Several third-party open source libraries are used within RestKit, including: + +1. [AFNetworking](https://github.com/AFNetworking/AFNetworking) - Networking Support +2. [LibComponentLogging](http://0xc0.de/LibComponentLogging) - Logging Support +3. [SOCKit](https://github.com/jverkoey/sockit) - String <-> Object Coding +4. [iso8601parser](http://boredzo.org/iso8601parser/) - Support for parsing and generating ISO-8601 dates + +The following Cocoa frameworks must be linked into the application target for proper compilation: + +1. **CFNetwork.framework** on iOS +1. **CoreData.framework** +1. **Security.framework** +1. **MobileCoreServices.framework** on iOS or **CoreServices.framework** on OS X + +And the following linker flags must be set: + +1. **-ObjC** +1. **-all_load** + +### ARC + +As of [version 0.20.0](https://github.com/RestKit/RestKit/wiki/Restkit-0.20.0), RestKit has migrated the entire codebase to ARC. + +If you are including the RestKit sources directly into a project that does not yet use [Automatic Reference Counting](http://clang.llvm.org/docs/AutomaticReferenceCounting.html), you will need to set the `-fobjc-arc` compiler flag on all of the RestKit source files. To do this in Xcode, go to your active target and select the "Build Phases" tab. Now select all RestKit source files, press Enter, insert `-fobjc-arc` and then "Done" to enable ARC for RestKit. + +### Serialization Formats + +RestKit provides a pluggable interface for handling arbitrary serialization formats via the [`RKSerialization`](http://restkit.org/api/0.20.0/Classes/RKSerialization.html) protocol and the [`RKMIMETypeSerialization`](http://restkit.org/api/0.20.0/Classes/RKMIMETypeSerialization.html) class. Out of the box, RestKit supports handling the [JSON](http://www.json.org/) format for serializing and deserializing object representations via the [`NSJSONSerialization`](http://developer.apple.com/library/mac/#documentation/Foundation/Reference/NSJSONSerialization_Class/Reference/Reference.html) class. + +#### Additional Serializations + +Support for additional formats and alternate serialization backends is provided via external modules that can be added to the project. Currently the following serialization implementations are available for use: + +* JSONKit +* SBJSON +* YAJL +* NextiveJson +* XMLReader + XMLWriter + +## Installation + +The recommended approach for installating RestKit is via the [CocoaPods](http://cocoapods.org/) package manager, as it provides flexible dependency management and dead simple installation. For best results, it is recommended that you install via CocoaPods **>= 0.15.2** using Git **>= 1.8.0** installed via Homebrew. + +### via CocoaPods + +Install CocoaPods if not already available: + +``` bash +$ [sudo] gem install cocoapods +$ pod setup +``` + +Edit your Podfile and add RestKit: + +``` bash +$ edit Podfile +platform :ios, '5.0' +pod 'RestKit', :git => 'https://github.com/RestKit/RestKit.git', :branch => 'development' + +# Testing and Search are optional components +pod 'RestKit/Testing', :git => 'https://github.com/RestKit/RestKit.git', :branch => 'development' +pod 'RestKit/Search', :git => 'https://github.com/RestKit/RestKit.git', :branch => 'development' +``` + +Install into your project: + +``` bash +$ pod install +``` + +Please note that if your installation fails, it may be because you are installing with a version of Git lower than CocoaPods is expecting. Please ensure that you are running Git **>= 1.8.0** by executing `git --version`. You can get a full picture of the installation details by executing `pod install --verbose`. + +### From a Release Package or as a Git submodule + +Detailed installation instructions are available in the [Visual Install Guide](https://github.com/RestKit/RestKit/wiki/Installing-RestKit-v0.20.x-as-a-Git-Submodule) on the Wiki. + +## License + +RestKit is licensed under the terms of the [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html). Please see the [LICENSE](https://github.com/RestKit/RestKit/blob/master/LICENSE) file for full details. + +## Credits + +RestKit is brought to you by [Blake Watters](http://twitter.com/blakewatters) and the RestKit team. + +Support is provided by the following organizations: + +* [GateGuru](http://www.gateguruapp.com/) +* [Two Toasters](http://www.twotoasters.com/) diff --git a/Pods/RestKit/RestKit.podspec b/Pods/RestKit/RestKit.podspec new file mode 100644 index 00000000..4ad4e5d1 --- /dev/null +++ b/Pods/RestKit/RestKit.podspec @@ -0,0 +1,66 @@ +Pod::Spec.new do |s| + s.name = 'RestKit' + s.version = '0.20.0dev' + s.summary = 'RestKit is a framework for consuming and modeling RESTful web resources on iOS and OS X.' + s.homepage = 'http://www.restkit.org' + s.author = { 'Blake Watters' => 'blakewatters@gmail.com' } + s.source = { :git => 'https://github.com/RestKit/RestKit.git', :branch => 'development' } + s.license = 'Apache License, Version 2.0' + + # Platform setup + s.requires_arc = true + s.ios.deployment_target = '5.0' + s.osx.deployment_target = '10.7' + + # Exclude optional Search and Testing modules + s.preferred_dependency = 'Core' + + ### Subspecs + + s.subspec 'Core' do |cs| + cs.source_files = 'Code/*.h', 'Vendor/LibComponentLogging/Core', 'Vendor/LibComponentLogging/NSLog' + cs.header_dir = 'RestKit' + + cs.dependency 'RestKit/ObjectMapping' + cs.dependency 'RestKit/Network' + cs.dependency 'RestKit/CoreData' + end + + s.subspec 'ObjectMapping' do |os| + os.header_dir = 'RestKit/ObjectMapping' + os.source_files = 'Code/ObjectMapping' + end + + s.subspec 'Network' do |ns| + ns.header_dir = 'RestKit/Network' + ns.source_files = 'Code/Network' + ns.ios.frameworks = 'CFNetwork', 'Security', 'MobileCoreServices', 'SystemConfiguration' + ns.osx.frameworks = 'CoreServices', 'Security', 'SystemConfiguration' + ns.dependency 'SOCKit' + ns.dependency 'AFNetworking', '1.0' + ns.dependency 'RestKit/ObjectMapping' + ns.dependency 'RestKit/Support' + end + + s.subspec 'CoreData' do |cdos| + cdos.header_dir = 'RestKit/CoreData' + cdos.source_files = 'Code/CoreData' + cdos.frameworks = 'CoreData' + end + + s.subspec 'Testing' do |ts| + ts.header_dir = 'RestKit/Testing' + ts.source_files = 'Code/Testing' + end + + s.subspec 'Search' do |ss| + ss.header_dir = 'RestKit/Search' + ss.source_files = 'Code/Search' + ss.dependency 'RestKit/CoreData' + end + + s.subspec 'Support' do |ss| + ss.header_dir = 'RestKit/Support' + ss.source_files = 'Code/Support' + end +end diff --git a/Pods/RestKit/Vendor/LibComponentLogging/Core/lcl_RK.h b/Pods/RestKit/Vendor/LibComponentLogging/Core/lcl_RK.h new file mode 100644 index 00000000..c4e3324e --- /dev/null +++ b/Pods/RestKit/Vendor/LibComponentLogging/Core/lcl_RK.h @@ -0,0 +1,388 @@ +// +// +// lcl_RK.h -- LibComponentLogging, embedded, RestKit/RK +// +// +// Copyright (c) 2008-2012 Arne Harren <ah@0xc0.de> +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#ifndef __RKLCL_H__ +#define __RKLCL_H__ + +#define _RKLCL_VERSION_MAJOR 1 +#define _RKLCL_VERSION_MINOR 3 +#define _RKLCL_VERSION_BUILD 1 +#define _RKLCL_VERSION_SUFFIX "" + +// +// lcl -- LibComponentLogging, embedded, RestKit/RK +// +// LibComponentLogging is a logging library for Objective-C applications +// with the following characteristics: +// +// - Log levels +// The library provides log levels for distinguishing between error messages, +// informational messages, and fine-grained trace messages for debugging. +// +// - Log components +// The library provides log components for identifying different parts of an +// application. A log component contains a unique identifier, a short name +// which is used as a header in a log message, and a full name which can be +// used in a user interface. +// +// - Active log level per log component +// At runtime, the library provides an active log level for each log +// component in order to enable/disable logging for certain parts of an +// application. +// +// - Grouping of log components +// Log components which have the same name prefix form a group of log +// components and logging can be enabled/disabled for the whole group with +// a single command. +// +// - Low runtime-overhead when logging is disabled +// Logging is based on a log macro which checks the active log level before +// constructing the log message and before evaluating log message arguments. +// +// - Code completion support +// The library provides symbols for log components and log levels which work +// with Xcode's code completion. All symbols, e.g. values or functions, which +// are relevant when using the logging library in an application, are prefixed +// with 'RKlcl_'. Internal symbols, which are needed when working with meta +// data, when defining log components, or when writing a logging back-end, are +// prefixed with '_RKlcl_'. Internal symbols, which are only used by the logging +// library itself, are prefixed with '__RKlcl_'. +// +// - Meta data +// The library provides public data structures which contain information about +// log levels and log components, e.g. headers and names. +// +// - Pluggable loggers +// The library does not contain a concrete logger, but provides a simple +// delegation mechanism for plugging-in a concrete logger based on the +// application's requirements, e.g. a logger which writes to the system log, +// or a logger which writes to a log file. The concrete logger is configured +// at build-time. +// +// Note: If the preprocessor symbol _RKLCL_NO_LOGGING is defined, the log macro +// will be defined to an empty effect. +// + + +#import <Foundation/Foundation.h> + + +// Use C linkage. +#ifdef __cplusplus +extern "C" { +#endif + + +// +// Log levels. +// + + +// Log levels, prefixed with 'RKlcl_v'. +enum _RKlcl_enum_level_t { + RKlcl_vOff = 0, + + RKlcl_vCritical, // critical situation + RKlcl_vError, // error situation + RKlcl_vWarning, // warning + RKlcl_vInfo, // informational message + RKlcl_vDebug, // coarse-grained debugging information + RKlcl_vTrace, // fine-grained debugging information + + _RKlcl_level_t_count, + _RKlcl_level_t_first = 0, + _RKlcl_level_t_last = _RKlcl_level_t_count-1 +}; + +// Log level type. +typedef uint32_t _RKlcl_level_t; +typedef uint8_t _RKlcl_level_narrow_t; + + +// +// Log components. +// + + +// Log components, prefixed with 'RKlcl_c'. +enum _RKlcl_enum_component_t { +# define _RKlcl_component(_identifier, _header, _name) \ + RKlcl_c##_identifier, \ + __RKlcl_log_symbol_RKlcl_c##_identifier = RKlcl_c##_identifier, +# include "lcl_config_components_RK.h" +# undef _RKlcl_component + + _RKlcl_component_t_count, + _RKlcl_component_t_first = 0, + _RKlcl_component_t_last = _RKlcl_component_t_count-1 +}; + +// Log component type. +typedef uint32_t _RKlcl_component_t; + + +// +// Functions and macros. +// + +#ifndef _RKLCL_NO_IGNORE_WARNINGS +# ifdef __clang__ + // Ignore some warnings about variadic macros when using '-Weverything'. +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wunknown-pragmas" +# pragma clang diagnostic ignored "-Wvariadic-macros" +# pragma clang diagnostic ignored "-Wpedantic" +# endif +#endif + +// RKlcl_log(<component>, <level>, <format>[, <arg1>[, <arg2>[, ...]]]) +// +// <component>: a log component with prefix 'RKlcl_c' +// <level> : a log level with prefix 'RKlcl_v' +// <format> : a format string of type NSString (may include %@) +// <arg..> : optional arguments required by the format string +// +// Logs a message for the given log component at the given log level if the +// log level is active for the log component. +// +// The actual logging is done by _RKlcl_logger which must be defined by a concrete +// logging back-end. _RKlcl_logger has the same signature as RKlcl_log. +// +#ifdef _RKLCL_NO_LOGGING +# define RKlcl_log(_component, _level, _format, ...) \ + do { \ + } while (0) +#else +# define RKlcl_log(_component, _level, _format, ...) \ + do { \ + if (((_RKlcl_component_level[(__RKlcl_log_symbol(_component))]) >= \ + (__RKlcl_log_symbol(_level))) \ + ) { \ + _RKlcl_logger(_component, \ + _level, \ + _format, \ + ##__VA_ARGS__); \ + } \ + } while (0) +#endif + +// RKlcl_log_if(<component>, <level>, <predicate>, <format>[, <arg1>[, ...]]) +// +// <component>: a log component with prefix 'RKlcl_c' +// <level> : a log level with prefix 'RKlcl_v' +// <predicate>: a predicate for conditional logging +// <format> : a format string of type NSString (may include %@) +// <arg..> : optional arguments required by the format string +// +// Logs a message for the given log component at the given log level if the +// log level is active for the log component and if the predicate evaluates +// to true. +// +// The predicate is only evaluated if the given log level is active. +// +// The actual logging is done by _RKlcl_logger which must be defined by a concrete +// logging back-end. _RKlcl_logger has the same signature as RKlcl_log. +// +#ifdef _RKLCL_NO_LOGGING +# define RKlcl_log_if(_component, _level, _predicate, _format, ...) \ + do { \ + } while (0) +#else +# define RKlcl_log_if(_component, _level, _predicate, _format, ...) \ + do { \ + if (((_RKlcl_component_level[(__RKlcl_log_symbol(_component))]) >= \ + (__RKlcl_log_symbol(_level))) \ + && \ + (_predicate) \ + ) { \ + _RKlcl_logger(_component, \ + _level, \ + _format, \ + ##__VA_ARGS__); \ + } \ + } while (0) +#endif + +#ifndef _RKLCL_NO_IGNORE_WARNINGS +# ifdef __clang__ +# pragma clang diagnostic pop +# endif +#endif + +// RKlcl_configure_by_component(<component>, <level>) +// +// <component>: a log component with prefix 'RKlcl_c' +// <level> : a log level with prefix 'RKlcl_v' +// +// Configures the given log level for the given log component. +// Returns the number of configured log components, or 0 on failure. +// +uint32_t RKlcl_configure_by_component(_RKlcl_component_t component, _RKlcl_level_t level); + +// RKlcl_configure_by_identifier(<identifier>, <level>) +// +// <identifier>: a log component's identifier with optional '*' wildcard suffix +// <level> : a log level with prefix 'RKlcl_v' +// +// Configures the given log level for the given log component(s). +// Returns the number of configured log components, or 0 on failure. +// +uint32_t RKlcl_configure_by_identifier(const char *identifier, _RKlcl_level_t level); + +// RKlcl_configure_by_header(<header>, <level>) +// +// <header> : a log component's header with optional '*' wildcard suffix +// <level> : a log level with prefix 'RKlcl_v' +// +// Configures the given log level for the given log component(s). +// Returns the number of configured log components, or 0 on failure. +// +uint32_t RKlcl_configure_by_header(const char *header, _RKlcl_level_t level); + +// RKlcl_configure_by_name(<name>, <level>) +// +// <name> : a log component's name with optional '*' wildcard suffix +// <level> : a log level with prefix 'RKlcl_v' +// +// Configures the given log level for the given log component(s). +// Returns the number of configured log components, or 0 on failure. +// +uint32_t RKlcl_configure_by_name(const char *name, _RKlcl_level_t level); + + +// +// Internals. +// + + +// Active log levels, indexed by log component. +extern _RKlcl_level_narrow_t _RKlcl_component_level[_RKlcl_component_t_count]; + +// Log component identifiers, indexed by log component. +extern const char * const _RKlcl_component_identifier[_RKlcl_component_t_count]; + +// Log component headers, indexed by log component. +extern const char * const _RKlcl_component_header[_RKlcl_component_t_count]; + +// Log component names, indexed by log component. +extern const char * const _RKlcl_component_name[_RKlcl_component_t_count]; + +// Log level headers, indexed by log level. +extern const char * const _RKlcl_level_header[_RKlcl_level_t_count]; // full header +extern const char * const _RKlcl_level_header_1[_RKlcl_level_t_count]; // header with 1 character +extern const char * const _RKlcl_level_header_3[_RKlcl_level_t_count]; // header with 3 characters + +// Log level names, indexed by log level. +extern const char * const _RKlcl_level_name[_RKlcl_level_t_count]; + +// Version. +extern const char * const _RKlcl_version; + +// Log level symbols used by RKlcl_log, prefixed with '__RKlcl_log_symbol_RKlcl_v'. +enum { + __RKlcl_log_symbol_RKlcl_vCritical = RKlcl_vCritical, + __RKlcl_log_symbol_RKlcl_vError = RKlcl_vError, + __RKlcl_log_symbol_RKlcl_vWarning = RKlcl_vWarning, + __RKlcl_log_symbol_RKlcl_vInfo = RKlcl_vInfo, + __RKlcl_log_symbol_RKlcl_vDebug = RKlcl_vDebug, + __RKlcl_log_symbol_RKlcl_vTrace = RKlcl_vTrace +}; + +// Macro for appending the '__RKlcl_log_symbol_' prefix to a given symbol. +#define __RKlcl_log_symbol(_symbol) \ + __RKlcl_log_symbol_##_symbol + + +// End C linkage. +#ifdef __cplusplus +} +#endif + + +// Include logging back-end and definition of _RKlcl_logger. +#import "lcl_config_logger_RK.h" + + +// For simple configurations where 'lcl_config_logger_RK.h' is empty, define a +// default NSLog()-based _RKlcl_logger here. +#ifndef _RKlcl_logger + +// ARC/non-ARC autorelease pool +#define _RKlcl_logger_autoreleasepool_arc 0 +#if defined(__has_feature) +# if __has_feature(objc_arc) +# undef _RKlcl_logger_autoreleasepool_arc +# define _RKlcl_logger_autoreleasepool_arc 1 +# endif +#endif +#if _RKlcl_logger_autoreleasepool_arc +# define _RKlcl_logger_autoreleasepool_begin \ + @autoreleasepool { +# define _RKlcl_logger_autoreleasepool_end \ + } +#else +# define _RKlcl_logger_autoreleasepool_begin \ + NSAutoreleasePool *_RKlcl_logger_autoreleasepool = [[NSAutoreleasePool alloc] init]; +# define _RKlcl_logger_autoreleasepool_end \ + [_RKlcl_logger_autoreleasepool release]; +#endif + +#ifndef _RKLCL_NO_IGNORE_WARNINGS +# ifdef __clang__ + // Ignore some warnings about variadic macros when using '-Weverything'. +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wunknown-pragmas" +# pragma clang diagnostic ignored "-Wvariadic-macros" +# pragma clang diagnostic ignored "-Wpedantic" +# endif +#endif + +// A simple default logger, which redirects to NSLog(). +#define _RKlcl_logger(_component, _level, _format, ...) { \ + _RKlcl_logger_autoreleasepool_begin \ + NSLog(@"%s %s:%@:%d " _format, \ + _RKlcl_level_header_1[_level], \ + _RKlcl_component_header[_component], \ + [@__FILE__ lastPathComponent], \ + __LINE__, \ + ## __VA_ARGS__); \ + _RKlcl_logger_autoreleasepool_end \ +} + +#ifndef _RKLCL_NO_IGNORE_WARNINGS +# ifdef __clang__ +# pragma clang diagnostic pop +# endif +#endif + +#endif + + +// Include extensions. +#import "lcl_config_extensions_RK.h" + + +#endif // __RKLCL_H__ + diff --git a/Pods/RestKit/Vendor/LibComponentLogging/Core/lcl_RK.m b/Pods/RestKit/Vendor/LibComponentLogging/Core/lcl_RK.m new file mode 100644 index 00000000..9c2a6b8c --- /dev/null +++ b/Pods/RestKit/Vendor/LibComponentLogging/Core/lcl_RK.m @@ -0,0 +1,176 @@ +// +// +// lcl_RK.m -- LibComponentLogging, embedded, RestKit/RK +// +// +// Copyright (c) 2008-2012 Arne Harren <ah@0xc0.de> +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "lcl_RK.h" +#include <string.h> + + +// Active log levels, indexed by log component. +_RKlcl_level_narrow_t _RKlcl_component_level[_RKlcl_component_t_count]; + +// Log component identifiers, indexed by log component. +const char * const _RKlcl_component_identifier[] = { +# define _RKlcl_component(_identifier, _header, _name) \ + #_identifier, +# include "lcl_config_components_RK.h" +# undef _RKlcl_component +}; + +// Log component headers, indexed by log component. +const char * const _RKlcl_component_header[] = { +# define _RKlcl_component(_identifier, _header, _name) \ + _header, +# include "lcl_config_components_RK.h" +# undef _RKlcl_component +}; + +// Log component names, indexed by log component. +const char * const _RKlcl_component_name[] = { +# define _RKlcl_component(_identifier, _header, _name) \ + _name, +# include "lcl_config_components_RK.h" +# undef _RKlcl_component +}; + +// Log level headers, indexed by log level. +const char * const _RKlcl_level_header[] = { + "-", + "CRITICAL", + "ERROR", + "WARNING", + "INFO", + "DEBUG", + "TRACE" +}; +const char * const _RKlcl_level_header_1[] = { + "-", + "C", + "E", + "W", + "I", + "D", + "T" +}; +const char * const _RKlcl_level_header_3[] = { + "---", + "CRI", + "ERR", + "WRN", + "INF", + "DBG", + "TRC" +}; + +// Log level names, indexed by log level. +const char * const _RKlcl_level_name[] = { + "Off", + "Critical", + "Error", + "Warning", + "Info", + "Debug", + "Trace" +}; + +// Version. +#define __RKlcl_version_to_string( _text) __RKlcl_version_to_string0(_text) +#define __RKlcl_version_to_string0(_text) #_text +const char * const _RKlcl_version = __RKlcl_version_to_string(_RKLCL_VERSION_MAJOR) + "." __RKlcl_version_to_string(_RKLCL_VERSION_MINOR) + "." __RKlcl_version_to_string(_RKLCL_VERSION_BUILD) + "" _RKLCL_VERSION_SUFFIX; + +// Configures the given log level for the given log component. +uint32_t RKlcl_configure_by_component(_RKlcl_component_t component, _RKlcl_level_t level) { + // unsupported level, clip to last level + if (level > _RKlcl_level_t_last) { + level = _RKlcl_level_t_last; + } + + // configure the component + if (component <= _RKlcl_component_t_last) { + _RKlcl_component_level[component] = level; + return 1; + } + + return 0; +} + +// Configures the given log level for the given log component(s). +static uint32_t _RKlcl_configure_by_text(uint32_t count, const char * const *texts, + _RKlcl_level_narrow_t *levels, const char *text, + _RKlcl_level_t level) { + // no text given, quit + if (text == NULL || text[0] == '\0') { + return 0; + } + + // unsupported level, clip to last level + if (level > _RKlcl_level_t_last) { + level = _RKlcl_level_t_last; + } + + // configure the components + uint32_t num_configured = 0; + size_t text_len = strlen(text); + if (text[text_len-1] == '*') { + // text ends with '*', wildcard suffix was specified + text_len--; + for (uint32_t c = 0; c < count; c++) { + if (strncmp(text, texts[c], text_len) == 0) { + levels[c] = level; + num_configured++; + } + } + } else { + // no wildcard suffix was specified + for (uint32_t c = 0; c < count; c++) { + if (strcmp(text, texts[c]) == 0) { + levels[c] = level; + num_configured++; + } + } + } + return num_configured; +} + +// Configures the given log level for the given log component(s) by identifier. +uint32_t RKlcl_configure_by_identifier(const char *identifier, _RKlcl_level_t level) { + return _RKlcl_configure_by_text(_RKlcl_component_t_count, _RKlcl_component_identifier, + _RKlcl_component_level, identifier, level); +} + +// Configures the given log level for the given log component(s) by header. +uint32_t RKlcl_configure_by_header(const char *header, _RKlcl_level_t level) { + return _RKlcl_configure_by_text(_RKlcl_component_t_count, _RKlcl_component_header, + _RKlcl_component_level, header, level); +} + +// Configures the given log level for the given log component(s) by name. +uint32_t RKlcl_configure_by_name(const char *name, _RKlcl_level_t level) { + return _RKlcl_configure_by_text(_RKlcl_component_t_count, _RKlcl_component_name, + _RKlcl_component_level, name, level); +} + diff --git a/Pods/RestKit/Vendor/LibComponentLogging/NSLog/LCLNSLog_RK.h b/Pods/RestKit/Vendor/LibComponentLogging/NSLog/LCLNSLog_RK.h new file mode 100644 index 00000000..06f9bda2 --- /dev/null +++ b/Pods/RestKit/Vendor/LibComponentLogging/NSLog/LCLNSLog_RK.h @@ -0,0 +1,100 @@ +// +// +// LCLNSLog_RK.h +// +// +// Copyright (c) 2008-2011 Arne Harren <ah@0xc0.de> +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + + +// +// RKLCLNSLog +// +// This file provides a simple LibComponentLogging logger implementation which +// redirects logging to NSLog. +// +// The logger uses the following format +// +// <NSLog Prefix> <Level> <Component>:<File>:<Line>:<Function> <Message> +// +// where <NSLog Prefix> is +// +// <Date> <Time> <Application>[<PID>:<TID>] +// +// Examples: +// +// 2009-02-01 12:38:32.796 Example[4964:10b] D c1:main.m:28:-[Class method] M1 +// 2009-02-01 12:38:32.798 Example[4964:10b] D c2:main.m:32:-[Class method] M2 +// 2009-02-01 12:38:32.799 Example[4964:10b] D c3:main.m:36:-[Class method] M3 +// + + +// +// Integration with LibComponentLogging Core. +// + + +// ARC/non-ARC autorelease pool +#define _RKlcl_logger_autoreleasepool_arc 0 +#if defined(__has_feature) +# if __has_feature(objc_arc) +# undef _RKlcl_logger_autoreleasepool_arc +# define _RKlcl_logger_autoreleasepool_arc 1 +# endif +#endif +#if _RKlcl_logger_autoreleasepool_arc +#define _RKlcl_logger_autoreleasepool_begin \ + @autoreleasepool { +#define _RKlcl_logger_autoreleasepool_end \ + } +#else +#define _RKlcl_logger_autoreleasepool_begin \ + NSAutoreleasePool *_RKlcl_logger_autoreleasepool = [[NSAutoreleasePool alloc] init]; +#define _RKlcl_logger_autoreleasepool_end \ + [_RKlcl_logger_autoreleasepool release]; +#endif + + +// A very simple logger, which redirects to NSLog(). +#if 0 +#define _RKlcl_logger(_component, _level, _format, ...) { \ + _RKlcl_logger_autoreleasepool_begin \ + NSLog(@"%s %s:%@:%d:%s " _format, \ + _RKlcl_level_header_1[_level], \ + _RKlcl_component_header[_component], \ + [@__FILE__ lastPathComponent], \ + __LINE__, \ + __PRETTY_FUNCTION__, \ + ## __VA_ARGS__); \ + _RKlcl_logger_autoreleasepool_end \ +} +#else +#define _RKlcl_logger(_component, _level, _format, ...) { \ + _RKlcl_logger_autoreleasepool_begin \ + NSLog(@"%s %s:%@:%d " _format, \ + _RKlcl_level_header_1[_level], \ + _RKlcl_component_header[_component], \ + [@__FILE__ lastPathComponent], \ + __LINE__, \ + ## __VA_ARGS__); \ + _RKlcl_logger_autoreleasepool_end \ +} +#endif + diff --git a/candpiosapp/Externals/AFNetworking/Example/Classes/Controllers/PublicTimelineViewController.h b/Pods/RestKit/Vendor/LibComponentLogging/NSLog/LCLNSLog_RK.m similarity index 84% rename from candpiosapp/Externals/AFNetworking/Example/Classes/Controllers/PublicTimelineViewController.h rename to Pods/RestKit/Vendor/LibComponentLogging/NSLog/LCLNSLog_RK.m index 5f8300d7..eb197824 100644 --- a/candpiosapp/Externals/AFNetworking/Example/Classes/Controllers/PublicTimelineViewController.h +++ b/Pods/RestKit/Vendor/LibComponentLogging/NSLog/LCLNSLog_RK.m @@ -1,17 +1,20 @@ -// PublicTimelineViewController.h // -// Copyright (c) 2012 Mattt Thompson (http://mattt.me/) -// +// +// LCLNSLog_RK.m +// +// +// Copyright (c) 2008-2009 Arne Harren <ah@0xc0.de> +// // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -20,8 +23,6 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#import <UIKit/UIKit.h> -@interface PublicTimelineViewController : UITableViewController +// empty -@end diff --git a/Pods/SOCKit/LICENSE b/Pods/SOCKit/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/Pods/SOCKit/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Pods/SOCKit/NOTICE b/Pods/SOCKit/NOTICE new file mode 100644 index 00000000..f4f66788 --- /dev/null +++ b/Pods/SOCKit/NOTICE @@ -0,0 +1,16 @@ + +Copyright 2011-2012 Jeff Verkoeyen + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +See the AUTHORS file for a list of contributors to SOCKit. \ No newline at end of file diff --git a/Pods/SOCKit/README.mdown b/Pods/SOCKit/README.mdown new file mode 100644 index 00000000..8f663670 --- /dev/null +++ b/Pods/SOCKit/README.mdown @@ -0,0 +1,94 @@ +SOCKit +====== + +String <-> Object Coding for Objective-C. Rhymes with "socket". + +With SOCKit and [SOCPattern][] you can easily transform objects into strings and vice versa. + +### Two examples, cuz devs love examples. + +```obj-c +SOCPattern* pattern = [SOCPattern patternWithString:@"api.github.com/users/:username/gists"]; +[pattern stringFromObject:githubUser]; +> @"api.github.com/users/jverkoey/gists" +``` + +```obj-c +SOCPattern* pattern = [SOCPattern patternWithString:@"github.com/:username"]; +[pattern performSelector:@selector(initWithUsername:) onObject:[GithubUser class] sourceString:@"github.com/jverkoey"]; +> <GithubUser> username = jverkoey +``` + +### Hey, this is really similar to defining routes in Rails. + +Damn straight it is. + +### And isn't this kind of like Three20's navigator? + +Except hella better. It's also entirely incompatible with Three20 routes. This kinda blows if +you've already invested a ton of energy into Three20's routing tech, but here are a few reasons +why SOCKit is better: + +1. *Selectors are not defined in the pattern*. The fact that Three20 requires that you define + selectors in the pattern is scary as hell: rename a method in one of your controllers and + your URL routing will silently break. No warnings, just broke. With SOCKit you define the + selectors using @selector notation and SOCKit infers the parameters from the pattern definition. + This way you can depend on the compiler to fire a warning if the selector isn't defined anywhere. +2. *Parameters are encoded using true KVC*. You now have full access to [KVC collection operators]. +3. *SOCKit is fully unit tested and documented*. Not much more to be said here. + +Here's a quick breakdown of the differences between Three20 and SOCKit, if SOCKit were used as +the backend for Three20's URL routing. + +``` +Three20: [map from:@"twitter://tweet/(initWithTweetId:)" toViewController:[TweetController class]]; +SOCKit: [map from:@"twitter://tweet/:id" toViewController:[TweetController class] selector:@selector(initWithTweetId:)]; + +Three20: [map from:[Tweet class] name:@"thread" toURL:@"twitter://tweet/(id)/thread"]; +SOCKit: [map from:[Tweet class] name:@"thread" toURL:@"twitter://tweet/:id/thread"]; +``` + +## Where it's being used + +SOCKit is a sibling project to [Nimbus][], a light-weight and modular framework that makes it +easy to blaze a trail with your iOS apps. Nimbus will soon be using SOCKit in a re-envisioning +of Three20's navigator. + +Users of RESTKit will notice that SOCKit provides similar functionality to RESTKit's +[RKMakePathWithObject][]. In fact, both `RKMakePathWithObject` and the underlying `RKPathMatcher` +class rely on SOCKit behind the scenes. + +## Adding SOCKit to your project + +This lightweight library is built to be a dead-simple airdrop directly into your project. Contained +in SOCKit.h and SOCKit.m is all of the functionality you will need in order to start mapping +Strings <-> Objects. To start using SOCKit, simply download or `git checkout` the SOCKit repo +and drag SOCKit.h and SOCKit.m to your project's source tree. `#import "SOCKit.h"` where you want +to use SOCKit and start pumping out some mad String <-> Object coding. + +## Some cool things + +When coding objects into strings you define parameters by prefixing the property name with a colon. +So if you have a Tweet object with a `tweetId` property, the pattern parameter name would look like +`:tweetId`. Simple enough. + +But now let's say you have a Tweet object that contains a reference to a TwitterUser object via +the `user` property, and that TwitterUser object has a `username` property. Check this out: +`:user.username`. If this was one of my tweets and I encoded the Tweet object using a SOCKit +pattern the resulting string would be `@"featherless"`. KVC rocks. + +## Learning more + +In-depth documentation can be found in the [SOCKit.h][SOCPattern] header file. + +## Contributing + +If you find a bug in SOCKit please file an issue on the Github [SOCKit issue tracker][]. Even +better: if you have a solution for the bug then fork the project and make a pull request. + +[SOCKit issue tracker]: https://github.com/jverkoey/sockit/issues +[SOCPattern]: https://github.com/jverkoey/sockit/blob/master/SOCKit.h +[KVC collection operators]: http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/KeyValueCoding/Articles/CollectionOperators.html#//apple_ref/doc/uid/20002176-BAJEAIEE +[Nimbus]: http://jverkoey.github.com/nimbus +[RESTKit]: https://github.com/RestKit/RestKit +[RKMakePathWithObject]: https://github.com/RestKit/RestKit/blob/master/Code/Network/RKClient.m#L37 \ No newline at end of file diff --git a/Pods/SOCKit/SOCKit.h b/Pods/SOCKit/SOCKit.h new file mode 100644 index 00000000..57fcf44a --- /dev/null +++ b/Pods/SOCKit/SOCKit.h @@ -0,0 +1,214 @@ +// +// Copyright 2011-2012 Jeff Verkoeyen +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import <Foundation/Foundation.h> + +/** + * String <-> Object Coding. + * + * Code information from strings into objects and vice versa. + * + * A pattern is a string with parameter names prefixed by colons (":"). + * An example of a pattern string with one parameter named :username is: + * api.github.com/users/:username/gists + * + * Patterns, once created, can be used to efficiently turn objects into strings and + * vice versa. Respectively, these techniques are referred to as inbound and outbound. + * + * Inbound examples (creating strings from objects): + * + * pattern: api.github.com/users/:username/gists + * > [pattern stringFromObject:[GithubUser userWithUsername:@"jverkoey"]]; + * returns: api.github.com/users/jverkoey/gists + * + * pattern: api.github.com/repos/:username/:repo/issues + * > [pattern stringFromObject:[GithubRepo repoWithUsername:@"jverkoey" repo:@"sockit"]]; + * returns: api.github.com/repos/jverkoey/sockit/issues + * + * Outbound examples (performing selectors on objects with values from given strings): + * + * pattern: github.com/:username + * > [pattern performSelector:@selector(initWithUsername:) onObject:[GithubUser class] sourceString:@"github.com/jverkoey"]; + * returns: an allocated, initialized, and autoreleased GithubUser object with @"jverkoey" passed + * to the initWithUsername: method. + * + * pattern: github.com/:username/:repo + * > [pattern performSelector:@selector(initWithUsername:repoName:) onObject:[GithubUser class] sourceString:@"github.com/jverkoey/sockit"]; + * returns: an allocated, initialized, and autoreleased GithubUser object with @"jverkoey" and + * @"sockit" passed to the initWithUsername:repoName: method. + * + * pattern: github.com/:username + * > [pattern performSelector:@selector(setUsername:) onObject:githubUser sourceString:@"github.com/jverkoey"]; + * returns: nil because setUsername: does not have a return value. githubUser's username property + * is now @"jverkoey". + * + * Note 1: Parameters must be separated by string literals + * + * Pattern parameters must be separated by some sort of non-parameter character. + * This means that you can't define a pattern like :user:repo. This is because when we + * get around to wanting to decode the string back into an object we need some sort of + * delimiter between the parameters. + * + * Note 2: When colons aren't seen as parameters + * + * If you have colons in your text that aren't followed by a valid parameter name then the + * colon will be treated as static text. This is handy if you're defining a URL pattern. + * For example: @"http://github.com/:user" only has one parameter, :user. The ":" in http:// + * is treated as a string literal and not a parameter. + * + * Note 3: Escaping KVC characters + * + * If you need to use KVC characters in SOCKit patterns as literal string tokens and not + * treated with KVC then you must escape the characters using double backslashes. For example, + * @"/:userid.json" would create a pattern that uses KVC to access the json property of the + * username value. In this case, however, we wish to interpret the ".json" portion as a + * static string. + * + * In order to do so we must escape the "." using a double backslash: "\\.". For example: + * @"/:userid\\.json". This makes it possible to create strings of the form @"/3.json". + * This also works with outbound parameters, so that the string @"/3.json" can + * be used with the pattern to invoke a selector with "3" as the first argument rather + * than "3.json". + * + * You can escape the following characters: + * ":" => @"\\:" + * "@" => @"\\@" + * "." => @"\\." + * "\\" => @"\\\\" + * + * Note 4: Allocating new objects with outbound patterns + * + * SOCKit will allocate a new object of a given class if + * performSelector:onObject:sourceString: is provided a selector with "init" as a prefix + * and object is a Class. E.g. [GithubUser class]. + */ +@interface SOCPattern : NSObject { +@private + NSString* _patternString; + NSArray* _tokens; + NSArray* _parameters; +} + +/** + * Initializes a newly allocated pattern object with the given pattern string. + * + * Designated initializer. + */ +- (id)initWithString:(NSString *)string; ++ (id)patternWithString:(NSString *)string; + +/** + * Returns YES if the given string can be used with performSelector:onObject:sourceString: or + * extractParameterKeyValuesFromSourceString:. + * + * A matching string must exactly match all of the static portions of the pattern and provide + * values for each of the parameters. + * + * @param string A string that may or may not conform to this pattern. + * @returns YES if the given string conforms to this pattern, NO otherwise. + */ +- (BOOL)stringMatches:(NSString *)string; + +/** + * Performs the given selector on the object with the matching parameter values from sourceString. + * + * @param selector The selector to perform on the object. If there aren't enough + * parameters in the pattern then the excess parameters in the selector + * will be nil. + * @param object The object to perform the selector on. + * @param sourceString A string that conforms to this pattern. The parameter values from + * this string are used as the arguments when performing the selector + * on the object. + * @returns The initialized, autoreleased object if the selector is an initializer + * (prefixed with "init") and object is a Class, otherwise the return value from + * invoking the selector. + */ +- (id)performSelector:(SEL)selector onObject:(id)object sourceString:(NSString *)sourceString; + +/** + * Extracts the matching parameter values from sourceString into an NSDictionary. + * + * @param sourceString A string that conforms to this pattern. The parameter values from + * this string are extracted into the NSDictionary. + * @returns A dictionary of key value pairs. All values will be NSStrings. The keys will + * correspond to the pattern's parameter names. Duplicate key values will be + * overwritten by later values. + */ +- (NSDictionary *)parameterDictionaryFromSourceString:(NSString *)sourceString; + +/** + * Returns a string with the parameters of this pattern replaced using Key-Value Coding (KVC) + * on the receiving object. + * + * Parameters of the pattern are evaluated using valueForKeyPath:. See Apple's KVC documentation + * for more details. + * + * Key-Value Coding Fundamentals: + * http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/KeyValueCoding/Articles/BasicPrinciples.html#//apple_ref/doc/uid/20002170-BAJEAIEE + * + * Collection Operators: + * http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/KeyValueCoding/Articles/CollectionOperators.html#//apple_ref/doc/uid/20002176-BAJEAIEE + * + * @param object The object whose properties will be used to replace the parameters in + * the pattern. + * @returns A string with the pattern parameters replaced by the object property values. + * @see stringFromObject:withBlock: + */ +- (NSString *)stringFromObject:(id)object; + +#if NS_BLOCKS_AVAILABLE +/** + * Returns a string with the parameters of this pattern replaced using Key-Value Coding (KVC) + * on the receiving object, and the result is (optionally) modified or encoded by the block. + * + * For example, consider we have individual object values that need percent escapes added to them, + * while preserving the slashes, question marks, and ampersands of a typical resource path. + * Using blocks, this is very succinct: + * + * @code + * NSDictionary* person = [NSDictionary dictionaryWithObjectsAndKeys: + * @"SECRET|KEY",@"password", + * @"Joe Bob Briggs", @"name", nil]; + * SOCPattern* soc = [SOCPattern patternWithString:@"/people/:name/:password"]; + * NSString* actualPath = [soc stringFromObject:person withBlock:^(NSString *)propertyValue) { + * return [propertyValue stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + * } + * NSString* expectedPath = @"/people/Joe%20Bob%20Briggs/SECRET%7CKEY"; + * @endcode + * + * @param object The object whose properties will be used to replace the parameters in + * the pattern. + * @param block An optional block (may be nil) that modifies or encodes each + * property value string. The block accepts one parameter - the property + * value as a string - and should return the modified property string. + * @returns A string with the pattern parameters replaced by the block-processed object + * property values. + * @see stringFromObject: + */ +- (NSString *)stringFromObject:(id)object withBlock:(NSString*(^)(NSString*))block; +#endif + +@end + +/** + * A convenience method for: + * + * SOCPattern* pattern = [SOCPattern patternWithString:string]; + * NSString* result = [pattern stringFromObject:object]; + * + * @see documentation for stringFromObject: + */ +NSString* SOCStringFromStringWithObject(NSString* string, id object); diff --git a/Pods/SOCKit/SOCKit.m b/Pods/SOCKit/SOCKit.m new file mode 100644 index 00000000..59e4a651 --- /dev/null +++ b/Pods/SOCKit/SOCKit.m @@ -0,0 +1,543 @@ +// +// Copyright 2011-2012 Jeff Verkoeyen +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "SOCKit.h" + +#import <objc/runtime.h> +#import <assert.h> + +typedef enum { + SOCArgumentTypeNone, + SOCArgumentTypePointer, + SOCArgumentTypeBool, + SOCArgumentTypeInteger, + SOCArgumentTypeLongLong, + SOCArgumentTypeFloat, + SOCArgumentTypeDouble, +} SOCArgumentType; + +SOCArgumentType SOCArgumentTypeForTypeAsChar(char argType); +NSString* kTemporaryBackslashToken = @"/backslash/"; + + +/////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////// +@interface SOCParameter : NSObject { +@private + NSString* _string; +} + +- (id)initWithString:(NSString *)string; ++ (id)parameterWithString:(NSString *)string; + +- (NSString *)string; + +@end + + +/////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////// +@interface SOCPattern() + +- (void)_compilePattern; + +@end + + +/////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////// +@implementation SOCPattern + + +/////////////////////////////////////////////////////////////////////////////////////////////////// +- (void)dealloc { + [_patternString release]; _patternString = nil; + [_tokens release]; _tokens = nil; + [_parameters release]; _parameters = nil; + [super dealloc]; +} + + +/////////////////////////////////////////////////////////////////////////////////////////////////// +- (id)initWithString:(NSString *)string { + if ((self = [super init])) { + _patternString = [string copy]; + + [self _compilePattern]; + } + return self; +} + + +/////////////////////////////////////////////////////////////////////////////////////////////////// ++ (id)patternWithString:(NSString *)string { + return [[[self alloc] initWithString:string] autorelease]; +} + + +/////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////// +#pragma mark - Pattern Compilation + + +/////////////////////////////////////////////////////////////////////////////////////////////////// +- (NSCharacterSet *)nonParameterCharacterSet { + NSMutableCharacterSet* parameterCharacterSet = [NSMutableCharacterSet alphanumericCharacterSet]; + [parameterCharacterSet addCharactersInString:@".@_"]; + NSCharacterSet* nonParameterCharacterSet = [parameterCharacterSet invertedSet]; + return nonParameterCharacterSet; +} + + +/////////////////////////////////////////////////////////////////////////////////////////////////// +- (void)_compilePattern { + if ([_patternString length] == 0) { + return; + } + + NSMutableArray* tokens = [[NSMutableArray alloc] init]; + NSMutableArray* parameters = [[NSMutableArray alloc] init]; + + NSCharacterSet* nonParameterCharacterSet = [self nonParameterCharacterSet]; + + // Turn escaped backslashes into a special backslash token to avoid \\. being interpreted as + // `\` and `\.` rather than `\\` and `.`. + NSString* escapedPatternString = _patternString; + if ([escapedPatternString rangeOfString:@"\\\\"].length > 0) { + escapedPatternString = [escapedPatternString stringByReplacingOccurrencesOfString: @"\\\\" + withString: kTemporaryBackslashToken]; + } + + // Scan through the string, creating tokens that are either strings or parameters. + // Parameters are prefixed with ":". + NSScanner* scanner = [NSScanner scannerWithString:escapedPatternString]; + + // NSScanner skips whitespace and newlines by default (not ideal!). + [scanner setCharactersToBeSkipped:nil]; + + while (![scanner isAtEnd]) { + NSString* token = nil; + [scanner scanUpToString:@":" intoString:&token]; + + if ([token length] > 0) { + if (![token hasSuffix:@"\\"]) { + // Add this static text to the token list. + [tokens addObject:token]; + + } else { + // This token is escaping the next colon, so we skip the parameter creation. + [tokens addObject:[token stringByAppendingString:@":"]]; + + // Skip the colon. + [scanner setScanLocation:[scanner scanLocation] + 1]; + continue; + } + } + + if (![scanner isAtEnd]) { + // Skip the colon. + [scanner setScanLocation:[scanner scanLocation] + 1]; + + // Scanning won't modify the token if there aren't any characters to be read, so we must + // clear it before scanning again. + token = nil; + [scanner scanUpToCharactersFromSet:nonParameterCharacterSet intoString:&token]; + + if ([token length] > 0) { + // Only add parameters that have valid names. + SOCParameter* parameter = [SOCParameter parameterWithString:token]; + [parameters addObject:parameter]; + [tokens addObject:parameter]; + + } else { + // Allows for http:// to get by without creating a parameter. + [tokens addObject:@":"]; + } + } + } + + // This is an outbound pattern. + if ([parameters count] > 0) { + BOOL lastWasParameter = NO; + for (id token in tokens) { + if ([token isKindOfClass:[SOCParameter class]]) { + NSAssert(!lastWasParameter, @"Parameters must be separated by non-parameter characters."); + lastWasParameter = YES; + + } else { + lastWasParameter = NO; + } + } + } + + [_tokens release]; + _tokens = [tokens copy]; + [_parameters release]; _parameters = nil; + if ([parameters count] > 0) { + _parameters = [parameters copy]; + } + [tokens release]; tokens = nil; + [parameters release]; parameters = nil; +} + + +/////////////////////////////////////////////////////////////////////////////////////////////////// +- (NSString *)_stringFromEscapedToken:(NSString *)token { + if ([token rangeOfString:@"\\"].length == 0 + && [token rangeOfString:kTemporaryBackslashToken].length == 0) { + // The common case (faster and creates fewer autoreleased strings). + return token; + + } else { + // Escaped characters may exist. + // Create a mutable copy so that we don't excessively create new autoreleased strings. + NSMutableString* mutableToken = [token mutableCopy]; + [mutableToken replaceOccurrencesOfString:@"\\." withString:@"." options:0 range:NSMakeRange(0, [mutableToken length])]; + [mutableToken replaceOccurrencesOfString:@"\\@" withString:@"@" options:0 range:NSMakeRange(0, [mutableToken length])]; + [mutableToken replaceOccurrencesOfString:@"\\:" withString:@":" options:0 range:NSMakeRange(0, [mutableToken length])]; + [mutableToken replaceOccurrencesOfString:kTemporaryBackslashToken withString:@"\\" options:0 range:NSMakeRange(0, [mutableToken length])]; + return [mutableToken autorelease]; + } +} + + +/////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////// +#pragma mark - Public Methods + + +/////////////////////////////////////////////////////////////////////////////////////////////////// +- (BOOL)gatherParameterValues:(NSArray**)pValues fromString:(NSString *)string { + const NSInteger stringLength = [string length]; + NSInteger validUpUntil = 0; + NSInteger matchingTokens = 0; + + NSMutableArray* values = nil; + if (nil != pValues) { + values = [NSMutableArray array]; + } + + NSInteger tokenIndex = 0; + for (id token in _tokens) { + + if ([token isKindOfClass:[NSString class]]) { + // Replace the escaped characters in the token before we start comparing the string. + token = [self _stringFromEscapedToken:token]; + + NSInteger tokenLength = [token length]; + if (validUpUntil + tokenLength > stringLength) { + // There aren't enough characters in the string to satisfy this token. + break; + } + if (![[string substringWithRange:NSMakeRange(validUpUntil, tokenLength)] + isEqualToString:token]) { + // The tokens don't match up. + break; + } + + // The string token matches. + validUpUntil += tokenLength; + ++matchingTokens; + + } else { + NSInteger parameterLocation = validUpUntil; + + // Look ahead for the next string token match. + if (tokenIndex + 1 < [_tokens count]) { + NSString* nextToken = [self _stringFromEscapedToken:[_tokens objectAtIndex:tokenIndex + 1]]; + NSAssert([nextToken isKindOfClass:[NSString class]], @"The token following a parameter must be a string."); + + NSRange nextTokenRange = [string rangeOfString:nextToken options:0 range:NSMakeRange(validUpUntil, stringLength - validUpUntil)]; + if (nextTokenRange.length == 0) { + // Couldn't find the next token. + break; + } + if (nextTokenRange.location == validUpUntil) { + // This parameter is empty. + break; + } + + validUpUntil = nextTokenRange.location; + ++matchingTokens; + + } else { + // Anything goes until the end of the string then. + if (validUpUntil == stringLength) { + // The last parameter is empty. + break; + } + + validUpUntil = stringLength; + ++matchingTokens; + } + + NSRange parameterRange = NSMakeRange(parameterLocation, validUpUntil - parameterLocation); + [values addObject:[string substringWithRange:parameterRange]]; + } + + ++tokenIndex; + } + + if (nil != pValues) { + *pValues = [[values copy] autorelease]; + } + + return validUpUntil == stringLength && matchingTokens == [_tokens count]; +} + + +/////////////////////////////////////////////////////////////////////////////////////////////////// +- (BOOL)stringMatches:(NSString *)string { + return [self gatherParameterValues:nil fromString:string]; +} + + +/////////////////////////////////////////////////////////////////////////////////////////////////// +- (void)setArgument:(NSString*)text withType:(SOCArgumentType)type atIndex:(NSInteger)index forInvocation:(NSInvocation*)invocation { + // There are two implicit arguments with an invocation. + index+=2; + + switch (type) { + case SOCArgumentTypeNone: { + break; + } + case SOCArgumentTypeInteger: { + int val = [text intValue]; + [invocation setArgument:&val atIndex:index]; + break; + } + case SOCArgumentTypeLongLong: { + long long val = [text longLongValue]; + [invocation setArgument:&val atIndex:index]; + break; + } + case SOCArgumentTypeFloat: { + float val = [text floatValue]; + [invocation setArgument:&val atIndex:index]; + break; + } + case SOCArgumentTypeDouble: { + double val = [text doubleValue]; + [invocation setArgument:&val atIndex:index]; + break; + } + case SOCArgumentTypeBool: { + BOOL val = [text boolValue]; + [invocation setArgument:&val atIndex:index]; + break; + } + default: { + [invocation setArgument:&text atIndex:index]; + break; + } + } +} + + +/////////////////////////////////////////////////////////////////////////////////////////////////// +- (void)setArgumentsFromValues:(NSArray *)values forInvocation:(NSInvocation *)invocation { + Method method = class_getInstanceMethod([invocation.target class], invocation.selector); + NSAssert(nil != method, @"The method must exist with the given invocation target."); + + for (NSInteger ix = 0; ix < [values count]; ++ix) { + NSString* value = [values objectAtIndex:ix]; + + char argType[4]; + method_getArgumentType(method, (unsigned int) ix + 2, argType, sizeof(argType) / sizeof(argType[0])); + SOCArgumentType type = SOCArgumentTypeForTypeAsChar(argType[0]); + + [self setArgument:value withType:type atIndex:ix forInvocation:invocation]; + } +} + + +/////////////////////////////////////////////////////////////////////////////////////////////////// +- (id)performSelector:(SEL)selector onObject:(id)object sourceString:(NSString *)sourceString { + BOOL isInitializer = [NSStringFromSelector(selector) hasPrefix:@"init"] && [object class] == object; + + if (isInitializer) { + object = [[object alloc] autorelease]; + } + + NSArray* values = nil; + BOOL succeeded = [self gatherParameterValues:&values fromString:sourceString]; + NSAssert(succeeded, @"The pattern can't be used with this string."); + + id returnValue = nil; + + if (succeeded) { + NSMethodSignature* sig = [object methodSignatureForSelector:selector]; + NSAssert(nil != sig, @"%@ does not respond to selector: '%@'", object, NSStringFromSelector(selector)); + NSInvocation* invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setTarget:object]; + [invocation setSelector:selector]; + [self setArgumentsFromValues:values forInvocation:invocation]; + [invocation invoke]; + + if (sig.methodReturnLength) { + [invocation getReturnValue:&returnValue]; + } + } + + return returnValue; +} + + +/////////////////////////////////////////////////////////////////////////////////////////////////// +- (NSDictionary *)parameterDictionaryFromSourceString:(NSString *)sourceString { + NSMutableDictionary* kvs = [[NSMutableDictionary alloc] initWithCapacity:[_parameters count]]; + + NSArray* values = nil; + BOOL succeeded = [self gatherParameterValues:&values fromString:sourceString]; + NSAssert(succeeded, @"The pattern can't be used with this string."); + + NSDictionary* result = nil; + + if (succeeded) { + for (NSInteger ix = 0; ix < [values count]; ++ix) { + SOCParameter* parameter = [_parameters objectAtIndex:ix]; + id value = [values objectAtIndex:ix]; + [kvs setObject:value forKey:parameter.string]; + } + + result = [[kvs copy] autorelease]; + [kvs release]; kvs = nil; + } + + return result; +} + + +/////////////////////////////////////////////////////////////////////////////////////////////////// +- (NSString *)_stringWithParameterValues:(NSDictionary *)parameterValues { + NSMutableString* accumulator = [[NSMutableString alloc] initWithCapacity:[_patternString length]]; + + for (id token in _tokens) { + if ([token isKindOfClass:[NSString class]]) { + [accumulator appendString:[self _stringFromEscapedToken:token]]; + + } else { + SOCParameter* parameter = token; + [accumulator appendString:[parameterValues objectForKey:parameter.string]]; + } + } + + NSString* result = nil; + result = [[accumulator copy] autorelease]; + [accumulator release]; accumulator = nil; + return result; +} + + +/////////////////////////////////////////////////////////////////////////////////////////////////// +- (NSString *)stringFromObject:(id)object { + if ([_tokens count] == 0) { + return @""; + } + NSMutableDictionary* parameterValues = + [NSMutableDictionary dictionaryWithCapacity:[_parameters count]]; + for (SOCParameter* parameter in _parameters) { + NSString* stringValue = [NSString stringWithFormat:@"%@", [object valueForKeyPath:parameter.string]]; + [parameterValues setObject:stringValue forKey:parameter.string]; + } + return [self _stringWithParameterValues:parameterValues]; +} + + +/////////////////////////////////////////////////////////////////////////////////////////////////// +#if NS_BLOCKS_AVAILABLE +- (NSString *)stringFromObject:(id)object withBlock:(NSString *(^)(NSString*))block { + if ([_tokens count] == 0) { + return @""; + } + NSMutableDictionary* parameterValues = [NSMutableDictionary dictionaryWithCapacity:[_parameters count]]; + for (SOCParameter* parameter in _parameters) { + NSString* stringValue = [NSString stringWithFormat:@"%@", [object valueForKeyPath:parameter.string]]; + if (nil != block) { + stringValue = block(stringValue); + } + if (nil != stringValue) { + [parameterValues setObject:stringValue forKey:parameter.string]; + } + } + return [self _stringWithParameterValues:parameterValues]; +} +#endif + +@end + +/////////////////////////////////////////////////////////////////////////////////////////////////// +@implementation SOCParameter + +- (void)dealloc { + [_string release]; _string = nil; + [super dealloc]; +} + +- (id)initWithString:(NSString *)string { + if ((self = [super init])) { + _string = [string copy]; + } + return self; +} + ++ (id)parameterWithString:(NSString *)string { + return [[[self alloc] initWithString:string] autorelease]; +} + +- (NSString *)description { + return [NSString stringWithFormat:@"Parameter: %@", _string]; +} + +- (NSString *)string { + return [[_string retain] autorelease]; +} + +@end + +/////////////////////////////////////////////////////////////////////////////////////////////////// +SOCArgumentType SOCArgumentTypeForTypeAsChar(char argType) { + if (argType == 'c' || argType == 'i' || argType == 's' || argType == 'l' || argType == 'C' + || argType == 'I' || argType == 'S' || argType == 'L') { + return SOCArgumentTypeInteger; + + } else if (argType == 'q' || argType == 'Q') { + return SOCArgumentTypeLongLong; + + } else if (argType == 'f') { + return SOCArgumentTypeFloat; + + } else if (argType == 'd') { + return SOCArgumentTypeDouble; + + } else if (argType == 'B') { + return SOCArgumentTypeBool; + + } else { + return SOCArgumentTypePointer; + } +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +NSString* SOCStringFromStringWithObject(NSString* string, id object) { + SOCPattern* pattern = [[SOCPattern alloc] initWithString:string]; + NSString* result = [pattern stringFromObject:object]; + [pattern release]; + return result; +} diff --git a/Pods/SOCKit/SOCKit.podspec b/Pods/SOCKit/SOCKit.podspec new file mode 100644 index 00000000..68e4ece0 --- /dev/null +++ b/Pods/SOCKit/SOCKit.podspec @@ -0,0 +1,16 @@ +Pod::Spec.new do |s| + s.name = "SOCKit" + s.version = "1.0" + s.summary = "String <-> Object Coder for Objective-C." + s.homepage = "http://github.com/jverkoey/SOCKit" + s.author = { "Jeff Verkoeyen" => "jverkoey@gmail.com" } + s.source = { :git => "https://github.com/jverkoey/sockit.git", :tag => "1.0" } + + # TODO uncomment when CocoaPods 0.6 is released + # s.license = { :type => 'Apache License Version 2.0', :file => 'LICENSE' } + + s.description = 'With SOCKit and SOCPattern you can easily transform objects into strings and vice versa.' + + s.source_files = '*.{h,m}' + s.clean_paths = "tests", "SOCKit.xcodeproj" +end diff --git a/candpiosapp.xcodeproj/project.pbxproj b/candpiosapp.xcodeproj/project.pbxproj index 52f7b74a..5ca3bb07 100644 --- a/candpiosapp.xcodeproj/project.pbxproj +++ b/candpiosapp.xcodeproj/project.pbxproj @@ -212,6 +212,7 @@ 538EF4351585352E00249AAF /* InviteLinkedInConnectionsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 538EF4321585352E00249AAF /* InviteLinkedInConnectionsTableViewController.m */; }; 538EF4381585354100249AAF /* LinkedInConnectionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 538EF4371585354100249AAF /* LinkedInConnectionCell.m */; }; 5396E0D814E466C200E33E0E /* LeagueGothic.otf in Resources */ = {isa = PBXBuildFile; fileRef = 5396E0D714E466C200E33E0E /* LeagueGothic.otf */; }; + 539F2E4A1638A22C000CF49D /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3267F67514D91A1900BFFBAA /* SystemConfiguration.framework */; }; 53A1EA971587B418009D8E31 /* thin-nav-bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 53A1EA951587B418009D8E31 /* thin-nav-bg.png */; }; 53A1EA981587B418009D8E31 /* thin-nav-bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 53A1EA961587B418009D8E31 /* thin-nav-bg@2x.png */; }; 53A1EAA11587B496009D8E31 /* tab-contacts.png in Resources */ = {isa = PBXBuildFile; fileRef = 53A1EA991587B496009D8E31 /* tab-contacts.png */; }; @@ -314,15 +315,6 @@ 53D6A63515B0BB50001A76DE /* action-menu-button-plus@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 53D6A62715B0BB50001A76DE /* action-menu-button-plus@2x.png */; }; 53D6A63D15B0CD3A001A76DE /* action-menu-button-base.png in Resources */ = {isa = PBXBuildFile; fileRef = 53D6A63B15B0CD3A001A76DE /* action-menu-button-base.png */; }; 53D6A63E15B0CD3A001A76DE /* action-menu-button-base@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 53D6A63C15B0CD3A001A76DE /* action-menu-button-base@2x.png */; }; - 53D78C10160B8DE300148EA3 /* AFHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D78BCB160B8DE300148EA3 /* AFHTTPClient.m */; }; - 53D78C11160B8DE300148EA3 /* AFHTTPRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D78BCD160B8DE300148EA3 /* AFHTTPRequestOperation.m */; }; - 53D78C12160B8DE300148EA3 /* AFImageRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D78BCF160B8DE300148EA3 /* AFImageRequestOperation.m */; }; - 53D78C13160B8DE300148EA3 /* AFJSONRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D78BD1160B8DE300148EA3 /* AFJSONRequestOperation.m */; }; - 53D78C14160B8DE300148EA3 /* AFNetworkActivityIndicatorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D78BD3160B8DE300148EA3 /* AFNetworkActivityIndicatorManager.m */; }; - 53D78C15160B8DE300148EA3 /* AFPropertyListRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D78BD6160B8DE300148EA3 /* AFPropertyListRequestOperation.m */; }; - 53D78C16160B8DE300148EA3 /* AFURLConnectionOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D78BD8160B8DE300148EA3 /* AFURLConnectionOperation.m */; }; - 53D78C17160B8DE300148EA3 /* AFXMLRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D78BDA160B8DE300148EA3 /* AFXMLRequestOperation.m */; }; - 53D78C18160B8DE300148EA3 /* UIImageView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D78BDC160B8DE300148EA3 /* UIImageView+AFNetworking.m */; }; 53D78C50160B904000148EA3 /* CustomBadge.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D78C3E160B904000148EA3 /* CustomBadge.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 53D78C65160B99D800148EA3 /* GTMNSString+HTML.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D78C64160B99D800148EA3 /* GTMNSString+HTML.m */; }; 53D7ADEE15D04AC800BB041E /* CPGeofenceHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D7ADED15D04AC800BB041E /* CPGeofenceHandler.m */; }; @@ -398,6 +390,7 @@ 871EFB1B14AE9C820030658B /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 871EFB1A14AE9C820030658B /* AppDelegate.m */; }; 871EFB5F14AEB4950030658B /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 871EFB5E14AEB4950030658B /* MapKit.framework */; }; 8726C6C414B00245004E4872 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8726C6C314B00245004E4872 /* CoreLocation.framework */; }; + 8E849599CB28489CB0A55E5F /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E061CFAA8C943A4B87BC76E /* libPods.a */; }; E41080711539AB2200D7EAA8 /* JobCategoryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E41080701539AB2200D7EAA8 /* JobCategoryViewController.m */; }; E410F9DC159DF0A500D32F86 /* ProfileViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E410F9DB159DF0A500D32F86 /* ProfileViewController.m */; }; E41AD9CC15A25D9500B6E360 /* UIImage+ImageBlur.m in Sources */ = {isa = PBXBuildFile; fileRef = E41AD9CB15A25D9500B6E360 /* UIImage+ImageBlur.m */; }; @@ -422,19 +415,20 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 0E061CFAA8C943A4B87BC76E /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 3267F66D14D919A700BFFBAA /* AirshipConfig.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = AirshipConfig.plist; sourceTree = "<group>"; }; 3267F66F14D919FE00BFFBAA /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; - 3267F67114D91A0B00BFFBAA /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; + 3267F67114D91A0B00BFFBAA /* MobileCoreServices.framework */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; 3267F67314D91A1300BFFBAA /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; 3267F67514D91A1900BFFBAA /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; - 3267F67714D91A2600BFFBAA /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; - 3267F67914D91A2E00BFFBAA /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; - 3267F67B14D91A3600BFFBAA /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; + 3267F67714D91A2600BFFBAA /* libz.dylib */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; + 3267F67914D91A2E00BFFBAA /* libsqlite3.dylib */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; + 3267F67B14D91A3600BFFBAA /* CoreTelephony.framework */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; 328452BD155A0EE800CF32F5 /* AutoCheckinTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AutoCheckinTableViewController.h; path = Settings/AutoCheckinTableViewController.h; sourceTree = "<group>"; }; 328452BE155A0EE800CF32F5 /* AutoCheckinTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; name = AutoCheckinTableViewController.m; path = Settings/AutoCheckinTableViewController.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 328452C1155A17CA00CF32F5 /* AutoCheckinCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = AutoCheckinCell.h; path = Settings/AutoCheckinCell.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 328452C2155A17CA00CF32F5 /* AutoCheckinCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AutoCheckinCell.m; path = Settings/AutoCheckinCell.m; sourceTree = "<group>"; }; - 32CE875114D27FFF002D391B /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + 32CE875114D27FFF002D391B /* QuartzCore.framework */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 32D1E99515701993009B45BD /* checkbox-checked.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-checked.png"; sourceTree = "<group>"; }; 32D1E99615701993009B45BD /* checkbox-checked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-checked@2x.png"; sourceTree = "<group>"; }; 32D1E99715701993009B45BD /* checkbox-unchecked.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-unchecked.png"; sourceTree = "<group>"; }; @@ -540,7 +534,7 @@ 530BA94B160BBEB1007DF806 /* UASubscriptionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UASubscriptionManager.h; sourceTree = "<group>"; }; 530BA94C160BBEB1007DF806 /* UASubscriptionObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UASubscriptionObserver.h; sourceTree = "<group>"; }; 530BA94D160BBEB1007DF806 /* UASubscriptionProduct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UASubscriptionProduct.h; sourceTree = "<group>"; }; - 530BA94F160BBEB1007DF806 /* libUAirshipPush-1.3.3.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libUAirshipPush-1.3.3.a"; sourceTree = "<group>"; }; + 530BA94F160BBEB1007DF806 /* libUAirshipPush-1.3.3.a */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = archive.ar; path = "libUAirshipPush-1.3.3.a"; sourceTree = "<group>"; }; 530BAAB6160BC097007DF806 /* UIImage+Alpha.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+Alpha.h"; sourceTree = "<group>"; }; 530BAAB7160BC097007DF806 /* UIImage+Alpha.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+Alpha.m"; sourceTree = "<group>"; }; 530BAAB8160BC097007DF806 /* UIImage+Resize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+Resize.h"; sourceTree = "<group>"; }; @@ -557,7 +551,7 @@ 530BAACD160BC143007DF806 /* ActionSheetStringPicker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ActionSheetStringPicker.m; sourceTree = "<group>"; }; 530BAACE160BC143007DF806 /* DistancePickerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DistancePickerView.h; sourceTree = "<group>"; }; 530BAACF160BC143007DF806 /* DistancePickerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DistancePickerView.m; sourceTree = "<group>"; }; - 530BAAFE160BC244007DF806 /* libTestFlight.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libTestFlight.a; sourceTree = "<group>"; }; + 530BAAFE160BC244007DF806 /* libTestFlight.a */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = archive.ar; path = libTestFlight.a; sourceTree = "<group>"; }; 530BAB01160BC244007DF806 /* TestFlight.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestFlight.h; sourceTree = "<group>"; }; 530BAD6F160BCA80007DF806 /* GRMustache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustache.h; sourceTree = "<group>"; }; 530BAD70160BCA80007DF806 /* GRMustacheAvailabilityMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheAvailabilityMacros.h; sourceTree = "<group>"; }; @@ -570,9 +564,9 @@ 530BAD77160BCA80007DF806 /* GRMustacheTemplateDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheTemplateDelegate.h; sourceTree = "<group>"; }; 530BAD78160BCA80007DF806 /* GRMustacheTemplateRepository.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheTemplateRepository.h; sourceTree = "<group>"; }; 530BAD79160BCA80007DF806 /* GRMustacheVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheVersion.h; sourceTree = "<group>"; }; - 530BAD7B160BCA80007DF806 /* libGRMustache5-iOS.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libGRMustache5-iOS.a"; sourceTree = "<group>"; }; + 530BAD7B160BCA80007DF806 /* libGRMustache5-iOS.a */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = archive.ar; path = "libGRMustache5-iOS.a"; sourceTree = "<group>"; }; 530BAF29160BCB2A007DF806 /* FlurryAnalytics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FlurryAnalytics.h; sourceTree = "<group>"; }; - 530BAF2A160BCB2A007DF806 /* libFlurryAnalytics.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libFlurryAnalytics.a; sourceTree = "<group>"; }; + 530BAF2A160BCB2A007DF806 /* libFlurryAnalytics.a */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = archive.ar; path = libFlurryAnalytics.a; sourceTree = "<group>"; }; 530C5DB51575E4FC003505AC /* CPSoundEffectsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CPSoundEffectsManager.h; sourceTree = "<group>"; }; 530C5DB61575E4FC003505AC /* CPSoundEffectsManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CPSoundEffectsManager.m; sourceTree = "<group>"; }; 530C5DB91575E516003505AC /* send-love-switch-sound-off.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = "send-love-switch-sound-off.wav"; sourceTree = "<group>"; }; @@ -822,7 +816,7 @@ 53B6C4D815211D3C002934B8 /* texture-first-aid-kit@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "texture-first-aid-kit@2x.png"; path = "Utils/images/textures/texture-first-aid-kit@2x.png"; sourceTree = "<group>"; }; 53BA0A1E150A9BF2006F5B98 /* map-locate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "map-locate.png"; path = "Map/images/map-locate.png"; sourceTree = "<group>"; }; 53BA0A1F150A9BF2006F5B98 /* map-locate@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "map-locate@2x.png"; path = "Map/images/map-locate@2x.png"; sourceTree = "<group>"; }; - 53BBBFAA1612B25700F5C14B /* libUserVoice.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libUserVoice.a; sourceTree = "<group>"; }; + 53BBBFAA1612B25700F5C14B /* libUserVoice.a */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = archive.ar; path = libUserVoice.a; sourceTree = "<group>"; }; 53BBBFAD1612B25700F5C14B /* UserVoice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserVoice.h; sourceTree = "<group>"; }; 53BBBFAE1612B25700F5C14B /* UVConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UVConfig.h; sourceTree = "<group>"; }; 53BBBFAF1612B25700F5C14B /* UVDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UVDelegate.h; sourceTree = "<group>"; }; @@ -922,25 +916,6 @@ 53D6A62715B0BB50001A76DE /* action-menu-button-plus@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "action-menu-button-plus@2x.png"; sourceTree = "<group>"; }; 53D6A63B15B0CD3A001A76DE /* action-menu-button-base.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "action-menu-button-base.png"; sourceTree = "<group>"; }; 53D6A63C15B0CD3A001A76DE /* action-menu-button-base@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "action-menu-button-base@2x.png"; sourceTree = "<group>"; }; - 53D78BCA160B8DE300148EA3 /* AFHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPClient.h; sourceTree = "<group>"; }; - 53D78BCB160B8DE300148EA3 /* AFHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPClient.m; sourceTree = "<group>"; }; - 53D78BCC160B8DE300148EA3 /* AFHTTPRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPRequestOperation.h; sourceTree = "<group>"; }; - 53D78BCD160B8DE300148EA3 /* AFHTTPRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPRequestOperation.m; sourceTree = "<group>"; }; - 53D78BCE160B8DE300148EA3 /* AFImageRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFImageRequestOperation.h; sourceTree = "<group>"; }; - 53D78BCF160B8DE300148EA3 /* AFImageRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFImageRequestOperation.m; sourceTree = "<group>"; }; - 53D78BD0160B8DE300148EA3 /* AFJSONRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFJSONRequestOperation.h; sourceTree = "<group>"; }; - 53D78BD1160B8DE300148EA3 /* AFJSONRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFJSONRequestOperation.m; sourceTree = "<group>"; }; - 53D78BD2160B8DE300148EA3 /* AFNetworkActivityIndicatorManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworkActivityIndicatorManager.h; sourceTree = "<group>"; }; - 53D78BD3160B8DE300148EA3 /* AFNetworkActivityIndicatorManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFNetworkActivityIndicatorManager.m; sourceTree = "<group>"; }; - 53D78BD4160B8DE300148EA3 /* AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworking.h; sourceTree = "<group>"; }; - 53D78BD5160B8DE300148EA3 /* AFPropertyListRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFPropertyListRequestOperation.h; sourceTree = "<group>"; }; - 53D78BD6160B8DE300148EA3 /* AFPropertyListRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFPropertyListRequestOperation.m; sourceTree = "<group>"; }; - 53D78BD7160B8DE300148EA3 /* AFURLConnectionOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFURLConnectionOperation.h; sourceTree = "<group>"; }; - 53D78BD8160B8DE300148EA3 /* AFURLConnectionOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFURLConnectionOperation.m; sourceTree = "<group>"; }; - 53D78BD9160B8DE300148EA3 /* AFXMLRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFXMLRequestOperation.h; sourceTree = "<group>"; }; - 53D78BDA160B8DE300148EA3 /* AFXMLRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFXMLRequestOperation.m; sourceTree = "<group>"; }; - 53D78BDB160B8DE300148EA3 /* UIImageView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+AFNetworking.h"; sourceTree = "<group>"; }; - 53D78BDC160B8DE300148EA3 /* UIImageView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+AFNetworking.m"; sourceTree = "<group>"; }; 53D78C3D160B904000148EA3 /* CustomBadge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomBadge.h; sourceTree = "<group>"; }; 53D78C3E160B904000148EA3 /* CustomBadge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomBadge.m; sourceTree = "<group>"; }; 53D78C63160B99D800148EA3 /* GTMNSString+HTML.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTMNSString+HTML.h"; sourceTree = "<group>"; }; @@ -960,9 +935,10 @@ 53FEA20B162F52D600A783DC /* action-menu-button-check-out@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "action-menu-button-check-out@2x.png"; sourceTree = "<group>"; }; 53FEA20E162F52D600A783DC /* action-menu-button-update.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "action-menu-button-update.png"; sourceTree = "<group>"; }; 53FEA20F162F52D600A783DC /* action-menu-button-update@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "action-menu-button-update@2x.png"; sourceTree = "<group>"; }; - 53FF95EC156D5D0E0046ADDE /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; }; + 53FF95EC156D5D0E0046ADDE /* StoreKit.framework */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; }; 5F7D21D7155AF1A200EAA540 /* UserProfileLinkedInViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UserProfileLinkedInViewController.h; path = User/UserProfileLinkedInViewController.h; sourceTree = "<group>"; }; 5F7D21D8155AF1A200EAA540 /* UserProfileLinkedInViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UserProfileLinkedInViewController.m; path = User/UserProfileLinkedInViewController.m; sourceTree = "<group>"; }; + 5F94CB9511754232A112BDF9 /* Pods.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.xcconfig; path = Pods/Pods.xcconfig; sourceTree = SOURCE_ROOT; }; 5FAF891D1555FA6600247B95 /* virtual-check-in-badge.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "virtual-check-in-badge.png"; sourceTree = "<group>"; }; 5FAF891E1555FA6600247B95 /* virtual-check-in-badge@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "virtual-check-in-badge@2x.png"; sourceTree = "<group>"; }; 68B7B124161626BA000987E2 /* NSDictionary+JsonParserWorkaround.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+JsonParserWorkaround.h"; path = "Utils/NSDictionary+JsonParserWorkaround.h"; sourceTree = "<group>"; }; @@ -1028,9 +1004,9 @@ 6FF5891D14FEE7E300EFDB56 /* ChatMessageCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChatMessageCell.h; path = candpiosapp/Chat/ChatMessageCell.h; sourceTree = SOURCE_ROOT; }; 6FF5891E14FEE7E300EFDB56 /* ChatMessageCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ChatMessageCell.m; path = candpiosapp/Chat/ChatMessageCell.m; sourceTree = SOURCE_ROOT; }; 871EFB0614AE9C820030658B /* coffeeandpower.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = coffeeandpower.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 871EFB0A14AE9C820030658B /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 871EFB0C14AE9C820030658B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 871EFB0E14AE9C820030658B /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 871EFB0A14AE9C820030658B /* UIKit.framework */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 871EFB0C14AE9C820030658B /* Foundation.framework */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 871EFB0E14AE9C820030658B /* CoreGraphics.framework */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 871EFB1214AE9C820030658B /* candpiosapp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "candpiosapp-Info.plist"; sourceTree = "<group>"; }; 871EFB1414AE9C820030658B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; }; 871EFB1614AE9C820030658B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; @@ -1038,8 +1014,8 @@ 871EFB1914AE9C820030658B /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; 871EFB1A14AE9C820030658B /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; }; 871EFB3614AE9C820030658B /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; }; - 871EFB5E14AEB4950030658B /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; - 8726C6C314B00245004E4872 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; + 871EFB5E14AEB4950030658B /* MapKit.framework */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; + 8726C6C314B00245004E4872 /* CoreLocation.framework */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; E410806F1539AB2200D7EAA8 /* JobCategoryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JobCategoryViewController.h; path = Settings/JobCategoryViewController.h; sourceTree = "<group>"; }; E41080701539AB2200D7EAA8 /* JobCategoryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JobCategoryViewController.m; path = Settings/JobCategoryViewController.m; sourceTree = "<group>"; }; E410F9DA159DF0A500D32F86 /* ProfileViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProfileViewController.h; path = Settings/ProfileViewController.h; sourceTree = "<group>"; }; @@ -1050,7 +1026,7 @@ E43CFC31153756C300A3A716 /* person-login-to-view@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "person-login-to-view@2x.png"; path = "User/images/person-login-to-view@2x.png"; sourceTree = "<group>"; }; E46B561E15A8D8A900AD3C62 /* divider-button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "divider-button.png"; path = "Utils/images/buttons/divider-button.png"; sourceTree = "<group>"; }; E46B561F15A8D8AA00AD3C62 /* divider-button@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "divider-button@2x.png"; path = "Utils/images/buttons/divider-button@2x.png"; sourceTree = "<group>"; }; - E46BA2C0161CD89500CA0440 /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; }; + E46BA2C0161CD89500CA0440 /* CoreText.framework */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; }; E47C832915115D0600ECE98D /* drop-down.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "drop-down.png"; path = "Settings/images/drop-down.png"; sourceTree = "<group>"; }; E47C832A15115D0600ECE98D /* drop-down@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "drop-down@2x.png"; path = "Settings/images/drop-down@2x.png"; sourceTree = "<group>"; }; E48C32B4151A7C3600A98427 /* VenueCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VenueCell.h; path = Venue/VenueCell.h; sourceTree = "<group>"; }; @@ -1063,7 +1039,7 @@ E496771B15A8252500917A1F /* back-button@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "back-button@2x.png"; path = "Utils/images/buttons/back-button@2x.png"; sourceTree = "<group>"; }; E496771C15A8252500917A1F /* header-button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "header-button.png"; path = "Utils/images/buttons/header-button.png"; sourceTree = "<group>"; }; E496771D15A8252500917A1F /* header-button@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "header-button@2x.png"; path = "Utils/images/buttons/header-button@2x.png"; sourceTree = "<group>"; }; - E4C35C4014F1323A009B6DBF /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + E4C35C4014F1323A009B6DBF /* AudioToolbox.framework */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; E4DFEB4C1554915100AE90F0 /* ProfileNotificationsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProfileNotificationsViewController.h; path = Settings/ProfileNotificationsViewController.h; sourceTree = "<group>"; }; E4DFEB4D1554915100AE90F0 /* ProfileNotificationsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ProfileNotificationsViewController.m; path = Settings/ProfileNotificationsViewController.m; sourceTree = "<group>"; }; E4E74E07153B08710022F404 /* CPTouchableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CPTouchableView.m; sourceTree = "<group>"; }; @@ -1075,6 +1051,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 539F2E4A1638A22C000CF49D /* SystemConfiguration.framework in Frameworks */, 3267F67214D91A0B00BFFBAA /* MobileCoreServices.framework in Frameworks */, E46BA2C1161CD89500CA0440 /* CoreText.framework in Frameworks */, 53FF95ED156D5D0E0046ADDE /* StoreKit.framework in Frameworks */, @@ -1093,6 +1070,7 @@ 530BAE86160BCA80007DF806 /* libGRMustache5-iOS.a in Frameworks */, 530BAF2B160BCB2A007DF806 /* libFlurryAnalytics.a in Frameworks */, 53BBBFD81612B25700F5C14B /* libUserVoice.a in Frameworks */, + 8E849599CB28489CB0A55E5F /* libPods.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2111,7 +2089,6 @@ isa = PBXGroup; children = ( 530BAAC0160BC143007DF806 /* ActionSheetPicker */, - 53D78BC8160B8DE300148EA3 /* AFNetworking */, 530BA8EE160BBEB1007DF806 /* Airship */, 53D78C3B160B904000148EA3 /* CustomBadge */, 530BAF28160BCB2A007DF806 /* FlurryAnalytics */, @@ -2129,40 +2106,6 @@ path = Externals; sourceTree = "<group>"; }; - 53D78BC8160B8DE300148EA3 /* AFNetworking */ = { - isa = PBXGroup; - children = ( - 53D78BC9160B8DE300148EA3 /* AFNetworking */, - ); - path = AFNetworking; - sourceTree = "<group>"; - }; - 53D78BC9160B8DE300148EA3 /* AFNetworking */ = { - isa = PBXGroup; - children = ( - 53D78BCA160B8DE300148EA3 /* AFHTTPClient.h */, - 53D78BCB160B8DE300148EA3 /* AFHTTPClient.m */, - 53D78BCC160B8DE300148EA3 /* AFHTTPRequestOperation.h */, - 53D78BCD160B8DE300148EA3 /* AFHTTPRequestOperation.m */, - 53D78BCE160B8DE300148EA3 /* AFImageRequestOperation.h */, - 53D78BCF160B8DE300148EA3 /* AFImageRequestOperation.m */, - 53D78BD0160B8DE300148EA3 /* AFJSONRequestOperation.h */, - 53D78BD1160B8DE300148EA3 /* AFJSONRequestOperation.m */, - 53D78BD2160B8DE300148EA3 /* AFNetworkActivityIndicatorManager.h */, - 53D78BD3160B8DE300148EA3 /* AFNetworkActivityIndicatorManager.m */, - 53D78BD4160B8DE300148EA3 /* AFNetworking.h */, - 53D78BD5160B8DE300148EA3 /* AFPropertyListRequestOperation.h */, - 53D78BD6160B8DE300148EA3 /* AFPropertyListRequestOperation.m */, - 53D78BD7160B8DE300148EA3 /* AFURLConnectionOperation.h */, - 53D78BD8160B8DE300148EA3 /* AFURLConnectionOperation.m */, - 53D78BD9160B8DE300148EA3 /* AFXMLRequestOperation.h */, - 53D78BDA160B8DE300148EA3 /* AFXMLRequestOperation.m */, - 53D78BDB160B8DE300148EA3 /* UIImageView+AFNetworking.h */, - 53D78BDC160B8DE300148EA3 /* UIImageView+AFNetworking.m */, - ); - path = AFNetworking; - sourceTree = "<group>"; - }; 53D78C3B160B904000148EA3 /* CustomBadge */ = { isa = PBXGroup; children = ( @@ -2281,6 +2224,7 @@ 871EFB1014AE9C820030658B /* candpiosapp */, 871EFB0914AE9C820030658B /* Frameworks */, 871EFB0714AE9C820030658B /* Products */, + 5F94CB9511754232A112BDF9 /* Pods.xcconfig */, ); sourceTree = "<group>"; }; @@ -2314,6 +2258,7 @@ 53FF95EC156D5D0E0046ADDE /* StoreKit.framework */, 3267F67514D91A1900BFFBAA /* SystemConfiguration.framework */, 871EFB0A14AE9C820030658B /* UIKit.framework */, + 0E061CFAA8C943A4B87BC76E /* libPods.a */, ); name = Frameworks; sourceTree = "<group>"; @@ -2411,6 +2356,7 @@ 871EFB0214AE9C820030658B /* Sources */, 871EFB0314AE9C820030658B /* Frameworks */, 871EFB0414AE9C820030658B /* Resources */, + 95C2A95A1B8C42CEBEBC3CA5 /* Copy Pods Resources */, ); buildRules = ( ); @@ -2732,6 +2678,23 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 95C2A95A1B8C42CEBEBC3CA5 /* Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Pods-resources.sh\"\n"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 871EFB0214AE9C820030658B /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -2812,15 +2775,6 @@ 530FC24815D4389D00838B5A /* SignupController.m in Sources */, 4EF559C915E8533200DAE3BA /* VenueCategoryCell.m in Sources */, 5338B0A11606C82200C23B4B /* VenueUserCell.m in Sources */, - 53D78C10160B8DE300148EA3 /* AFHTTPClient.m in Sources */, - 53D78C11160B8DE300148EA3 /* AFHTTPRequestOperation.m in Sources */, - 53D78C12160B8DE300148EA3 /* AFImageRequestOperation.m in Sources */, - 53D78C13160B8DE300148EA3 /* AFJSONRequestOperation.m in Sources */, - 53D78C14160B8DE300148EA3 /* AFNetworkActivityIndicatorManager.m in Sources */, - 53D78C15160B8DE300148EA3 /* AFPropertyListRequestOperation.m in Sources */, - 53D78C16160B8DE300148EA3 /* AFURLConnectionOperation.m in Sources */, - 53D78C17160B8DE300148EA3 /* AFXMLRequestOperation.m in Sources */, - 53D78C18160B8DE300148EA3 /* UIImageView+AFNetworking.m in Sources */, 53D78C50160B904000148EA3 /* CustomBadge.m in Sources */, 53D78C65160B99D800148EA3 /* GTMNSString+HTML.m in Sources */, 5335D821160BA801005400FC /* MKAnnotationView+SpecialPin.m in Sources */, @@ -2956,8 +2910,9 @@ }; 871EFB4814AE9C820030658B /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 5F94CB9511754232A112BDF9 /* Pods.xcconfig */; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = YES; + ALWAYS_SEARCH_USER_PATHS = "$(inherited)"; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; FRAMEWORK_SEARCH_PATHS = ( @@ -2967,7 +2922,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "candpiosapp/candpiosapp-Prefix.pch"; GCC_THUMB_SUPPORT = NO; - HEADER_SEARCH_PATHS = ""; + HEADER_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = "candpiosapp/candpiosapp-Info.plist"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", @@ -2977,7 +2932,7 @@ "\"$(SRCROOT)/candpiosapp/Externals/GRMustache/lib\"", "\"$(SRCROOT)/candpiosapp/Externals/FlurryAnalytics\"", ); - OTHER_LDFLAGS = ""; + OTHER_LDFLAGS = "$(inherited)"; PRODUCT_NAME = "${TARGET_NAME}"; PROVISIONING_PROFILE = ""; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; @@ -2989,8 +2944,9 @@ }; 871EFB4914AE9C820030658B /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 5F94CB9511754232A112BDF9 /* Pods.xcconfig */; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = YES; + ALWAYS_SEARCH_USER_PATHS = "$(inherited)"; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; FRAMEWORK_SEARCH_PATHS = ( @@ -3000,7 +2956,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "candpiosapp/candpiosapp-Prefix.pch"; GCC_THUMB_SUPPORT = NO; - HEADER_SEARCH_PATHS = ""; + HEADER_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = "candpiosapp/candpiosapp-Info.plist"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", @@ -3010,7 +2966,7 @@ "\"$(SRCROOT)/candpiosapp/Externals/GRMustache/lib\"", "\"$(SRCROOT)/candpiosapp/Externals/FlurryAnalytics\"", ); - OTHER_LDFLAGS = ""; + OTHER_LDFLAGS = "$(inherited)"; PRODUCT_NAME = "${TARGET_NAME}"; PROVISIONING_PROFILE = ""; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; diff --git a/candpiosapp.xcworkspace/contents.xcworkspacedata b/candpiosapp.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..875a699b --- /dev/null +++ b/candpiosapp.xcworkspace/contents.xcworkspacedata @@ -0,0 +1 @@ +<?xml version='1.0' encoding='UTF-8'?><Workspace version='1.0'><FileRef location='group:Pods/Pods.xcodeproj'/><FileRef location='group:candpiosapp.xcodeproj'/></Workspace> \ No newline at end of file diff --git a/candpiosapp/Common/CPObjectMapper.m b/candpiosapp/Common/CPObjectMapper.m index 256e6175..9766dd85 100644 --- a/candpiosapp/Common/CPObjectMapper.m +++ b/candpiosapp/Common/CPObjectMapper.m @@ -7,6 +7,7 @@ // #import "CPObjectMapper.h" +#import <RestKit/RestKit.h> @implementation CPObjectMapper diff --git a/candpiosapp/Externals/AFNetworking/AFNetworking.podspec b/candpiosapp/Externals/AFNetworking/AFNetworking.podspec deleted file mode 100644 index 064ef405..00000000 --- a/candpiosapp/Externals/AFNetworking/AFNetworking.podspec +++ /dev/null @@ -1,13 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'AFNetworking' - s.version = '1.0' - s.license = 'MIT' - s.summary = 'A delightful iOS and OS X networking framework.' - s.homepage = 'https://github.com/AFNetworking/AFNetworking' - s.authors = {'Mattt Thompson' => 'm@mattt.me', 'Scott Raymond' => 'sco@gowalla.com'} - s.source = { :git => 'https://github.com/AFNetworking/AFNetworking.git', :tag => '1.0RC3' } - s.source_files = 'AFNetworking' - s.requires_arc = true - - s.framework = 'SystemConfiguration' -end diff --git a/candpiosapp/Externals/AFNetworking/CHANGES b/candpiosapp/Externals/AFNetworking/CHANGES deleted file mode 100644 index bc7f2a8f..00000000 --- a/candpiosapp/Externals/AFNetworking/CHANGES +++ /dev/null @@ -1,288 +0,0 @@ -= 1.0RC2 / 2012-06-26 - - * AFNetworking now requires iOS 5 / Mac OSX 10.7 or higher (Mattt Thompson) - - * AFNetworking now uses Automatic Reference Counting (ARC) (Mattt Thompson) - - * Revert implementation of `AFHTTPRequestOperation` - `+addAcceptableStatusCodes:` and `+addAcceptableContentTypes:` to use - `class_replaceMethod` with `imp_implementationWithBlock`. (Mattt Thompson) - - * Update `AFHTTPClient` to not handle cookies by default (@phamsonha, Mattt Thompson) - - * Update icons for iOS example application (Mattt Thompson) - -= 0.10.0 / 2012-06-26 - - * Add Twitter Mac Example application (Mattt Thompson) - - * Add note in README about how to set `-fno-objc-arc` flag for multiple files - at once (Pål Brattberg) - - * Add note in README about 64-bit architecture requirement (@rmuginov, Mattt - Thompson) - - * Add note in `AFNetworkActivityIndicatorManager` about not having to manually - manage animation state (Mattt Thompson) - - * Add missing block parameter name for `imageProcessingBlock` (Francois - Lambert) - - * Add NextiveJson to list of supported JSON libraries (Mattt Thompson) - - * Restore iOS 4.0 compatibility with `addAcceptableStatusCodes:` and - `addAcceptableContentTypes:` (Zachary Waldowski) - - * Update `AFHTTPClient` to use HTTP pipelining for `GET` and `HEAD` requests by - default (Mattt Thompson) - - * Remove @private ivar declaration in headers (Peter Steinberger, Mattt - Thompson) - - * Fix potential premature deallocation of _skippedCharacterSet (Tom Wanielista, - Mattt Thompson) - - * Fix potential issue in `setOutputStream` by closing any existing - `outputStream` (Mattt Thompson) - - * Fix filename in AFHTTPClient header (Steven Fisher) - - * Fix documentation for UIImageView+AFNetworking (Mattt Thompson) - - * Fix HTTP multipart form format, which caused issues with Tornado web server - (Matt Chen) - - * Fix `AFHTTPClient` to not append empty data into multipart form data (Jon - Parise) - - * Fix URL encoding normalization to not conditionally escape percent-encoded - strings (João Prado Maia, Kendall Helmstetter Gelner, @cysp, Mattt Thompson) - - * Fix `AFHTTPClient` documentation reference of - `HTTPRequestOperationWithRequest:success:failure` (Shane Vitarana) - - * Add `AFURLRequestOperation -setRedirectResponseBlock:` (Kevin Harwood) - - * Fix `AFURLConnectionOperation` compilation error by conditionally importing - UIKit framework (Steven Fisher) - - * Fix issue where image processing block is not called correctly with success - block in `AFImageRequestOperation` (Sergey Gavrilyuk) - - * Fix leaked dispatch group in batch operations (@andyegorov, Mattt Thompson) - - * Fix support for non-LLVM compilers in `AFNetworkActivityIndicatorManager` - (Abraham Vegh, Bill Williams, Mattt Thompson) - - * Fix AFHTTPClient to not add unnecessary data when constructing multipart form - request with nil parameters (Taeho Kim) - -= 1.0RC1 / 2012-04-25 - - * Add `AFHTTPRequestOperation +addAcceptableStatusCodes / -+addAcceptableContentTypes` to dynamically add acceptable status codes and -content types on the class level (Mattt Thompson) - - * Add support for compound and complex `Accept` headers that include multiple -content types and / or specify a particular character encoding (Mattt Thompson) - - * Add `AFURLConnectionOperation --setShouldExecuteAsBackgroundTaskWithExpirationHandler:` to have operations -finish once an app becomes inactive (Mattt Thompson) - - * Add support for pausing / resuming request operations (Peter Steinberger, -Mattt Thompson) - - * Improve network reachability functionality in `AFHTTPClient`, including a -distinction between WWan and WiFi reachability (Kevin Harwood, Mattt Thompson) - - -= 0.9.2 / 2012-04-25 - - * Add thread safety to `AFNetworkActivityIndicator` (Peter Steinberger, Mattt -Thompson) - - * Document requirement of available JSON libraries for decoding responses in -`AFJSONRequestOperation` and parameter encoding in `AFHTTPClient` (Mattt -Thompson) - - * Fix `AFHTTPClient` parameter encoding (Mattt Thompson) - - * Fix `AFJSONEncode` and `AFJSONDecode` to use `SBJsonWriter` and -`SBJsonParser` instead of `NSObject+SBJson` (Oliver Eikemeier) - - * Fix bug where `AFJSONDecode` does not return errors (Alex Michaud) - - * Fix compiler warning for undeclared -`AFQueryStringComponentFromKeyAndValueWithEncoding` function (Mattt Thompson) - - * Fix cache policy for URL requests (Peter Steinberger) - - * Fix race condition bug in `UIImageView+AFNetworking` caused by incorrectly -nil-ing request operations (John Wu) - - * Fix reload button in Twitter example (Peter Steinberger) - - * Improve batched operation by deferring execution of batch completion block -until all component request completion blocks have finished (Patrick Hernandez, -Kevin Harwood, Mattt Thompson) - - * Improve performance of image request decoding by dispatching to background - queue (Mattt Thompson) - - * Revert `AFImageCache` to cache image objects rather than `NSPurgeableData` -(Tony Million, Peter Steinberger, Mattt Thompson) - - * Remove unnecessary KVO `willChangeValueForKey:` / `didChangeValueForKey:` -calls (Peter Steinberger) - - * Remove unnecessary @private ivar declarations in headers (Peter Steinberger, -Mattt Thompson) - - * Remove @try-@catch block wrapping network thread entry point (Charles T. Ahn) - - -= 0.9.1 / 2012-03-19 - - * Create Twitter example application (Mattt Thompson) - - * Add support for nested array and dictionary parameters for query string and -form-encoded requests (Mathieu Hausherr, Josh Chung, Mattt Thompson) - - * Add `AFURLConnectionOperation -setCacheResponseBlock:`, which allows the -behavior of the `NSURLConnectionDelegate` method -`-connection:willCacheResponse:` to be overridden without subclassing (Mattt -Thompson) - - * Add `_AFNETWORKING_ALLOW_INVALID_SSL_CERTIFICATES_` macros for -NSURLConnection authentication delegate methods (Mattt Thompson) - - * Add properties for custom success / failure callback queues (Peter -Steinberger) - - * Add notifications for network reachability changes to `AFHTTPClient` (Mattt -Thompson) - - * Add `AFHTTPClient -patchPath:` convenience method (Mattt Thompson) - - * Add support for NextiveJson (Adrian Kosmaczewski) - - * Improve network reachability checks (C. Bess) - - * Improve NSIndexSet formatting in error strings (Jon Parise) - - * Document crashing behavior in iOS 4 loading a file:// URL (Mattt Thompson) - - * Fix crash caused by `AFHTTPClient -cancelAllHTTPOperationsWithMethod:` not -checking operation to be instance of `AFHTTPRequestOperation` (Mattt Thompson) - - * Fix crash caused by passing `nil` URL in requests (Sam Soffes) - - * Fix errors caused by connection property not being nil'd out after an -operation finishes (Kevin Harwood, @zdzisiekpu) - - * Fix crash caused by passing `NULL` error pointer when setting `NSInvocation` -in `AFJSONEncode` and `AFJSONDecode` (Tyler Stromberg) - - * Fix batch operation completion block returning on background thread (Patrick -Hernandez) - - * Fix documentation for UIImageView+AFNetworking (Dominic Dagradi) - - * Fix race condition caused by `AFURLConnectionOperation` being cancelled on -main thread, rather than network thread (Erik Olsson) - - * Fix `AFURLEncodedStringFromStringWithEncoding` to correctly handle cases -where % is used as a literal rather than as part of a percent escape code -(Mattt Thompson) - - * Fix missing comma in `+defaultAcceptableContentTypes` for -`AFImageRequestOperation` (Michael Schneider) - - -= 0.9.0 / 2012-01-23 - - * Add thread-safe behavior to `AFURLConnectionOperation` (Mattt Thompson) - - * Add batching of operations for `AFHTTPClient` (Mattt Thompson) - - * Add authentication challenge callback block to override default - implementation of `connection:didReceiveAuthenticationChallenge:` in - `AFURLConnectionOperation` (Mattt Thompson) - - * Add `_AFNETWORKING_PREFER_NSJSONSERIALIZATION_`, which, when defined, - short-circuits the standard preference ordering used in `AFJSONEncode` and - `AFJSONDecode` to use `NSJSONSerialization` when available, falling back on - third-party-libraries. (Mattt Thompson, Shane Vitarana) - - * Add custom `description` for `AFURLConnectionOperation` and `AFHTTPClient` - (Mattt Thompson) - - * Add `text/javascript` to default acceptable content types for - `AFJSONRequestOperation` (Jake Boxer) - - * Add `imageScale` property to change resolution of images constructed from - cached data (Štěpán Petrů) - - * Add note about third party JSON libraries in README (David Keegan) - - * `AFQueryStringFromParametersWithEncoding` formats `NSArray` values in the - form `key[]=value1&key[]=value2` instead of `key=(value1,value2)` (Dan Thorpe) - - * `AFImageRequestOperation -responseImage` on OS X uses `NSBitmapImageRep` to - determine the correct pixel dimensions of the image (David Keegan) - - * `AFURLConnectionOperation` `connection` has memory management policy `assign` - to avoid retain cycles caused by `NSURLConnection` retaining its delegate - (Mattt Thompson) - - * `AFURLConnectionOperation` calls super implementation for `-isReady`, - following the guidelines for `NSOperation` subclasses (Mattt Thompson) - - * `UIImageView -setImageWithURL:` and related methods call success callback - after setting image (Cameron Boehmer) - - * Cancel request if an authentication challenge has no suitable credentials in - `AFURLConnectionOperation -connection:didReceiveAuthenticationChallenge:` - (Jorge Bernal) - - * Remove exception from - `multipartFormRequestWithMethod:path:parameters:constructing BodyWithBlock:` - raised when certain HTTP methods are used. (Mattt Thompson) - - * Remove `AFImageCache` from public API, moving it into private implementation - of `UIImageView+AFNetworking` (Mattt Thompson) - - * Mac example application makes better use of AppKit technologies and - conventions (Mattt Thompson) - - * Fix issue with multipart form boundaries in `AFHTTPClient - -multipartFormRequestWithMethod:path:parameters:constructing BodyWithBlock:` - (Ray Morgan, Mattt Thompson, Sam Soffes) - - * Fix "File Upload with Progress Callback" code snippet in README (Larry Legend) - - * Fix to SBJSON invocations in `AFJSONEncode` and `AFJSONDecode` (Matthias - Tretter, James Frye) - - * Fix documentation for `AFHTTPClient requestWithMethod:path:parameters:` - (Michael Parker) - - * Fix `Content-Disposition` headers used for multipart form construction - (Michael Parker) - - * Add network reachability status change callback property to `AFHTTPClient`. - (Mattt Thompson, Kevin Harwood) - - * Fix exception handling in `AFJSONEncode` and `AFJSONDecode` (David Keegan) - - * Fix `NSData` initialization with string in `AFBase64EncodedStringFromString` - (Adam Ernst, Mattt Thompson) - - * Fix error check in `appendPartWithFileURL:name:error:` (Warren Moore, - Baldoph, Mattt Thompson) - - * Fix compiler warnings for certain configurations (Charlie Williams) - - * Fix bug caused by passing zero-length `responseData` to response object - initializers (Mattt Thompson, Serge Paquet) \ No newline at end of file diff --git a/candpiosapp/Externals/AFNetworking/Example/AFNetworking Example.entitlements b/candpiosapp/Externals/AFNetworking/Example/AFNetworking Example.entitlements deleted file mode 100644 index 7a2230dc..00000000 --- a/candpiosapp/Externals/AFNetworking/Example/AFNetworking Example.entitlements +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>com.apple.security.app-sandbox</key> - <true/> - <key>com.apple.security.network.client</key> - <true/> - <key>com.apple.security.network.server</key> - <true/> -</dict> -</plist> diff --git a/candpiosapp/Externals/AFNetworking/Example/AFNetworking Mac Example.xcodeproj/project.pbxproj b/candpiosapp/Externals/AFNetworking/Example/AFNetworking Mac Example.xcodeproj/project.pbxproj deleted file mode 100644 index 899632e4..00000000 --- a/candpiosapp/Externals/AFNetworking/Example/AFNetworking Mac Example.xcodeproj/project.pbxproj +++ /dev/null @@ -1,351 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - F8129C001591061B009BFE23 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8129BFF1591061B009BFE23 /* Cocoa.framework */; }; - F8129C321591073C009BFE23 /* AFTwitterAPIClient.m in Sources */ = {isa = PBXBuildFile; fileRef = F8129C251591073C009BFE23 /* AFTwitterAPIClient.m */; }; - F8129C341591073C009BFE23 /* Tweet.m in Sources */ = {isa = PBXBuildFile; fileRef = F8129C2B1591073C009BFE23 /* Tweet.m */; }; - F8129C351591073C009BFE23 /* User.m in Sources */ = {isa = PBXBuildFile; fileRef = F8129C2D1591073C009BFE23 /* User.m */; }; - F8129C6F15910B15009BFE23 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F8129C6E15910B15009BFE23 /* main.m */; }; - F8129C7115910B3E009BFE23 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = F8129C7015910B3E009BFE23 /* MainMenu.xib */; }; - F8129C7715910C40009BFE23 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F8129C7515910C40009BFE23 /* AppDelegate.m */; }; - F82EB07C159A172000B10B56 /* AFHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = F82EB06E159A172000B10B56 /* AFHTTPClient.m */; }; - F82EB07D159A172000B10B56 /* AFHTTPRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F82EB070159A172000B10B56 /* AFHTTPRequestOperation.m */; }; - F82EB07E159A172000B10B56 /* AFImageRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F82EB072159A172000B10B56 /* AFImageRequestOperation.m */; }; - F82EB07F159A172000B10B56 /* AFJSONRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F82EB074159A172000B10B56 /* AFJSONRequestOperation.m */; }; - F82EB080159A172000B10B56 /* AFPropertyListRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F82EB077159A172000B10B56 /* AFPropertyListRequestOperation.m */; }; - F82EB081159A172000B10B56 /* AFURLConnectionOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F82EB079159A172000B10B56 /* AFURLConnectionOperation.m */; }; - F82EB082159A172000B10B56 /* AFXMLRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F82EB07B159A172000B10B56 /* AFXMLRequestOperation.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - F8129BFB1591061B009BFE23 /* AFNetworking Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "AFNetworking Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - F8129BFF1591061B009BFE23 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; - F8129C021591061B009BFE23 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; - F8129C031591061B009BFE23 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; - F8129C041591061B009BFE23 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - F8129C251591073C009BFE23 /* AFTwitterAPIClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFTwitterAPIClient.m; path = Classes/AFTwitterAPIClient.m; sourceTree = SOURCE_ROOT; }; - F8129C2A1591073C009BFE23 /* Tweet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tweet.h; sourceTree = "<group>"; }; - F8129C2B1591073C009BFE23 /* Tweet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Tweet.m; sourceTree = "<group>"; }; - F8129C2C1591073C009BFE23 /* User.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = User.h; sourceTree = "<group>"; }; - F8129C2D1591073C009BFE23 /* User.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = User.m; sourceTree = "<group>"; }; - F8129C311591073C009BFE23 /* AFTwitterAPIClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFTwitterAPIClient.h; path = Classes/AFTwitterAPIClient.h; sourceTree = SOURCE_ROOT; }; - F8129C6E15910B15009BFE23 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = SOURCE_ROOT; }; - F8129C7015910B3E009BFE23 /* MainMenu.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainMenu.xib; sourceTree = SOURCE_ROOT; }; - F8129C7515910C40009BFE23 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = SOURCE_ROOT; }; - F8129C7615910C40009BFE23 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = SOURCE_ROOT; }; - F82EB06D159A172000B10B56 /* AFHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFHTTPClient.h; path = ../AFNetworking/AFHTTPClient.h; sourceTree = "<group>"; }; - F82EB06E159A172000B10B56 /* AFHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFHTTPClient.m; path = ../AFNetworking/AFHTTPClient.m; sourceTree = "<group>"; }; - F82EB06F159A172000B10B56 /* AFHTTPRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFHTTPRequestOperation.h; path = ../AFNetworking/AFHTTPRequestOperation.h; sourceTree = "<group>"; }; - F82EB070159A172000B10B56 /* AFHTTPRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFHTTPRequestOperation.m; path = ../AFNetworking/AFHTTPRequestOperation.m; sourceTree = "<group>"; }; - F82EB071159A172000B10B56 /* AFImageRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFImageRequestOperation.h; path = ../AFNetworking/AFImageRequestOperation.h; sourceTree = "<group>"; }; - F82EB072159A172000B10B56 /* AFImageRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFImageRequestOperation.m; path = ../AFNetworking/AFImageRequestOperation.m; sourceTree = "<group>"; }; - F82EB073159A172000B10B56 /* AFJSONRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFJSONRequestOperation.h; path = ../AFNetworking/AFJSONRequestOperation.h; sourceTree = "<group>"; }; - F82EB074159A172000B10B56 /* AFJSONRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFJSONRequestOperation.m; path = ../AFNetworking/AFJSONRequestOperation.m; sourceTree = "<group>"; }; - F82EB075159A172000B10B56 /* AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFNetworking.h; path = ../AFNetworking/AFNetworking.h; sourceTree = "<group>"; }; - F82EB076159A172000B10B56 /* AFPropertyListRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFPropertyListRequestOperation.h; path = ../AFNetworking/AFPropertyListRequestOperation.h; sourceTree = "<group>"; }; - F82EB077159A172000B10B56 /* AFPropertyListRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFPropertyListRequestOperation.m; path = ../AFNetworking/AFPropertyListRequestOperation.m; sourceTree = "<group>"; }; - F82EB078159A172000B10B56 /* AFURLConnectionOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFURLConnectionOperation.h; path = ../AFNetworking/AFURLConnectionOperation.h; sourceTree = "<group>"; }; - F82EB079159A172000B10B56 /* AFURLConnectionOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFURLConnectionOperation.m; path = ../AFNetworking/AFURLConnectionOperation.m; sourceTree = "<group>"; }; - F82EB07A159A172000B10B56 /* AFXMLRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFXMLRequestOperation.h; path = ../AFNetworking/AFXMLRequestOperation.h; sourceTree = "<group>"; }; - F82EB07B159A172000B10B56 /* AFXMLRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFXMLRequestOperation.m; path = ../AFNetworking/AFXMLRequestOperation.m; sourceTree = "<group>"; }; - F877018B159A1CE700B45C0D /* AFNetworking Example.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "AFNetworking Example.entitlements"; sourceTree = "<group>"; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - F8129BF81591061B009BFE23 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - F8129C001591061B009BFE23 /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - F8129BF01591061B009BFE23 = { - isa = PBXGroup; - children = ( - F877018B159A1CE700B45C0D /* AFNetworking Example.entitlements */, - F8129C051591061B009BFE23 /* Classes */, - F8129C4C15910901009BFE23 /* Vendor */, - F8129BFE1591061B009BFE23 /* Frameworks */, - F8129BFC1591061B009BFE23 /* Products */, - ); - sourceTree = "<group>"; - }; - F8129BFC1591061B009BFE23 /* Products */ = { - isa = PBXGroup; - children = ( - F8129BFB1591061B009BFE23 /* AFNetworking Example.app */, - ); - name = Products; - sourceTree = "<group>"; - }; - F8129BFE1591061B009BFE23 /* Frameworks */ = { - isa = PBXGroup; - children = ( - F8129BFF1591061B009BFE23 /* Cocoa.framework */, - F8129C011591061B009BFE23 /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = "<group>"; - }; - F8129C011591061B009BFE23 /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - F8129C021591061B009BFE23 /* AppKit.framework */, - F8129C031591061B009BFE23 /* CoreData.framework */, - F8129C041591061B009BFE23 /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = "<group>"; - }; - F8129C051591061B009BFE23 /* Classes */ = { - isa = PBXGroup; - children = ( - F8129C311591073C009BFE23 /* AFTwitterAPIClient.h */, - F8129C251591073C009BFE23 /* AFTwitterAPIClient.m */, - F8129C291591073C009BFE23 /* Models */, - F8129C061591061B009BFE23 /* Supporting Files */, - ); - name = Classes; - path = "AFNetworking-Mac-Example"; - sourceTree = "<group>"; - }; - F8129C061591061B009BFE23 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - F8129C7615910C40009BFE23 /* AppDelegate.h */, - F8129C7515910C40009BFE23 /* AppDelegate.m */, - F8129C6E15910B15009BFE23 /* main.m */, - F8129C7015910B3E009BFE23 /* MainMenu.xib */, - ); - name = "Supporting Files"; - sourceTree = "<group>"; - }; - F8129C291591073C009BFE23 /* Models */ = { - isa = PBXGroup; - children = ( - F8129C2A1591073C009BFE23 /* Tweet.h */, - F8129C2B1591073C009BFE23 /* Tweet.m */, - F8129C2C1591073C009BFE23 /* User.h */, - F8129C2D1591073C009BFE23 /* User.m */, - ); - name = Models; - path = Classes/Models; - sourceTree = SOURCE_ROOT; - }; - F8129C4C15910901009BFE23 /* Vendor */ = { - isa = PBXGroup; - children = ( - F82EB083159A172500B10B56 /* AFNetworking */, - ); - name = Vendor; - sourceTree = "<group>"; - }; - F82EB083159A172500B10B56 /* AFNetworking */ = { - isa = PBXGroup; - children = ( - F82EB075159A172000B10B56 /* AFNetworking.h */, - F82EB078159A172000B10B56 /* AFURLConnectionOperation.h */, - F82EB079159A172000B10B56 /* AFURLConnectionOperation.m */, - F82EB06F159A172000B10B56 /* AFHTTPRequestOperation.h */, - F82EB070159A172000B10B56 /* AFHTTPRequestOperation.m */, - F82EB073159A172000B10B56 /* AFJSONRequestOperation.h */, - F82EB074159A172000B10B56 /* AFJSONRequestOperation.m */, - F82EB07A159A172000B10B56 /* AFXMLRequestOperation.h */, - F82EB07B159A172000B10B56 /* AFXMLRequestOperation.m */, - F82EB076159A172000B10B56 /* AFPropertyListRequestOperation.h */, - F82EB077159A172000B10B56 /* AFPropertyListRequestOperation.m */, - F82EB06D159A172000B10B56 /* AFHTTPClient.h */, - F82EB06E159A172000B10B56 /* AFHTTPClient.m */, - F82EB071159A172000B10B56 /* AFImageRequestOperation.h */, - F82EB072159A172000B10B56 /* AFImageRequestOperation.m */, - ); - name = AFNetworking; - sourceTree = "<group>"; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - F8129BFA1591061B009BFE23 /* AFNetworking Example */ = { - isa = PBXNativeTarget; - buildConfigurationList = F8129C191591061B009BFE23 /* Build configuration list for PBXNativeTarget "AFNetworking Example" */; - buildPhases = ( - F8129BF71591061B009BFE23 /* Sources */, - F8129BF81591061B009BFE23 /* Frameworks */, - F8129BF91591061B009BFE23 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "AFNetworking Example"; - productName = "AFNetworking-Mac-Example"; - productReference = F8129BFB1591061B009BFE23 /* AFNetworking Example.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - F8129BF21591061B009BFE23 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0430; - }; - buildConfigurationList = F8129BF51591061B009BFE23 /* Build configuration list for PBXProject "AFNetworking Mac Example" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = F8129BF01591061B009BFE23; - productRefGroup = F8129BFC1591061B009BFE23 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - F8129BFA1591061B009BFE23 /* AFNetworking Example */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - F8129BF91591061B009BFE23 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - F8129C7115910B3E009BFE23 /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - F8129BF71591061B009BFE23 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - F8129C341591073C009BFE23 /* Tweet.m in Sources */, - F8129C351591073C009BFE23 /* User.m in Sources */, - F8129C321591073C009BFE23 /* AFTwitterAPIClient.m in Sources */, - F8129C6F15910B15009BFE23 /* main.m in Sources */, - F8129C7715910C40009BFE23 /* AppDelegate.m in Sources */, - F82EB07C159A172000B10B56 /* AFHTTPClient.m in Sources */, - F82EB07D159A172000B10B56 /* AFHTTPRequestOperation.m in Sources */, - F82EB07E159A172000B10B56 /* AFImageRequestOperation.m in Sources */, - F82EB07F159A172000B10B56 /* AFJSONRequestOperation.m in Sources */, - F82EB080159A172000B10B56 /* AFPropertyListRequestOperation.m in Sources */, - F82EB081159A172000B10B56 /* AFURLConnectionOperation.m in Sources */, - F82EB082159A172000B10B56 /* AFXMLRequestOperation.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - F8129C171591061B009BFE23 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_ARC = YES; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - F8129C181591061B009BFE23 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_ARC = YES; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx; - }; - name = Release; - }; - F8129C1A1591061B009BFE23 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_ENTITLEMENTS = "AFNetworking Example.entitlements"; - CODE_SIGN_IDENTITY = "Mac Developer"; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - INFOPLIST_FILE = "Mac-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - F8129C1B1591061B009BFE23 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_ENTITLEMENTS = "AFNetworking Example.entitlements"; - CODE_SIGN_IDENTITY = "Mac Developer"; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - INFOPLIST_FILE = "Mac-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - F8129BF51591061B009BFE23 /* Build configuration list for PBXProject "AFNetworking Mac Example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - F8129C171591061B009BFE23 /* Debug */, - F8129C181591061B009BFE23 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - F8129C191591061B009BFE23 /* Build configuration list for PBXNativeTarget "AFNetworking Example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - F8129C1A1591061B009BFE23 /* Debug */, - F8129C1B1591061B009BFE23 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = F8129BF21591061B009BFE23 /* Project object */; -} diff --git a/candpiosapp/Externals/AFNetworking/Example/AFNetworking iOS Example.xcodeproj/project.pbxproj b/candpiosapp/Externals/AFNetworking/Example/AFNetworking iOS Example.xcodeproj/project.pbxproj deleted file mode 100644 index f193529e..00000000 --- a/candpiosapp/Externals/AFNetworking/Example/AFNetworking iOS Example.xcodeproj/project.pbxproj +++ /dev/null @@ -1,439 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - F8129C7415910C37009BFE23 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F8129C7215910C37009BFE23 /* AppDelegate.m */; }; - F8D0701B14310F4A00653FD3 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E469E213957DF700DB05C8 /* SystemConfiguration.framework */; }; - F8D0701C14310F4F00653FD3 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E469E013957DF100DB05C8 /* Security.framework */; }; - F8DA09E41396AC040057D0CC /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F8DA09E31396AC040057D0CC /* main.m */; }; - F8E469651395739D00DB05C8 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E469641395739D00DB05C8 /* UIKit.framework */; }; - F8E469671395739D00DB05C8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E469661395739D00DB05C8 /* Foundation.framework */; }; - F8E469691395739D00DB05C8 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E469681395739D00DB05C8 /* CoreGraphics.framework */; }; - F8E469DF13957DD500DB05C8 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E469DE13957DD500DB05C8 /* CoreLocation.framework */; }; - F8F6E8DA1463424800AD016F /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = F8F6E8D61463424800AD016F /* Default.png */; }; - F8F6E8DB1463424800AD016F /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F8F6E8D71463424800AD016F /* Default@2x.png */; }; - F8F6E8DC1463424800AD016F /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = F8F6E8D81463424800AD016F /* Icon.png */; }; - F8F6E8DD1463424800AD016F /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F8F6E8D91463424800AD016F /* Icon@2x.png */; }; - F8FA9491150EF8C100ED4EAD /* AFTwitterAPIClient.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FA9490150EF8C100ED4EAD /* AFTwitterAPIClient.m */; }; - F8FA9494150EF97E00ED4EAD /* Tweet.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FA9493150EF97E00ED4EAD /* Tweet.m */; }; - F8FA9497150EF98800ED4EAD /* User.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FA9496150EF98800ED4EAD /* User.m */; }; - F8FA949A150EF9DA00ED4EAD /* PublicTimelineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FA9499150EF9DA00ED4EAD /* PublicTimelineViewController.m */; }; - F8FA94B1150EFEC100ED4EAD /* AFHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FA949D150EFEC100ED4EAD /* AFHTTPClient.m */; }; - F8FA94B2150EFEC100ED4EAD /* AFHTTPRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FA949F150EFEC100ED4EAD /* AFHTTPRequestOperation.m */; }; - F8FA94B3150EFEC100ED4EAD /* AFImageRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FA94A1150EFEC100ED4EAD /* AFImageRequestOperation.m */; }; - F8FA94B4150EFEC100ED4EAD /* AFJSONRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FA94A3150EFEC100ED4EAD /* AFJSONRequestOperation.m */; }; - F8FA94B6150EFEC100ED4EAD /* AFNetworkActivityIndicatorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FA94A7150EFEC100ED4EAD /* AFNetworkActivityIndicatorManager.m */; }; - F8FA94B7150EFEC100ED4EAD /* AFPropertyListRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FA94AA150EFEC100ED4EAD /* AFPropertyListRequestOperation.m */; }; - F8FA94B8150EFEC100ED4EAD /* AFURLConnectionOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FA94AC150EFEC100ED4EAD /* AFURLConnectionOperation.m */; }; - F8FA94B9150EFEC100ED4EAD /* AFXMLRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FA94AE150EFEC100ED4EAD /* AFXMLRequestOperation.m */; }; - F8FA94BA150EFEC100ED4EAD /* UIImageView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FA94B0150EFEC100ED4EAD /* UIImageView+AFNetworking.m */; }; - F8FA94C1150F019100ED4EAD /* TweetTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FA94C0150F019100ED4EAD /* TweetTableViewCell.m */; }; - F8FA94D0150F094D00ED4EAD /* profile-image-placeholder.png in Resources */ = {isa = PBXBuildFile; fileRef = F8FA94CC150F094D00ED4EAD /* profile-image-placeholder.png */; }; - F8FA94D1150F094D00ED4EAD /* profile-image-placeholder@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F8FA94CD150F094D00ED4EAD /* profile-image-placeholder@2x.png */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - F8129C3815910830009BFE23 /* Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = SOURCE_ROOT; }; - F8129C7215910C37009BFE23 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = SOURCE_ROOT; }; - F8129C7315910C37009BFE23 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = SOURCE_ROOT; }; - F8DA09E31396AC040057D0CC /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = SOURCE_ROOT; }; - F8E469601395739C00DB05C8 /* AFNetworking iOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "AFNetworking iOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - F8E469641395739D00DB05C8 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - F8E469661395739D00DB05C8 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - F8E469681395739D00DB05C8 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - F8E4696C1395739D00DB05C8 /* iOS-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "iOS-Info.plist"; sourceTree = "<group>"; }; - F8E469DE13957DD500DB05C8 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; - F8E469E013957DF100DB05C8 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; - F8E469E213957DF700DB05C8 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; - F8F6E8D61463424800AD016F /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = SOURCE_ROOT; }; - F8F6E8D71463424800AD016F /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = SOURCE_ROOT; }; - F8F6E8D81463424800AD016F /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = SOURCE_ROOT; }; - F8F6E8D91463424800AD016F /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon@2x.png"; sourceTree = SOURCE_ROOT; }; - F8FA948F150EF8C100ED4EAD /* AFTwitterAPIClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFTwitterAPIClient.h; path = Classes/AFTwitterAPIClient.h; sourceTree = "<group>"; }; - F8FA9490150EF8C100ED4EAD /* AFTwitterAPIClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFTwitterAPIClient.m; path = Classes/AFTwitterAPIClient.m; sourceTree = "<group>"; }; - F8FA9492150EF97E00ED4EAD /* Tweet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tweet.h; sourceTree = "<group>"; }; - F8FA9493150EF97E00ED4EAD /* Tweet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Tweet.m; sourceTree = "<group>"; }; - F8FA9495150EF98800ED4EAD /* User.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = User.h; sourceTree = "<group>"; }; - F8FA9496150EF98800ED4EAD /* User.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = User.m; sourceTree = "<group>"; }; - F8FA9498150EF9DA00ED4EAD /* PublicTimelineViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PublicTimelineViewController.h; sourceTree = "<group>"; }; - F8FA9499150EF9DA00ED4EAD /* PublicTimelineViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PublicTimelineViewController.m; sourceTree = "<group>"; }; - F8FA949C150EFEC100ED4EAD /* AFHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPClient.h; sourceTree = "<group>"; }; - F8FA949D150EFEC100ED4EAD /* AFHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPClient.m; sourceTree = "<group>"; }; - F8FA949E150EFEC100ED4EAD /* AFHTTPRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPRequestOperation.h; sourceTree = "<group>"; }; - F8FA949F150EFEC100ED4EAD /* AFHTTPRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPRequestOperation.m; sourceTree = "<group>"; }; - F8FA94A0150EFEC100ED4EAD /* AFImageRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFImageRequestOperation.h; sourceTree = "<group>"; }; - F8FA94A1150EFEC100ED4EAD /* AFImageRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFImageRequestOperation.m; sourceTree = "<group>"; }; - F8FA94A2150EFEC100ED4EAD /* AFJSONRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFJSONRequestOperation.h; sourceTree = "<group>"; }; - F8FA94A3150EFEC100ED4EAD /* AFJSONRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFJSONRequestOperation.m; sourceTree = "<group>"; }; - F8FA94A6150EFEC100ED4EAD /* AFNetworkActivityIndicatorManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworkActivityIndicatorManager.h; sourceTree = "<group>"; }; - F8FA94A7150EFEC100ED4EAD /* AFNetworkActivityIndicatorManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFNetworkActivityIndicatorManager.m; sourceTree = "<group>"; }; - F8FA94A8150EFEC100ED4EAD /* AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworking.h; sourceTree = "<group>"; }; - F8FA94A9150EFEC100ED4EAD /* AFPropertyListRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFPropertyListRequestOperation.h; sourceTree = "<group>"; }; - F8FA94AA150EFEC100ED4EAD /* AFPropertyListRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFPropertyListRequestOperation.m; sourceTree = "<group>"; }; - F8FA94AB150EFEC100ED4EAD /* AFURLConnectionOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFURLConnectionOperation.h; sourceTree = "<group>"; }; - F8FA94AC150EFEC100ED4EAD /* AFURLConnectionOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFURLConnectionOperation.m; sourceTree = "<group>"; }; - F8FA94AD150EFEC100ED4EAD /* AFXMLRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFXMLRequestOperation.h; sourceTree = "<group>"; }; - F8FA94AE150EFEC100ED4EAD /* AFXMLRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFXMLRequestOperation.m; sourceTree = "<group>"; }; - F8FA94AF150EFEC100ED4EAD /* UIImageView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+AFNetworking.h"; sourceTree = "<group>"; }; - F8FA94B0150EFEC100ED4EAD /* UIImageView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+AFNetworking.m"; sourceTree = "<group>"; }; - F8FA94BF150F019100ED4EAD /* TweetTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TweetTableViewCell.h; sourceTree = "<group>"; }; - F8FA94C0150F019100ED4EAD /* TweetTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TweetTableViewCell.m; sourceTree = "<group>"; }; - F8FA94CC150F094D00ED4EAD /* profile-image-placeholder.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "profile-image-placeholder.png"; path = "Images/profile-image-placeholder.png"; sourceTree = SOURCE_ROOT; }; - F8FA94CD150F094D00ED4EAD /* profile-image-placeholder@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "profile-image-placeholder@2x.png"; path = "Images/profile-image-placeholder@2x.png"; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - F8E4695D1395739C00DB05C8 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - F8E469651395739D00DB05C8 /* UIKit.framework in Frameworks */, - F8E469671395739D00DB05C8 /* Foundation.framework in Frameworks */, - F8E469691395739D00DB05C8 /* CoreGraphics.framework in Frameworks */, - F8E469DF13957DD500DB05C8 /* CoreLocation.framework in Frameworks */, - F8D0701B14310F4A00653FD3 /* SystemConfiguration.framework in Frameworks */, - F8D0701C14310F4F00653FD3 /* Security.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - F8DA09C61396AB690057D0CC /* Controllers */ = { - isa = PBXGroup; - children = ( - F8FA9498150EF9DA00ED4EAD /* PublicTimelineViewController.h */, - F8FA9499150EF9DA00ED4EAD /* PublicTimelineViewController.m */, - ); - name = Controllers; - path = Classes/Controllers; - sourceTree = SOURCE_ROOT; - }; - F8DA09C91396AB690057D0CC /* Models */ = { - isa = PBXGroup; - children = ( - F8FA9492150EF97E00ED4EAD /* Tweet.h */, - F8FA9493150EF97E00ED4EAD /* Tweet.m */, - F8FA9495150EF98800ED4EAD /* User.h */, - F8FA9496150EF98800ED4EAD /* User.m */, - ); - name = Models; - path = Classes/Models; - sourceTree = SOURCE_ROOT; - }; - F8DA09CC1396AB690057D0CC /* Views */ = { - isa = PBXGroup; - children = ( - F8FA94BF150F019100ED4EAD /* TweetTableViewCell.h */, - F8FA94C0150F019100ED4EAD /* TweetTableViewCell.m */, - ); - name = Views; - path = Classes/Views; - sourceTree = SOURCE_ROOT; - }; - F8E469551395739C00DB05C8 = { - isa = PBXGroup; - children = ( - F8E469B71395759C00DB05C8 /* Networking Extensions */, - F8E4696A1395739D00DB05C8 /* Classes */, - F8E469ED1395812A00DB05C8 /* Images */, - F8E469931395743A00DB05C8 /* Vendor */, - F8E469631395739D00DB05C8 /* Frameworks */, - F8E469611395739C00DB05C8 /* Products */, - ); - sourceTree = "<group>"; - }; - F8E469611395739C00DB05C8 /* Products */ = { - isa = PBXGroup; - children = ( - F8E469601395739C00DB05C8 /* AFNetworking iOS Example.app */, - ); - name = Products; - sourceTree = "<group>"; - }; - F8E469631395739D00DB05C8 /* Frameworks */ = { - isa = PBXGroup; - children = ( - F8E469E213957DF700DB05C8 /* SystemConfiguration.framework */, - F8E469E013957DF100DB05C8 /* Security.framework */, - F8E469DE13957DD500DB05C8 /* CoreLocation.framework */, - F8E469641395739D00DB05C8 /* UIKit.framework */, - F8E469661395739D00DB05C8 /* Foundation.framework */, - F8E469681395739D00DB05C8 /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = "<group>"; - }; - F8E4696A1395739D00DB05C8 /* Classes */ = { - isa = PBXGroup; - children = ( - F8DA09C91396AB690057D0CC /* Models */, - F8DA09CC1396AB690057D0CC /* Views */, - F8DA09C61396AB690057D0CC /* Controllers */, - F8E4696B1395739D00DB05C8 /* Supporting Files */, - ); - name = Classes; - path = AFNetworkingExample; - sourceTree = "<group>"; - }; - F8E4696B1395739D00DB05C8 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - F8DA09E31396AC040057D0CC /* main.m */, - F8129C3815910830009BFE23 /* Prefix.pch */, - F8129C7315910C37009BFE23 /* AppDelegate.h */, - F8129C7215910C37009BFE23 /* AppDelegate.m */, - F8E4696C1395739D00DB05C8 /* iOS-Info.plist */, - ); - name = "Supporting Files"; - sourceTree = "<group>"; - }; - F8E469931395743A00DB05C8 /* Vendor */ = { - isa = PBXGroup; - children = ( - F8FA949B150EFEC100ED4EAD /* AFNetworking */, - ); - name = Vendor; - sourceTree = "<group>"; - }; - F8E469B71395759C00DB05C8 /* Networking Extensions */ = { - isa = PBXGroup; - children = ( - F8FA948F150EF8C100ED4EAD /* AFTwitterAPIClient.h */, - F8FA9490150EF8C100ED4EAD /* AFTwitterAPIClient.m */, - ); - name = "Networking Extensions"; - sourceTree = "<group>"; - }; - F8E469ED1395812A00DB05C8 /* Images */ = { - isa = PBXGroup; - children = ( - F8F6E8D61463424800AD016F /* Default.png */, - F8F6E8D71463424800AD016F /* Default@2x.png */, - F8F6E8D81463424800AD016F /* Icon.png */, - F8F6E8D91463424800AD016F /* Icon@2x.png */, - F8FA94CC150F094D00ED4EAD /* profile-image-placeholder.png */, - F8FA94CD150F094D00ED4EAD /* profile-image-placeholder@2x.png */, - ); - name = Images; - path = AFNetworkingExample/Images; - sourceTree = "<group>"; - }; - F8FA949B150EFEC100ED4EAD /* AFNetworking */ = { - isa = PBXGroup; - children = ( - F8FA94A8150EFEC100ED4EAD /* AFNetworking.h */, - F8FA94AB150EFEC100ED4EAD /* AFURLConnectionOperation.h */, - F8FA94AC150EFEC100ED4EAD /* AFURLConnectionOperation.m */, - F8FA949E150EFEC100ED4EAD /* AFHTTPRequestOperation.h */, - F8FA949F150EFEC100ED4EAD /* AFHTTPRequestOperation.m */, - F8FA94A2150EFEC100ED4EAD /* AFJSONRequestOperation.h */, - F8FA94A3150EFEC100ED4EAD /* AFJSONRequestOperation.m */, - F8FA94AD150EFEC100ED4EAD /* AFXMLRequestOperation.h */, - F8FA94AE150EFEC100ED4EAD /* AFXMLRequestOperation.m */, - F8FA94A9150EFEC100ED4EAD /* AFPropertyListRequestOperation.h */, - F8FA94AA150EFEC100ED4EAD /* AFPropertyListRequestOperation.m */, - F8FA949C150EFEC100ED4EAD /* AFHTTPClient.h */, - F8FA949D150EFEC100ED4EAD /* AFHTTPClient.m */, - F8FA94A0150EFEC100ED4EAD /* AFImageRequestOperation.h */, - F8FA94A1150EFEC100ED4EAD /* AFImageRequestOperation.m */, - F8FA94AF150EFEC100ED4EAD /* UIImageView+AFNetworking.h */, - F8FA94B0150EFEC100ED4EAD /* UIImageView+AFNetworking.m */, - F8FA94A6150EFEC100ED4EAD /* AFNetworkActivityIndicatorManager.h */, - F8FA94A7150EFEC100ED4EAD /* AFNetworkActivityIndicatorManager.m */, - ); - name = AFNetworking; - path = ../AFNetworking; - sourceTree = "<group>"; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - F8E4695F1395739C00DB05C8 /* AFNetworking iOS Example */ = { - isa = PBXNativeTarget; - buildConfigurationList = F8E469811395739D00DB05C8 /* Build configuration list for PBXNativeTarget "AFNetworking iOS Example" */; - buildPhases = ( - F8E4695C1395739C00DB05C8 /* Sources */, - F8E4695D1395739C00DB05C8 /* Frameworks */, - F8E4695E1395739C00DB05C8 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "AFNetworking iOS Example"; - productName = AFNetworkingExample; - productReference = F8E469601395739C00DB05C8 /* AFNetworking iOS Example.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - F8E469571395739C00DB05C8 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0450; - ORGANIZATIONNAME = Gowalla; - }; - buildConfigurationList = F8E4695A1395739C00DB05C8 /* Build configuration list for PBXProject "AFNetworking iOS Example" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = F8E469551395739C00DB05C8; - productRefGroup = F8E469611395739C00DB05C8 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - F8E4695F1395739C00DB05C8 /* AFNetworking iOS Example */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - F8E4695E1395739C00DB05C8 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - F8F6E8DA1463424800AD016F /* Default.png in Resources */, - F8F6E8DB1463424800AD016F /* Default@2x.png in Resources */, - F8F6E8DC1463424800AD016F /* Icon.png in Resources */, - F8F6E8DD1463424800AD016F /* Icon@2x.png in Resources */, - F8FA94D0150F094D00ED4EAD /* profile-image-placeholder.png in Resources */, - F8FA94D1150F094D00ED4EAD /* profile-image-placeholder@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - F8E4695C1395739C00DB05C8 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - F8DA09E41396AC040057D0CC /* main.m in Sources */, - F8FA9491150EF8C100ED4EAD /* AFTwitterAPIClient.m in Sources */, - F8FA9494150EF97E00ED4EAD /* Tweet.m in Sources */, - F8FA9497150EF98800ED4EAD /* User.m in Sources */, - F8FA949A150EF9DA00ED4EAD /* PublicTimelineViewController.m in Sources */, - F8FA94B1150EFEC100ED4EAD /* AFHTTPClient.m in Sources */, - F8FA94B2150EFEC100ED4EAD /* AFHTTPRequestOperation.m in Sources */, - F8FA94B3150EFEC100ED4EAD /* AFImageRequestOperation.m in Sources */, - F8FA94B4150EFEC100ED4EAD /* AFJSONRequestOperation.m in Sources */, - F8FA94B6150EFEC100ED4EAD /* AFNetworkActivityIndicatorManager.m in Sources */, - F8FA94B7150EFEC100ED4EAD /* AFPropertyListRequestOperation.m in Sources */, - F8FA94B8150EFEC100ED4EAD /* AFURLConnectionOperation.m in Sources */, - F8FA94B9150EFEC100ED4EAD /* AFXMLRequestOperation.m in Sources */, - F8FA94BA150EFEC100ED4EAD /* UIImageView+AFNetworking.m in Sources */, - F8FA94C1150F019100ED4EAD /* TweetTableViewCell.m in Sources */, - F8129C7415910C37009BFE23 /* AppDelegate.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - F8E4697F1395739D00DB05C8 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvmgcc42; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - SDKROOT = iphoneos; - }; - name = Debug; - }; - F8E469801395739D00DB05C8 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvmgcc42; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - SDKROOT = iphoneos; - }; - name = Release; - }; - F8E469821395739D00DB05C8 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ENABLE_OBJC_ARC = YES; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_SHADOW = YES; - GCC_WARN_SIGN_COMPARE = YES; - GCC_WARN_UNUSED_PARAMETER = NO; - INFOPLIST_FILE = "iOS-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - F8E469831395739D00DB05C8 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ENABLE_OBJC_ARC = YES; - COPY_PHASE_STRIP = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_SHADOW = YES; - GCC_WARN_SIGN_COMPARE = YES; - GCC_WARN_UNUSED_PARAMETER = NO; - INFOPLIST_FILE = "iOS-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; - PRODUCT_NAME = "$(TARGET_NAME)"; - VALIDATE_PRODUCT = YES; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - F8E4695A1395739C00DB05C8 /* Build configuration list for PBXProject "AFNetworking iOS Example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - F8E4697F1395739D00DB05C8 /* Debug */, - F8E469801395739D00DB05C8 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - F8E469811395739D00DB05C8 /* Build configuration list for PBXNativeTarget "AFNetworking iOS Example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - F8E469821395739D00DB05C8 /* Debug */, - F8E469831395739D00DB05C8 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = F8E469571395739C00DB05C8 /* Project object */; -} diff --git a/candpiosapp/Externals/AFNetworking/Example/AppDelegate.h b/candpiosapp/Externals/AFNetworking/Example/AppDelegate.h deleted file mode 100644 index bc25a4bc..00000000 --- a/candpiosapp/Externals/AFNetworking/Example/AppDelegate.h +++ /dev/null @@ -1,50 +0,0 @@ -// AppDelegate.h -// -// Copyright (c) 2012 Mattt Thompson (http://mattt.me/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import <Availability.h> - -#if __IPHONE_OS_VERSION_MIN_REQUIRED - -#import <UIKit/UIKit.h> - -@interface AppDelegate : NSObject <UIApplicationDelegate> { - -} - -@property (nonatomic, strong) UIWindow *window; -@property (nonatomic, strong) UINavigationController *navigationController; - -@end - -#else - -#import <Cocoa/Cocoa.h> - -@interface AppDelegate : NSObject <NSApplicationDelegate> - -@property (strong) IBOutlet NSWindow *window; -@property (strong) IBOutlet NSTableView *tableView; -@property (strong) IBOutlet NSArrayController *tweetsArrayController; - -@end - -#endif diff --git a/candpiosapp/Externals/AFNetworking/Example/AppDelegate.m b/candpiosapp/Externals/AFNetworking/Example/AppDelegate.m deleted file mode 100644 index c5b56a1c..00000000 --- a/candpiosapp/Externals/AFNetworking/Example/AppDelegate.m +++ /dev/null @@ -1,97 +0,0 @@ -// AppDelegate.m -// -// Copyright (c) 2012 Mattt Thompson (http://mattt.me/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "AppDelegate.h" - -#if __IPHONE_OS_VERSION_MIN_REQUIRED - -#import "PublicTimelineViewController.h" - -#import "AFNetworkActivityIndicatorManager.h" - -@implementation AppDelegate -@synthesize window = _window; -@synthesize navigationController = _navigationController; - -- (BOOL)application:(UIApplication *)application -didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - NSURLCache *URLCache = [[NSURLCache alloc] initWithMemoryCapacity:4 * 1024 * 1024 diskCapacity:20 * 1024 * 1024 diskPath:nil]; - [NSURLCache setSharedURLCache:URLCache]; - - [[AFNetworkActivityIndicatorManager sharedManager] setEnabled:YES]; - - UITableViewController *viewController = [[PublicTimelineViewController alloc] initWithStyle:UITableViewStylePlain]; - self.navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; - self.navigationController.navigationBar.tintColor = [UIColor darkGrayColor]; - - self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - self.window.backgroundColor = [UIColor whiteColor]; - self.window.rootViewController = self.navigationController; - [self.window makeKeyAndVisible]; - - return YES; -} - -@end - -#else - -#import "Tweet.h" -#import "User.h" - -@implementation AppDelegate - -@synthesize window = _window; -@synthesize tableView = _tableView; -@synthesize tweetsArrayController = _tweetsArrayController; - -- (void)applicationDidFinishLaunching:(NSNotification *)notification { - NSURLCache *URLCache = [[NSURLCache alloc] initWithMemoryCapacity:4 * 1024 * 1024 diskCapacity:20 * 1024 * 1024 diskPath:nil]; - [NSURLCache setSharedURLCache:URLCache]; - - [self.window makeKeyAndOrderFront:self]; - - [Tweet publicTimelineTweetsWithBlock:^(NSArray *tweets, NSError *error) { - if (error) { - [[NSAlert alertWithMessageText:NSLocalizedString(@"Error", nil) defaultButton:NSLocalizedString(@"OK", nil) alternateButton:nil otherButton:nil informativeTextWithFormat:@"%@",[error localizedDescription]] runModal]; - } - - self.tweetsArrayController.content = tweets; - }]; - - [[NSNotificationCenter defaultCenter] addObserverForName:kUserProfileImageDidLoadNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) { - [self.tableView reloadData]; - }]; -} - -- (BOOL)applicationShouldHandleReopen:(NSApplication *)application - hasVisibleWindows:(BOOL)flag -{ - [self.window makeKeyAndOrderFront:self]; - - return YES; -} - -@end - -#endif \ No newline at end of file diff --git a/candpiosapp/Externals/AFNetworking/Example/Classes/AFTwitterAPIClient.h b/candpiosapp/Externals/AFNetworking/Example/Classes/AFTwitterAPIClient.h deleted file mode 100644 index 61b7d3e1..00000000 --- a/candpiosapp/Externals/AFNetworking/Example/Classes/AFTwitterAPIClient.h +++ /dev/null @@ -1,30 +0,0 @@ -// AFTwitterAPIClient.h -// -// Copyright (c) 2012 Mattt Thompson (http://mattt.me/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import <Foundation/Foundation.h> -#import "AFHTTPClient.h" - -@interface AFTwitterAPIClient : AFHTTPClient - -+ (AFTwitterAPIClient *)sharedClient; - -@end diff --git a/candpiosapp/Externals/AFNetworking/Example/Classes/AFTwitterAPIClient.m b/candpiosapp/Externals/AFNetworking/Example/Classes/AFTwitterAPIClient.m deleted file mode 100644 index 82d56398..00000000 --- a/candpiosapp/Externals/AFNetworking/Example/Classes/AFTwitterAPIClient.m +++ /dev/null @@ -1,55 +0,0 @@ -// AFTwitterAPIClient.h -// -// Copyright (c) 2012 Mattt Thompson (http://mattt.me/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "AFTwitterAPIClient.h" - -#import "AFJSONRequestOperation.h" - -static NSString * const kAFTwitterAPIBaseURLString = @"http://api.twitter.com/1/"; - -@implementation AFTwitterAPIClient - -+ (AFTwitterAPIClient *)sharedClient { - static AFTwitterAPIClient *_sharedClient = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - _sharedClient = [[AFTwitterAPIClient alloc] initWithBaseURL:[NSURL URLWithString:kAFTwitterAPIBaseURLString]]; - }); - - return _sharedClient; -} - -- (id)initWithBaseURL:(NSURL *)url { - self = [super initWithBaseURL:url]; - if (!self) { - return nil; - } - - [self registerHTTPOperationClass:[AFJSONRequestOperation class]]; - - // Accept HTTP Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1 - [self setDefaultHeader:@"Accept" value:@"application/json"]; - - return self; -} - -@end diff --git a/candpiosapp/Externals/AFNetworking/Example/Classes/Controllers/PublicTimelineViewController.m b/candpiosapp/Externals/AFNetworking/Example/Classes/Controllers/PublicTimelineViewController.m deleted file mode 100644 index aad2d633..00000000 --- a/candpiosapp/Externals/AFNetworking/Example/Classes/Controllers/PublicTimelineViewController.m +++ /dev/null @@ -1,130 +0,0 @@ -// PublicTimelineViewController.m -// -// Copyright (c) 2012 Mattt Thompson (http://mattt.me/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "PublicTimelineViewController.h" - -#import "Tweet.h" - -#import "TweetTableViewCell.h" - -@interface PublicTimelineViewController () -- (void)reload:(id)sender; -@end - -@implementation PublicTimelineViewController { -@private - NSArray *_tweets; - - __strong UIActivityIndicatorView *_activityIndicatorView; -} - -- (void)reload:(id)sender { - [_activityIndicatorView startAnimating]; - self.navigationItem.rightBarButtonItem.enabled = NO; - - [Tweet publicTimelineTweetsWithBlock:^(NSArray *tweets, NSError *error) { - if (error) { - [[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error", nil) message:[error localizedDescription] delegate:nil cancelButtonTitle:nil otherButtonTitles:NSLocalizedString(@"OK", nil), nil] show]; - } else { - _tweets = tweets; - [self.tableView reloadData]; - } - - [_activityIndicatorView stopAnimating]; - self.navigationItem.rightBarButtonItem.enabled = YES; - }]; -} - -#pragma mark - UIViewController - -- (void)loadView { - [super loadView]; - - _activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite]; - _activityIndicatorView.hidesWhenStopped = YES; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - - self.title = NSLocalizedString(@"AFNetworking", nil); - - self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:_activityIndicatorView]; - self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(reload:)]; - - self.tableView.rowHeight = 70.0f; - - [self reload:nil]; -} - -- (void)viewDidUnload { - _activityIndicatorView = nil; - - [super viewDidUnload]; -} - -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; -} - -- (void)viewDidAppear:(BOOL)animated { - [super viewDidAppear:animated]; -} - -- (void)viewWillDisappear:(BOOL)animated { - [super viewWillDisappear:animated]; -} - -- (void)viewDidDisappear:(BOOL)animated { - [super viewDidDisappear:animated]; -} - -#pragma mark - UITableViewDataSource - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return [_tweets count]; -} - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - static NSString *CellIdentifier = @"Cell"; - - TweetTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; - if (!cell) { - cell = [[TweetTableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier]; - } - - cell.tweet = [_tweets objectAtIndex:indexPath.row]; - - return cell; -} - -#pragma mark - UITableViewDelegate - -- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { - return [TweetTableViewCell heightForCellWithTweet:[_tweets objectAtIndex:indexPath.row]]; -} - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - [tableView deselectRowAtIndexPath:indexPath animated:YES]; -} - -@end diff --git a/candpiosapp/Externals/AFNetworking/Example/Classes/Models/Tweet.h b/candpiosapp/Externals/AFNetworking/Example/Classes/Models/Tweet.h deleted file mode 100644 index 2a41c4b7..00000000 --- a/candpiosapp/Externals/AFNetworking/Example/Classes/Models/Tweet.h +++ /dev/null @@ -1,38 +0,0 @@ -// Tweet.h -// -// Copyright (c) 2012 Mattt Thompson (http://mattt.me/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import <Foundation/Foundation.h> - -@class User; - -@interface Tweet : NSObject - -@property (readonly, assign) NSUInteger tweetID; -@property (readonly, strong) NSString *text; - -@property (readonly, strong) User *user; - -- (id)initWithAttributes:(NSDictionary *)attributes; - -+ (void)publicTimelineTweetsWithBlock:(void (^)(NSArray *tweets, NSError *error))block; - -@end diff --git a/candpiosapp/Externals/AFNetworking/Example/Classes/Models/Tweet.m b/candpiosapp/Externals/AFNetworking/Example/Classes/Models/Tweet.m deleted file mode 100644 index 5e59e199..00000000 --- a/candpiosapp/Externals/AFNetworking/Example/Classes/Models/Tweet.m +++ /dev/null @@ -1,67 +0,0 @@ -// Tweet.m -// -// Copyright (c) 2012 Mattt Thompson (http://mattt.me/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "Tweet.h" -#import "User.h" - -#import "AFTwitterAPIClient.h" - -@implementation Tweet -@synthesize tweetID = _tweetID; -@synthesize text = _text; -@synthesize user = _user; - -- (id)initWithAttributes:(NSDictionary *)attributes { - self = [super init]; - if (!self) { - return nil; - } - - _tweetID = [[attributes valueForKeyPath:@"id"] integerValue]; - _text = [attributes valueForKeyPath:@"text"]; - - _user = [[User alloc] initWithAttributes:[attributes valueForKeyPath:@"user"]]; - - return self; -} - -#pragma mark - - -+ (void)publicTimelineTweetsWithBlock:(void (^)(NSArray *tweets, NSError *error))block { - [[AFTwitterAPIClient sharedClient] getPath:@"statuses/public_timeline.json" parameters:[NSDictionary dictionaryWithObject:@"false" forKey:@"include_entities"] success:^(AFHTTPRequestOperation *operation, id JSON) { - NSMutableArray *mutableTweets = [NSMutableArray arrayWithCapacity:[JSON count]]; - for (NSDictionary *attributes in JSON) { - Tweet *tweet = [[Tweet alloc] initWithAttributes:attributes]; - [mutableTweets addObject:tweet]; - } - - if (block) { - block([NSArray arrayWithArray:mutableTweets], nil); - } - } failure:^(AFHTTPRequestOperation *operation, NSError *error) { - if (block) { - block([NSArray array], error); - } - }]; -} - -@end diff --git a/candpiosapp/Externals/AFNetworking/Example/Classes/Models/User.h b/candpiosapp/Externals/AFNetworking/Example/Classes/Models/User.h deleted file mode 100644 index 25419ef7..00000000 --- a/candpiosapp/Externals/AFNetworking/Example/Classes/Models/User.h +++ /dev/null @@ -1,39 +0,0 @@ -// User.h -// -// Copyright (c) 2012 Mattt Thompson (http://mattt.me/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import <Foundation/Foundation.h> - -extern NSString * const kUserProfileImageDidLoadNotification; - -@interface User : NSObject - -@property (readonly) NSUInteger userID; -@property (strong, readonly) NSString *username; -@property (unsafe_unretained, readonly) NSURL *profileImageURL; - -- (id)initWithAttributes:(NSDictionary *)attributes; - -#if __MAC_OS_X_VERSION_MIN_REQUIRED -@property (nonatomic, strong) NSImage *profileImage; -#endif - -@end diff --git a/candpiosapp/Externals/AFNetworking/Example/Classes/Models/User.m b/candpiosapp/Externals/AFNetworking/Example/Classes/Models/User.m deleted file mode 100644 index a32b4bdf..00000000 --- a/candpiosapp/Externals/AFNetworking/Example/Classes/Models/User.m +++ /dev/null @@ -1,99 +0,0 @@ -// User.m -// -// Copyright (c) 2012 Mattt Thompson (http://mattt.me/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "User.h" -#import "AFImageRequestOperation.h" - -NSString * const kUserProfileImageDidLoadNotification = @"com.alamofire.user.profile-image.loaded"; - -#if __MAC_OS_X_VERSION_MIN_REQUIRED -@interface User () -#if __MAC_OS_X_VERSION_MIN_REQUIRED -+ (NSOperationQueue *)sharedProfileImageRequestOperationQueue; -#endif -@end -#endif - -@implementation User { -@private - __strong NSString *_profileImageURLString; - __strong AFImageRequestOperation *_profileImageRequestOperation; -} - -@synthesize userID = _userID; -@synthesize username = _username; - -- (id)initWithAttributes:(NSDictionary *)attributes { - self = [super init]; - if (!self) { - return nil; - } - - _userID = [[attributes valueForKeyPath:@"id"] integerValue]; - _username = [attributes valueForKeyPath:@"screen_name"]; - _profileImageURLString = [attributes valueForKeyPath:@"profile_image_url_https"]; - - return self; -} - -- (NSURL *)profileImageURL { - return [NSURL URLWithString:_profileImageURLString]; -} - -#if __MAC_OS_X_VERSION_MIN_REQUIRED - -@synthesize profileImage = _profileImage; - -+ (NSOperationQueue *)sharedProfileImageRequestOperationQueue { - static NSOperationQueue *_sharedProfileImageRequestOperationQueue = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - _sharedProfileImageRequestOperationQueue = [[NSOperationQueue alloc] init]; - [_sharedProfileImageRequestOperationQueue setMaxConcurrentOperationCount:8]; - }); - - return _sharedProfileImageRequestOperationQueue; -} - -- (NSImage *)profileImage { - if (!_profileImage && !_profileImageRequestOperation) { - _profileImageRequestOperation = [AFImageRequestOperation imageRequestOperationWithRequest:[NSURLRequest requestWithURL:self.profileImageURL] success:^(NSImage *image) { - self.profileImage = image; - - _profileImageRequestOperation = nil; - - [[NSNotificationCenter defaultCenter] postNotificationName:kUserProfileImageDidLoadNotification object:self userInfo:nil]; - }]; - - [_profileImageRequestOperation setCacheResponseBlock:^NSCachedURLResponse *(NSURLConnection *connection, NSCachedURLResponse *cachedResponse) { - return [[NSCachedURLResponse alloc] initWithResponse:cachedResponse.response data:cachedResponse.data userInfo:cachedResponse.userInfo storagePolicy:NSURLCacheStorageAllowed]; - }]; - - [[[self class] sharedProfileImageRequestOperationQueue] addOperation:_profileImageRequestOperation]; - } - - return _profileImage; -} - -#endif - -@end diff --git a/candpiosapp/Externals/AFNetworking/Example/Classes/Views/TweetTableViewCell.h b/candpiosapp/Externals/AFNetworking/Example/Classes/Views/TweetTableViewCell.h deleted file mode 100644 index d12bec07..00000000 --- a/candpiosapp/Externals/AFNetworking/Example/Classes/Views/TweetTableViewCell.h +++ /dev/null @@ -1,33 +0,0 @@ -// TweetTableViewCell.h -// -// Copyright (c) 2012 Mattt Thompson (http://mattt.me/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import <UIKit/UIKit.h> - -@class Tweet; - -@interface TweetTableViewCell : UITableViewCell - -@property (nonatomic, strong) Tweet *tweet; - -+ (CGFloat)heightForCellWithTweet:(Tweet *)tweet; - -@end diff --git a/candpiosapp/Externals/AFNetworking/Example/Classes/Views/TweetTableViewCell.m b/candpiosapp/Externals/AFNetworking/Example/Classes/Views/TweetTableViewCell.m deleted file mode 100644 index f44c1f9d..00000000 --- a/candpiosapp/Externals/AFNetworking/Example/Classes/Views/TweetTableViewCell.m +++ /dev/null @@ -1,81 +0,0 @@ -// TweetTableViewCell.m -// -// Copyright (c) 2012 Mattt Thompson (http://mattt.me/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "TweetTableViewCell.h" - -#import "Tweet.h" -#import "User.h" - -#import "UIImageView+AFNetworking.h" - -@implementation TweetTableViewCell { -@private - __strong Tweet *_tweet; -} - -@synthesize tweet = _tweet; - -- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; - if (!self) { - return nil; - } - - self.textLabel.adjustsFontSizeToFitWidth = YES; - self.textLabel.textColor = [UIColor darkGrayColor]; - self.detailTextLabel.font = [UIFont systemFontOfSize:12.0f]; - self.detailTextLabel.numberOfLines = 0; - self.selectionStyle = UITableViewCellSelectionStyleGray; - - return self; -} - -- (void)setTweet:(Tweet *)tweet { - _tweet = tweet; - - self.textLabel.text = _tweet.user.username; - self.detailTextLabel.text = _tweet.text; - [self.imageView setImageWithURL:_tweet.user.profileImageURL placeholderImage:[UIImage imageNamed:@"profile-image-placeholder"]]; - - [self setNeedsLayout]; -} - -+ (CGFloat)heightForCellWithTweet:(Tweet *)tweet { - CGSize sizeToFit = [tweet.text sizeWithFont:[UIFont systemFontOfSize:12.0f] constrainedToSize:CGSizeMake(220.0f, CGFLOAT_MAX) lineBreakMode:UILineBreakModeWordWrap]; - - return fmaxf(70.0f, sizeToFit.height + 45.0f); -} - -#pragma mark - UIView - -- (void)layoutSubviews { - [super layoutSubviews]; - - self.imageView.frame = CGRectMake(10.0f, 10.0f, 50.0f, 50.0f); - self.textLabel.frame = CGRectMake(70.0f, 10.0f, 240.0f, 20.0f); - - CGRect detailTextLabelFrame = CGRectOffset(self.textLabel.frame, 0.0f, 25.0f); - detailTextLabelFrame.size.height = [[self class] heightForCellWithTweet:_tweet] - 45.0f; - self.detailTextLabel.frame = detailTextLabelFrame; -} - -@end diff --git a/candpiosapp/Externals/AFNetworking/Example/Default.png b/candpiosapp/Externals/AFNetworking/Example/Default.png deleted file mode 100644 index b4364952..00000000 Binary files a/candpiosapp/Externals/AFNetworking/Example/Default.png and /dev/null differ diff --git a/candpiosapp/Externals/AFNetworking/Example/Default@2x.png b/candpiosapp/Externals/AFNetworking/Example/Default@2x.png deleted file mode 100644 index f65fbcce..00000000 Binary files a/candpiosapp/Externals/AFNetworking/Example/Default@2x.png and /dev/null differ diff --git a/candpiosapp/Externals/AFNetworking/Example/Icon.png b/candpiosapp/Externals/AFNetworking/Example/Icon.png deleted file mode 100644 index 9956cb16..00000000 Binary files a/candpiosapp/Externals/AFNetworking/Example/Icon.png and /dev/null differ diff --git a/candpiosapp/Externals/AFNetworking/Example/Icon@2x.png b/candpiosapp/Externals/AFNetworking/Example/Icon@2x.png deleted file mode 100644 index 7fcc2264..00000000 Binary files a/candpiosapp/Externals/AFNetworking/Example/Icon@2x.png and /dev/null differ diff --git a/candpiosapp/Externals/AFNetworking/Example/Images/profile-image-placeholder.png b/candpiosapp/Externals/AFNetworking/Example/Images/profile-image-placeholder.png deleted file mode 100644 index 4503b5b9..00000000 Binary files a/candpiosapp/Externals/AFNetworking/Example/Images/profile-image-placeholder.png and /dev/null differ diff --git a/candpiosapp/Externals/AFNetworking/Example/Images/profile-image-placeholder@2x.png b/candpiosapp/Externals/AFNetworking/Example/Images/profile-image-placeholder@2x.png deleted file mode 100644 index ee6e24f5..00000000 Binary files a/candpiosapp/Externals/AFNetworking/Example/Images/profile-image-placeholder@2x.png and /dev/null differ diff --git a/candpiosapp/Externals/AFNetworking/Example/Mac-Info.plist b/candpiosapp/Externals/AFNetworking/Example/Mac-Info.plist deleted file mode 100644 index fc1c1f64..00000000 --- a/candpiosapp/Externals/AFNetworking/Example/Mac-Info.plist +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleDevelopmentRegion</key> - <string>en</string> - <key>CFBundleExecutable</key> - <string>${EXECUTABLE_NAME}</string> - <key>CFBundleIconFile</key> - <string></string> - <key>CFBundleIdentifier</key> - <string>com.alamofire.${PRODUCT_NAME:rfc1034identifier}</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundleName</key> - <string>${PRODUCT_NAME}</string> - <key>CFBundlePackageType</key> - <string>APPL</string> - <key>CFBundleShortVersionString</key> - <string>1.0</string> - <key>CFBundleSignature</key> - <string>????</string> - <key>CFBundleVersion</key> - <string>1</string> - <key>LSMinimumSystemVersion</key> - <string>${MACOSX_DEPLOYMENT_TARGET}</string> - <key>NSHumanReadableCopyright</key> - <string>Copyright © 2012年 Mattt Thompson. All rights reserved.</string> - <key>NSMainNibFile</key> - <string>MainMenu</string> - <key>NSPrincipalClass</key> - <string>NSApplication</string> -</dict> -</plist> diff --git a/candpiosapp/Externals/AFNetworking/Example/MainMenu.xib b/candpiosapp/Externals/AFNetworking/Example/MainMenu.xib deleted file mode 100644 index 6c474398..00000000 --- a/candpiosapp/Externals/AFNetworking/Example/MainMenu.xib +++ /dev/null @@ -1,2069 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10"> - <data> - <int key="IBDocument.SystemTarget">1070</int> - <string key="IBDocument.SystemVersion">11E53</string> - <string key="IBDocument.InterfaceBuilderVersion">2182</string> - <string key="IBDocument.AppKitVersion">1138.47</string> - <string key="IBDocument.HIToolboxVersion">569.00</string> - <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> - <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="NS.object.0">2182</string> - </object> - <object class="NSArray" key="IBDocument.IntegratedClassDependencies"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>NSScroller</string> - <string>NSArrayController</string> - <string>NSMenuItem</string> - <string>NSMenu</string> - <string>NSScrollView</string> - <string>NSTextFieldCell</string> - <string>NSImageView</string> - <string>NSImageCell</string> - <string>NSTableView</string> - <string>NSTableCellView</string> - <string>IBNSLayoutConstraint</string> - <string>NSCustomObject</string> - <string>NSView</string> - <string>NSWindowTemplate</string> - <string>NSTableColumn</string> - <string>NSTextField</string> - </object> - <object class="NSArray" key="IBDocument.PluginDependencies"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - </object> - <object class="NSMutableDictionary" key="IBDocument.Metadata"> - <string key="NS.key.0">PluginDependencyRecalculationVersion</string> - <integer value="1" key="NS.object.0"/> - </object> - <object class="NSMutableArray" key="IBDocument.RootObjects" id="1048"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSCustomObject" id="1021"> - <string key="NSClassName">NSApplication</string> - </object> - <object class="NSCustomObject" id="1014"> - <string key="NSClassName">FirstResponder</string> - </object> - <object class="NSCustomObject" id="1050"> - <string key="NSClassName">NSApplication</string> - </object> - <object class="NSMenu" id="649796088"> - <string key="NSTitle">AMainMenu</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="694149608"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">AFNetworking Mac Example</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <object class="NSCustomResource" key="NSOnImage" id="35465992"> - <string key="NSClassName">NSImage</string> - <string key="NSResourceName">NSMenuCheckmark</string> - </object> - <object class="NSCustomResource" key="NSMixedImage" id="502551668"> - <string key="NSClassName">NSImage</string> - <string key="NSResourceName">NSMenuMixedState</string> - </object> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="110575045"> - <string key="NSTitle">AFNetworking Mac Example</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="238522557"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">About AFNetworking Mac Example</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="304266470"> - <reference key="NSMenu" ref="110575045"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="1046388886"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Services</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="752062318"> - <string key="NSTitle">Services</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - </object> - <string key="NSName">_NSServicesMenu</string> - </object> - </object> - <object class="NSMenuItem" id="646227648"> - <reference key="NSMenu" ref="110575045"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="755159360"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Hide AFNetworking Mac Example</string> - <string key="NSKeyEquiv">h</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="342932134"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Hide Others</string> - <string key="NSKeyEquiv">h</string> - <int key="NSKeyEquivModMask">1572864</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="908899353"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Show All</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="1056857174"> - <reference key="NSMenu" ref="110575045"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="632727374"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Quit AFNetworking Mac Example</string> - <string key="NSKeyEquiv">q</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </object> - <string key="NSName">_NSAppleMenu</string> - </object> - </object> - <object class="NSMenuItem" id="141598972"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">File</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="702625398"> - <string key="NSTitle">File</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="943041763"> - <reference key="NSMenu" ref="702625398"/> - <string key="NSTitle">New</string> - <string key="NSKeyEquiv">n</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="883464109"> - <reference key="NSMenu" ref="702625398"/> - <string key="NSTitle">Open…</string> - <string key="NSKeyEquiv">o</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="858489037"> - <reference key="NSMenu" ref="702625398"/> - <string key="NSTitle">Open Recent</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="878241342"> - <string key="NSTitle">Open Recent</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="56667518"> - <reference key="NSMenu" ref="878241342"/> - <string key="NSTitle">Clear Menu</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </object> - <string key="NSName">_NSRecentDocumentsMenu</string> - </object> - </object> - <object class="NSMenuItem" id="13890772"> - <reference key="NSMenu" ref="702625398"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="713570148"> - <reference key="NSMenu" ref="702625398"/> - <string key="NSTitle">Close</string> - <string key="NSKeyEquiv">w</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="847949808"> - <reference key="NSMenu" ref="702625398"/> - <string key="NSTitle">Save</string> - <string key="NSKeyEquiv">s</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="787531788"> - <reference key="NSMenu" ref="702625398"/> - <string key="NSTitle">Save As…</string> - <string key="NSKeyEquiv">S</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="269865460"> - <reference key="NSMenu" ref="702625398"/> - <string key="NSTitle">Revert to Saved</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="157520762"> - <reference key="NSMenu" ref="702625398"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="245280452"> - <reference key="NSMenu" ref="702625398"/> - <string key="NSTitle">Page Setup…</string> - <string key="NSKeyEquiv">P</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="1012221138"> - <reference key="NSMenu" ref="702625398"/> - <string key="NSTitle">Print…</string> - <string key="NSKeyEquiv">p</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </object> - </object> - </object> - <object class="NSMenuItem" id="713487014"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">Window</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="835318025"> - <string key="NSTitle">Window</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="1011231497"> - <reference key="NSMenu" ref="835318025"/> - <string key="NSTitle">Minimize</string> - <string key="NSKeyEquiv">m</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="575023229"> - <reference key="NSMenu" ref="835318025"/> - <string key="NSTitle">Zoom</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="299356726"> - <reference key="NSMenu" ref="835318025"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="625202149"> - <reference key="NSMenu" ref="835318025"/> - <string key="NSTitle">Bring All to Front</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </object> - <string key="NSName">_NSWindowsMenu</string> - </object> - </object> - <object class="NSMenuItem" id="448692316"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">Help</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="992780483"> - <string key="NSTitle">Help</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="105068016"> - <reference key="NSMenu" ref="992780483"/> - <string key="NSTitle">AFNetworking Mac Example Help</string> - <string key="NSKeyEquiv">?</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </object> - <string key="NSName">_NSHelpMenu</string> - </object> - </object> - </object> - <string key="NSName">_NSMainMenu</string> - </object> - <object class="NSWindowTemplate" id="972006081"> - <int key="NSWindowStyleMask">4111</int> - <int key="NSWindowBacking">2</int> - <string key="NSWindowRect">{{60, 295}, {331, 500}}</string> - <int key="NSWTFlags">1954022400</int> - <string key="NSWindowTitle">AFNetworking Mac Example</string> - <string key="NSWindowClass">NSWindow</string> - <nil key="NSViewClass"/> - <nil key="NSUserInterfaceItemIdentifier"/> - <string key="NSWindowContentMaxSize">{375, 1280}</string> - <string key="NSWindowContentMinSize">{375, 200}</string> - <object class="NSView" key="NSWindowView" id="439893737"> - <reference key="NSNextResponder"/> - <int key="NSvFlags">256</int> - <object class="NSMutableArray" key="NSSubviews"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSScrollView" id="905625827"> - <reference key="NSNextResponder" ref="439893737"/> - <int key="NSvFlags">274</int> - <object class="NSMutableArray" key="NSSubviews"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSClipView" id="411548182"> - <reference key="NSNextResponder" ref="905625827"/> - <int key="NSvFlags">2304</int> - <object class="NSMutableArray" key="NSSubviews"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSTableView" id="256434433"> - <reference key="NSNextResponder" ref="411548182"/> - <int key="NSvFlags">256</int> - <string key="NSFrameSize">{331, 498}</string> - <reference key="NSSuperview" ref="411548182"/> - <reference key="NSWindow"/> - <reference key="NSNextKeyView" ref="505772708"/> - <string key="NSReuseIdentifierKey">_NS:1197</string> - <bool key="NSEnabled">YES</bool> - <object class="_NSCornerView" key="NSCornerView"> - <nil key="NSNextResponder"/> - <int key="NSvFlags">-2147483392</int> - <string key="NSFrame">{{224, 0}, {16, 17}}</string> - <string key="NSReuseIdentifierKey">_NS:1202</string> - </object> - <object class="NSMutableArray" key="NSTableColumns"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSTableColumn" id="553559566"> - <double key="NSWidth">321</double> - <double key="NSMinWidth">70</double> - <double key="NSMaxWidth">10000</double> - <object class="NSTableHeaderCell" key="NSHeaderCell"> - <int key="NSCellFlags">75628096</int> - <int key="NSCellFlags2">2048</int> - <string key="NSContents"/> - <object class="NSFont" key="NSSupport"> - <string key="NSName">LucidaGrande</string> - <double key="NSSize">11</double> - <int key="NSfFlags">3100</int> - </object> - <object class="NSColor" key="NSBackgroundColor"> - <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes> - </object> - <object class="NSColor" key="NSTextColor"> - <int key="NSColorSpace">6</int> - <string key="NSCatalogName">System</string> - <string key="NSColorName">headerTextColor</string> - <object class="NSColor" key="NSColor" id="840334811"> - <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MAA</bytes> - </object> - </object> - </object> - <object class="NSImageCell" key="NSDataCell" id="717955434"> - <int key="NSCellFlags">67239424</int> - <int key="NSCellFlags2">33554432</int> - <object class="NSFont" key="NSSupport"> - <string key="NSName">LucidaGrande</string> - <double key="NSSize">13</double> - <int key="NSfFlags">1044</int> - </object> - <string key="NSCellIdentifier">_NS:4045</string> - <int key="NSAlign">1</int> - <int key="NSScale">0</int> - <int key="NSStyle">0</int> - <bool key="NSAnimates">NO</bool> - </object> - <int key="NSResizingMask">3</int> - <bool key="NSIsResizeable">YES</bool> - <bool key="NSIsEditable">YES</bool> - <reference key="NSTableView" ref="256434433"/> - </object> - </object> - <double key="NSIntercellSpacingWidth">10</double> - <double key="NSIntercellSpacingHeight">10</double> - <object class="NSColor" key="NSBackgroundColor"> - <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MQA</bytes> - </object> - <object class="NSColor" key="NSGridColor"> - <int key="NSColorSpace">6</int> - <string key="NSCatalogName">System</string> - <string key="NSColorName">gridColor</string> - <object class="NSColor" key="NSColor"> - <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MC41AA</bytes> - </object> - </object> - <double key="NSRowHeight">85</double> - <int key="NSTvFlags">381714432</int> - <reference key="NSDelegate"/> - <reference key="NSDataSource"/> - <int key="NSColumnAutoresizingStyle">1</int> - <int key="NSDraggingSourceMaskForLocal">15</int> - <int key="NSDraggingSourceMaskForNonLocal">0</int> - <bool key="NSAllowsTypeSelect">YES</bool> - <int key="NSTableViewDraggingDestinationStyle">0</int> - <int key="NSTableViewGroupRowStyle">1</int> - </object> - </object> - <string key="NSFrame">{{1, 1}, {331, 498}}</string> - <reference key="NSSuperview" ref="905625827"/> - <reference key="NSWindow"/> - <reference key="NSNextKeyView" ref="256434433"/> - <string key="NSReuseIdentifierKey">_NS:1195</string> - <reference key="NSDocView" ref="256434433"/> - <object class="NSColor" key="NSBGColor"> - <int key="NSColorSpace">6</int> - <string key="NSCatalogName">System</string> - <string key="NSColorName">controlBackgroundColor</string> - <object class="NSColor" key="NSColor" id="77157331"> - <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes> - </object> - </object> - <int key="NScvFlags">4</int> - </object> - <object class="NSScroller" id="830874312"> - <reference key="NSNextResponder" ref="905625827"/> - <int key="NSvFlags">-2147483392</int> - <string key="NSFrame">{{224, 17}, {15, 102}}</string> - <reference key="NSSuperview" ref="905625827"/> - <reference key="NSWindow"/> - <reference key="NSNextKeyView" ref="870849666"/> - <string key="NSReuseIdentifierKey">_NS:1214</string> - <reference key="NSTarget" ref="905625827"/> - <string key="NSAction">_doScroller:</string> - <double key="NSPercent">0.99815157116451014</double> - </object> - <object class="NSScroller" id="870849666"> - <reference key="NSNextResponder" ref="905625827"/> - <int key="NSvFlags">-2147483392</int> - <string key="NSFrame">{{1, 484}, {373, 15}}</string> - <reference key="NSSuperview" ref="905625827"/> - <reference key="NSWindow"/> - <string key="NSReuseIdentifierKey">_NS:1216</string> - <int key="NSsFlags">1</int> - <reference key="NSTarget" ref="905625827"/> - <string key="NSAction">_doScroller:</string> - <double key="NSPercent">0.99732620320855614</double> - </object> - </object> - <string key="NSFrame">{{-1, 0}, {333, 500}}</string> - <reference key="NSSuperview" ref="439893737"/> - <reference key="NSWindow"/> - <reference key="NSNextKeyView" ref="411548182"/> - <string key="NSReuseIdentifierKey">_NS:1193</string> - <int key="NSsFlags">133682</int> - <reference key="NSVScroller" ref="830874312"/> - <reference key="NSHScroller" ref="870849666"/> - <reference key="NSContentView" ref="411548182"/> - <bytes key="NSScrollAmts">QSAAAEEgAABCvgAAQr4AAA</bytes> - </object> - </object> - <string key="NSFrameSize">{331, 500}</string> - <reference key="NSSuperview"/> - <reference key="NSWindow"/> - <reference key="NSNextKeyView" ref="905625827"/> - </object> - <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string> - <string key="NSMinSize">{375, 222}</string> - <string key="NSMaxSize">{375, 1302}</string> - <bool key="NSWindowIsRestorable">YES</bool> - </object> - <object class="NSCustomObject" id="976324537"> - <string key="NSClassName">AppDelegate</string> - </object> - <object class="NSCustomObject" id="755631768"> - <string key="NSClassName">NSFontManager</string> - </object> - <object class="NSArrayController" id="680254480"> - <string key="NSObjectClassName">Spot</string> - <object class="_NSManagedProxy" key="_NSManagedProxy"/> - <bool key="NSAvoidsEmptySelection">YES</bool> - <bool key="NSPreservesSelection">YES</bool> - <bool key="NSSelectsInsertedObjects">YES</bool> - <bool key="NSFilterRestrictsInsertion">YES</bool> - <bool key="NSClearsFilterPredicateOnInsertion">YES</bool> - </object> - </object> - <object class="IBObjectContainer" key="IBDocument.Objects"> - <object class="NSMutableArray" key="connectionRecords"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">terminate:</string> - <reference key="source" ref="1050"/> - <reference key="destination" ref="632727374"/> - </object> - <int key="connectionID">449</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">orderFrontStandardAboutPanel:</string> - <reference key="source" ref="1021"/> - <reference key="destination" ref="238522557"/> - </object> - <int key="connectionID">142</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">delegate</string> - <reference key="source" ref="1021"/> - <reference key="destination" ref="976324537"/> - </object> - <int key="connectionID">615</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">performMiniaturize:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="1011231497"/> - </object> - <int key="connectionID">37</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">arrangeInFront:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="625202149"/> - </object> - <int key="connectionID">39</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">performZoom:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="575023229"/> - </object> - <int key="connectionID">240</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">hide:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="755159360"/> - </object> - <int key="connectionID">367</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">hideOtherApplications:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="342932134"/> - </object> - <int key="connectionID">368</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">unhideAllApplications:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="908899353"/> - </object> - <int key="connectionID">370</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">showHelp:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="105068016"/> - </object> - <int key="connectionID">493</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">print:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="1012221138"/> - </object> - <int key="connectionID">632</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">performClose:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="713570148"/> - </object> - <int key="connectionID">634</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">saveDocumentAs:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="787531788"/> - </object> - <int key="connectionID">637</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">runPageLayout:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="245280452"/> - </object> - <int key="connectionID">638</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">saveDocument:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="847949808"/> - </object> - <int key="connectionID">639</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">revertDocumentToSaved:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="269865460"/> - </object> - <int key="connectionID">640</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">newDocument:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="943041763"/> - </object> - <int key="connectionID">635</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">clearRecentDocuments:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="56667518"/> - </object> - <int key="connectionID">636</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">openDocument:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="883464109"/> - </object> - <int key="connectionID">633</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">window</string> - <reference key="source" ref="976324537"/> - <reference key="destination" ref="972006081"/> - </object> - <int key="connectionID">532</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">tweetsArrayController</string> - <reference key="source" ref="976324537"/> - <reference key="destination" ref="680254480"/> - </object> - <int key="connectionID">609</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">tableView</string> - <reference key="source" ref="976324537"/> - <reference key="destination" ref="256434433"/> - </object> - <int key="connectionID">848</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBBindingConnection" key="connection"> - <string key="label">value: arrangedObjects</string> - <reference key="source" ref="553559566"/> - <reference key="destination" ref="680254480"/> - <object class="NSNibBindingConnector" key="connector"> - <reference key="NSSource" ref="553559566"/> - <reference key="NSDestination" ref="680254480"/> - <string key="NSLabel">value: arrangedObjects</string> - <string key="NSBinding">value</string> - <string key="NSKeyPath">arrangedObjects</string> - <int key="NSNibBindingConnectorVersion">2</int> - </object> - </object> - <int key="connectionID">598</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">textField</string> - <object class="NSTableCellView" key="source" id="505772708"> - <nil key="NSNextResponder"/> - <int key="NSvFlags">274</int> - <object class="NSMutableArray" key="NSSubviews"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSTextField" id="373530427"> - <reference key="NSNextResponder" ref="505772708"/> - <int key="NSvFlags">266</int> - <string key="NSFrame">{{84, 65}, {237, 17}}</string> - <reference key="NSSuperview" ref="505772708"/> - <reference key="NSNextKeyView" ref="472484220"/> - <string key="NSAntiCompressionPriority">{250, 750}</string> - <bool key="NSEnabled">YES</bool> - <object class="NSTextFieldCell" key="NSCell" id="602054441"> - <int key="NSCellFlags">67239488</int> - <int key="NSCellFlags2">272631808</int> - <string key="NSContents">Username</string> - <object class="NSFont" key="NSSupport"> - <string key="NSName">LucidaGrande-Bold</string> - <double key="NSSize">14</double> - <int key="NSfFlags">16</int> - </object> - <reference key="NSControlView" ref="373530427"/> - <object class="NSColor" key="NSBackgroundColor" id="790157350"> - <int key="NSColorSpace">6</int> - <string key="NSCatalogName">System</string> - <string key="NSColorName">controlColor</string> - <reference key="NSColor" ref="77157331"/> - </object> - <object class="NSColor" key="NSTextColor" id="475189419"> - <int key="NSColorSpace">6</int> - <string key="NSCatalogName">System</string> - <string key="NSColorName">controlTextColor</string> - <reference key="NSColor" ref="840334811"/> - </object> - </object> - </object> - <object class="NSImageView" id="615770799"> - <reference key="NSNextResponder" ref="505772708"/> - <int key="NSvFlags">268</int> - <object class="NSMutableSet" key="NSDragTypes"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="set.sortedObjects"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>Apple PDF pasteboard type</string> - <string>Apple PICT pasteboard type</string> - <string>Apple PNG pasteboard type</string> - <string>NSFilenamesPboardType</string> - <string>NeXT Encapsulated PostScript v1.2 pasteboard type</string> - <string>NeXT TIFF v4.0 pasteboard type</string> - </object> - </object> - <string key="NSFrame">{{14, 21}, {56, 56}}</string> - <reference key="NSSuperview" ref="505772708"/> - <reference key="NSNextKeyView" ref="373530427"/> - <string key="NSReuseIdentifierKey">_NS:9</string> - <bool key="NSEnabled">YES</bool> - <object class="NSImageCell" key="NSCell" id="1006424888"> - <int key="NSCellFlags">130560</int> - <int key="NSCellFlags2">33554432</int> - <string key="NSCellIdentifier">_NS:9</string> - <int key="NSAlign">0</int> - <int key="NSScale">0</int> - <int key="NSStyle">1</int> - <bool key="NSAnimates">NO</bool> - </object> - <bool key="NSEditable">YES</bool> - </object> - <object class="NSTextField" id="472484220"> - <reference key="NSNextResponder" ref="505772708"/> - <int key="NSvFlags">268</int> - <string key="NSFrame">{{84, 3}, {236, 56}}</string> - <reference key="NSSuperview" ref="505772708"/> - <reference key="NSNextKeyView" ref="830874312"/> - <string key="NSReuseIdentifierKey">_NS:9</string> - <string key="NSAntiCompressionPriority">{250, 750}</string> - <bool key="NSEnabled">YES</bool> - <object class="NSTextFieldCell" key="NSCell" id="429971541"> - <int key="NSCellFlags">67239424</int> - <int key="NSCellFlags2">272629760</int> - <string key="NSContents">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad mi.</string> - <object class="NSFont" key="NSSupport"> - <string key="NSName">LucidaGrande</string> - <double key="NSSize">11</double> - <int key="NSfFlags">16</int> - </object> - <string key="NSCellIdentifier">_NS:9</string> - <reference key="NSControlView" ref="472484220"/> - <reference key="NSBackgroundColor" ref="790157350"/> - <reference key="NSTextColor" ref="475189419"/> - </object> - </object> - </object> - <string key="NSFrame">{{5, 5}, {321, 85}}</string> - <reference key="NSNextKeyView" ref="615770799"/> - </object> - <reference key="destination" ref="373530427"/> - </object> - <int key="connectionID">580</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBBindingConnection" key="connection"> - <string key="label">value: objectValue.user.username</string> - <reference key="source" ref="373530427"/> - <reference key="destination" ref="505772708"/> - <object class="NSNibBindingConnector" key="connector"> - <reference key="NSSource" ref="373530427"/> - <reference key="NSDestination" ref="505772708"/> - <string key="NSLabel">value: objectValue.user.username</string> - <string key="NSBinding">value</string> - <string key="NSKeyPath">objectValue.user.username</string> - <int key="NSNibBindingConnectorVersion">2</int> - </object> - </object> - <int key="connectionID">604</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBBindingConnection" key="connection"> - <string key="label">value: objectValue.user.profileImage</string> - <reference key="source" ref="615770799"/> - <reference key="destination" ref="505772708"/> - <object class="NSNibBindingConnector" key="connector"> - <reference key="NSSource" ref="615770799"/> - <reference key="NSDestination" ref="505772708"/> - <string key="NSLabel">value: objectValue.user.profileImage</string> - <string key="NSBinding">value</string> - <string key="NSKeyPath">objectValue.user.profileImage</string> - <int key="NSNibBindingConnectorVersion">2</int> - </object> - </object> - <int key="connectionID">829</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBBindingConnection" key="connection"> - <string key="label">value: objectValue.text</string> - <reference key="source" ref="472484220"/> - <reference key="destination" ref="505772708"/> - <object class="NSNibBindingConnector" key="connector"> - <reference key="NSSource" ref="472484220"/> - <reference key="NSDestination" ref="505772708"/> - <string key="NSLabel">value: objectValue.text</string> - <string key="NSBinding">value</string> - <string key="NSKeyPath">objectValue.text</string> - <int key="NSNibBindingConnectorVersion">2</int> - </object> - </object> - <int key="connectionID">605</int> - </object> - </object> - <object class="IBMutableOrderedSet" key="objectRecords"> - <object class="NSArray" key="orderedObjects"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBObjectRecord"> - <int key="objectID">0</int> - <object class="NSArray" key="object" id="0"> - <bool key="EncodedWithXMLCoder">YES</bool> - </object> - <reference key="children" ref="1048"/> - <nil key="parent"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">-2</int> - <reference key="object" ref="1021"/> - <reference key="parent" ref="0"/> - <string key="objectName">File's Owner</string> - </object> - <object class="IBObjectRecord"> - <int key="objectID">-1</int> - <reference key="object" ref="1014"/> - <reference key="parent" ref="0"/> - <string key="objectName">First Responder</string> - </object> - <object class="IBObjectRecord"> - <int key="objectID">-3</int> - <reference key="object" ref="1050"/> - <reference key="parent" ref="0"/> - <string key="objectName">Application</string> - </object> - <object class="IBObjectRecord"> - <int key="objectID">29</int> - <reference key="object" ref="649796088"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="713487014"/> - <reference ref="694149608"/> - <reference ref="448692316"/> - <reference ref="141598972"/> - </object> - <reference key="parent" ref="0"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">19</int> - <reference key="object" ref="713487014"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="835318025"/> - </object> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">56</int> - <reference key="object" ref="694149608"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="110575045"/> - </object> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">57</int> - <reference key="object" ref="110575045"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="238522557"/> - <reference ref="755159360"/> - <reference ref="908899353"/> - <reference ref="632727374"/> - <reference ref="646227648"/> - <reference ref="304266470"/> - <reference ref="1046388886"/> - <reference ref="1056857174"/> - <reference ref="342932134"/> - </object> - <reference key="parent" ref="694149608"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">58</int> - <reference key="object" ref="238522557"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">134</int> - <reference key="object" ref="755159360"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">150</int> - <reference key="object" ref="908899353"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">136</int> - <reference key="object" ref="632727374"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">144</int> - <reference key="object" ref="646227648"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">236</int> - <reference key="object" ref="304266470"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">131</int> - <reference key="object" ref="1046388886"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="752062318"/> - </object> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">149</int> - <reference key="object" ref="1056857174"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">145</int> - <reference key="object" ref="342932134"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">130</int> - <reference key="object" ref="752062318"/> - <reference key="parent" ref="1046388886"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">24</int> - <reference key="object" ref="835318025"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="299356726"/> - <reference ref="625202149"/> - <reference ref="575023229"/> - <reference ref="1011231497"/> - </object> - <reference key="parent" ref="713487014"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">92</int> - <reference key="object" ref="299356726"/> - <reference key="parent" ref="835318025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">5</int> - <reference key="object" ref="625202149"/> - <reference key="parent" ref="835318025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">239</int> - <reference key="object" ref="575023229"/> - <reference key="parent" ref="835318025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">23</int> - <reference key="object" ref="1011231497"/> - <reference key="parent" ref="835318025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">371</int> - <reference key="object" ref="972006081"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="439893737"/> - </object> - <reference key="parent" ref="0"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">372</int> - <reference key="object" ref="439893737"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="905625827"/> - <object class="IBNSLayoutConstraint" id="467789989"> - <reference key="firstItem" ref="905625827"/> - <int key="firstAttribute">10</int> - <int key="relation">0</int> - <reference key="secondItem" ref="439893737"/> - <int key="secondAttribute">10</int> - <float key="multiplier">1</float> - <object class="IBLayoutConstant" key="constant"> - <double key="value">0.0</double> - </object> - <float key="priority">1000</float> - <int key="scoringType">5</int> - <float key="scoringTypeFloat">22</float> - <int key="contentType">2</int> - <reference key="containingView" ref="439893737"/> - </object> - <object class="IBNSLayoutConstraint" id="792626335"> - <reference key="firstItem" ref="439893737"/> - <int key="firstAttribute">6</int> - <int key="relation">0</int> - <reference key="secondItem" ref="905625827"/> - <int key="secondAttribute">6</int> - <float key="multiplier">1</float> - <object class="IBLayoutConstant" key="constant"> - <double key="value">-1</double> - </object> - <float key="priority">1000</float> - <int key="scoringType">8</int> - <float key="scoringTypeFloat">29</float> - <int key="contentType">3</int> - <reference key="containingView" ref="439893737"/> - </object> - <object class="IBNSLayoutConstraint" id="865651107"> - <reference key="firstItem" ref="905625827"/> - <int key="firstAttribute">5</int> - <int key="relation">0</int> - <reference key="secondItem" ref="439893737"/> - <int key="secondAttribute">5</int> - <float key="multiplier">1</float> - <object class="IBLayoutConstant" key="constant"> - <double key="value">-1</double> - </object> - <float key="priority">1000</float> - <int key="scoringType">8</int> - <float key="scoringTypeFloat">29</float> - <int key="contentType">3</int> - <reference key="containingView" ref="439893737"/> - </object> - <object class="IBNSLayoutConstraint" id="590922666"> - <reference key="firstItem" ref="905625827"/> - <int key="firstAttribute">3</int> - <int key="relation">0</int> - <reference key="secondItem" ref="439893737"/> - <int key="secondAttribute">3</int> - <float key="multiplier">1</float> - <object class="IBLayoutConstant" key="constant"> - <double key="value">0.0</double> - </object> - <float key="priority">1000</float> - <int key="scoringType">3</int> - <float key="scoringTypeFloat">9</float> - <int key="contentType">3</int> - <reference key="containingView" ref="439893737"/> - </object> - </object> - <reference key="parent" ref="972006081"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">420</int> - <reference key="object" ref="755631768"/> - <reference key="parent" ref="0"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">490</int> - <reference key="object" ref="448692316"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="992780483"/> - </object> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">491</int> - <reference key="object" ref="992780483"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="105068016"/> - </object> - <reference key="parent" ref="448692316"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">492</int> - <reference key="object" ref="105068016"/> - <reference key="parent" ref="992780483"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">494</int> - <reference key="object" ref="976324537"/> - <reference key="parent" ref="0"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">555</int> - <reference key="object" ref="680254480"/> - <reference key="parent" ref="0"/> - <string key="objectName">Tweets Array Controller</string> - </object> - <object class="IBObjectRecord"> - <int key="objectID">537</int> - <reference key="object" ref="905625827"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="830874312"/> - <reference ref="870849666"/> - <reference ref="256434433"/> - </object> - <reference key="parent" ref="439893737"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">541</int> - <reference key="object" ref="256434433"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="553559566"/> - </object> - <reference key="parent" ref="905625827"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">542</int> - <reference key="object" ref="553559566"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="717955434"/> - <reference ref="505772708"/> - </object> - <reference key="parent" ref="256434433"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">546</int> - <reference key="object" ref="717955434"/> - <reference key="parent" ref="553559566"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">540</int> - <reference key="object" ref="870849666"/> - <reference key="parent" ref="905625827"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">538</int> - <reference key="object" ref="830874312"/> - <reference key="parent" ref="905625827"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">577</int> - <reference key="object" ref="505772708"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="373530427"/> - <reference ref="472484220"/> - <object class="IBNSLayoutConstraint" id="716515170"> - <reference key="firstItem" ref="472484220"/> - <int key="firstAttribute">3</int> - <int key="relation">0</int> - <reference key="secondItem" ref="505772708"/> - <int key="secondAttribute">3</int> - <float key="multiplier">1</float> - <object class="IBLayoutConstant" key="constant"> - <double key="value">26</double> - </object> - <float key="priority">1000</float> - <int key="scoringType">9</int> - <float key="scoringTypeFloat">40</float> - <int key="contentType">3</int> - <reference key="containingView" ref="505772708"/> - </object> - <reference ref="615770799"/> - <object class="IBNSLayoutConstraint" id="124660203"> - <reference key="firstItem" ref="615770799"/> - <int key="firstAttribute">5</int> - <int key="relation">0</int> - <reference key="secondItem" ref="505772708"/> - <int key="secondAttribute">5</int> - <float key="multiplier">1</float> - <object class="IBLayoutConstant" key="constant"> - <double key="value">17</double> - </object> - <float key="priority">1000</float> - <int key="scoringType">3</int> - <float key="scoringTypeFloat">9</float> - <int key="contentType">3</int> - <reference key="containingView" ref="505772708"/> - </object> - <object class="IBNSLayoutConstraint" id="210332473"> - <reference key="firstItem" ref="615770799"/> - <int key="firstAttribute">3</int> - <int key="relation">0</int> - <reference key="secondItem" ref="505772708"/> - <int key="secondAttribute">3</int> - <float key="multiplier">1</float> - <object class="IBLayoutConstant" key="constant"> - <double key="value">11</double> - </object> - <float key="priority">1000</float> - <int key="scoringType">3</int> - <float key="scoringTypeFloat">9</float> - <int key="contentType">3</int> - <reference key="containingView" ref="505772708"/> - </object> - <object class="IBNSLayoutConstraint" id="971396673"> - <reference key="firstItem" ref="505772708"/> - <int key="firstAttribute">6</int> - <int key="relation">0</int> - <reference key="secondItem" ref="373530427"/> - <int key="secondAttribute">6</int> - <float key="multiplier">1</float> - <object class="IBLayoutConstant" key="constant"> - <double key="value">3</double> - </object> - <float key="priority">1000</float> - <int key="scoringType">9</int> - <float key="scoringTypeFloat">40</float> - <int key="contentType">3</int> - <reference key="containingView" ref="505772708"/> - </object> - <object class="IBNSLayoutConstraint" id="14444973"> - <reference key="firstItem" ref="373530427"/> - <int key="firstAttribute">5</int> - <int key="relation">0</int> - <reference key="secondItem" ref="472484220"/> - <int key="secondAttribute">5</int> - <float key="multiplier">1</float> - <object class="IBLayoutConstant" key="constant"> - <double key="value">0.0</double> - </object> - <float key="priority">1000</float> - <int key="scoringType">9</int> - <float key="scoringTypeFloat">40</float> - <int key="contentType">2</int> - <reference key="containingView" ref="505772708"/> - </object> - <object class="IBNSLayoutConstraint" id="1049409873"> - <reference key="firstItem" ref="373530427"/> - <int key="firstAttribute">3</int> - <int key="relation">0</int> - <reference key="secondItem" ref="505772708"/> - <int key="secondAttribute">3</int> - <float key="multiplier">1</float> - <object class="IBLayoutConstant" key="constant"> - <double key="value">3</double> - </object> - <float key="priority">1000</float> - <int key="scoringType">8</int> - <float key="scoringTypeFloat">29</float> - <int key="contentType">3</int> - <reference key="containingView" ref="505772708"/> - </object> - <object class="IBNSLayoutConstraint" id="226440407"> - <reference key="firstItem" ref="373530427"/> - <int key="firstAttribute">9</int> - <int key="relation">0</int> - <reference key="secondItem" ref="472484220"/> - <int key="secondAttribute">9</int> - <float key="multiplier">1</float> - <object class="IBLayoutConstant" key="constant"> - <double key="value">0.0</double> - </object> - <float key="priority">1000</float> - <int key="scoringType">9</int> - <float key="scoringTypeFloat">40</float> - <int key="contentType">2</int> - <reference key="containingView" ref="505772708"/> - </object> - <object class="IBNSLayoutConstraint" id="376417113"> - <reference key="firstItem" ref="472484220"/> - <int key="firstAttribute">5</int> - <int key="relation">0</int> - <reference key="secondItem" ref="505772708"/> - <int key="secondAttribute">5</int> - <float key="multiplier">1</float> - <object class="IBLayoutConstant" key="constant"> - <double key="value">87</double> - </object> - <float key="priority">1000</float> - <int key="scoringType">9</int> - <float key="scoringTypeFloat">40</float> - <int key="contentType">3</int> - <reference key="containingView" ref="505772708"/> - </object> - <object class="IBNSLayoutConstraint" id="958031551"> - <reference key="firstItem" ref="373530427"/> - <int key="firstAttribute">5</int> - <int key="relation">0</int> - <reference key="secondItem" ref="505772708"/> - <int key="secondAttribute">5</int> - <float key="multiplier">1</float> - <object class="IBLayoutConstant" key="constant"> - <double key="value">87</double> - </object> - <float key="priority">1000</float> - <int key="scoringType">9</int> - <float key="scoringTypeFloat">40</float> - <int key="contentType">3</int> - <reference key="containingView" ref="505772708"/> - </object> - </object> - <reference key="parent" ref="553559566"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">578</int> - <reference key="object" ref="373530427"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="602054441"/> - <object class="IBNSLayoutConstraint" id="350454218"> - <reference key="firstItem" ref="373530427"/> - <int key="firstAttribute">8</int> - <int key="relation">0</int> - <nil key="secondItem"/> - <int key="secondAttribute">0</int> - <float key="multiplier">1</float> - <object class="IBLayoutConstant" key="constant"> - <double key="value">17</double> - </object> - <float key="priority">1000</float> - <int key="scoringType">3</int> - <float key="scoringTypeFloat">9</float> - <int key="contentType">1</int> - <reference key="containingView" ref="373530427"/> - </object> - </object> - <reference key="parent" ref="505772708"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">579</int> - <reference key="object" ref="602054441"/> - <reference key="parent" ref="373530427"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">594</int> - <reference key="object" ref="615770799"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="1006424888"/> - <object class="IBNSLayoutConstraint" id="710625895"> - <reference key="firstItem" ref="615770799"/> - <int key="firstAttribute">8</int> - <int key="relation">0</int> - <nil key="secondItem"/> - <int key="secondAttribute">0</int> - <float key="multiplier">1</float> - <object class="IBLayoutConstant" key="constant"> - <double key="value">50</double> - </object> - <float key="priority">1000</float> - <int key="scoringType">9</int> - <float key="scoringTypeFloat">40</float> - <int key="contentType">1</int> - <reference key="containingView" ref="615770799"/> - </object> - <object class="IBNSLayoutConstraint" id="1014208838"> - <reference key="firstItem" ref="615770799"/> - <int key="firstAttribute">7</int> - <int key="relation">0</int> - <nil key="secondItem"/> - <int key="secondAttribute">0</int> - <float key="multiplier">1</float> - <object class="IBLayoutConstant" key="constant"> - <double key="value">50</double> - </object> - <float key="priority">1000</float> - <int key="scoringType">3</int> - <float key="scoringTypeFloat">9</float> - <int key="contentType">1</int> - <reference key="containingView" ref="615770799"/> - </object> - </object> - <reference key="parent" ref="505772708"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">595</int> - <reference key="object" ref="1006424888"/> - <reference key="parent" ref="615770799"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">596</int> - <reference key="object" ref="472484220"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="429971541"/> - <object class="IBNSLayoutConstraint" id="308636502"> - <reference key="firstItem" ref="472484220"/> - <int key="firstAttribute">8</int> - <int key="relation">1</int> - <nil key="secondItem"/> - <int key="secondAttribute">0</int> - <float key="multiplier">1</float> - <object class="IBLayoutConstant" key="constant"> - <double key="value">34</double> - </object> - <float key="priority">1000</float> - <int key="scoringType">9</int> - <float key="scoringTypeFloat">40</float> - <int key="contentType">1</int> - <reference key="containingView" ref="472484220"/> - </object> - <object class="IBNSLayoutConstraint" id="398152041"> - <reference key="firstItem" ref="472484220"/> - <int key="firstAttribute">8</int> - <int key="relation">0</int> - <nil key="secondItem"/> - <int key="secondAttribute">0</int> - <float key="multiplier">1</float> - <object class="IBLayoutConstant" key="constant"> - <double key="value">56</double> - </object> - <float key="priority">1000</float> - <int key="scoringType">3</int> - <float key="scoringTypeFloat">9</float> - <int key="contentType">1</int> - <reference key="containingView" ref="472484220"/> - </object> - <object class="IBNSLayoutConstraint" id="775719842"> - <reference key="firstItem" ref="472484220"/> - <int key="firstAttribute">7</int> - <int key="relation">0</int> - <nil key="secondItem"/> - <int key="secondAttribute">0</int> - <float key="multiplier">1</float> - <object class="IBLayoutConstant" key="constant"> - <double key="value">230</double> - </object> - <float key="priority">652</float> - <int key="scoringType">9</int> - <float key="scoringTypeFloat">40</float> - <int key="contentType">1</int> - <reference key="containingView" ref="472484220"/> - </object> - </object> - <reference key="parent" ref="505772708"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">597</int> - <reference key="object" ref="429971541"/> - <reference key="parent" ref="472484220"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">617</int> - <reference key="object" ref="141598972"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="702625398"/> - </object> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">618</int> - <reference key="object" ref="702625398"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="943041763"/> - <reference ref="883464109"/> - <reference ref="858489037"/> - <reference ref="13890772"/> - <reference ref="713570148"/> - <reference ref="847949808"/> - <reference ref="787531788"/> - <reference ref="269865460"/> - <reference ref="157520762"/> - <reference ref="245280452"/> - <reference ref="1012221138"/> - </object> - <reference key="parent" ref="141598972"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">622</int> - <reference key="object" ref="13890772"/> - <reference key="parent" ref="702625398"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">623</int> - <reference key="object" ref="713570148"/> - <reference key="parent" ref="702625398"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">624</int> - <reference key="object" ref="847949808"/> - <reference key="parent" ref="702625398"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">625</int> - <reference key="object" ref="787531788"/> - <reference key="parent" ref="702625398"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">626</int> - <reference key="object" ref="269865460"/> - <reference key="parent" ref="702625398"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">627</int> - <reference key="object" ref="157520762"/> - <reference key="parent" ref="702625398"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">628</int> - <reference key="object" ref="245280452"/> - <reference key="parent" ref="702625398"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">629</int> - <reference key="object" ref="1012221138"/> - <reference key="parent" ref="702625398"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">619</int> - <reference key="object" ref="943041763"/> - <reference key="parent" ref="702625398"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">621</int> - <reference key="object" ref="858489037"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="878241342"/> - </object> - <reference key="parent" ref="702625398"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">630</int> - <reference key="object" ref="878241342"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="56667518"/> - </object> - <reference key="parent" ref="858489037"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">631</int> - <reference key="object" ref="56667518"/> - <reference key="parent" ref="878241342"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">620</int> - <reference key="object" ref="883464109"/> - <reference key="parent" ref="702625398"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">694</int> - <reference key="object" ref="308636502"/> - <reference key="parent" ref="472484220"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">702</int> - <reference key="object" ref="716515170"/> - <reference key="parent" ref="505772708"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">714</int> - <reference key="object" ref="467789989"/> - <reference key="parent" ref="439893737"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">732</int> - <reference key="object" ref="710625895"/> - <reference key="parent" ref="615770799"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">813</int> - <reference key="object" ref="350454218"/> - <reference key="parent" ref="373530427"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">814</int> - <reference key="object" ref="1014208838"/> - <reference key="parent" ref="615770799"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">816</int> - <reference key="object" ref="124660203"/> - <reference key="parent" ref="505772708"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">824</int> - <reference key="object" ref="210332473"/> - <reference key="parent" ref="505772708"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">836</int> - <reference key="object" ref="971396673"/> - <reference key="parent" ref="505772708"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">837</int> - <reference key="object" ref="14444973"/> - <reference key="parent" ref="505772708"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">838</int> - <reference key="object" ref="1049409873"/> - <reference key="parent" ref="505772708"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">839</int> - <reference key="object" ref="792626335"/> - <reference key="parent" ref="439893737"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">840</int> - <reference key="object" ref="865651107"/> - <reference key="parent" ref="439893737"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">841</int> - <reference key="object" ref="590922666"/> - <reference key="parent" ref="439893737"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">842</int> - <reference key="object" ref="398152041"/> - <reference key="parent" ref="472484220"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">843</int> - <reference key="object" ref="775719842"/> - <reference key="parent" ref="472484220"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">844</int> - <reference key="object" ref="226440407"/> - <reference key="parent" ref="505772708"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">845</int> - <reference key="object" ref="376417113"/> - <reference key="parent" ref="505772708"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">846</int> - <reference key="object" ref="958031551"/> - <reference key="parent" ref="505772708"/> - </object> - </object> - </object> - <object class="NSMutableDictionary" key="flattenedProperties"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>-1.IBPluginDependency</string> - <string>-2.IBPluginDependency</string> - <string>-3.IBPluginDependency</string> - <string>130.IBPluginDependency</string> - <string>131.IBPluginDependency</string> - <string>134.IBPluginDependency</string> - <string>136.IBPluginDependency</string> - <string>144.IBPluginDependency</string> - <string>145.IBPluginDependency</string> - <string>149.IBPluginDependency</string> - <string>150.IBPluginDependency</string> - <string>19.IBPluginDependency</string> - <string>23.IBPluginDependency</string> - <string>236.IBPluginDependency</string> - <string>239.IBPluginDependency</string> - <string>24.IBPluginDependency</string> - <string>29.IBPluginDependency</string> - <string>371.IBPluginDependency</string> - <string>371.IBWindowTemplateEditedContentRect</string> - <string>371.NSWindowTemplate.visibleAtLaunch</string> - <string>372.IBNSViewMetadataConstraints</string> - <string>372.IBPluginDependency</string> - <string>420.IBPluginDependency</string> - <string>490.IBPluginDependency</string> - <string>491.IBPluginDependency</string> - <string>492.IBPluginDependency</string> - <string>494.IBPluginDependency</string> - <string>5.IBPluginDependency</string> - <string>537.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints</string> - <string>537.IBPluginDependency</string> - <string>538.IBPluginDependency</string> - <string>540.IBPluginDependency</string> - <string>541.IBPluginDependency</string> - <string>541.ibExternalAutomaticallyCalculatesRowSizeFromViewHeight</string> - <string>542.IBPluginDependency</string> - <string>542.isInViewBasedMode</string> - <string>542.prototypeCellViews</string> - <string>546.IBPluginDependency</string> - <string>555.IBPluginDependency</string> - <string>56.IBPluginDependency</string> - <string>57.IBPluginDependency</string> - <string>577.IBNSViewMetadataConstraints</string> - <string>577.IBPluginDependency</string> - <string>578.IBNSViewMetadataConstraints</string> - <string>578.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints</string> - <string>578.IBPluginDependency</string> - <string>579.IBPluginDependency</string> - <string>58.IBPluginDependency</string> - <string>594.IBNSViewMetadataConstraints</string> - <string>594.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints</string> - <string>594.IBPluginDependency</string> - <string>595.IBPluginDependency</string> - <string>596.IBNSViewMetadataConstraints</string> - <string>596.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints</string> - <string>596.IBPluginDependency</string> - <string>597.IBPluginDependency</string> - <string>617.IBPluginDependency</string> - <string>618.IBPluginDependency</string> - <string>619.IBPluginDependency</string> - <string>620.IBPluginDependency</string> - <string>621.IBPluginDependency</string> - <string>622.IBPluginDependency</string> - <string>623.IBPluginDependency</string> - <string>624.IBPluginDependency</string> - <string>625.IBPluginDependency</string> - <string>626.IBPluginDependency</string> - <string>627.IBPluginDependency</string> - <string>628.IBPluginDependency</string> - <string>629.IBPluginDependency</string> - <string>630.IBPluginDependency</string> - <string>631.IBPluginDependency</string> - <string>694.IBPluginDependency</string> - <string>702.IBPluginDependency</string> - <string>714.IBPluginDependency</string> - <string>732.IBPluginDependency</string> - <string>813.IBPluginDependency</string> - <string>814.IBPluginDependency</string> - <string>816.IBPluginDependency</string> - <string>824.IBPluginDependency</string> - <string>836.IBPluginDependency</string> - <string>837.IBPluginDependency</string> - <string>838.IBPluginDependency</string> - <string>839.IBPluginDependency</string> - <string>840.IBPluginDependency</string> - <string>841.IBPluginDependency</string> - <string>842.IBPluginDependency</string> - <string>843.IBPluginDependency</string> - <string>844.IBPluginDependency</string> - <string>845.IBPluginDependency</string> - <string>846.IBPluginDependency</string> - <string>92.IBPluginDependency</string> - </object> - <object class="NSArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{380, 496}, {480, 360}}</string> - <integer value="1"/> - <object class="NSMutableArray"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="467789989"/> - <reference ref="792626335"/> - <reference ref="865651107"/> - <reference ref="590922666"/> - </object> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <boolean value="NO"/> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <boolean value="YES"/> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <boolean value="YES"/> - <object class="NSArray"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="505772708"/> - </object> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <object class="NSMutableArray"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="124660203"/> - <reference ref="210332473"/> - <reference ref="971396673"/> - <reference ref="14444973"/> - <reference ref="1049409873"/> - <reference ref="226440407"/> - <reference ref="376417113"/> - <reference ref="958031551"/> - <reference ref="716515170"/> - </object> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <object class="NSMutableArray"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="350454218"/> - </object> - <boolean value="NO"/> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <object class="NSMutableArray"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="710625895"/> - <reference ref="1014208838"/> - </object> - <boolean value="NO"/> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <object class="NSArray"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="308636502"/> - <reference ref="398152041"/> - <reference ref="775719842"/> - </object> - <boolean value="NO"/> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - </object> - </object> - <object class="NSMutableDictionary" key="unlocalizedProperties"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference key="dict.sortedKeys" ref="0"/> - <reference key="dict.values" ref="0"/> - </object> - <nil key="activeLocalization"/> - <object class="NSMutableDictionary" key="localizations"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference key="dict.sortedKeys" ref="0"/> - <reference key="dict.values" ref="0"/> - </object> - <nil key="sourceID"/> - <int key="maxID">848</int> - </object> - <object class="IBClassDescriber" key="IBDocument.Classes"> - <object class="NSMutableArray" key="referencedPartialClassDescriptions"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBPartialClassDescription"> - <string key="className">AppDelegate</string> - <string key="superclassName">NSObject</string> - <object class="NSMutableDictionary" key="outlets"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>tableView</string> - <string>tweetsArrayController</string> - <string>window</string> - </object> - <object class="NSArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>NSTableView</string> - <string>NSArrayController</string> - <string>NSWindow</string> - </object> - </object> - <object class="NSMutableDictionary" key="toOneOutletInfosByName"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>tableView</string> - <string>tweetsArrayController</string> - <string>window</string> - </object> - <object class="NSArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBToOneOutletInfo"> - <string key="name">tableView</string> - <string key="candidateClassName">NSTableView</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">tweetsArrayController</string> - <string key="candidateClassName">NSArrayController</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">window</string> - <string key="candidateClassName">NSWindow</string> - </object> - </object> - </object> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/AppDelegate.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSLayoutConstraint</string> - <string key="superclassName">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/NSLayoutConstraint.h</string> - </object> - </object> - </object> - </object> - <int key="IBDocument.localizationMode">0</int> - <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string> - <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies"> - <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string> - <integer value="3000" key="NS.object.0"/> - </object> - <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> - <int key="IBDocument.defaultPropertyAccessControl">3</int> - <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>NSMenuCheckmark</string> - <string>NSMenuMixedState</string> - </object> - <object class="NSArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>{11, 11}</string> - <string>{10, 3}</string> - </object> - </object> - <bool key="IBDocument.UseAutolayout">YES</bool> - </data> -</archive> diff --git a/candpiosapp/Externals/AFNetworking/Example/Prefix.pch b/candpiosapp/Externals/AFNetworking/Example/Prefix.pch deleted file mode 100644 index 05abd7ab..00000000 --- a/candpiosapp/Externals/AFNetworking/Example/Prefix.pch +++ /dev/null @@ -1,17 +0,0 @@ -#import <Availability.h> - -#if __IPHONE_OS_VERSION_MIN_REQUIRED - #ifndef __IPHONE_3_0 - #warning "This project uses features only available in iPhone SDK 3.0 and later." - #endif - - #ifdef __OBJC__ - #import <UIKit/UIKit.h> - #import <Foundation/Foundation.h> - #import <SystemConfiguration/SystemConfiguration.h> - #endif -#else - #ifdef __OBJC__ - #import <Cocoa/Cocoa.h> - #endif -#endif \ No newline at end of file diff --git a/candpiosapp/Externals/AFNetworking/Example/en.lproj/MainMenu.xib b/candpiosapp/Externals/AFNetworking/Example/en.lproj/MainMenu.xib deleted file mode 100644 index 1285ad34..00000000 --- a/candpiosapp/Externals/AFNetworking/Example/en.lproj/MainMenu.xib +++ /dev/null @@ -1,4587 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00"> - <data> - <int key="IBDocument.SystemTarget">1070</int> - <string key="IBDocument.SystemVersion">11C42</string> - <string key="IBDocument.InterfaceBuilderVersion">1938</string> - <string key="IBDocument.AppKitVersion">1138.17</string> - <string key="IBDocument.HIToolboxVersion">567.00</string> - <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> - <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="NS.object.0">1938</string> - </object> - <array key="IBDocument.IntegratedClassDependencies"> - <string>NSWindowTemplate</string> - <string>NSView</string> - <string>NSMenu</string> - <string>NSMenuItem</string> - <string>NSCustomObject</string> - </array> - <array key="IBDocument.PluginDependencies"> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - </array> - <object class="NSMutableDictionary" key="IBDocument.Metadata"> - <string key="NS.key.0">PluginDependencyRecalculationVersion</string> - <integer value="1" key="NS.object.0"/> - </object> - <array class="NSMutableArray" key="IBDocument.RootObjects" id="1048"> - <object class="NSCustomObject" id="1021"> - <string key="NSClassName">NSApplication</string> - </object> - <object class="NSCustomObject" id="1014"> - <string key="NSClassName">FirstResponder</string> - </object> - <object class="NSCustomObject" id="1050"> - <string key="NSClassName">NSApplication</string> - </object> - <object class="NSMenu" id="649796088"> - <string key="NSTitle">AMainMenu</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="694149608"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">AFNetworking-Mac-Example</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <object class="NSCustomResource" key="NSOnImage" id="35465992"> - <string key="NSClassName">NSImage</string> - <string key="NSResourceName">NSMenuCheckmark</string> - </object> - <object class="NSCustomResource" key="NSMixedImage" id="502551668"> - <string key="NSClassName">NSImage</string> - <string key="NSResourceName">NSMenuMixedState</string> - </object> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="110575045"> - <string key="NSTitle">AFNetworking-Mac-Example</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="238522557"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">About AFNetworking-Mac-Example</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="304266470"> - <reference key="NSMenu" ref="110575045"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="609285721"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Preferences…</string> - <string key="NSKeyEquiv">,</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="481834944"> - <reference key="NSMenu" ref="110575045"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="1046388886"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Services</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="752062318"> - <string key="NSTitle">Services</string> - <array class="NSMutableArray" key="NSMenuItems"/> - <string key="NSName">_NSServicesMenu</string> - </object> - </object> - <object class="NSMenuItem" id="646227648"> - <reference key="NSMenu" ref="110575045"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="755159360"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Hide AFNetworking-Mac-Example</string> - <string key="NSKeyEquiv">h</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="342932134"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Hide Others</string> - <string key="NSKeyEquiv">h</string> - <int key="NSKeyEquivModMask">1572864</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="908899353"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Show All</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="1056857174"> - <reference key="NSMenu" ref="110575045"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="632727374"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Quit AFNetworking-Mac-Example</string> - <string key="NSKeyEquiv">q</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </array> - <string key="NSName">_NSAppleMenu</string> - </object> - </object> - <object class="NSMenuItem" id="379814623"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">File</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="720053764"> - <string key="NSTitle">File</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="705341025"> - <reference key="NSMenu" ref="720053764"/> - <string key="NSTitle">New</string> - <string key="NSKeyEquiv">n</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="722745758"> - <reference key="NSMenu" ref="720053764"/> - <string key="NSTitle">Open…</string> - <string key="NSKeyEquiv">o</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="1025936716"> - <reference key="NSMenu" ref="720053764"/> - <string key="NSTitle">Open Recent</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="1065607017"> - <string key="NSTitle">Open Recent</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="759406840"> - <reference key="NSMenu" ref="1065607017"/> - <string key="NSTitle">Clear Menu</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </array> - <string key="NSName">_NSRecentDocumentsMenu</string> - </object> - </object> - <object class="NSMenuItem" id="425164168"> - <reference key="NSMenu" ref="720053764"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="776162233"> - <reference key="NSMenu" ref="720053764"/> - <string key="NSTitle">Close</string> - <string key="NSKeyEquiv">w</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="1023925487"> - <reference key="NSMenu" ref="720053764"/> - <string key="NSTitle">Save…</string> - <string key="NSKeyEquiv">s</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="579971712"> - <reference key="NSMenu" ref="720053764"/> - <string key="NSTitle">Revert to Saved</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="1010469920"> - <reference key="NSMenu" ref="720053764"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="294629803"> - <reference key="NSMenu" ref="720053764"/> - <string key="NSTitle">Page Setup...</string> - <string key="NSKeyEquiv">P</string> - <int key="NSKeyEquivModMask">1179648</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSToolTip"/> - </object> - <object class="NSMenuItem" id="49223823"> - <reference key="NSMenu" ref="720053764"/> - <string key="NSTitle">Print…</string> - <string key="NSKeyEquiv">p</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </array> - </object> - </object> - <object class="NSMenuItem" id="952259628"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">Edit</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="789758025"> - <string key="NSTitle">Edit</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="1058277027"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Undo</string> - <string key="NSKeyEquiv">z</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="790794224"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Redo</string> - <string key="NSKeyEquiv">Z</string> - <int key="NSKeyEquivModMask">1179648</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="1040322652"> - <reference key="NSMenu" ref="789758025"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="296257095"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Cut</string> - <string key="NSKeyEquiv">x</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="860595796"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Copy</string> - <string key="NSKeyEquiv">c</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="29853731"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Paste</string> - <string key="NSKeyEquiv">v</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="82994268"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Paste and Match Style</string> - <string key="NSKeyEquiv">V</string> - <int key="NSKeyEquivModMask">1572864</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="437104165"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Delete</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="583158037"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Select All</string> - <string key="NSKeyEquiv">a</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="212016141"> - <reference key="NSMenu" ref="789758025"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="892235320"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Find</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="963351320"> - <string key="NSTitle">Find</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="447796847"> - <reference key="NSMenu" ref="963351320"/> - <string key="NSTitle">Find…</string> - <string key="NSKeyEquiv">f</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">1</int> - </object> - <object class="NSMenuItem" id="738670835"> - <reference key="NSMenu" ref="963351320"/> - <string key="NSTitle">Find and Replace…</string> - <string key="NSKeyEquiv">f</string> - <int key="NSKeyEquivModMask">1572864</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">12</int> - </object> - <object class="NSMenuItem" id="326711663"> - <reference key="NSMenu" ref="963351320"/> - <string key="NSTitle">Find Next</string> - <string key="NSKeyEquiv">g</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">2</int> - </object> - <object class="NSMenuItem" id="270902937"> - <reference key="NSMenu" ref="963351320"/> - <string key="NSTitle">Find Previous</string> - <string key="NSKeyEquiv">G</string> - <int key="NSKeyEquivModMask">1179648</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">3</int> - </object> - <object class="NSMenuItem" id="159080638"> - <reference key="NSMenu" ref="963351320"/> - <string key="NSTitle">Use Selection for Find</string> - <string key="NSKeyEquiv">e</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">7</int> - </object> - <object class="NSMenuItem" id="88285865"> - <reference key="NSMenu" ref="963351320"/> - <string key="NSTitle">Jump to Selection</string> - <string key="NSKeyEquiv">j</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </array> - </object> - </object> - <object class="NSMenuItem" id="972420730"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Spelling and Grammar</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="769623530"> - <string key="NSTitle">Spelling and Grammar</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="679648819"> - <reference key="NSMenu" ref="769623530"/> - <string key="NSTitle">Show Spelling and Grammar</string> - <string key="NSKeyEquiv">:</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="96193923"> - <reference key="NSMenu" ref="769623530"/> - <string key="NSTitle">Check Document Now</string> - <string key="NSKeyEquiv">;</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="859480356"> - <reference key="NSMenu" ref="769623530"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="948374510"> - <reference key="NSMenu" ref="769623530"/> - <string key="NSTitle">Check Spelling While Typing</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="967646866"> - <reference key="NSMenu" ref="769623530"/> - <string key="NSTitle">Check Grammar With Spelling</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="795346622"> - <reference key="NSMenu" ref="769623530"/> - <string key="NSTitle">Correct Spelling Automatically</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </array> - </object> - </object> - <object class="NSMenuItem" id="507821607"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Substitutions</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="698887838"> - <string key="NSTitle">Substitutions</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="65139061"> - <reference key="NSMenu" ref="698887838"/> - <string key="NSTitle">Show Substitutions</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="19036812"> - <reference key="NSMenu" ref="698887838"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="605118523"> - <reference key="NSMenu" ref="698887838"/> - <string key="NSTitle">Smart Copy/Paste</string> - <string key="NSKeyEquiv">f</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">1</int> - </object> - <object class="NSMenuItem" id="197661976"> - <reference key="NSMenu" ref="698887838"/> - <string key="NSTitle">Smart Quotes</string> - <string key="NSKeyEquiv">g</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">2</int> - </object> - <object class="NSMenuItem" id="672708820"> - <reference key="NSMenu" ref="698887838"/> - <string key="NSTitle">Smart Dashes</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="708854459"> - <reference key="NSMenu" ref="698887838"/> - <string key="NSTitle">Smart Links</string> - <string key="NSKeyEquiv">G</string> - <int key="NSKeyEquivModMask">1179648</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">3</int> - </object> - <object class="NSMenuItem" id="537092702"> - <reference key="NSMenu" ref="698887838"/> - <string key="NSTitle">Text Replacement</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </array> - </object> - </object> - <object class="NSMenuItem" id="288088188"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Transformations</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="579392910"> - <string key="NSTitle">Transformations</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="1060694897"> - <reference key="NSMenu" ref="579392910"/> - <string key="NSTitle">Make Upper Case</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="879586729"> - <reference key="NSMenu" ref="579392910"/> - <string key="NSTitle">Make Lower Case</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="56570060"> - <reference key="NSMenu" ref="579392910"/> - <string key="NSTitle">Capitalize</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </array> - </object> - </object> - <object class="NSMenuItem" id="676164635"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Speech</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="785027613"> - <string key="NSTitle">Speech</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="731782645"> - <reference key="NSMenu" ref="785027613"/> - <string key="NSTitle">Start Speaking</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="680220178"> - <reference key="NSMenu" ref="785027613"/> - <string key="NSTitle">Stop Speaking</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </array> - </object> - </object> - </array> - </object> - </object> - <object class="NSMenuItem" id="302598603"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">Format</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="941447902"> - <string key="NSTitle">Format</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="792887677"> - <reference key="NSMenu" ref="941447902"/> - <string key="NSTitle">Font</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="786677654"> - <string key="NSTitle">Font</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="159677712"> - <reference key="NSMenu" ref="786677654"/> - <string key="NSTitle">Show Fonts</string> - <string key="NSKeyEquiv">t</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="305399458"> - <reference key="NSMenu" ref="786677654"/> - <string key="NSTitle">Bold</string> - <string key="NSKeyEquiv">b</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">2</int> - </object> - <object class="NSMenuItem" id="814362025"> - <reference key="NSMenu" ref="786677654"/> - <string key="NSTitle">Italic</string> - <string key="NSKeyEquiv">i</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">1</int> - </object> - <object class="NSMenuItem" id="330926929"> - <reference key="NSMenu" ref="786677654"/> - <string key="NSTitle">Underline</string> - <string key="NSKeyEquiv">u</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="533507878"> - <reference key="NSMenu" ref="786677654"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="158063935"> - <reference key="NSMenu" ref="786677654"/> - <string key="NSTitle">Bigger</string> - <string key="NSKeyEquiv">+</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">3</int> - </object> - <object class="NSMenuItem" id="885547335"> - <reference key="NSMenu" ref="786677654"/> - <string key="NSTitle">Smaller</string> - <string key="NSKeyEquiv">-</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">4</int> - </object> - <object class="NSMenuItem" id="901062459"> - <reference key="NSMenu" ref="786677654"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="767671776"> - <reference key="NSMenu" ref="786677654"/> - <string key="NSTitle">Kern</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="175441468"> - <string key="NSTitle">Kern</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="252969304"> - <reference key="NSMenu" ref="175441468"/> - <string key="NSTitle">Use Default</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="766922938"> - <reference key="NSMenu" ref="175441468"/> - <string key="NSTitle">Use None</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="677519740"> - <reference key="NSMenu" ref="175441468"/> - <string key="NSTitle">Tighten</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="238351151"> - <reference key="NSMenu" ref="175441468"/> - <string key="NSTitle">Loosen</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </array> - </object> - </object> - <object class="NSMenuItem" id="691570813"> - <reference key="NSMenu" ref="786677654"/> - <string key="NSTitle">Ligature</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="1058217995"> - <string key="NSTitle">Ligature</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="706297211"> - <reference key="NSMenu" ref="1058217995"/> - <string key="NSTitle">Use Default</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="568384683"> - <reference key="NSMenu" ref="1058217995"/> - <string key="NSTitle">Use None</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="663508465"> - <reference key="NSMenu" ref="1058217995"/> - <string key="NSTitle">Use All</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </array> - </object> - </object> - <object class="NSMenuItem" id="769124883"> - <reference key="NSMenu" ref="786677654"/> - <string key="NSTitle">Baseline</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="18263474"> - <string key="NSTitle">Baseline</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="257962622"> - <reference key="NSMenu" ref="18263474"/> - <string key="NSTitle">Use Default</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="644725453"> - <reference key="NSMenu" ref="18263474"/> - <string key="NSTitle">Superscript</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="1037576581"> - <reference key="NSMenu" ref="18263474"/> - <string key="NSTitle">Subscript</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="941806246"> - <reference key="NSMenu" ref="18263474"/> - <string key="NSTitle">Raise</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="1045724900"> - <reference key="NSMenu" ref="18263474"/> - <string key="NSTitle">Lower</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </array> - </object> - </object> - <object class="NSMenuItem" id="739652853"> - <reference key="NSMenu" ref="786677654"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="1012600125"> - <reference key="NSMenu" ref="786677654"/> - <string key="NSTitle">Show Colors</string> - <string key="NSKeyEquiv">C</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="214559597"> - <reference key="NSMenu" ref="786677654"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="596732606"> - <reference key="NSMenu" ref="786677654"/> - <string key="NSTitle">Copy Style</string> - <string key="NSKeyEquiv">c</string> - <int key="NSKeyEquivModMask">1572864</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="393423671"> - <reference key="NSMenu" ref="786677654"/> - <string key="NSTitle">Paste Style</string> - <string key="NSKeyEquiv">v</string> - <int key="NSKeyEquivModMask">1572864</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </array> - <string key="NSName">_NSFontMenu</string> - </object> - </object> - <object class="NSMenuItem" id="215659978"> - <reference key="NSMenu" ref="941447902"/> - <string key="NSTitle">Text</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="446991534"> - <string key="NSTitle">Text</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="875092757"> - <reference key="NSMenu" ref="446991534"/> - <string key="NSTitle">Align Left</string> - <string key="NSKeyEquiv">{</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="630155264"> - <reference key="NSMenu" ref="446991534"/> - <string key="NSTitle">Center</string> - <string key="NSKeyEquiv">|</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="945678886"> - <reference key="NSMenu" ref="446991534"/> - <string key="NSTitle">Justify</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="512868991"> - <reference key="NSMenu" ref="446991534"/> - <string key="NSTitle">Align Right</string> - <string key="NSKeyEquiv">}</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="163117631"> - <reference key="NSMenu" ref="446991534"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="31516759"> - <reference key="NSMenu" ref="446991534"/> - <string key="NSTitle">Writing Direction</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="956096989"> - <string key="NSTitle">Writing Direction</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="257099033"> - <reference key="NSMenu" ref="956096989"/> - <bool key="NSIsDisabled">YES</bool> - <string key="NSTitle">Paragraph</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="551969625"> - <reference key="NSMenu" ref="956096989"/> - <string type="base64-UTF8" key="NSTitle">CURlZmF1bHQ</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="249532473"> - <reference key="NSMenu" ref="956096989"/> - <string type="base64-UTF8" key="NSTitle">CUxlZnQgdG8gUmlnaHQ</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="607364498"> - <reference key="NSMenu" ref="956096989"/> - <string type="base64-UTF8" key="NSTitle">CVJpZ2h0IHRvIExlZnQ</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="508151438"> - <reference key="NSMenu" ref="956096989"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="981751889"> - <reference key="NSMenu" ref="956096989"/> - <bool key="NSIsDisabled">YES</bool> - <string key="NSTitle">Selection</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="380031999"> - <reference key="NSMenu" ref="956096989"/> - <string type="base64-UTF8" key="NSTitle">CURlZmF1bHQ</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="825984362"> - <reference key="NSMenu" ref="956096989"/> - <string type="base64-UTF8" key="NSTitle">CUxlZnQgdG8gUmlnaHQ</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="560145579"> - <reference key="NSMenu" ref="956096989"/> - <string type="base64-UTF8" key="NSTitle">CVJpZ2h0IHRvIExlZnQ</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </array> - </object> - </object> - <object class="NSMenuItem" id="908105787"> - <reference key="NSMenu" ref="446991534"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="644046920"> - <reference key="NSMenu" ref="446991534"/> - <string key="NSTitle">Show Ruler</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="231811626"> - <reference key="NSMenu" ref="446991534"/> - <string key="NSTitle">Copy Ruler</string> - <string key="NSKeyEquiv">c</string> - <int key="NSKeyEquivModMask">1310720</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="883618387"> - <reference key="NSMenu" ref="446991534"/> - <string key="NSTitle">Paste Ruler</string> - <string key="NSKeyEquiv">v</string> - <int key="NSKeyEquivModMask">1310720</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </array> - </object> - </object> - </array> - </object> - </object> - <object class="NSMenuItem" id="586577488"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">View</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="466310130"> - <string key="NSTitle">View</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="102151532"> - <reference key="NSMenu" ref="466310130"/> - <string key="NSTitle">Show Toolbar</string> - <string key="NSKeyEquiv">t</string> - <int key="NSKeyEquivModMask">1572864</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="237841660"> - <reference key="NSMenu" ref="466310130"/> - <string key="NSTitle">Customize Toolbar…</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </array> - </object> - </object> - <object class="NSMenuItem" id="713487014"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">Window</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="835318025"> - <string key="NSTitle">Window</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="1011231497"> - <reference key="NSMenu" ref="835318025"/> - <string key="NSTitle">Minimize</string> - <string key="NSKeyEquiv">m</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="575023229"> - <reference key="NSMenu" ref="835318025"/> - <string key="NSTitle">Zoom</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="299356726"> - <reference key="NSMenu" ref="835318025"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="625202149"> - <reference key="NSMenu" ref="835318025"/> - <string key="NSTitle">Bring All to Front</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </array> - <string key="NSName">_NSWindowsMenu</string> - </object> - </object> - <object class="NSMenuItem" id="448692316"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">Help</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="992780483"> - <string key="NSTitle">Help</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="105068016"> - <reference key="NSMenu" ref="992780483"/> - <string key="NSTitle">AFNetworking-Mac-Example Help</string> - <string key="NSKeyEquiv">?</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </array> - <string key="NSName">_NSHelpMenu</string> - </object> - </object> - </array> - <string key="NSName">_NSMainMenu</string> - </object> - <object class="NSWindowTemplate" id="972006081"> - <int key="NSWindowStyleMask">15</int> - <int key="NSWindowBacking">2</int> - <string key="NSWindowRect">{{335, 390}, {480, 360}}</string> - <int key="NSWTFlags">1954021376</int> - <string key="NSWindowTitle">AFNetworking-Mac-Example</string> - <string key="NSWindowClass">NSWindow</string> - <nil key="NSViewClass"/> - <nil key="NSUserInterfaceItemIdentifier"/> - <object class="NSView" key="NSWindowView" id="439893737"> - <nil key="NSNextResponder"/> - <int key="NSvFlags">256</int> - <string key="NSFrameSize">{480, 360}</string> - </object> - <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string> - <string key="NSMaxSize">{10000000000000, 10000000000000}</string> - <bool key="NSWindowIsRestorable">YES</bool> - </object> - <object class="NSCustomObject" id="976324537"> - <string key="NSClassName">AppDelegate</string> - </object> - <object class="NSCustomObject" id="755631768"> - <string key="NSClassName">NSFontManager</string> - </object> - </array> - <object class="IBObjectContainer" key="IBDocument.Objects"> - <array class="NSMutableArray" key="connectionRecords"> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">terminate:</string> - <reference key="source" ref="1050"/> - <reference key="destination" ref="632727374"/> - </object> - <int key="connectionID">449</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">orderFrontStandardAboutPanel:</string> - <reference key="source" ref="1021"/> - <reference key="destination" ref="238522557"/> - </object> - <int key="connectionID">142</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">delegate</string> - <reference key="source" ref="1021"/> - <reference key="destination" ref="976324537"/> - </object> - <int key="connectionID">495</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">performMiniaturize:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="1011231497"/> - </object> - <int key="connectionID">37</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">arrangeInFront:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="625202149"/> - </object> - <int key="connectionID">39</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">print:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="49223823"/> - </object> - <int key="connectionID">86</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">runPageLayout:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="294629803"/> - </object> - <int key="connectionID">87</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">clearRecentDocuments:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="759406840"/> - </object> - <int key="connectionID">127</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">performClose:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="776162233"/> - </object> - <int key="connectionID">193</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleContinuousSpellChecking:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="948374510"/> - </object> - <int key="connectionID">222</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">undo:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="1058277027"/> - </object> - <int key="connectionID">223</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">copy:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="860595796"/> - </object> - <int key="connectionID">224</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">checkSpelling:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="96193923"/> - </object> - <int key="connectionID">225</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">paste:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="29853731"/> - </object> - <int key="connectionID">226</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">stopSpeaking:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="680220178"/> - </object> - <int key="connectionID">227</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">cut:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="296257095"/> - </object> - <int key="connectionID">228</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">showGuessPanel:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="679648819"/> - </object> - <int key="connectionID">230</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">redo:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="790794224"/> - </object> - <int key="connectionID">231</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">selectAll:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="583158037"/> - </object> - <int key="connectionID">232</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">startSpeaking:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="731782645"/> - </object> - <int key="connectionID">233</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">delete:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="437104165"/> - </object> - <int key="connectionID">235</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">performZoom:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="575023229"/> - </object> - <int key="connectionID">240</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">performFindPanelAction:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="447796847"/> - </object> - <int key="connectionID">241</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">centerSelectionInVisibleArea:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="88285865"/> - </object> - <int key="connectionID">245</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleGrammarChecking:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="967646866"/> - </object> - <int key="connectionID">347</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleSmartInsertDelete:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="605118523"/> - </object> - <int key="connectionID">355</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleAutomaticQuoteSubstitution:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="197661976"/> - </object> - <int key="connectionID">356</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleAutomaticLinkDetection:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="708854459"/> - </object> - <int key="connectionID">357</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">saveDocument:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="1023925487"/> - </object> - <int key="connectionID">362</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">revertDocumentToSaved:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="579971712"/> - </object> - <int key="connectionID">364</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">runToolbarCustomizationPalette:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="237841660"/> - </object> - <int key="connectionID">365</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleToolbarShown:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="102151532"/> - </object> - <int key="connectionID">366</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">hide:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="755159360"/> - </object> - <int key="connectionID">367</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">hideOtherApplications:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="342932134"/> - </object> - <int key="connectionID">368</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">unhideAllApplications:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="908899353"/> - </object> - <int key="connectionID">370</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">newDocument:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="705341025"/> - </object> - <int key="connectionID">373</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">openDocument:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="722745758"/> - </object> - <int key="connectionID">374</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">raiseBaseline:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="941806246"/> - </object> - <int key="connectionID">426</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">lowerBaseline:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="1045724900"/> - </object> - <int key="connectionID">427</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">copyFont:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="596732606"/> - </object> - <int key="connectionID">428</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">subscript:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="1037576581"/> - </object> - <int key="connectionID">429</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">superscript:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="644725453"/> - </object> - <int key="connectionID">430</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">tightenKerning:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="677519740"/> - </object> - <int key="connectionID">431</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">underline:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="330926929"/> - </object> - <int key="connectionID">432</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">orderFrontColorPanel:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="1012600125"/> - </object> - <int key="connectionID">433</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">useAllLigatures:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="663508465"/> - </object> - <int key="connectionID">434</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">loosenKerning:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="238351151"/> - </object> - <int key="connectionID">435</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">pasteFont:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="393423671"/> - </object> - <int key="connectionID">436</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">unscript:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="257962622"/> - </object> - <int key="connectionID">437</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">useStandardKerning:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="252969304"/> - </object> - <int key="connectionID">438</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">useStandardLigatures:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="706297211"/> - </object> - <int key="connectionID">439</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">turnOffLigatures:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="568384683"/> - </object> - <int key="connectionID">440</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">turnOffKerning:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="766922938"/> - </object> - <int key="connectionID">441</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleAutomaticSpellingCorrection:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="795346622"/> - </object> - <int key="connectionID">456</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">orderFrontSubstitutionsPanel:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="65139061"/> - </object> - <int key="connectionID">458</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleAutomaticDashSubstitution:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="672708820"/> - </object> - <int key="connectionID">461</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleAutomaticTextReplacement:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="537092702"/> - </object> - <int key="connectionID">463</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">uppercaseWord:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="1060694897"/> - </object> - <int key="connectionID">464</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">capitalizeWord:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="56570060"/> - </object> - <int key="connectionID">467</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">lowercaseWord:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="879586729"/> - </object> - <int key="connectionID">468</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">pasteAsPlainText:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="82994268"/> - </object> - <int key="connectionID">486</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">performFindPanelAction:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="326711663"/> - </object> - <int key="connectionID">487</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">performFindPanelAction:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="270902937"/> - </object> - <int key="connectionID">488</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">performFindPanelAction:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="159080638"/> - </object> - <int key="connectionID">489</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">showHelp:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="105068016"/> - </object> - <int key="connectionID">493</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">alignCenter:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="630155264"/> - </object> - <int key="connectionID">518</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">pasteRuler:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="883618387"/> - </object> - <int key="connectionID">519</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleRuler:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="644046920"/> - </object> - <int key="connectionID">520</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">alignRight:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="512868991"/> - </object> - <int key="connectionID">521</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">copyRuler:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="231811626"/> - </object> - <int key="connectionID">522</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">alignJustified:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="945678886"/> - </object> - <int key="connectionID">523</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">alignLeft:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="875092757"/> - </object> - <int key="connectionID">524</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">makeBaseWritingDirectionNatural:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="551969625"/> - </object> - <int key="connectionID">525</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">makeBaseWritingDirectionLeftToRight:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="249532473"/> - </object> - <int key="connectionID">526</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">makeBaseWritingDirectionRightToLeft:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="607364498"/> - </object> - <int key="connectionID">527</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">makeTextWritingDirectionNatural:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="380031999"/> - </object> - <int key="connectionID">528</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">makeTextWritingDirectionLeftToRight:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="825984362"/> - </object> - <int key="connectionID">529</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">makeTextWritingDirectionRightToLeft:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="560145579"/> - </object> - <int key="connectionID">530</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">performFindPanelAction:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="738670835"/> - </object> - <int key="connectionID">535</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">addFontTrait:</string> - <reference key="source" ref="755631768"/> - <reference key="destination" ref="305399458"/> - </object> - <int key="connectionID">421</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">addFontTrait:</string> - <reference key="source" ref="755631768"/> - <reference key="destination" ref="814362025"/> - </object> - <int key="connectionID">422</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">modifyFont:</string> - <reference key="source" ref="755631768"/> - <reference key="destination" ref="885547335"/> - </object> - <int key="connectionID">423</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">orderFrontFontPanel:</string> - <reference key="source" ref="755631768"/> - <reference key="destination" ref="159677712"/> - </object> - <int key="connectionID">424</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">modifyFont:</string> - <reference key="source" ref="755631768"/> - <reference key="destination" ref="158063935"/> - </object> - <int key="connectionID">425</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">window</string> - <reference key="source" ref="976324537"/> - <reference key="destination" ref="972006081"/> - </object> - <int key="connectionID">532</int> - </object> - </array> - <object class="IBMutableOrderedSet" key="objectRecords"> - <array key="orderedObjects"> - <object class="IBObjectRecord"> - <int key="objectID">0</int> - <array key="object" id="0"/> - <reference key="children" ref="1048"/> - <nil key="parent"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">-2</int> - <reference key="object" ref="1021"/> - <reference key="parent" ref="0"/> - <string key="objectName">File's Owner</string> - </object> - <object class="IBObjectRecord"> - <int key="objectID">-1</int> - <reference key="object" ref="1014"/> - <reference key="parent" ref="0"/> - <string key="objectName">First Responder</string> - </object> - <object class="IBObjectRecord"> - <int key="objectID">-3</int> - <reference key="object" ref="1050"/> - <reference key="parent" ref="0"/> - <string key="objectName">Application</string> - </object> - <object class="IBObjectRecord"> - <int key="objectID">29</int> - <reference key="object" ref="649796088"/> - <array class="NSMutableArray" key="children"> - <reference ref="713487014"/> - <reference ref="694149608"/> - <reference ref="952259628"/> - <reference ref="379814623"/> - <reference ref="586577488"/> - <reference ref="302598603"/> - <reference ref="448692316"/> - </array> - <reference key="parent" ref="0"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">19</int> - <reference key="object" ref="713487014"/> - <array class="NSMutableArray" key="children"> - <reference ref="835318025"/> - </array> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">56</int> - <reference key="object" ref="694149608"/> - <array class="NSMutableArray" key="children"> - <reference ref="110575045"/> - </array> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">217</int> - <reference key="object" ref="952259628"/> - <array class="NSMutableArray" key="children"> - <reference ref="789758025"/> - </array> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">83</int> - <reference key="object" ref="379814623"/> - <array class="NSMutableArray" key="children"> - <reference ref="720053764"/> - </array> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">81</int> - <reference key="object" ref="720053764"/> - <array class="NSMutableArray" key="children"> - <reference ref="1023925487"/> - <reference ref="49223823"/> - <reference ref="722745758"/> - <reference ref="705341025"/> - <reference ref="1025936716"/> - <reference ref="294629803"/> - <reference ref="776162233"/> - <reference ref="425164168"/> - <reference ref="579971712"/> - <reference ref="1010469920"/> - </array> - <reference key="parent" ref="379814623"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">75</int> - <reference key="object" ref="1023925487"/> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">78</int> - <reference key="object" ref="49223823"/> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">72</int> - <reference key="object" ref="722745758"/> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">82</int> - <reference key="object" ref="705341025"/> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">124</int> - <reference key="object" ref="1025936716"/> - <array class="NSMutableArray" key="children"> - <reference ref="1065607017"/> - </array> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">77</int> - <reference key="object" ref="294629803"/> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">73</int> - <reference key="object" ref="776162233"/> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">79</int> - <reference key="object" ref="425164168"/> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">112</int> - <reference key="object" ref="579971712"/> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">74</int> - <reference key="object" ref="1010469920"/> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">125</int> - <reference key="object" ref="1065607017"/> - <array class="NSMutableArray" key="children"> - <reference ref="759406840"/> - </array> - <reference key="parent" ref="1025936716"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">126</int> - <reference key="object" ref="759406840"/> - <reference key="parent" ref="1065607017"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">205</int> - <reference key="object" ref="789758025"/> - <array class="NSMutableArray" key="children"> - <reference ref="437104165"/> - <reference ref="583158037"/> - <reference ref="1058277027"/> - <reference ref="212016141"/> - <reference ref="296257095"/> - <reference ref="29853731"/> - <reference ref="860595796"/> - <reference ref="1040322652"/> - <reference ref="790794224"/> - <reference ref="892235320"/> - <reference ref="972420730"/> - <reference ref="676164635"/> - <reference ref="507821607"/> - <reference ref="288088188"/> - <reference ref="82994268"/> - </array> - <reference key="parent" ref="952259628"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">202</int> - <reference key="object" ref="437104165"/> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">198</int> - <reference key="object" ref="583158037"/> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">207</int> - <reference key="object" ref="1058277027"/> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">214</int> - <reference key="object" ref="212016141"/> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">199</int> - <reference key="object" ref="296257095"/> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">203</int> - <reference key="object" ref="29853731"/> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">197</int> - <reference key="object" ref="860595796"/> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">206</int> - <reference key="object" ref="1040322652"/> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">215</int> - <reference key="object" ref="790794224"/> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">218</int> - <reference key="object" ref="892235320"/> - <array class="NSMutableArray" key="children"> - <reference ref="963351320"/> - </array> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">216</int> - <reference key="object" ref="972420730"/> - <array class="NSMutableArray" key="children"> - <reference ref="769623530"/> - </array> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">200</int> - <reference key="object" ref="769623530"/> - <array class="NSMutableArray" key="children"> - <reference ref="948374510"/> - <reference ref="96193923"/> - <reference ref="679648819"/> - <reference ref="967646866"/> - <reference ref="859480356"/> - <reference ref="795346622"/> - </array> - <reference key="parent" ref="972420730"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">219</int> - <reference key="object" ref="948374510"/> - <reference key="parent" ref="769623530"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">201</int> - <reference key="object" ref="96193923"/> - <reference key="parent" ref="769623530"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">204</int> - <reference key="object" ref="679648819"/> - <reference key="parent" ref="769623530"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">220</int> - <reference key="object" ref="963351320"/> - <array class="NSMutableArray" key="children"> - <reference ref="270902937"/> - <reference ref="88285865"/> - <reference ref="159080638"/> - <reference ref="326711663"/> - <reference ref="447796847"/> - <reference ref="738670835"/> - </array> - <reference key="parent" ref="892235320"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">213</int> - <reference key="object" ref="270902937"/> - <reference key="parent" ref="963351320"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">210</int> - <reference key="object" ref="88285865"/> - <reference key="parent" ref="963351320"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">221</int> - <reference key="object" ref="159080638"/> - <reference key="parent" ref="963351320"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">208</int> - <reference key="object" ref="326711663"/> - <reference key="parent" ref="963351320"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">209</int> - <reference key="object" ref="447796847"/> - <reference key="parent" ref="963351320"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">57</int> - <reference key="object" ref="110575045"/> - <array class="NSMutableArray" key="children"> - <reference ref="238522557"/> - <reference ref="755159360"/> - <reference ref="908899353"/> - <reference ref="632727374"/> - <reference ref="646227648"/> - <reference ref="609285721"/> - <reference ref="481834944"/> - <reference ref="304266470"/> - <reference ref="1046388886"/> - <reference ref="1056857174"/> - <reference ref="342932134"/> - </array> - <reference key="parent" ref="694149608"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">58</int> - <reference key="object" ref="238522557"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">134</int> - <reference key="object" ref="755159360"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">150</int> - <reference key="object" ref="908899353"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">136</int> - <reference key="object" ref="632727374"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">144</int> - <reference key="object" ref="646227648"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">129</int> - <reference key="object" ref="609285721"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">143</int> - <reference key="object" ref="481834944"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">236</int> - <reference key="object" ref="304266470"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">131</int> - <reference key="object" ref="1046388886"/> - <array class="NSMutableArray" key="children"> - <reference ref="752062318"/> - </array> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">149</int> - <reference key="object" ref="1056857174"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">145</int> - <reference key="object" ref="342932134"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">130</int> - <reference key="object" ref="752062318"/> - <reference key="parent" ref="1046388886"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">24</int> - <reference key="object" ref="835318025"/> - <array class="NSMutableArray" key="children"> - <reference ref="299356726"/> - <reference ref="625202149"/> - <reference ref="575023229"/> - <reference ref="1011231497"/> - </array> - <reference key="parent" ref="713487014"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">92</int> - <reference key="object" ref="299356726"/> - <reference key="parent" ref="835318025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">5</int> - <reference key="object" ref="625202149"/> - <reference key="parent" ref="835318025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">239</int> - <reference key="object" ref="575023229"/> - <reference key="parent" ref="835318025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">23</int> - <reference key="object" ref="1011231497"/> - <reference key="parent" ref="835318025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">295</int> - <reference key="object" ref="586577488"/> - <array class="NSMutableArray" key="children"> - <reference ref="466310130"/> - </array> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">296</int> - <reference key="object" ref="466310130"/> - <array class="NSMutableArray" key="children"> - <reference ref="102151532"/> - <reference ref="237841660"/> - </array> - <reference key="parent" ref="586577488"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">297</int> - <reference key="object" ref="102151532"/> - <reference key="parent" ref="466310130"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">298</int> - <reference key="object" ref="237841660"/> - <reference key="parent" ref="466310130"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">211</int> - <reference key="object" ref="676164635"/> - <array class="NSMutableArray" key="children"> - <reference ref="785027613"/> - </array> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">212</int> - <reference key="object" ref="785027613"/> - <array class="NSMutableArray" key="children"> - <reference ref="680220178"/> - <reference ref="731782645"/> - </array> - <reference key="parent" ref="676164635"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">195</int> - <reference key="object" ref="680220178"/> - <reference key="parent" ref="785027613"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">196</int> - <reference key="object" ref="731782645"/> - <reference key="parent" ref="785027613"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">346</int> - <reference key="object" ref="967646866"/> - <reference key="parent" ref="769623530"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">348</int> - <reference key="object" ref="507821607"/> - <array class="NSMutableArray" key="children"> - <reference ref="698887838"/> - </array> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">349</int> - <reference key="object" ref="698887838"/> - <array class="NSMutableArray" key="children"> - <reference ref="605118523"/> - <reference ref="197661976"/> - <reference ref="708854459"/> - <reference ref="65139061"/> - <reference ref="19036812"/> - <reference ref="672708820"/> - <reference ref="537092702"/> - </array> - <reference key="parent" ref="507821607"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">350</int> - <reference key="object" ref="605118523"/> - <reference key="parent" ref="698887838"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">351</int> - <reference key="object" ref="197661976"/> - <reference key="parent" ref="698887838"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">354</int> - <reference key="object" ref="708854459"/> - <reference key="parent" ref="698887838"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">371</int> - <reference key="object" ref="972006081"/> - <array class="NSMutableArray" key="children"> - <reference ref="439893737"/> - </array> - <reference key="parent" ref="0"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">372</int> - <reference key="object" ref="439893737"/> - <reference key="parent" ref="972006081"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">375</int> - <reference key="object" ref="302598603"/> - <array class="NSMutableArray" key="children"> - <reference ref="941447902"/> - </array> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">376</int> - <reference key="object" ref="941447902"/> - <array class="NSMutableArray" key="children"> - <reference ref="792887677"/> - <reference ref="215659978"/> - </array> - <reference key="parent" ref="302598603"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">377</int> - <reference key="object" ref="792887677"/> - <array class="NSMutableArray" key="children"> - <reference ref="786677654"/> - </array> - <reference key="parent" ref="941447902"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">388</int> - <reference key="object" ref="786677654"/> - <array class="NSMutableArray" key="children"> - <reference ref="159677712"/> - <reference ref="305399458"/> - <reference ref="814362025"/> - <reference ref="330926929"/> - <reference ref="533507878"/> - <reference ref="158063935"/> - <reference ref="885547335"/> - <reference ref="901062459"/> - <reference ref="767671776"/> - <reference ref="691570813"/> - <reference ref="769124883"/> - <reference ref="739652853"/> - <reference ref="1012600125"/> - <reference ref="214559597"/> - <reference ref="596732606"/> - <reference ref="393423671"/> - </array> - <reference key="parent" ref="792887677"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">389</int> - <reference key="object" ref="159677712"/> - <reference key="parent" ref="786677654"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">390</int> - <reference key="object" ref="305399458"/> - <reference key="parent" ref="786677654"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">391</int> - <reference key="object" ref="814362025"/> - <reference key="parent" ref="786677654"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">392</int> - <reference key="object" ref="330926929"/> - <reference key="parent" ref="786677654"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">393</int> - <reference key="object" ref="533507878"/> - <reference key="parent" ref="786677654"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">394</int> - <reference key="object" ref="158063935"/> - <reference key="parent" ref="786677654"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">395</int> - <reference key="object" ref="885547335"/> - <reference key="parent" ref="786677654"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">396</int> - <reference key="object" ref="901062459"/> - <reference key="parent" ref="786677654"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">397</int> - <reference key="object" ref="767671776"/> - <array class="NSMutableArray" key="children"> - <reference ref="175441468"/> - </array> - <reference key="parent" ref="786677654"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">398</int> - <reference key="object" ref="691570813"/> - <array class="NSMutableArray" key="children"> - <reference ref="1058217995"/> - </array> - <reference key="parent" ref="786677654"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">399</int> - <reference key="object" ref="769124883"/> - <array class="NSMutableArray" key="children"> - <reference ref="18263474"/> - </array> - <reference key="parent" ref="786677654"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">400</int> - <reference key="object" ref="739652853"/> - <reference key="parent" ref="786677654"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">401</int> - <reference key="object" ref="1012600125"/> - <reference key="parent" ref="786677654"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">402</int> - <reference key="object" ref="214559597"/> - <reference key="parent" ref="786677654"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">403</int> - <reference key="object" ref="596732606"/> - <reference key="parent" ref="786677654"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">404</int> - <reference key="object" ref="393423671"/> - <reference key="parent" ref="786677654"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">405</int> - <reference key="object" ref="18263474"/> - <array class="NSMutableArray" key="children"> - <reference ref="257962622"/> - <reference ref="644725453"/> - <reference ref="1037576581"/> - <reference ref="941806246"/> - <reference ref="1045724900"/> - </array> - <reference key="parent" ref="769124883"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">406</int> - <reference key="object" ref="257962622"/> - <reference key="parent" ref="18263474"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">407</int> - <reference key="object" ref="644725453"/> - <reference key="parent" ref="18263474"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">408</int> - <reference key="object" ref="1037576581"/> - <reference key="parent" ref="18263474"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">409</int> - <reference key="object" ref="941806246"/> - <reference key="parent" ref="18263474"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">410</int> - <reference key="object" ref="1045724900"/> - <reference key="parent" ref="18263474"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">411</int> - <reference key="object" ref="1058217995"/> - <array class="NSMutableArray" key="children"> - <reference ref="706297211"/> - <reference ref="568384683"/> - <reference ref="663508465"/> - </array> - <reference key="parent" ref="691570813"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">412</int> - <reference key="object" ref="706297211"/> - <reference key="parent" ref="1058217995"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">413</int> - <reference key="object" ref="568384683"/> - <reference key="parent" ref="1058217995"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">414</int> - <reference key="object" ref="663508465"/> - <reference key="parent" ref="1058217995"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">415</int> - <reference key="object" ref="175441468"/> - <array class="NSMutableArray" key="children"> - <reference ref="252969304"/> - <reference ref="766922938"/> - <reference ref="677519740"/> - <reference ref="238351151"/> - </array> - <reference key="parent" ref="767671776"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">416</int> - <reference key="object" ref="252969304"/> - <reference key="parent" ref="175441468"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">417</int> - <reference key="object" ref="766922938"/> - <reference key="parent" ref="175441468"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">418</int> - <reference key="object" ref="677519740"/> - <reference key="parent" ref="175441468"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">419</int> - <reference key="object" ref="238351151"/> - <reference key="parent" ref="175441468"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">420</int> - <reference key="object" ref="755631768"/> - <reference key="parent" ref="0"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">450</int> - <reference key="object" ref="288088188"/> - <array class="NSMutableArray" key="children"> - <reference ref="579392910"/> - </array> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">451</int> - <reference key="object" ref="579392910"/> - <array class="NSMutableArray" key="children"> - <reference ref="1060694897"/> - <reference ref="879586729"/> - <reference ref="56570060"/> - </array> - <reference key="parent" ref="288088188"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">452</int> - <reference key="object" ref="1060694897"/> - <reference key="parent" ref="579392910"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">453</int> - <reference key="object" ref="859480356"/> - <reference key="parent" ref="769623530"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">454</int> - <reference key="object" ref="795346622"/> - <reference key="parent" ref="769623530"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">457</int> - <reference key="object" ref="65139061"/> - <reference key="parent" ref="698887838"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">459</int> - <reference key="object" ref="19036812"/> - <reference key="parent" ref="698887838"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">460</int> - <reference key="object" ref="672708820"/> - <reference key="parent" ref="698887838"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">462</int> - <reference key="object" ref="537092702"/> - <reference key="parent" ref="698887838"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">465</int> - <reference key="object" ref="879586729"/> - <reference key="parent" ref="579392910"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">466</int> - <reference key="object" ref="56570060"/> - <reference key="parent" ref="579392910"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">485</int> - <reference key="object" ref="82994268"/> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">490</int> - <reference key="object" ref="448692316"/> - <array class="NSMutableArray" key="children"> - <reference ref="992780483"/> - </array> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">491</int> - <reference key="object" ref="992780483"/> - <array class="NSMutableArray" key="children"> - <reference ref="105068016"/> - </array> - <reference key="parent" ref="448692316"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">492</int> - <reference key="object" ref="105068016"/> - <reference key="parent" ref="992780483"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">494</int> - <reference key="object" ref="976324537"/> - <reference key="parent" ref="0"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">496</int> - <reference key="object" ref="215659978"/> - <array class="NSMutableArray" key="children"> - <reference ref="446991534"/> - </array> - <reference key="parent" ref="941447902"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">497</int> - <reference key="object" ref="446991534"/> - <array class="NSMutableArray" key="children"> - <reference ref="875092757"/> - <reference ref="630155264"/> - <reference ref="945678886"/> - <reference ref="512868991"/> - <reference ref="163117631"/> - <reference ref="31516759"/> - <reference ref="908105787"/> - <reference ref="644046920"/> - <reference ref="231811626"/> - <reference ref="883618387"/> - </array> - <reference key="parent" ref="215659978"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">498</int> - <reference key="object" ref="875092757"/> - <reference key="parent" ref="446991534"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">499</int> - <reference key="object" ref="630155264"/> - <reference key="parent" ref="446991534"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">500</int> - <reference key="object" ref="945678886"/> - <reference key="parent" ref="446991534"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">501</int> - <reference key="object" ref="512868991"/> - <reference key="parent" ref="446991534"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">502</int> - <reference key="object" ref="163117631"/> - <reference key="parent" ref="446991534"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">503</int> - <reference key="object" ref="31516759"/> - <array class="NSMutableArray" key="children"> - <reference ref="956096989"/> - </array> - <reference key="parent" ref="446991534"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">504</int> - <reference key="object" ref="908105787"/> - <reference key="parent" ref="446991534"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">505</int> - <reference key="object" ref="644046920"/> - <reference key="parent" ref="446991534"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">506</int> - <reference key="object" ref="231811626"/> - <reference key="parent" ref="446991534"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">507</int> - <reference key="object" ref="883618387"/> - <reference key="parent" ref="446991534"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">508</int> - <reference key="object" ref="956096989"/> - <array class="NSMutableArray" key="children"> - <reference ref="257099033"/> - <reference ref="551969625"/> - <reference ref="249532473"/> - <reference ref="607364498"/> - <reference ref="508151438"/> - <reference ref="981751889"/> - <reference ref="380031999"/> - <reference ref="825984362"/> - <reference ref="560145579"/> - </array> - <reference key="parent" ref="31516759"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">509</int> - <reference key="object" ref="257099033"/> - <reference key="parent" ref="956096989"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">510</int> - <reference key="object" ref="551969625"/> - <reference key="parent" ref="956096989"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">511</int> - <reference key="object" ref="249532473"/> - <reference key="parent" ref="956096989"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">512</int> - <reference key="object" ref="607364498"/> - <reference key="parent" ref="956096989"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">513</int> - <reference key="object" ref="508151438"/> - <reference key="parent" ref="956096989"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">514</int> - <reference key="object" ref="981751889"/> - <reference key="parent" ref="956096989"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">515</int> - <reference key="object" ref="380031999"/> - <reference key="parent" ref="956096989"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">516</int> - <reference key="object" ref="825984362"/> - <reference key="parent" ref="956096989"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">517</int> - <reference key="object" ref="560145579"/> - <reference key="parent" ref="956096989"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">534</int> - <reference key="object" ref="738670835"/> - <reference key="parent" ref="963351320"/> - </object> - </array> - </object> - <dictionary class="NSMutableDictionary" key="flattenedProperties"> - <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="112.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="124.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="125.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="126.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="129.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="130.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="131.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="134.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="136.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="143.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="144.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="145.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="149.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="150.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="19.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="195.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="196.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="197.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="198.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="199.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="200.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="201.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="202.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="203.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="204.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="205.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="206.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="207.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="208.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="209.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="210.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="211.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="212.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="213.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="214.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="215.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="216.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="217.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="218.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="219.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="220.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="221.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="23.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="236.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="239.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="24.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="29.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="296.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="297.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="298.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="346.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="348.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="349.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="350.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="351.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="354.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="371.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="371.IBWindowTemplateEditedContentRect">{{380, 496}, {480, 360}}</string> - <integer value="1" key="371.NSWindowTemplate.visibleAtLaunch"/> - <string key="372.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="375.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="376.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="377.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="388.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="389.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="390.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="391.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="392.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="393.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="394.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="395.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="396.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="397.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="398.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="399.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="400.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="401.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="402.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="403.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="404.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="405.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="406.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="407.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="408.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="409.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="410.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="411.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="412.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="413.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="414.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="415.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="416.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="417.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="418.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="419.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="420.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="450.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="451.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="452.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="453.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="454.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="457.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="459.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="460.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="462.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="465.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="466.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="485.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="490.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="491.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="492.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="494.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="496.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="497.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="498.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="499.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="500.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="501.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="502.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="503.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="504.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="505.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="506.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="507.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="508.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="509.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="510.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="511.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="512.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="513.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="514.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="515.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="516.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="517.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="534.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="56.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="57.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="58.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="72.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="73.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="74.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="75.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="77.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="78.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="79.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="81.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="82.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="83.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="92.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/> - <nil key="activeLocalization"/> - <dictionary class="NSMutableDictionary" key="localizations"/> - <nil key="sourceID"/> - <int key="maxID">535</int> - </object> - <object class="IBClassDescriber" key="IBDocument.Classes"> - <array class="NSMutableArray" key="referencedPartialClassDescriptions"> - <object class="IBPartialClassDescription"> - <string key="className">ABCardController</string> - <string key="superclassName">NSObject</string> - <dictionary class="NSMutableDictionary" key="actions"> - <string key="addCardViewField:">id</string> - <string key="copy:">id</string> - <string key="cut:">id</string> - <string key="doDelete:">id</string> - <string key="find:">id</string> - <string key="paste:">id</string> - <string key="saveChanges:">id</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="actionInfosByName"> - <object class="IBActionInfo" key="addCardViewField:"> - <string key="name">addCardViewField:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="copy:"> - <string key="name">copy:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="cut:"> - <string key="name">cut:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="doDelete:"> - <string key="name">doDelete:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="find:"> - <string key="name">find:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="paste:"> - <string key="name">paste:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="saveChanges:"> - <string key="name">saveChanges:</string> - <string key="candidateClassName">id</string> - </object> - </dictionary> - <dictionary class="NSMutableDictionary" key="outlets"> - <string key="mCardView">ABCardView</string> - <string key="mEditButton">NSButton</string> - <string key="mManagedObjectContext">NSManagedObjectContext</string> - <string key="mSearchField">NSSearchField</string> - <string key="mStatusTextField">NSTextField</string> - <string key="mWindow">NSWindow</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> - <object class="IBToOneOutletInfo" key="mCardView"> - <string key="name">mCardView</string> - <string key="candidateClassName">ABCardView</string> - </object> - <object class="IBToOneOutletInfo" key="mEditButton"> - <string key="name">mEditButton</string> - <string key="candidateClassName">NSButton</string> - </object> - <object class="IBToOneOutletInfo" key="mManagedObjectContext"> - <string key="name">mManagedObjectContext</string> - <string key="candidateClassName">NSManagedObjectContext</string> - </object> - <object class="IBToOneOutletInfo" key="mSearchField"> - <string key="name">mSearchField</string> - <string key="candidateClassName">NSSearchField</string> - </object> - <object class="IBToOneOutletInfo" key="mStatusTextField"> - <string key="name">mStatusTextField</string> - <string key="candidateClassName">NSTextField</string> - </object> - <object class="IBToOneOutletInfo" key="mWindow"> - <string key="name">mWindow</string> - <string key="candidateClassName">NSWindow</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/ABCardController.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">ABCardView</string> - <string key="superclassName">NSView</string> - <dictionary class="NSMutableDictionary" key="actions"> - <string key="commitAndSave:">id</string> - <string key="statusImageClicked:">id</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="actionInfosByName"> - <object class="IBActionInfo" key="commitAndSave:"> - <string key="name">commitAndSave:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="statusImageClicked:"> - <string key="name">statusImageClicked:</string> - <string key="candidateClassName">id</string> - </object> - </dictionary> - <dictionary class="NSMutableDictionary" key="outlets"> - <string key="mBuddyStatusImage">NSImageView</string> - <string key="mHeaderView">NSView</string> - <string key="mNameView">ABNameFrameView</string> - <string key="mNextKeyView">NSView</string> - <string key="mUserImage">NSImage</string> - <string key="mUserImageView">ABImageView</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> - <object class="IBToOneOutletInfo" key="mBuddyStatusImage"> - <string key="name">mBuddyStatusImage</string> - <string key="candidateClassName">NSImageView</string> - </object> - <object class="IBToOneOutletInfo" key="mHeaderView"> - <string key="name">mHeaderView</string> - <string key="candidateClassName">NSView</string> - </object> - <object class="IBToOneOutletInfo" key="mNameView"> - <string key="name">mNameView</string> - <string key="candidateClassName">ABNameFrameView</string> - </object> - <object class="IBToOneOutletInfo" key="mNextKeyView"> - <string key="name">mNextKeyView</string> - <string key="candidateClassName">NSView</string> - </object> - <object class="IBToOneOutletInfo" key="mUserImage"> - <string key="name">mUserImage</string> - <string key="candidateClassName">NSImage</string> - </object> - <object class="IBToOneOutletInfo" key="mUserImageView"> - <string key="name">mUserImageView</string> - <string key="candidateClassName">ABImageView</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/ABCardView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">ABImageView</string> - <string key="superclassName">NSImageView</string> - <dictionary class="NSMutableDictionary" key="actions"> - <string key="copy:">id</string> - <string key="cut:">id</string> - <string key="delete:">id</string> - <string key="paste:">id</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="actionInfosByName"> - <object class="IBActionInfo" key="copy:"> - <string key="name">copy:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="cut:"> - <string key="name">cut:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="delete:"> - <string key="name">delete:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="paste:"> - <string key="name">paste:</string> - <string key="candidateClassName">id</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/ABImageView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">DVTAutoLayoutView</string> - <string key="superclassName">NSView</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/DVTAutoLayoutView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">DVTBorderedView</string> - <string key="superclassName">DVTAutoLayoutView</string> - <object class="NSMutableDictionary" key="outlets"> - <string key="NS.key.0">contentView</string> - <string key="NS.object.0">NSView</string> - </object> - <object class="NSMutableDictionary" key="toOneOutletInfosByName"> - <string key="NS.key.0">contentView</string> - <object class="IBToOneOutletInfo" key="NS.object.0"> - <string key="name">contentView</string> - <string key="candidateClassName">NSView</string> - </object> - </object> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/DVTBorderedView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">DVTDelayedMenuButton</string> - <string key="superclassName">NSButton</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/DVTDelayedMenuButton.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">DVTGradientImageButton</string> - <string key="superclassName">NSButton</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/DVTGradientImageButton.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">DVTImageAndTextCell</string> - <string key="superclassName">NSTextFieldCell</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/DVTImageAndTextCell.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">DVTImageAndTextColumn</string> - <string key="superclassName">NSTableColumn</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/DVTImageAndTextColumn.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">DVTOutlineView</string> - <string key="superclassName">NSOutlineView</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/DVTOutlineView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">DVTSplitView</string> - <string key="superclassName">NSSplitView</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/DVTSplitView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">DVTStackView</string> - <string key="superclassName">DVTAutoLayoutView</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/DVTStackView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">DVTViewController</string> - <string key="superclassName">NSViewController</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/DVTViewController.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">HFController</string> - <string key="superclassName">NSObject</string> - <object class="NSMutableDictionary" key="actions"> - <string key="NS.key.0">selectAll:</string> - <string key="NS.object.0">id</string> - </object> - <object class="NSMutableDictionary" key="actionInfosByName"> - <string key="NS.key.0">selectAll:</string> - <object class="IBActionInfo" key="NS.object.0"> - <string key="name">selectAll:</string> - <string key="candidateClassName">id</string> - </object> - </object> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/HFController.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">HFRepresenterTextView</string> - <string key="superclassName">NSView</string> - <object class="NSMutableDictionary" key="actions"> - <string key="NS.key.0">selectAll:</string> - <string key="NS.object.0">id</string> - </object> - <object class="NSMutableDictionary" key="actionInfosByName"> - <string key="NS.key.0">selectAll:</string> - <object class="IBActionInfo" key="NS.object.0"> - <string key="name">selectAll:</string> - <string key="candidateClassName">id</string> - </object> - </object> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/HFRepresenterTextView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">IBEditor</string> - <string key="superclassName">NSObject</string> - <dictionary class="NSMutableDictionary" key="actions"> - <string key="changeFont:">id</string> - <string key="selectAll:">id</string> - <string key="sizeSelectionToFit:">id</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="actionInfosByName"> - <object class="IBActionInfo" key="changeFont:"> - <string key="name">changeFont:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="selectAll:"> - <string key="name">selectAll:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="sizeSelectionToFit:"> - <string key="name">sizeSelectionToFit:</string> - <string key="candidateClassName">id</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/IBEditor.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">IDECapsuleListView</string> - <string key="superclassName">DVTStackView</string> - <object class="NSMutableDictionary" key="outlets"> - <string key="NS.key.0">dataSource</string> - <string key="NS.object.0">id</string> - </object> - <object class="NSMutableDictionary" key="toOneOutletInfosByName"> - <string key="NS.key.0">dataSource</string> - <object class="IBToOneOutletInfo" key="NS.object.0"> - <string key="name">dataSource</string> - <string key="candidateClassName">id</string> - </object> - </object> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/IDECapsuleListView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">IDEDMArrayController</string> - <string key="superclassName">NSArrayController</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/IDEDMArrayController.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">IDEDMEditor</string> - <string key="superclassName">IDEEditor</string> - <dictionary class="NSMutableDictionary" key="outlets"> - <string key="bottomToolbarBorderView">DVTBorderedView</string> - <string key="sourceListSplitViewPane">NSView</string> - <string key="sourceListViewController">IDEDMEditorSourceListController</string> - <string key="splitView">DVTSplitView</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> - <object class="IBToOneOutletInfo" key="bottomToolbarBorderView"> - <string key="name">bottomToolbarBorderView</string> - <string key="candidateClassName">DVTBorderedView</string> - </object> - <object class="IBToOneOutletInfo" key="sourceListSplitViewPane"> - <string key="name">sourceListSplitViewPane</string> - <string key="candidateClassName">NSView</string> - </object> - <object class="IBToOneOutletInfo" key="sourceListViewController"> - <string key="name">sourceListViewController</string> - <string key="candidateClassName">IDEDMEditorSourceListController</string> - </object> - <object class="IBToOneOutletInfo" key="splitView"> - <string key="name">splitView</string> - <string key="candidateClassName">DVTSplitView</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/IDEDMEditor.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">IDEDMEditorController</string> - <string key="superclassName">IDEViewController</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/IDEDMEditorController.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">IDEDMEditorSourceListController</string> - <string key="superclassName">IDEDMEditorController</string> - <dictionary class="NSMutableDictionary" key="outlets"> - <string key="borderedView">DVTBorderedView</string> - <string key="parentEditor">IDEDMEditor</string> - <string key="primaryColumn">DVTImageAndTextColumn</string> - <string key="sourceListOutlineView">DVTOutlineView</string> - <string key="sourceListTreeController">NSTreeController</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> - <object class="IBToOneOutletInfo" key="borderedView"> - <string key="name">borderedView</string> - <string key="candidateClassName">DVTBorderedView</string> - </object> - <object class="IBToOneOutletInfo" key="parentEditor"> - <string key="name">parentEditor</string> - <string key="candidateClassName">IDEDMEditor</string> - </object> - <object class="IBToOneOutletInfo" key="primaryColumn"> - <string key="name">primaryColumn</string> - <string key="candidateClassName">DVTImageAndTextColumn</string> - </object> - <object class="IBToOneOutletInfo" key="sourceListOutlineView"> - <string key="name">sourceListOutlineView</string> - <string key="candidateClassName">DVTOutlineView</string> - </object> - <object class="IBToOneOutletInfo" key="sourceListTreeController"> - <string key="name">sourceListTreeController</string> - <string key="candidateClassName">NSTreeController</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/IDEDMEditorSourceListController.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">IDEDMHighlightImageAndTextCell</string> - <string key="superclassName">DVTImageAndTextCell</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/IDEDMHighlightImageAndTextCell.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">IDEDataModelBrowserEditor</string> - <string key="superclassName">IDEDMEditorController</string> - <dictionary class="NSMutableDictionary" key="outlets"> - <string key="attributesTableViewController">IDEDataModelPropertiesTableController</string> - <string key="capsuleView">IDECapsuleListView</string> - <string key="entityArrayController">NSArrayController</string> - <string key="fetchedPropertiesTableViewController">IDEDataModelPropertiesTableController</string> - <string key="parentEditor">IDEDataModelEntityContentsEditor</string> - <string key="relationshipsTableViewController">IDEDataModelPropertiesTableController</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> - <object class="IBToOneOutletInfo" key="attributesTableViewController"> - <string key="name">attributesTableViewController</string> - <string key="candidateClassName">IDEDataModelPropertiesTableController</string> - </object> - <object class="IBToOneOutletInfo" key="capsuleView"> - <string key="name">capsuleView</string> - <string key="candidateClassName">IDECapsuleListView</string> - </object> - <object class="IBToOneOutletInfo" key="entityArrayController"> - <string key="name">entityArrayController</string> - <string key="candidateClassName">NSArrayController</string> - </object> - <object class="IBToOneOutletInfo" key="fetchedPropertiesTableViewController"> - <string key="name">fetchedPropertiesTableViewController</string> - <string key="candidateClassName">IDEDataModelPropertiesTableController</string> - </object> - <object class="IBToOneOutletInfo" key="parentEditor"> - <string key="name">parentEditor</string> - <string key="candidateClassName">IDEDataModelEntityContentsEditor</string> - </object> - <object class="IBToOneOutletInfo" key="relationshipsTableViewController"> - <string key="name">relationshipsTableViewController</string> - <string key="candidateClassName">IDEDataModelPropertiesTableController</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/IDEDataModelBrowserEditor.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">IDEDataModelConfigurationEditor</string> - <string key="superclassName">IDEDMEditorController</string> - <dictionary class="NSMutableDictionary" key="outlets"> - <string key="capsuleListView">IDECapsuleListView</string> - <string key="parentEditor">IDEDataModelEditor</string> - <string key="tableController">IDEDataModelConfigurationTableController</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> - <object class="IBToOneOutletInfo" key="capsuleListView"> - <string key="name">capsuleListView</string> - <string key="candidateClassName">IDECapsuleListView</string> - </object> - <object class="IBToOneOutletInfo" key="parentEditor"> - <string key="name">parentEditor</string> - <string key="candidateClassName">IDEDataModelEditor</string> - </object> - <object class="IBToOneOutletInfo" key="tableController"> - <string key="name">tableController</string> - <string key="candidateClassName">IDEDataModelConfigurationTableController</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/IDEDataModelConfigurationEditor.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">IDEDataModelConfigurationTableController</string> - <string key="superclassName">IDEDMEditorController</string> - <dictionary class="NSMutableDictionary" key="outlets"> - <string key="configurationsArrayController">NSArrayController</string> - <string key="entitiesArrayController">NSArrayController</string> - <string key="parentEditor">IDEDataModelConfigurationEditor</string> - <string key="tableView">XDTableView</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> - <object class="IBToOneOutletInfo" key="configurationsArrayController"> - <string key="name">configurationsArrayController</string> - <string key="candidateClassName">NSArrayController</string> - </object> - <object class="IBToOneOutletInfo" key="entitiesArrayController"> - <string key="name">entitiesArrayController</string> - <string key="candidateClassName">NSArrayController</string> - </object> - <object class="IBToOneOutletInfo" key="parentEditor"> - <string key="name">parentEditor</string> - <string key="candidateClassName">IDEDataModelConfigurationEditor</string> - </object> - <object class="IBToOneOutletInfo" key="tableView"> - <string key="name">tableView</string> - <string key="candidateClassName">XDTableView</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/IDEDataModelConfigurationTableController.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">IDEDataModelDiagramEditor</string> - <string key="superclassName">IDEDMEditorController</string> - <dictionary class="NSMutableDictionary" key="outlets"> - <string key="diagramView">XDDiagramView</string> - <string key="parentEditor">IDEDataModelEntityContentsEditor</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> - <object class="IBToOneOutletInfo" key="diagramView"> - <string key="name">diagramView</string> - <string key="candidateClassName">XDDiagramView</string> - </object> - <object class="IBToOneOutletInfo" key="parentEditor"> - <string key="name">parentEditor</string> - <string key="candidateClassName">IDEDataModelEntityContentsEditor</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/IDEDataModelDiagramEditor.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">IDEDataModelEditor</string> - <string key="superclassName">IDEDMEditor</string> - <dictionary class="NSMutableDictionary" key="outlets"> - <string key="addEntityButton">DVTDelayedMenuButton</string> - <string key="addPropertyButton">DVTDelayedMenuButton</string> - <string key="browserDiagramSegmentControl">NSSegmentedControl</string> - <string key="configurationViewController">IDEDataModelConfigurationEditor</string> - <string key="entityContentsViewController">IDEDataModelEntityContentsEditor</string> - <string key="fetchRequestViewController">IDEDataModelFetchRequestEditor</string> - <string key="hierarchySegmentControl">NSSegmentedControl</string> - <string key="tabView">NSTabView</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> - <object class="IBToOneOutletInfo" key="addEntityButton"> - <string key="name">addEntityButton</string> - <string key="candidateClassName">DVTDelayedMenuButton</string> - </object> - <object class="IBToOneOutletInfo" key="addPropertyButton"> - <string key="name">addPropertyButton</string> - <string key="candidateClassName">DVTDelayedMenuButton</string> - </object> - <object class="IBToOneOutletInfo" key="browserDiagramSegmentControl"> - <string key="name">browserDiagramSegmentControl</string> - <string key="candidateClassName">NSSegmentedControl</string> - </object> - <object class="IBToOneOutletInfo" key="configurationViewController"> - <string key="name">configurationViewController</string> - <string key="candidateClassName">IDEDataModelConfigurationEditor</string> - </object> - <object class="IBToOneOutletInfo" key="entityContentsViewController"> - <string key="name">entityContentsViewController</string> - <string key="candidateClassName">IDEDataModelEntityContentsEditor</string> - </object> - <object class="IBToOneOutletInfo" key="fetchRequestViewController"> - <string key="name">fetchRequestViewController</string> - <string key="candidateClassName">IDEDataModelFetchRequestEditor</string> - </object> - <object class="IBToOneOutletInfo" key="hierarchySegmentControl"> - <string key="name">hierarchySegmentControl</string> - <string key="candidateClassName">NSSegmentedControl</string> - </object> - <object class="IBToOneOutletInfo" key="tabView"> - <string key="name">tabView</string> - <string key="candidateClassName">NSTabView</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/IDEDataModelEditor.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">IDEDataModelEntityContentsEditor</string> - <string key="superclassName">IDEDMEditorController</string> - <dictionary class="NSMutableDictionary" key="outlets"> - <string key="browserViewController">IDEDataModelBrowserEditor</string> - <string key="diagramViewController">IDEDataModelDiagramEditor</string> - <string key="parentEditor">IDEDataModelEditor</string> - <string key="tabView">NSTabView</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> - <object class="IBToOneOutletInfo" key="browserViewController"> - <string key="name">browserViewController</string> - <string key="candidateClassName">IDEDataModelBrowserEditor</string> - </object> - <object class="IBToOneOutletInfo" key="diagramViewController"> - <string key="name">diagramViewController</string> - <string key="candidateClassName">IDEDataModelDiagramEditor</string> - </object> - <object class="IBToOneOutletInfo" key="parentEditor"> - <string key="name">parentEditor</string> - <string key="candidateClassName">IDEDataModelEditor</string> - </object> - <object class="IBToOneOutletInfo" key="tabView"> - <string key="name">tabView</string> - <string key="candidateClassName">NSTabView</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/IDEDataModelEntityContentsEditor.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">IDEDataModelFetchRequestEditor</string> - <string key="superclassName">IDEDMEditorController</string> - <dictionary class="NSMutableDictionary" key="outlets"> - <string key="entityController">NSArrayController</string> - <string key="parentEditor">IDEDataModelEditor</string> - <string key="tableView">IDECapsuleListView</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> - <object class="IBToOneOutletInfo" key="entityController"> - <string key="name">entityController</string> - <string key="candidateClassName">NSArrayController</string> - </object> - <object class="IBToOneOutletInfo" key="parentEditor"> - <string key="name">parentEditor</string> - <string key="candidateClassName">IDEDataModelEditor</string> - </object> - <object class="IBToOneOutletInfo" key="tableView"> - <string key="name">tableView</string> - <string key="candidateClassName">IDECapsuleListView</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/IDEDataModelFetchRequestEditor.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">IDEDataModelPropertiesTableController</string> - <string key="superclassName">IDEDMEditorController</string> - <dictionary class="NSMutableDictionary" key="outlets"> - <string key="arrayController">IDEDMArrayController</string> - <string key="entitiesColumn">NSTableColumn</string> - <string key="entityArrayController">NSArrayController</string> - <string key="parentEditor">IDEDataModelBrowserEditor</string> - <string key="propertyNameAndImageCell">IDEDMHighlightImageAndTextCell</string> - <string key="tableView">XDTableView</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> - <object class="IBToOneOutletInfo" key="arrayController"> - <string key="name">arrayController</string> - <string key="candidateClassName">IDEDMArrayController</string> - </object> - <object class="IBToOneOutletInfo" key="entitiesColumn"> - <string key="name">entitiesColumn</string> - <string key="candidateClassName">NSTableColumn</string> - </object> - <object class="IBToOneOutletInfo" key="entityArrayController"> - <string key="name">entityArrayController</string> - <string key="candidateClassName">NSArrayController</string> - </object> - <object class="IBToOneOutletInfo" key="parentEditor"> - <string key="name">parentEditor</string> - <string key="candidateClassName">IDEDataModelBrowserEditor</string> - </object> - <object class="IBToOneOutletInfo" key="propertyNameAndImageCell"> - <string key="name">propertyNameAndImageCell</string> - <string key="candidateClassName">IDEDMHighlightImageAndTextCell</string> - </object> - <object class="IBToOneOutletInfo" key="tableView"> - <string key="name">tableView</string> - <string key="candidateClassName">XDTableView</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/IDEDataModelPropertiesTableController.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">IDEDocSetOutlineView</string> - <string key="superclassName">NSOutlineView</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/IDEDocSetOutlineView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">IDEDocSetOutlineViewController</string> - <string key="superclassName">NSObject</string> - <dictionary class="NSMutableDictionary" key="actions"> - <string key="getDocSetAction:">id</string> - <string key="showProblemInfoForUpdate:">id</string> - <string key="subscribeToPublisherAction:">id</string> - <string key="unsubscribeFromPublisher:">id</string> - <string key="updateDocSetAction:">id</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="actionInfosByName"> - <object class="IBActionInfo" key="getDocSetAction:"> - <string key="name">getDocSetAction:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="showProblemInfoForUpdate:"> - <string key="name">showProblemInfoForUpdate:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="subscribeToPublisherAction:"> - <string key="name">subscribeToPublisherAction:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="unsubscribeFromPublisher:"> - <string key="name">unsubscribeFromPublisher:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="updateDocSetAction:"> - <string key="name">updateDocSetAction:</string> - <string key="candidateClassName">id</string> - </object> - </dictionary> - <object class="NSMutableDictionary" key="outlets"> - <string key="NS.key.0">docSetOutlineView</string> - <string key="NS.object.0">IDEDocSetOutlineView</string> - </object> - <object class="NSMutableDictionary" key="toOneOutletInfosByName"> - <string key="NS.key.0">docSetOutlineView</string> - <object class="IBToOneOutletInfo" key="NS.object.0"> - <string key="name">docSetOutlineView</string> - <string key="candidateClassName">IDEDocSetOutlineView</string> - </object> - </object> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/IDEDocSetOutlineViewController.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">IDEDocViewingPrefPaneController</string> - <string key="superclassName">IDEViewController</string> - <dictionary class="NSMutableDictionary" key="actions"> - <string key="addSubscription:">id</string> - <string key="checkForAndInstallUpdatesNow:">id</string> - <string key="minimumFontSizeComboBoxAction:">id</string> - <string key="minimumFontSizeEnabledAction:">id</string> - <string key="showHelp:">id</string> - <string key="showSubscriptionSheet:">id</string> - <string key="subscriptionCancelAction:">id</string> - <string key="toggleAutoCheckForAndInstallUpdates:">id</string> - <string key="toggleDocSetInfo:">id</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="actionInfosByName"> - <object class="IBActionInfo" key="addSubscription:"> - <string key="name">addSubscription:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="checkForAndInstallUpdatesNow:"> - <string key="name">checkForAndInstallUpdatesNow:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="minimumFontSizeComboBoxAction:"> - <string key="name">minimumFontSizeComboBoxAction:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="minimumFontSizeEnabledAction:"> - <string key="name">minimumFontSizeEnabledAction:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="showHelp:"> - <string key="name">showHelp:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="showSubscriptionSheet:"> - <string key="name">showSubscriptionSheet:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="subscriptionCancelAction:"> - <string key="name">subscriptionCancelAction:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="toggleAutoCheckForAndInstallUpdates:"> - <string key="name">toggleAutoCheckForAndInstallUpdates:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="toggleDocSetInfo:"> - <string key="name">toggleDocSetInfo:</string> - <string key="candidateClassName">id</string> - </object> - </dictionary> - <dictionary class="NSMutableDictionary" key="outlets"> - <string key="_addButton">DVTGradientImageButton</string> - <string key="_deleteButton">DVTGradientImageButton</string> - <string key="_showInfoAreaButton">DVTGradientImageButton</string> - <string key="_splitView">NSSplitView</string> - <string key="_splitViewDocSetInfoSubview">NSView</string> - <string key="_splitViewDocSetsListSubview">NSView</string> - <string key="borderedViewAroundSplitView">DVTBorderedView</string> - <string key="borderedViewBelowTable">DVTBorderedView</string> - <string key="checkAndInstallNowButton">NSButton</string> - <string key="docSetInfoTextView">NSTextView</string> - <string key="docSetOutlineViewController">IDEDocSetOutlineViewController</string> - <string key="minimumFontSizeControl">NSComboBox</string> - <string key="noUpdatesAvailableMessage">NSTextField</string> - <string key="showInfoButton">NSButton</string> - <string key="subscriptionTextField">NSTextField</string> - <string key="subscriptionWindow">NSWindow</string> - <string key="validateAddSubscriptionButton">NSButton</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> - <object class="IBToOneOutletInfo" key="_addButton"> - <string key="name">_addButton</string> - <string key="candidateClassName">DVTGradientImageButton</string> - </object> - <object class="IBToOneOutletInfo" key="_deleteButton"> - <string key="name">_deleteButton</string> - <string key="candidateClassName">DVTGradientImageButton</string> - </object> - <object class="IBToOneOutletInfo" key="_showInfoAreaButton"> - <string key="name">_showInfoAreaButton</string> - <string key="candidateClassName">DVTGradientImageButton</string> - </object> - <object class="IBToOneOutletInfo" key="_splitView"> - <string key="name">_splitView</string> - <string key="candidateClassName">NSSplitView</string> - </object> - <object class="IBToOneOutletInfo" key="_splitViewDocSetInfoSubview"> - <string key="name">_splitViewDocSetInfoSubview</string> - <string key="candidateClassName">NSView</string> - </object> - <object class="IBToOneOutletInfo" key="_splitViewDocSetsListSubview"> - <string key="name">_splitViewDocSetsListSubview</string> - <string key="candidateClassName">NSView</string> - </object> - <object class="IBToOneOutletInfo" key="borderedViewAroundSplitView"> - <string key="name">borderedViewAroundSplitView</string> - <string key="candidateClassName">DVTBorderedView</string> - </object> - <object class="IBToOneOutletInfo" key="borderedViewBelowTable"> - <string key="name">borderedViewBelowTable</string> - <string key="candidateClassName">DVTBorderedView</string> - </object> - <object class="IBToOneOutletInfo" key="checkAndInstallNowButton"> - <string key="name">checkAndInstallNowButton</string> - <string key="candidateClassName">NSButton</string> - </object> - <object class="IBToOneOutletInfo" key="docSetInfoTextView"> - <string key="name">docSetInfoTextView</string> - <string key="candidateClassName">NSTextView</string> - </object> - <object class="IBToOneOutletInfo" key="docSetOutlineViewController"> - <string key="name">docSetOutlineViewController</string> - <string key="candidateClassName">IDEDocSetOutlineViewController</string> - </object> - <object class="IBToOneOutletInfo" key="minimumFontSizeControl"> - <string key="name">minimumFontSizeControl</string> - <string key="candidateClassName">NSComboBox</string> - </object> - <object class="IBToOneOutletInfo" key="noUpdatesAvailableMessage"> - <string key="name">noUpdatesAvailableMessage</string> - <string key="candidateClassName">NSTextField</string> - </object> - <object class="IBToOneOutletInfo" key="showInfoButton"> - <string key="name">showInfoButton</string> - <string key="candidateClassName">NSButton</string> - </object> - <object class="IBToOneOutletInfo" key="subscriptionTextField"> - <string key="name">subscriptionTextField</string> - <string key="candidateClassName">NSTextField</string> - </object> - <object class="IBToOneOutletInfo" key="subscriptionWindow"> - <string key="name">subscriptionWindow</string> - <string key="candidateClassName">NSWindow</string> - </object> - <object class="IBToOneOutletInfo" key="validateAddSubscriptionButton"> - <string key="name">validateAddSubscriptionButton</string> - <string key="candidateClassName">NSButton</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/IDEDocViewingPrefPaneController.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">IDEEditor</string> - <string key="superclassName">IDEViewController</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/IDEEditor.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">IDEViewController</string> - <string key="superclassName">DVTViewController</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/IDEViewController.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">IKImageView</string> - <dictionary class="NSMutableDictionary" key="actions"> - <string key="copy:">id</string> - <string key="crop:">id</string> - <string key="cut:">id</string> - <string key="paste:">id</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="actionInfosByName"> - <object class="IBActionInfo" key="copy:"> - <string key="name">copy:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="crop:"> - <string key="name">crop:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="cut:"> - <string key="name">cut:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="paste:"> - <string key="name">paste:</string> - <string key="candidateClassName">id</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/IKImageView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSDocument</string> - <dictionary class="NSMutableDictionary" key="actions"> - <string key="printDocument:">id</string> - <string key="revertDocumentToSaved:">id</string> - <string key="runPageLayout:">id</string> - <string key="saveDocument:">id</string> - <string key="saveDocumentAs:">id</string> - <string key="saveDocumentTo:">id</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="actionInfosByName"> - <object class="IBActionInfo" key="printDocument:"> - <string key="name">printDocument:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="revertDocumentToSaved:"> - <string key="name">revertDocumentToSaved:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="runPageLayout:"> - <string key="name">runPageLayout:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="saveDocument:"> - <string key="name">saveDocument:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="saveDocumentAs:"> - <string key="name">saveDocumentAs:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="saveDocumentTo:"> - <string key="name">saveDocumentTo:</string> - <string key="candidateClassName">id</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/NSDocument.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">QLPreviewBubble</string> - <string key="superclassName">NSObject</string> - <dictionary class="NSMutableDictionary" key="actions"> - <string key="hide:">id</string> - <string key="show:">id</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="actionInfosByName"> - <object class="IBActionInfo" key="hide:"> - <string key="name">hide:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="show:"> - <string key="name">show:</string> - <string key="candidateClassName">id</string> - </object> - </dictionary> - <object class="NSMutableDictionary" key="outlets"> - <string key="NS.key.0">parentWindow</string> - <string key="NS.object.0">NSWindow</string> - </object> - <object class="NSMutableDictionary" key="toOneOutletInfosByName"> - <string key="NS.key.0">parentWindow</string> - <object class="IBToOneOutletInfo" key="NS.object.0"> - <string key="name">parentWindow</string> - <string key="candidateClassName">NSWindow</string> - </object> - </object> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/QLPreviewBubble.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">QTMovieView</string> - <dictionary class="NSMutableDictionary" key="actions"> - <string key="showAll:">id</string> - <string key="showCustomButton:">id</string> - <string key="toggleLoops:">id</string> - <string key="zoomIn:">id</string> - <string key="zoomOut:">id</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="actionInfosByName"> - <object class="IBActionInfo" key="showAll:"> - <string key="name">showAll:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="showCustomButton:"> - <string key="name">showCustomButton:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="toggleLoops:"> - <string key="name">toggleLoops:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="zoomIn:"> - <string key="name">zoomIn:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="zoomOut:"> - <string key="name">zoomOut:</string> - <string key="candidateClassName">id</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/QTMovieView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">WebView</string> - <dictionary class="NSMutableDictionary" key="actions"> - <string key="reloadFromOrigin:">id</string> - <string key="resetPageZoom:">id</string> - <string key="zoomPageIn:">id</string> - <string key="zoomPageOut:">id</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="actionInfosByName"> - <object class="IBActionInfo" key="reloadFromOrigin:"> - <string key="name">reloadFromOrigin:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="resetPageZoom:"> - <string key="name">resetPageZoom:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="zoomPageIn:"> - <string key="name">zoomPageIn:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="zoomPageOut:"> - <string key="name">zoomPageOut:</string> - <string key="candidateClassName">id</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/WebView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">XDDiagramView</string> - <string key="superclassName">NSView</string> - <dictionary class="NSMutableDictionary" key="actions"> - <string key="_graphLayouterMenuItemAction:">id</string> - <string key="_zoomPopUpButtonAction:">id</string> - <string key="alignBottomEdges:">id</string> - <string key="alignCentersHorizontallyInContainer:">id</string> - <string key="alignCentersVerticallyInContainer:">id</string> - <string key="alignHorizontalCenters:">id</string> - <string key="alignLeftEdges:">id</string> - <string key="alignRightEdges:">id</string> - <string key="alignTopEdges:">id</string> - <string key="alignVerticalCenters:">id</string> - <string key="bringToFront:">id</string> - <string key="collapseAllCompartments:">id</string> - <string key="copy:">id</string> - <string key="cut:">id</string> - <string key="delete:">id</string> - <string key="deleteBackward:">id</string> - <string key="deleteForward:">id</string> - <string key="deselectAll:">id</string> - <string key="diagramZoomIn:">id</string> - <string key="diagramZoomOut:">id</string> - <string key="expandAllCompartments:">id</string> - <string key="flipHorizontally:">id</string> - <string key="flipVertically:">id</string> - <string key="layoutGraphicsConcentrically:">id</string> - <string key="layoutGraphicsHierarchically:">id</string> - <string key="lock:">id</string> - <string key="makeSameHeight:">id</string> - <string key="makeSameWidth:">id</string> - <string key="moveDown:">id</string> - <string key="moveDownAndModifySelection:">id</string> - <string key="moveLeft:">id</string> - <string key="moveLeftAndModifySelection:">id</string> - <string key="moveRight:">id</string> - <string key="moveRightAndModifySelection:">id</string> - <string key="moveUp:">id</string> - <string key="moveUpAndModifySelection:">id</string> - <string key="paste:">id</string> - <string key="rollDownAllCompartments:">id</string> - <string key="rollUpAllCompartments:">id</string> - <string key="selectAll:">id</string> - <string key="sendToBack:">id</string> - <string key="sizeToFit:">id</string> - <string key="toggleGridShown:">id</string> - <string key="toggleHiddenGraphicsShown:">id</string> - <string key="togglePageBreaksShown:">id</string> - <string key="toggleRuler:">id</string> - <string key="toggleSnapsToGrid:">id</string> - <string key="unlock:">id</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="actionInfosByName"> - <object class="IBActionInfo" key="_graphLayouterMenuItemAction:"> - <string key="name">_graphLayouterMenuItemAction:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="_zoomPopUpButtonAction:"> - <string key="name">_zoomPopUpButtonAction:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="alignBottomEdges:"> - <string key="name">alignBottomEdges:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="alignCentersHorizontallyInContainer:"> - <string key="name">alignCentersHorizontallyInContainer:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="alignCentersVerticallyInContainer:"> - <string key="name">alignCentersVerticallyInContainer:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="alignHorizontalCenters:"> - <string key="name">alignHorizontalCenters:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="alignLeftEdges:"> - <string key="name">alignLeftEdges:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="alignRightEdges:"> - <string key="name">alignRightEdges:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="alignTopEdges:"> - <string key="name">alignTopEdges:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="alignVerticalCenters:"> - <string key="name">alignVerticalCenters:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="bringToFront:"> - <string key="name">bringToFront:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="collapseAllCompartments:"> - <string key="name">collapseAllCompartments:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="copy:"> - <string key="name">copy:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="cut:"> - <string key="name">cut:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="delete:"> - <string key="name">delete:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="deleteBackward:"> - <string key="name">deleteBackward:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="deleteForward:"> - <string key="name">deleteForward:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="deselectAll:"> - <string key="name">deselectAll:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="diagramZoomIn:"> - <string key="name">diagramZoomIn:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="diagramZoomOut:"> - <string key="name">diagramZoomOut:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="expandAllCompartments:"> - <string key="name">expandAllCompartments:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="flipHorizontally:"> - <string key="name">flipHorizontally:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="flipVertically:"> - <string key="name">flipVertically:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="layoutGraphicsConcentrically:"> - <string key="name">layoutGraphicsConcentrically:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="layoutGraphicsHierarchically:"> - <string key="name">layoutGraphicsHierarchically:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="lock:"> - <string key="name">lock:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="makeSameHeight:"> - <string key="name">makeSameHeight:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="makeSameWidth:"> - <string key="name">makeSameWidth:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="moveDown:"> - <string key="name">moveDown:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="moveDownAndModifySelection:"> - <string key="name">moveDownAndModifySelection:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="moveLeft:"> - <string key="name">moveLeft:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="moveLeftAndModifySelection:"> - <string key="name">moveLeftAndModifySelection:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="moveRight:"> - <string key="name">moveRight:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="moveRightAndModifySelection:"> - <string key="name">moveRightAndModifySelection:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="moveUp:"> - <string key="name">moveUp:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="moveUpAndModifySelection:"> - <string key="name">moveUpAndModifySelection:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="paste:"> - <string key="name">paste:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="rollDownAllCompartments:"> - <string key="name">rollDownAllCompartments:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="rollUpAllCompartments:"> - <string key="name">rollUpAllCompartments:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="selectAll:"> - <string key="name">selectAll:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="sendToBack:"> - <string key="name">sendToBack:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="sizeToFit:"> - <string key="name">sizeToFit:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="toggleGridShown:"> - <string key="name">toggleGridShown:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="toggleHiddenGraphicsShown:"> - <string key="name">toggleHiddenGraphicsShown:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="togglePageBreaksShown:"> - <string key="name">togglePageBreaksShown:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="toggleRuler:"> - <string key="name">toggleRuler:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="toggleSnapsToGrid:"> - <string key="name">toggleSnapsToGrid:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="unlock:"> - <string key="name">unlock:</string> - <string key="candidateClassName">id</string> - </object> - </dictionary> - <object class="NSMutableDictionary" key="outlets"> - <string key="NS.key.0">_diagramController</string> - <string key="NS.object.0">IDEDataModelDiagramEditor</string> - </object> - <object class="NSMutableDictionary" key="toOneOutletInfosByName"> - <string key="NS.key.0">_diagramController</string> - <object class="IBToOneOutletInfo" key="NS.object.0"> - <string key="name">_diagramController</string> - <string key="candidateClassName">IDEDataModelDiagramEditor</string> - </object> - </object> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/XDDiagramView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">XDTableView</string> - <string key="superclassName">NSTableView</string> - <object class="NSMutableDictionary" key="actions"> - <string key="NS.key.0">showAllTableColumns:</string> - <string key="NS.object.0">id</string> - </object> - <object class="NSMutableDictionary" key="actionInfosByName"> - <string key="NS.key.0">showAllTableColumns:</string> - <object class="IBActionInfo" key="NS.object.0"> - <string key="name">showAllTableColumns:</string> - <string key="candidateClassName">id</string> - </object> - </object> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/XDTableView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">AppDelegate</string> - <string key="superclassName">NSObject</string> - <dictionary class="NSMutableDictionary" key="actions"> - <string key="applicationShouldTerminate:">id</string> - <string key="applicationWillFinishLaunching:">id</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="actionInfosByName"> - <object class="IBActionInfo" key="applicationShouldTerminate:"> - <string key="name">applicationShouldTerminate:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="applicationWillFinishLaunching:"> - <string key="name">applicationWillFinishLaunching:</string> - <string key="candidateClassName">id</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/AppDelegate.h</string> - </object> - </object> - </array> - </object> - <int key="IBDocument.localizationMode">0</int> - <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string> - <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies"> - <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string> - <integer value="1070" key="NS.object.0"/> - </object> - <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> - <int key="IBDocument.defaultPropertyAccessControl">3</int> - <dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes"> - <string key="NSMenuCheckmark">{9, 8}</string> - <string key="NSMenuMixedState">{7, 2}</string> - </dictionary> - <bool key="IBDocument.UseAutolayout">YES</bool> - </data> -</archive> diff --git a/candpiosapp/Externals/AFNetworking/Example/iOS-Info.plist b/candpiosapp/Externals/AFNetworking/Example/iOS-Info.plist deleted file mode 100644 index 7e523a43..00000000 --- a/candpiosapp/Externals/AFNetworking/Example/iOS-Info.plist +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleDevelopmentRegion</key> - <string>en</string> - <key>CFBundleDisplayName</key> - <string>AFNetworking</string> - <key>CFBundleExecutable</key> - <string>${EXECUTABLE_NAME}</string> - <key>CFBundleIconFile</key> - <string></string> - <key>CFBundleIconFiles</key> - <array> - <string>Icon.png</string> - <string>Icon@2x.png</string> - </array> - <key>CFBundleIcons</key> - <dict> - <key>CFBundlePrimaryIcon</key> - <dict> - <key>CFBundleIconFiles</key> - <array> - <string>Icon.png</string> - <string>Icon@2x.png</string> - </array> - <key>UIPrerenderedIcon</key> - <true/> - </dict> - </dict> - <key>CFBundleIdentifier</key> - <string>com.alamofire.${PRODUCT_NAME:rfc1034identifier}</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundleName</key> - <string>${PRODUCT_NAME}</string> - <key>CFBundlePackageType</key> - <string>APPL</string> - <key>CFBundleShortVersionString</key> - <string>1.0</string> - <key>CFBundleSignature</key> - <string>????</string> - <key>CFBundleVersion</key> - <string>1.0.0</string> - <key>LSRequiresIPhoneOS</key> - <true/> - <key>UIPrerenderedIcon</key> - <true/> - <key>UISupportedInterfaceOrientations</key> - <array> - <string>UIInterfaceOrientationPortrait</string> - </array> -</dict> -</plist> diff --git a/candpiosapp/Externals/AFNetworking/Example/main.m b/candpiosapp/Externals/AFNetworking/Example/main.m deleted file mode 100644 index 44bc3d60..00000000 --- a/candpiosapp/Externals/AFNetworking/Example/main.m +++ /dev/null @@ -1,37 +0,0 @@ -// main.m -// Copyright (c) 2012 Mattt Thompson (http://mattt.me/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if __IPHONE_OS_VERSION_MIN_REQUIRED - #import <UIKit/UIKit.h> - - int main(int argc, char *argv[]) { - @autoreleasepool { - int retVal = UIApplicationMain(argc, argv, @"UIApplication", @"AppDelegate"); - return retVal; - } - } -#else - #import <Cocoa/Cocoa.h> - - int main(int argc, char *argv[]) { - return NSApplicationMain(argc, (const char **)argv); - } -#endif