diff --git a/.gitignore b/.gitignore index d7356f40af..54eaeeff2d 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ DerivedData # Bundler binstubs .bundle bin +RestKit.xcscmblueprint diff --git a/.gitmodules b/.gitmodules index f6265ec0e3..e69de29bb2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +0,0 @@ -[submodule "Vendor/AFNetworking"] - path = Vendor/AFNetworking - url = https://github.com/AFNetworking/AFNetworking.git -[submodule "Vendor/TransitionKit"] - path = Vendor/TransitionKit - url = https://github.com/blakewatters/TransitionKit.git -[submodule "Vendor/RKValueTransformers"] - path = Vendor/RKValueTransformers - url = https://github.com/RestKit/RKValueTransformers.git -[submodule "Vendor/ISO8601DateFormatterValueTransformer"] - path = Vendor/ISO8601DateFormatterValueTransformer - url = https://github.com/blakewatters/ISO8601DateFormatterValueTransformer.git -[submodule "Vendor/SOCKit"] - path = Vendor/SOCKit - url = https://github.com/NimbusKit/sockit.git diff --git a/.ruby-version b/.ruby-version index c043eea776..b1b25a5ffa 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.2.1 +2.2.2 diff --git a/.travis.yml b/.travis.yml index 769bd0077e..d3015b8fc4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,12 @@ language: objective-c -rvm: 2.2.1 +rvm: 2.2.2 install: - bundle install - bundle exec pod install script: - bundle exec rake ci +branches: + only: + - master + - development + - /^release/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 763ff0b51e..5565d68e7c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ ## Issues -GitHub Issues is for reporting bugs in RestKit and discussing changes to RestKit itself. Please check the [documentation](http://cocoadocs.org/docsets/RestKit/), [wiki](https://github.com/RestKit/RestKit/wiki), and [existing issues](https://github.com/RestKit/RestKit/issues?state=closed) before opening a new issue. +GitHub Issues is for reporting bugs in RestKit and discussing changes to RestKit itself. Please check the [documentation](http://cocoadocs.org/docsets/RestKit/), [wiki](https://github.com/RestKit/RestKit/wiki), and [existing issues](https://github.com/RestKit/RestKit/issues?q=is:issue) before opening a new issue. Additionaly, please do not post general usage questions to Issues, but instead take them to [Stack Overflow](http://stackoverflow.com/questions/tagged/restkit). diff --git a/Code/Support/RKLumberjackLogger.h b/Code/CocoaLumberjack/RKLumberjackLogger.h similarity index 68% rename from Code/Support/RKLumberjackLogger.h rename to Code/CocoaLumberjack/RKLumberjackLogger.h index c77def651a..935a778bae 100644 --- a/Code/Support/RKLumberjackLogger.h +++ b/Code/CocoaLumberjack/RKLumberjackLogger.h @@ -8,8 +8,8 @@ #import -#if __has_include("DDLog.h") -#import "RKLog.h" +#if __has_include() +#import @interface RKLumberjackLogger : NSObject @end diff --git a/Code/CocoaLumberjack/RKLumberjackLogger.m b/Code/CocoaLumberjack/RKLumberjackLogger.m new file mode 100644 index 0000000000..5e349a2daa --- /dev/null +++ b/Code/CocoaLumberjack/RKLumberjackLogger.m @@ -0,0 +1,110 @@ +// +// RKLumberjackLogger.m +// Pods +// +// Created by C_Lindberg,Carl on 10/31/14. +// +// + +#if __has_include() +#import +#import + +@implementation RKLumberjackLogger + ++ (DDLogLevel)ddLogLevelFromRKLogLevel:(_RKlcl_level_t)rkLevel +{ + switch (rkLevel) + { + case RKLogLevelOff: return DDLogLevelOff; + case RKLogLevelCritical: return DDLogLevelError; + case RKLogLevelError: return DDLogLevelError; + case RKLogLevelWarning: return DDLogLevelWarning; + case RKLogLevelInfo: return DDLogLevelInfo; + case RKLogLevelDebug: return DDLogLevelDebug; + case RKLogLevelTrace: return DDLogLevelVerbose; + } + + return DDLogLevelDebug; +} + ++ (DDLogFlag)ddLogFlagFromRKLogLevel:(_RKlcl_level_t)rkLevel +{ + switch (rkLevel) + { + case RKLogLevelOff: return 0; + case RKLogLevelCritical: return DDLogFlagError; + case RKLogLevelError: return DDLogFlagError; + case RKLogLevelWarning: return DDLogFlagWarning; + case RKLogLevelInfo: return DDLogFlagInfo; + case RKLogLevelDebug: return DDLogFlagDebug; + case RKLogLevelTrace: return DDLogFlagVerbose; + } + + return DDLogFlagDebug; +} + ++ (_RKlcl_level_t)rkLogLevelFromDDLogLevel:(DDLogLevel)ddLogLevel +{ + if (ddLogLevel & DDLogFlagVerbose) return RKLogLevelTrace; + if (ddLogLevel & DDLogFlagDebug) return RKLogLevelDebug; + if (ddLogLevel & DDLogFlagInfo) return RKLogLevelInfo; + if (ddLogLevel & DDLogFlagWarning) return RKLogLevelWarning; + if (ddLogLevel & DDLogFlagError) return RKLogLevelError; + + return RKLogLevelOff; +} + + +#pragma mark RKLogging + ++ (void)logWithComponent:(_RKlcl_component_t)component + level:(_RKlcl_level_t)level + path:(const char *)path + line:(uint32_t)line + function:(const char *)function + format:(NSString *)format, ... +{ + va_list args; + va_start(args, format); + + DDLogFlag flag = [self ddLogFlagFromRKLogLevel:level]; + DDLogLevel componentLevel = [self ddLogLevelFromRKLogLevel:_RKlcl_component_level[component]]; + BOOL async = LOG_ASYNC_ENABLED && ((flag & DDLogFlagError) == 0); + + [DDLog log:async + level:componentLevel + flag:flag + context:0x524B5F00 + component + file:path function:function line:line + tag:nil + format:format args:args]; + va_end(args); +} + +@end + +/* Create a DDRegisteredDynamicLogging class for each RestKit component */ + +#import + +#undef _RKlcl_component +#define _RKlcl_component(_identifier, _header, _name) \ + @interface RKLumberjackLog##_identifier : NSObject \ + @end \ + @implementation RKLumberjackLog##_identifier \ + + (DDLogLevel)ddLogLevel { \ + _RKlcl_level_t level = _RKlcl_component_level[RKlcl_c##_identifier]; \ + return [RKLumberjackLogger ddLogLevelFromRKLogLevel:level]; \ + } \ + + (void)ddSetLogLevel:(DDLogLevel)logLevel { \ + RKLogConfigureByName(_name, [RKLumberjackLogger rkLogLevelFromDDLogLevel:logLevel]); \ + } \ + @end + +RKLCLComponentDefinitions + +#undef _RKlcl_component + + +#endif diff --git a/Code/CoreData.h b/Code/CoreData.h index ff8972d4a6..247d919ae1 100644 --- a/Code/CoreData.h +++ b/Code/CoreData.h @@ -19,15 +19,15 @@ // #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 +#import +#import +#import +#import +#import +#import +#import -#import "RKPropertyInspector+CoreData.h" -#import "NSManagedObjectContext+RKAdditions.h" -#import "NSManagedObject+RKAdditions.h" +#import +#import +#import diff --git a/Code/CoreData/NSManagedObject+RKAdditions.m b/Code/CoreData/NSManagedObject+RKAdditions.m index 196ff18979..d98a0922c2 100644 --- a/Code/CoreData/NSManagedObject+RKAdditions.m +++ b/Code/CoreData/NSManagedObject+RKAdditions.m @@ -6,10 +6,10 @@ // Copyright (c) 2009-2012 RestKit. All rights reserved. // -#import "NSManagedObject+RKAdditions.h" -#import "NSManagedObjectContext+RKAdditions.h" -#import "RKLog.h" -#import "RKManagedObjectStore.h" +#import +#import +#import +#import @implementation NSManagedObject (RKAdditions) diff --git a/Code/CoreData/NSManagedObjectContext+RKAdditions.m b/Code/CoreData/NSManagedObjectContext+RKAdditions.m index 8f22e10c19..48e1677eac 100644 --- a/Code/CoreData/NSManagedObjectContext+RKAdditions.m +++ b/Code/CoreData/NSManagedObjectContext+RKAdditions.m @@ -18,9 +18,9 @@ // limitations under the License. // +#import +#import #import -#import "NSManagedObjectContext+RKAdditions.h" -#import "RKLog.h" @implementation NSManagedObjectContext (RKAdditions) diff --git a/Code/CoreData/RKConnectionDescription.m b/Code/CoreData/RKConnectionDescription.m index ee47003508..d868f3e7d1 100644 --- a/Code/CoreData/RKConnectionDescription.m +++ b/Code/CoreData/RKConnectionDescription.m @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKConnectionDescription.h" +#import static NSSet *RKSetWithInvalidAttributesForEntity(NSArray *attributes, NSEntityDescription *entity) { diff --git a/Code/CoreData/RKCoreData.h b/Code/CoreData/RKCoreData.h index 01c826eb75..5d700c8d94 100644 --- a/Code/CoreData/RKCoreData.h +++ b/Code/CoreData/RKCoreData.h @@ -21,6 +21,6 @@ #ifndef RestKit_RKCoreData_h #define RestKit_RKCoreData_h -#import "CoreData.h" +#import #endif diff --git a/Code/CoreData/RKEntityByAttributeCache.m b/Code/CoreData/RKEntityByAttributeCache.m index 6ecac27dea..5176d66dfe 100644 --- a/Code/CoreData/RKEntityByAttributeCache.m +++ b/Code/CoreData/RKEntityByAttributeCache.m @@ -22,12 +22,12 @@ #import #endif -#import "RKEntityByAttributeCache.h" -#import "RKLog.h" -#import "RKPropertyInspector.h" -#import "RKPropertyInspector+CoreData.h" -#import "NSManagedObject+RKAdditions.h" -#import "RKObjectUtilities.h" +#import +#import +#import +#import +#import +#import // Set Logging Component #undef RKLogComponent @@ -211,16 +211,17 @@ - (NSManagedObject *)objectForObjectID:(NSManagedObjectID *)objectID inContext:( { /** 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. + that will raise an exception when fired. `objectRegisteredForID:` is also an acceptable approach. */ __block NSError *error = nil; __block NSManagedObject *object; [context performBlockAndWait:^{ object = [context existingObjectWithID:objectID error:&error]; }]; + // Don't return the object if it has been deleted. + if ([object isDeleted]) object = nil; if (! object) { // Referential integrity errors often indicates that the temporary objectID does not exist in the specified context if (error && !([objectID isTemporaryID] && [error code] == NSManagedObjectReferentialIntegrityError)) { diff --git a/Code/CoreData/RKEntityCache.m b/Code/CoreData/RKEntityCache.m index 90241db133..501d4648ed 100644 --- a/Code/CoreData/RKEntityCache.m +++ b/Code/CoreData/RKEntityCache.m @@ -18,8 +18,8 @@ // limitations under the License. // -#import "RKEntityCache.h" -#import "RKEntityByAttributeCache.h" +#import +#import @interface RKEntityCache () @property (nonatomic, strong) NSMutableSet *attributeCaches; diff --git a/Code/CoreData/RKEntityMapping.h b/Code/CoreData/RKEntityMapping.h index 7170053fc1..e727bcd537 100644 --- a/Code/CoreData/RKEntityMapping.h +++ b/Code/CoreData/RKEntityMapping.h @@ -19,9 +19,9 @@ // #import -#import "RKObjectMapping.h" -#import "RKConnectionDescription.h" -#import "RKMacros.h" +#import +#import +#import @class RKManagedObjectStore; @@ -114,17 +114,33 @@ */ @property (nonatomic, copy) NSPredicate *identificationPredicate; +/** + An optional block which returns a predicate used to filter identified objects during mapping. + + @return The identification predicate block. + */ +@property (nonatomic, copy) NSPredicate *(^identificationPredicateBlock)(NSDictionary *representation, NSManagedObjectContext *managedObjectContext); + /** An optional attribute of the receiver's entity that can be used to detect modification of a given instance. This is used to improve the performance of mapping operations by skipping the property mappings for a given object if it is found to be not modified. A common modification attribute is a 'last modified' or 'updated at' timestamp that specifies the timestamp of the last change to an object. When the `modificationAttribute` is non-nil, the mapper will compare the value returned of the attribute on an existing object instance with the value in the representation being mapped. - The semantics of the comparison are dependent on the data type of the modification attribute. If the attribute is a string, then the values are compared for equality. If the attribute is a date or a numeric value, then the values will be compared numerically and mapping will be skipped if the value in the representation is greater than the value of the modification attribute stored on the object. + The semantics of the comparison are dependent on the data type of the modification attribute. If the attribute is a string, then the values are compared for equality. If the attribute is a date or a numeric value, then the values will be compared numerically and mapping will be skipped unless the value in the representation is greater than the value of the modification attribute stored on the object. @raises NSInvalidArgumentException Raised if the attribute given is not a property of the receiver's entity. */ @property (nonatomic, strong) NSAttributeDescription *modificationAttribute; +/** + If this is YES, mapping operations will map relationships of the object even if the `modificationAttribute` shows that the object has not been modified. + + This is useful if a response contains a nested object that has been updated inside an object that has not. + + Defaults to NO. + */ +@property (nonatomic) BOOL shouldMapRelationshipsIfObjectIsUnmodified; + /** Sets the `modificationAttribute` to the receiver to the attribute with the specified name. diff --git a/Code/CoreData/RKEntityMapping.m b/Code/CoreData/RKEntityMapping.m index 1e0ef0c091..e69de9964c 100644 --- a/Code/CoreData/RKEntityMapping.m +++ b/Code/CoreData/RKEntityMapping.m @@ -18,13 +18,13 @@ // limitations under the License. // -#import "RKEntityMapping.h" -#import "RKManagedObjectStore.h" -#import "RKObjectMappingMatcher.h" -#import "RKPropertyInspector+CoreData.h" -#import "RKLog.h" -#import "RKRelationshipMapping.h" -#import "RKObjectUtilities.h" +#import +#import +#import +#import +#import +#import +#import // Set Logging Component #undef RKLogComponent @@ -39,9 +39,17 @@ do { id userInfoValue = [[entity userInfo] valueForKey:RKEntityIdentificationAttributesUserInfoKey]; if (userInfoValue) { - NSArray *attributeNames = [userInfoValue isKindOfClass:[NSArray class]] ? userInfoValue : @[ userInfoValue ]; + NSArray *attributeNames; + if ([userInfoValue isKindOfClass:[NSString class]]) { + attributeNames = [userInfoValue componentsSeparatedByString:@","]; + } else if ([userInfoValue isKindOfClass:[NSArray class]]) { + attributeNames = userInfoValue; + } else { + attributeNames = @[ userInfoValue ]; + } + NSMutableArray *attributes = [NSMutableArray arrayWithCapacity:[attributeNames count]]; - [attributeNames enumerateObjectsUsingBlock:^(NSString *attributeName, NSUInteger idx, BOOL *stop) { + for (NSString *attributeName in attributeNames) { if (! [attributeName isKindOfClass:[NSString class]]) { [NSException raise:NSInvalidArgumentException format:@"Invalid value given in user info key '%@' of entity '%@': expected an `NSString` or `NSArray` of strings, instead got '%@' (%@)", RKEntityIdentificationAttributesUserInfoKey, [entity name], attributeName, [attributeName class]]; } @@ -52,7 +60,7 @@ } [attributes addObject:attribute]; - }]; + }; return attributes; } entity = [entity superentity]; @@ -111,7 +119,9 @@ { NSArray *attributes = RKEntityIdentificationAttributesFromUserInfoOfEntity(entity); if (attributes) { - return RKArrayOfAttributesForEntityFromAttributesOrNames(entity, attributes); + NSArray *identificationAttributes = RKArrayOfAttributesForEntityFromAttributesOrNames(entity, attributes); + RKLogDebug(@"Inferred identification attributes for %@: %@", entity.name, [[identificationAttributes valueForKeyPath:@"name"] componentsJoinedByString:@", "]); + return identificationAttributes; } NSMutableArray *identifyingAttributes = [RKEntityIdentificationAttributeNamesForEntity(entity) mutableCopy]; @@ -119,9 +129,11 @@ for (NSString *attributeName in identifyingAttributes) { NSAttributeDescription *attribute = [[entity attributesByName] valueForKey:attributeName]; if (attribute) { + RKLogDebug(@"Inferred identification attribute for %@: %@", entity.name, attributeName); return @[ attribute ]; } } + RKLogDebug(@"No inferred identification attributes for %@", entity.name); return nil; } @@ -142,6 +154,7 @@ @interface RKEntityMapping () @implementation RKEntityMapping @synthesize identificationAttributes = _identificationAttributes; +@synthesize shouldMapRelationshipsIfObjectIsUnmodified = _shouldMapRelationshipsIfObjectIsUnmodified; + (instancetype)mappingForClass:(Class)objectClass { @@ -190,6 +203,7 @@ - (id)copyWithZone:(NSZone *)zone copy.entity = self.entity; copy.identificationAttributes = self.identificationAttributes; copy.identificationPredicate = self.identificationPredicate; + copy.identificationPredicateBlock = self.identificationPredicateBlock; copy.deletionPredicate = self.deletionPredicate; copy.modificationAttribute = self.modificationAttribute; copy.mutableConnections = [NSMutableArray array]; diff --git a/Code/CoreData/RKFetchRequestManagedObjectCache.h b/Code/CoreData/RKFetchRequestManagedObjectCache.h index da50ebee12..69e1832a39 100644 --- a/Code/CoreData/RKFetchRequestManagedObjectCache.h +++ b/Code/CoreData/RKFetchRequestManagedObjectCache.h @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKManagedObjectCaching.h" +#import /** Provides a simple managed object cache strategy in which every request for an object diff --git a/Code/CoreData/RKFetchRequestManagedObjectCache.m b/Code/CoreData/RKFetchRequestManagedObjectCache.m index de4ba7461c..e86a868e65 100644 --- a/Code/CoreData/RKFetchRequestManagedObjectCache.m +++ b/Code/CoreData/RKFetchRequestManagedObjectCache.m @@ -18,11 +18,11 @@ // limitations under the License. // -#import "RKFetchRequestManagedObjectCache.h" -#import "RKLog.h" -#import "RKPropertyInspector.h" -#import "RKPropertyInspector+CoreData.h" -#import "RKObjectUtilities.h" +#import +#import +#import +#import +#import // Set Logging Component #undef RKLogComponent diff --git a/Code/CoreData/RKInMemoryManagedObjectCache.h b/Code/CoreData/RKInMemoryManagedObjectCache.h index 09916908a1..70781e21f0 100644 --- a/Code/CoreData/RKInMemoryManagedObjectCache.h +++ b/Code/CoreData/RKInMemoryManagedObjectCache.h @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKManagedObjectCaching.h" +#import /** 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. diff --git a/Code/CoreData/RKInMemoryManagedObjectCache.m b/Code/CoreData/RKInMemoryManagedObjectCache.m index e41857b0af..d79537e867 100644 --- a/Code/CoreData/RKInMemoryManagedObjectCache.m +++ b/Code/CoreData/RKInMemoryManagedObjectCache.m @@ -18,10 +18,10 @@ // limitations under the License. // -#import "RKInMemoryManagedObjectCache.h" -#import "RKEntityCache.h" -#import "RKLog.h" -#import "RKEntityByAttributeCache.h" +#import +#import +#import +#import // Set Logging Component #undef RKLogComponent diff --git a/Code/CoreData/RKManagedObjectImporter.m b/Code/CoreData/RKManagedObjectImporter.m index 65213b7b51..5bd8af6bb4 100644 --- a/Code/CoreData/RKManagedObjectImporter.m +++ b/Code/CoreData/RKManagedObjectImporter.m @@ -22,14 +22,14 @@ #import #endif -#import "RKManagedObjectImporter.h" -#import "RKMapperOperation.h" -#import "RKManagedObjectMappingOperationDataSource.h" -#import "RKInMemoryManagedObjectCache.h" -#import "RKFetchRequestManagedObjectCache.h" -#import "RKMIMETypeSerialization.h" -#import "RKPathUtilities.h" -#import "RKLog.h" +#import +#import +#import +#import +#import +#import +#import +#import // Set Logging Component #undef RKLogComponent diff --git a/Code/CoreData/RKManagedObjectMappingOperationDataSource.h b/Code/CoreData/RKManagedObjectMappingOperationDataSource.h index 9f8c19d9fa..4bad46ba8d 100644 --- a/Code/CoreData/RKManagedObjectMappingOperationDataSource.h +++ b/Code/CoreData/RKManagedObjectMappingOperationDataSource.h @@ -19,7 +19,7 @@ // #import -#import "RKMappingOperationDataSource.h" +#import @protocol RKManagedObjectCaching; diff --git a/Code/CoreData/RKManagedObjectMappingOperationDataSource.m b/Code/CoreData/RKManagedObjectMappingOperationDataSource.m index fe18347226..0e020f3521 100644 --- a/Code/CoreData/RKManagedObjectMappingOperationDataSource.m +++ b/Code/CoreData/RKManagedObjectMappingOperationDataSource.m @@ -18,21 +18,21 @@ // limitations under the License. // +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import #import -#import "RKManagedObjectMappingOperationDataSource.h" -#import "RKObjectMapping.h" -#import "RKEntityMapping.h" -#import "RKLog.h" -#import "RKManagedObjectStore.h" -#import "RKMappingOperation.h" -#import "RKObjectMappingMatcher.h" -#import "RKManagedObjectCaching.h" -#import "RKRelationshipConnectionOperation.h" -#import "RKMappingErrors.h" -#import "RKValueTransformers.h" -#import "RKRelationshipMapping.h" -#import "RKObjectUtilities.h" -#import "NSManagedObject+RKAdditions.h" extern NSString * const RKObjectMappingNestingAttributeKeyName; @@ -277,6 +277,10 @@ - (id)mappingOperation:(RKMappingOperation *)mappingOperation targetObjectForRep attributeValues:entityIdentifierAttributes inManagedObjectContext:self.managedObjectContext]; if (entityMapping.identificationPredicate) objects = [objects filteredSetUsingPredicate:entityMapping.identificationPredicate]; + if (entityMapping.identificationPredicateBlock) { + NSPredicate *predicate = entityMapping.identificationPredicateBlock(representation, self.managedObjectContext); + if (predicate) objects = [objects filteredSetUsingPredicate:predicate]; + } if ([objects count] > 0) { managedObject = [objects anyObject]; if ([objects count] > 1) RKLogWarning(@"Managed object cache returned %ld objects for the identifier configured for the '%@' entity, expected 1.", (long) [objects count], [entity name]); @@ -463,8 +467,7 @@ - (BOOL)mappingOperationShouldSetUnchangedValues:(RKMappingOperation *)mappingOp return [mappingOperation isNewDestinationObject]; } -- (BOOL)mappingOperationShouldSkipPropertyMapping:(RKMappingOperation *)mappingOperation -{ +- (BOOL)isDestinationObjectNotModifiedInMappingOperation:(RKMappingOperation *)mappingOperation { // Use concrete mapping or original mapping if not available RKMapping *checkedMapping = mappingOperation.objectMapping ?: mappingOperation.mapping; @@ -494,6 +497,25 @@ - (BOOL)mappingOperationShouldSkipPropertyMapping:(RKMappingOperation *)mappingO } } +- (BOOL)mappingOperationShouldSkipAttributeMapping:(RKMappingOperation *)mappingOperation +{ + return [self isDestinationObjectNotModifiedInMappingOperation:mappingOperation]; +} + +- (BOOL)mappingOperationShouldSkipRelationshipMapping:(RKMappingOperation *)mappingOperation +{ + // Use concrete mapping or original mapping if not available + RKMapping *checkedMapping = mappingOperation.objectMapping ?: mappingOperation.mapping; + + if (! [checkedMapping isKindOfClass:[RKEntityMapping class]]) return NO; + RKEntityMapping *entityMapping = (id)checkedMapping; + if (entityMapping.shouldMapRelationshipsIfObjectIsUnmodified) { + return NO; + } else { + return [self isDestinationObjectNotModifiedInMappingOperation:mappingOperation]; + } +} + - (BOOL)mappingOperationShouldCollectMappingInfo:(RKMappingOperation *)mappingOperation { return YES; diff --git a/Code/CoreData/RKManagedObjectStore.h b/Code/CoreData/RKManagedObjectStore.h index d11ecf3a18..83dafd63a1 100644 --- a/Code/CoreData/RKManagedObjectStore.h +++ b/Code/CoreData/RKManagedObjectStore.h @@ -19,8 +19,8 @@ // #import -#import "RKEntityMapping.h" -#import "RKManagedObjectCaching.h" +#import +#import @class RKManagedObjectStore; diff --git a/Code/CoreData/RKManagedObjectStore.m b/Code/CoreData/RKManagedObjectStore.m index 93e680155f..d5c98af955 100644 --- a/Code/CoreData/RKManagedObjectStore.m +++ b/Code/CoreData/RKManagedObjectStore.m @@ -18,15 +18,15 @@ // limitations under the License. // +#import +#import +#import +#import +#import +#import +#import +#import #import -#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 @@ -52,10 +52,15 @@ static BOOL RKIsManagedObjectContextDescendentOfContext(NSManagedObjectContext * static NSSet *RKSetOfManagedObjectIDsFromManagedObjectContextDidSaveNotification(NSNotification *notification) { - NSUInteger count = [[[notification.userInfo allValues] valueForKeyPath:@"@sum.@count"] unsignedIntegerValue]; - NSMutableSet *objectIDs = [NSMutableSet setWithCapacity:count]; + // fixing the following NEW error: "this class is not key value coding-compliant for the key @count" for iOS 10+ + // NSUInteger count = [[[notification.userInfo allValues] valueForKeyPath:@"@sum.@count"] unsignedIntegerValue]; + // NSMutableSet *objectIDs = [NSMutableSet setWithCapacity:count]; + + NSLog([notification.userInfo allValues]); + NSMutableSet *objectIDs =[NSMutableSet new]; for (NSSet *objects in [notification.userInfo allValues]) { - [objectIDs unionSet:[objects valueForKey:@"objectID"]]; + if ([objects isKindOfClass:NSSet.class]) + [objectIDs unionSet:[objects valueForKey:@"objectID"]]; } return objectIDs; } @@ -70,6 +75,14 @@ - (instancetype)initWithObservedContext:(NSManagedObjectContext *)observedContex @implementation RKManagedObjectContextChangeMergingObserver +- (instancetype)init +{ + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"-init is not a valid initializer for the class %@, use designated initilizer -initWithObservedContext:mergeContext:", NSStringFromClass([self class])] + userInfo:nil]; + return [self init]; +} + - (instancetype)initWithObservedContext:(NSManagedObjectContext *)observedContext mergeContext:(NSManagedObjectContext *)mergeContext { if (! observedContext) [NSException raise:NSInvalidArgumentException format:@"observedContext cannot be `nil`."]; @@ -103,6 +116,31 @@ - (void)handleManagedObjectContextDidSaveNotification:(NSNotification *)notifica NSAssert([notification object] == self.observedContext, @"Received Managed Object Context Did Save Notification for Unexpected Context: %@", [notification object]); if (! [self.objectIDsFromChildDidSaveNotification isEqual:RKSetOfManagedObjectIDsFromManagedObjectContextDidSaveNotification(notification)]) { [self.mergeContext performBlock:^{ + + /* + Fault updated objects before merging changes into mainQueueManagedObjectContext. + + This enables NSFetchedResultsController to update and re-sort its fetch results and to call its delegate methods + in response Managed Object updates merged from another context. + See: + http://stackoverflow.com/a/3927811/489376 + http://stackoverflow.com/a/16296365/489376 + for issue details. + */ + for (NSManagedObject *object in [[notification userInfo] objectForKey:NSUpdatedObjectsKey]) { + NSManagedObjectID *objectID = [object objectID]; + if (objectID && ![objectID isTemporaryID]) { + NSError *error = nil; + NSManagedObject * updatedObject = [self.mergeContext existingObjectWithID:objectID error:&error]; + if (error) { + RKLogDebug(@"Failed to get existing object for objectID (%@). Failed with error: %@", objectID, error); + } + else { + [updatedObject willAccessValueForKey:nil]; + } + } + } + [self.mergeContext mergeChangesFromContextDidSaveNotification:notification]; }]; } else { @@ -156,6 +194,12 @@ - (instancetype)initWithManagedObjectModel:(NSManagedObjectModel *)managedObject return self; } +- (instancetype)init +{ + NSManagedObjectModel *managedObjectModel = [NSManagedObjectModel mergedModelFromBundles:[NSBundle allBundles]]; + return [self initWithManagedObjectModel:managedObjectModel]; +} + - (instancetype)initWithPersistentStoreCoordinator:(NSPersistentStoreCoordinator *)persistentStoreCoordinator { self = [self initWithManagedObjectModel:persistentStoreCoordinator.managedObjectModel]; @@ -166,12 +210,6 @@ - (instancetype)initWithPersistentStoreCoordinator:(NSPersistentStoreCoordinator return self; } -- (instancetype)init -{ - NSManagedObjectModel *managedObjectModel = [NSManagedObjectModel mergedModelFromBundles:[NSBundle allBundles]]; - return [self initWithManagedObjectModel:managedObjectModel]; -} - - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; diff --git a/Code/CoreData/RKPropertyInspector+CoreData.h b/Code/CoreData/RKPropertyInspector+CoreData.h index 2afbc8d636..d4e1f50665 100644 --- a/Code/CoreData/RKPropertyInspector+CoreData.h +++ b/Code/CoreData/RKPropertyInspector+CoreData.h @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKPropertyInspector.h" +#import /** The `CoreData` category augments the `RKPropertyInspector` class with support for introspecting the property types for `NSManagedObject` and `NSEntityDescription` objects. diff --git a/Code/CoreData/RKPropertyInspector+CoreData.m b/Code/CoreData/RKPropertyInspector+CoreData.m index 3716deaf15..cb9f1285f4 100644 --- a/Code/CoreData/RKPropertyInspector+CoreData.m +++ b/Code/CoreData/RKPropertyInspector+CoreData.m @@ -19,11 +19,11 @@ // #import +#import +#import +#import +#import #import -#import "RKPropertyInspector+CoreData.h" -#import "RKLog.h" -#import "RKObjectUtilities.h" -#import "RKMacros.h" // Set Logging Component #undef RKLogComponent diff --git a/Code/CoreData/RKRelationshipConnectionOperation.m b/Code/CoreData/RKRelationshipConnectionOperation.m index 8848924c43..f5104cb372 100644 --- a/Code/CoreData/RKRelationshipConnectionOperation.m +++ b/Code/CoreData/RKRelationshipConnectionOperation.m @@ -19,14 +19,14 @@ // #import -#import "RKRelationshipConnectionOperation.h" -#import "RKConnectionDescription.h" -#import "RKEntityMapping.h" -#import "RKLog.h" -#import "RKManagedObjectCaching.h" -#import "RKObjectMappingMatcher.h" -#import "RKErrors.h" -#import "RKObjectUtilities.h" +#import +#import +#import +#import +#import +#import +#import +#import // Set Logging Component #undef RKLogComponent @@ -148,7 +148,14 @@ - (id)findConnectedValueForConnection:(RKConnectionDescription *)connection shou { *shouldConnectRelationship = YES; id connectionResult = nil; - if (connection.sourcePredicate && ![connection.sourcePredicate evaluateWithObject:self.managedObject]) return nil; + if (connection.sourcePredicate) { + __block BOOL evaluationResult; + [self.managedObject.managedObjectContext performBlockAndWait:^{ + evaluationResult = [connection.sourcePredicate evaluateWithObject:self.managedObject]; + }]; + + if (!evaluationResult) return nil; + } if ([connection isForeignKeyConnection]) { NSDictionary *attributeValues = RKConnectionAttributeValuesWithObject(connection, self.managedObject); @@ -157,11 +164,15 @@ - (id)findConnectedValueForConnection:(RKConnectionDescription *)connection shou *shouldConnectRelationship = NO; return nil; } - NSSet *managedObjects = [self.managedObjectCache managedObjectsWithEntity:[connection.relationship destinationEntity] - attributeValues:attributeValues - inManagedObjectContext:self.managedObjectContext]; - if (connection.destinationPredicate) managedObjects = [managedObjects filteredSetUsingPredicate:connection.destinationPredicate]; - if (!connection.includesSubentities) managedObjects = [managedObjects filteredSetUsingPredicate:[NSPredicate predicateWithFormat:@"entity == %@", [connection.relationship destinationEntity]]]; + __block NSSet *managedObjects = [self.managedObjectCache managedObjectsWithEntity:[connection.relationship destinationEntity] + attributeValues:attributeValues + inManagedObjectContext:self.managedObjectContext]; + + [self.managedObjectContext performBlockAndWait:^{ + if (connection.destinationPredicate) managedObjects = [managedObjects filteredSetUsingPredicate:connection.destinationPredicate]; + if (!connection.includesSubentities) managedObjects = [managedObjects filteredSetUsingPredicate:[NSPredicate predicateWithFormat:@"entity == %@", [connection.relationship destinationEntity]]]; + }]; + if ([connection.relationship isToMany]) { connectionResult = managedObjects; } else { diff --git a/Code/Network.h b/Code/Network.h index 53d34a53cf..6cdaa758db 100644 --- a/Code/Network.h +++ b/Code/Network.h @@ -18,17 +18,17 @@ // 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" -#import "RKObjectRequestOperation.h" -#import "RKObjectParameterization.h" -#import "RKPathMatcher.h" +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import #ifdef _COREDATADEFINES_H -#import "RKManagedObjectRequestOperation.h" +#import #endif diff --git a/Code/Network/RKHTTPRequestOperation.h b/Code/Network/RKHTTPRequestOperation.h index f18d9f2e40..5f41c3f011 100644 --- a/Code/Network/RKHTTPRequestOperation.h +++ b/Code/Network/RKHTTPRequestOperation.h @@ -18,8 +18,8 @@ // limitations under the License. // -#import "AFHTTPClient.h" -#import "AFHTTPRequestOperation.h" +#import +#import // Expose the default headers from AFNetworking's AFHTTPClient @interface AFHTTPClient () diff --git a/Code/Network/RKHTTPRequestOperation.m b/Code/Network/RKHTTPRequestOperation.m index 8b6f6aff2b..69c1d6cd3b 100644 --- a/Code/Network/RKHTTPRequestOperation.m +++ b/Code/Network/RKHTTPRequestOperation.m @@ -18,11 +18,11 @@ // limitations under the License. // -#import "RKHTTPRequestOperation.h" -#import "RKLog.h" -#import "lcl_RK.h" -#import "RKHTTPUtilities.h" -#import "RKMIMETypes.h" +#import +#import +#import +#import +#import extern NSString * const RKErrorDomain; @@ -92,7 +92,7 @@ - (NSError *)error [userInfo setValue:[self.request URL] forKey:NSURLErrorFailingURLErrorKey]; [userInfo setValue:self.request forKey:AFNetworkingOperationFailingURLRequestErrorKey]; [userInfo setValue:self.response forKey:AFNetworkingOperationFailingURLResponseErrorKey]; - + if (![self hasAcceptableStatusCode]) { NSUInteger statusCode = ([self.response isKindOfClass:[NSHTTPURLResponse class]]) ? (NSUInteger)[self.response statusCode] : 200; [userInfo setValue:[NSString stringWithFormat:NSLocalizedString(@"Expected status code in (%@), got %d", nil), RKStringFromIndexSet(self.acceptableStatusCodes ?: [NSMutableIndexSet indexSet]), statusCode] forKey:NSLocalizedDescriptionKey]; @@ -104,7 +104,7 @@ - (NSError *)error } } } - + NSError *error = self.rkHTTPError ?: [super error]; [self.lock unlock]; return error; diff --git a/Code/Network/RKManagedObjectRequestOperation.h b/Code/Network/RKManagedObjectRequestOperation.h index c677e98a9b..4c7e669da7 100644 --- a/Code/Network/RKManagedObjectRequestOperation.h +++ b/Code/Network/RKManagedObjectRequestOperation.h @@ -21,8 +21,8 @@ #ifdef _COREDATADEFINES_H #if __has_include("RKManagedObjectCaching.h") -#import "RKObjectRequestOperation.h" -#import "RKManagedObjectCaching.h" +#import +#import /** `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. diff --git a/Code/Network/RKManagedObjectRequestOperation.m b/Code/Network/RKManagedObjectRequestOperation.m index df3ff6c748..dc01594a32 100644 --- a/Code/Network/RKManagedObjectRequestOperation.m +++ b/Code/Network/RKManagedObjectRequestOperation.m @@ -21,20 +21,20 @@ #ifdef _COREDATADEFINES_H #if __has_include("RKManagedObjectCaching.h") -#import "RKManagedObjectRequestOperation.h" -#import "RKLog.h" -#import "RKHTTPUtilities.h" -#import "RKResponseMapperOperation.h" -#import "RKObjectRequestOperationSubclass.h" -#import "NSManagedObjectContext+RKAdditions.h" -#import "NSManagedObject+RKAdditions.h" -#import "RKObjectUtilities.h" +#import +#import +#import +#import +#import +#import +#import +#import // Graph visitor -#import "RKResponseDescriptor.h" -#import "RKEntityMapping.h" -#import "RKDynamicMapping.h" -#import "RKRelationshipMapping.h" +#import +#import +#import +#import // Set Logging Component #undef RKLogComponent @@ -262,20 +262,7 @@ - (RKMappingResult *)refetchedMappingResult NSString *destinationKey = [keyPathComponents lastObject]; [keyPathComponents removeLastObject]; id sourceObject = [keyPathComponents count] ? [mappingResultsAtRootKey valueForKeyPath:[keyPathComponents componentsJoinedByString:@"."]] : mappingResultsAtRootKey; - if (RKObjectIsCollection(sourceObject)) { - // This is a to-many relationship, we want to refetch each item at the keyPath - for (id nestedObject in sourceObject) { - // NOTE: If this collection was mapped with a dynamic mapping then each instance may not respond to the key - if ([nestedObject respondsToSelector:NSSelectorFromString(destinationKey)]) { - NSManagedObject *managedObject = [nestedObject valueForKey:destinationKey]; - [nestedObject setValue:RKRefetchedValueInManagedObjectContext(managedObject, self.managedObjectContext) forKey:destinationKey]; - } - } - } else { - // This is a singular relationship. We want to refetch the object and set it directly. - id valueToRefetch = [sourceObject valueForKey:destinationKey]; - [sourceObject setValue:RKRefetchedValueInManagedObjectContext(valueToRefetch, self.managedObjectContext) forKey:destinationKey]; - } + [self refetchSourceObject:sourceObject atDestinationKey:destinationKey]; } } } @@ -284,6 +271,21 @@ - (RKMappingResult *)refetchedMappingResult return [[RKMappingResult alloc] initWithDictionary:newDictionary]; } +- (void) refetchSourceObject:(id) sourceObject atDestinationKey:(NSString *)destinationKey { + if (RKObjectIsCollection(sourceObject)) { + // This is a to-many relationship, we want to refetch each item at the keyPath + for (id nestedObject in sourceObject) { + [self refetchSourceObject:nestedObject atDestinationKey:destinationKey]; + } + } else { + // NOTE: If this collection was mapped with a dynamic mapping then each instance may not respond to the key + if ([sourceObject respondsToSelector:NSSelectorFromString(destinationKey)]) { + id valueToRefetch = [sourceObject valueForKey:destinationKey]; + [sourceObject setValue:RKRefetchedValueInManagedObjectContext(valueToRefetch, self.managedObjectContext) forKey:destinationKey]; + } + } +} + @end NSArray *RKArrayOfFetchRequestFromBlocksWithURL(NSArray *fetchRequestBlocks, NSURL *URL) @@ -778,7 +780,7 @@ - (BOOL)deleteLocalObjectsMissingFromMappingResult:(RKMappingResult *)mappingRes /** NOTE: This is more or less a direct port of the functionality provided by `[NSManagedObjectContext saveToPersistentStore:]` in the `RKAdditions` category. We have duplicated the logic here to add in support for checking if the operation has been cancelled since we began cascading up the MOC chain. Because each `performBlockAndWait:` invocation essentially jumps threads and is subject to the availability of the context, it is very possible for the operation to be cancelled during this part of the operation's lifecycle. */ -- (BOOL)saveContextToPersistentStore:(NSManagedObjectContext *)contextToSave error:(NSError **)error +- (BOOL)saveContextToPersistentStore:(NSManagedObjectContext *)contextToSave failedContext:(NSManagedObjectContext **)failedContext error:(NSError **)error { __block NSError *localError = nil; while (contextToSave) { @@ -795,11 +797,13 @@ - (BOOL)saveContextToPersistentStore:(NSManagedObjectContext *)contextToSave err if (! success) { if (error) *error = localError; + *failedContext = contextToSave; 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."); + *failedContext = contextToSave; return NO; } contextToSave = contextToSave.parentContext; @@ -812,11 +816,15 @@ - (BOOL)saveContext:(NSManagedObjectContext *)context error:(NSError **)error { __block BOOL success = YES; __block NSError *localError = nil; + __block NSManagedObjectContext *failedContext = nil; if (self.savesToPersistentStore) { - success = [self saveContextToPersistentStore:context error:&localError]; + success = [self saveContextToPersistentStore:context failedContext:&failedContext error:&localError]; } else { [context performBlockAndWait:^{ success = ([self isCancelled]) ? NO : [context save:&localError]; + if (!success) { + failedContext = context; + } }]; } if (success) { @@ -828,8 +836,12 @@ - (BOOL)saveContext:(NSManagedObjectContext *)context error:(NSError **)error } } else { if (error) *error = localError; - RKLogError(@"Failed saving managed object context %@ %@: %@", (self.savesToPersistentStore ? @"to the persistent store" : @""), context, localError); - RKLogCoreDataError(localError); + // Logging the error requires calling -[NSManagedObject description] which + // can only be done on the context's queue + [failedContext performBlock:^{ + RKLogError(@"Failed saving managed object context %@ %@: %@", (self.savesToPersistentStore ? @"to the persistent store" : @""), context, localError); + RKLogCoreDataError(localError); + }]; } return success; diff --git a/Code/Network/RKObjectManager.h b/Code/Network/RKObjectManager.h index a1cd3ed042..d343ef10cc 100644 --- a/Code/Network/RKObjectManager.h +++ b/Code/Network/RKObjectManager.h @@ -18,15 +18,16 @@ // limitations under the License. // -#import "RKRouter.h" -#import "RKPaginator.h" -#import "RKMacros.h" -#import "AFNetworking.h" +#import +#import +#import + +#import #ifdef _COREDATADEFINES_H -#if __has_include("RKCoreData.h") -#define RKCoreDataIncluded -#endif +# if __has_include("RKCoreData.h") +# define RKCoreDataIncluded +# endif #endif @protocol RKSerialization; diff --git a/Code/Network/RKObjectManager.m b/Code/Network/RKObjectManager.m index 800f84e4a8..757621d3af 100644 --- a/Code/Network/RKObjectManager.m +++ b/Code/Network/RKObjectManager.m @@ -18,36 +18,36 @@ // limitations under the License. // +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import #import -#import "RKObjectManager.h" -#import "RKObjectParameterization.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" -#import "RKPaginator.h" -#import "RKDynamicMapping.h" -#import "RKRelationshipMapping.h" -#import "RKObjectRequestOperation.h" -#import "RKRouter.h" -#import "RKRoute.h" -#import "RKRouteSet.h" #ifdef _COREDATADEFINES_H -#if __has_include("RKCoreData.h") -#define RKCoreDataIncluded -#import "RKManagedObjectStore.h" -#import "RKManagedObjectRequestOperation.h" -#endif +# if __has_include("RKCoreData.h") +# define RKCoreDataIncluded +# import "RKManagedObjectStore.h" +# import "RKManagedObjectRequestOperation.h" +# endif #endif #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. +#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 ////////////////////////////////// @@ -172,6 +172,14 @@ @interface RKMappingGraphVisitor () @implementation RKMappingGraphVisitor +- (instancetype)init +{ + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"-init is not a valid initializer for the class %@, use designated initilizer -initWithMapping:", NSStringFromClass([self class])] + userInfo:nil]; + return [self init]; +} + - (instancetype)initWithMapping:(RKMapping *)mapping { self = [super init]; @@ -348,6 +356,14 @@ @interface RKObjectManager () @implementation RKObjectManager +- (instancetype)init +{ + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"-init is not a valid initializer for the class %@, use designated initilizer -initWithHTTPClient:", NSStringFromClass([self class])] + userInfo:nil]; + return [self init]; +} + - (instancetype)initWithHTTPClient:(AFHTTPClient *)client { self = [super init]; @@ -668,8 +684,9 @@ - (id)appropriateObjectRequestOperationWithObject:(id)object // Non-Core Data operation operation = [self objectRequestOperationWithRequest:request success:nil failure:nil]; #endif - - if (RKDoesArrayOfResponseDescriptorsContainMappingForClass(self.responseDescriptors, [object class])) operation.targetObject = object; + // Don't expect to receive the same object in the receiver + /*if (RKDoesArrayOfResponseDescriptorsContainMappingForClass(self.responseDescriptors, [object class])) operation.targetObject = object; + */ operation.mappingMetadata = routingMetadata; return operation; } diff --git a/Code/Network/RKObjectParameterization.h b/Code/Network/RKObjectParameterization.h index 5e9c68f97a..be03c8869f 100644 --- a/Code/Network/RKObjectParameterization.h +++ b/Code/Network/RKObjectParameterization.h @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKRequestDescriptor.h" +#import /** 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. diff --git a/Code/Network/RKObjectParameterization.m b/Code/Network/RKObjectParameterization.m index 857c81a540..067c67a7dd 100644 --- a/Code/Network/RKObjectParameterization.m +++ b/Code/Network/RKObjectParameterization.m @@ -18,17 +18,17 @@ // 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" -#import "RKPropertyInspector.h" -#import "RKValueTransformers.h" +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import // Set Logging Component #undef RKLogComponent diff --git a/Code/Network/RKObjectRequestOperation.h b/Code/Network/RKObjectRequestOperation.h index ea0d17b251..89ad4edf16 100644 --- a/Code/Network/RKObjectRequestOperation.h +++ b/Code/Network/RKObjectRequestOperation.h @@ -18,9 +18,9 @@ // limitations under the License. // -#import "RKHTTPRequestOperation.h" -#import "RKMappingResult.h" -#import "RKMapperOperation.h" +#import +#import +#import /** The key for a Boolean NSNumber value that indicates if a `NSCachedURLResponse` stored in the `NSURLCache` has been object mapped to completion. This key is stored on the `userInfo` of the cached response, if any, just before an `RKObjectRequestOperation` transitions to the finished state. diff --git a/Code/Network/RKObjectRequestOperation.m b/Code/Network/RKObjectRequestOperation.m index 8fbeda8320..987b71d17b 100644 --- a/Code/Network/RKObjectRequestOperation.m +++ b/Code/Network/RKObjectRequestOperation.m @@ -18,26 +18,28 @@ // limitations under the License. // +#import +#import +#import +#import +#import +#import +#import +#import #import -#import "RKObjectRequestOperation.h" -#import "RKResponseMapperOperation.h" -#import "RKResponseDescriptor.h" -#import "RKMIMETypeSerialization.h" -#import "RKHTTPUtilities.h" -#import "RKLog.h" -#import "RKMappingErrors.h" -#import "RKOperationStateMachine.h" #import #if __IPHONE_OS_VERSION_MIN_REQUIRED -#import "AFNetworkActivityIndicatorManager.h" +#import #endif // Set Logging Component #undef RKLogComponent #define RKLogComponent RKlcl_cRestKitNetwork +#define RKLogIsTrace() (_RKlcl_component_level[(__RKlcl_log_symbol(RKlcl_cRestKitNetwork))]) >= (__RKlcl_log_symbol(RKlcl_vTrace)) + static BOOL RKLogIsStringBlank(NSString *string) { return ([[string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] length] == 0); @@ -130,63 +132,23 @@ - (void)objectRequestOperationDidStart:(NSNotification *)notification RKObjectRequestOperation *objectRequestOperation = [notification object]; objc_setAssociatedObject(objectRequestOperation, RKOperationStartDate, [NSDate date], OBJC_ASSOCIATION_RETAIN_NONATOMIC); objc_setAssociatedObject(objectRequestOperation.HTTPRequestOperation, RKParentObjectRequestOperation, objectRequestOperation, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + + NSURLRequest *request = objectRequestOperation.HTTPRequestOperation.request; + RKLogInfo(@"%@ '%@'", request.HTTPMethod, request.URL.absoluteString); + RKLogDebug(@"request.headers=%@", request.allHTTPHeaderFields); + if (request.HTTPBody && RKLogIsTrace()) { + RKLogTrace(@"request.body=%@", RKLogTruncateString([[NSString alloc] initWithData:request.HTTPBody encoding:NSUTF8StringEncoding])); + } } - (void)HTTPOperationDidStart:(NSNotification *)notification { - RKHTTPRequestOperation *operation = [notification object]; - if (![operation isKindOfClass:[AFHTTPRequestOperation class]]) return; - - objc_setAssociatedObject(operation, RKOperationStartDate, [NSDate date], OBJC_ASSOCIATION_RETAIN_NONATOMIC); - - if ((_RKlcl_component_level[(__RKlcl_log_symbol(RKlcl_cRestKitNetwork))]) >= (__RKlcl_log_symbol(RKlcl_vTrace))) { - NSString *body = nil; - if ([operation.request HTTPBody]) { - body = RKLogTruncateString([[NSString alloc] initWithData:[operation.request HTTPBody] encoding:NSUTF8StringEncoding]); - } - - 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]); - } + objc_setAssociatedObject(notification.object, RKOperationStartDate, [NSDate date], OBJC_ASSOCIATION_RETAIN_NONATOMIC); } - (void)HTTPOperationDidFinish:(NSNotification *)notification { - RKHTTPRequestOperation *operation = [notification object]; - if (![operation isKindOfClass:[AFHTTPRequestOperation class]]) return; - - // NOTE: if we have a parent object request operation, we'll wait it to finish to emit the logging info - RKObjectRequestOperation *parentOperation = objc_getAssociatedObject(operation, RKParentObjectRequestOperation); - objc_setAssociatedObject(operation, RKParentObjectRequestOperation, nil, OBJC_ASSOCIATION_RETAIN_NONATOMIC); - if (parentOperation) { - objc_setAssociatedObject(operation, RKOperationFinishDate, [NSDate date], OBJC_ASSOCIATION_RETAIN_NONATOMIC); - return; - } - - NSTimeInterval elapsedTime = [[NSDate date] timeIntervalSinceDate:objc_getAssociatedObject(operation, RKOperationStartDate)]; - - NSString *statusCodeString = RKStringFromStatusCode([operation.response statusCode]); - NSString *elapsedTimeString = [NSString stringWithFormat:@"[%.04f s]", elapsedTime]; - NSString *statusCodeAndElapsedTime = statusCodeString ? [NSString stringWithFormat:@"(%ld %@) %@", (long)[operation.response statusCode], statusCodeString, elapsedTimeString] : [NSString stringWithFormat:@"(%ld) %@", (long)[operation.response statusCode], elapsedTimeString]; - if (operation.error) { - if ((_RKlcl_component_level[(__RKlcl_log_symbol(RKlcl_cRestKitNetwork))]) >= (__RKlcl_log_symbol(RKlcl_vTrace))) { - RKLogError(@"%@ '%@' %@:\nerror=%@", [operation.request HTTPMethod], [[operation.request URL] absoluteString], statusCodeAndElapsedTime, operation.error); - RKLogDebug(@"response.body=%@", operation.responseString); - } else { - if (operation.error.code == NSURLErrorCancelled) { - RKLogError(@"%@ '%@' %@: Cancelled", [operation.request HTTPMethod], [[operation.request URL] absoluteString], statusCodeAndElapsedTime); - } else { - RKLogError(@"%@ '%@' %@: %@", [operation.request HTTPMethod], [[operation.request URL] absoluteString], statusCodeAndElapsedTime, operation.error); - } - } - } else { - if ((_RKlcl_component_level[(__RKlcl_log_symbol(RKlcl_cRestKitNetwork))]) >= (__RKlcl_log_symbol(RKlcl_vTrace))) { - RKLogTrace(@"%@ '%@' %@:\nresponse.headers=%@\nresponse.body=%@", [operation.request HTTPMethod], [[operation.request URL] absoluteString], statusCodeAndElapsedTime, [operation.response allHeaderFields], RKLogTruncateString(operation.responseString)); - } else { - RKLogInfo(@"%@ '%@' %@", [operation.request HTTPMethod], [[operation.request URL] absoluteString], statusCodeAndElapsedTime); - } - } + objc_setAssociatedObject(notification.object, RKOperationFinishDate, [NSDate date], OBJC_ASSOCIATION_RETAIN_NONATOMIC); } - (void)objectRequestOperationDidFinish:(NSNotification *)notification @@ -200,27 +162,24 @@ - (void)objectRequestOperationDidFinish:(NSNotification *)notification NSDate *mappingDidStartTime = (notification.userInfo)[RKObjectRequestOperationMappingDidFinishUserInfoKey]; NSTimeInterval mappingDuration = [mappingDidStartTime isEqual:[NSNull null]] ? 0.0 : [mappingDidStartTime timeIntervalSinceDate:(notification.userInfo)[RKObjectRequestOperationMappingDidStartUserInfoKey]]; - NSString *statusCodeString = RKStringFromStatusCode([HTTPRequestOperation.response statusCode]); + NSURLRequest *request = HTTPRequestOperation.request; + NSHTTPURLResponse *response = HTTPRequestOperation.response; + NSString *statusCodeString = RKStringFromStatusCode(response.statusCode); NSString *statusCodeDescription = statusCodeString ? [NSString stringWithFormat:@" %@ ", statusCodeString] : @" "; NSString *elapsedTimeString = [NSString stringWithFormat:@"[request=%.04fs mapping=%.04fs total=%.04fs]", httpRequestExecutionDuration, mappingDuration, objectRequestExecutionDuration]; - NSString *statusCodeAndElapsedTime = [NSString stringWithFormat:@"(%ld%@/ %lu objects) %@", (long)[HTTPRequestOperation.response statusCode], statusCodeDescription, (unsigned long) [objectRequestOperation.mappingResult count], elapsedTimeString]; + NSString *statusCodeAndElapsedTime = [NSString stringWithFormat:@"(%ld%@/ %lu objects) %@", (long)response.statusCode, statusCodeDescription, (unsigned long) [objectRequestOperation.mappingResult count], elapsedTimeString]; if (objectRequestOperation.error) { - if ((_RKlcl_component_level[(__RKlcl_log_symbol(RKlcl_cRestKitNetwork))]) >= (__RKlcl_log_symbol(RKlcl_vTrace))) { - RKLogError(@"%@ '%@' %@:\nerror=%@", [HTTPRequestOperation.request HTTPMethod], [[HTTPRequestOperation.request URL] absoluteString], statusCodeAndElapsedTime, objectRequestOperation.error); - RKLogDebug(@"response.body=%@", HTTPRequestOperation.responseString); + if (objectRequestOperation.error.code == NSURLErrorCancelled) { + RKLogDebug(@"%@ '%@' %@: Cancelled", request.HTTPMethod, request.URL.absoluteString, statusCodeAndElapsedTime); } else { - if (objectRequestOperation.error.code == NSURLErrorCancelled) { - RKLogError(@"%@ '%@' %@: Cancelled", [HTTPRequestOperation.request HTTPMethod], [[HTTPRequestOperation.request URL] absoluteString], statusCodeAndElapsedTime); - } else { - RKLogError(@"%@ '%@' %@: %@", [HTTPRequestOperation.request HTTPMethod], [[HTTPRequestOperation.request URL] absoluteString], statusCodeAndElapsedTime, objectRequestOperation.error); - } + RKLogError(@"%@ '%@' %@: %@", request.HTTPMethod, request.URL.absoluteString, statusCodeAndElapsedTime, objectRequestOperation.error); } } else { - if ((_RKlcl_component_level[(__RKlcl_log_symbol(RKlcl_cRestKitNetwork))]) >= (__RKlcl_log_symbol(RKlcl_vTrace))) { - RKLogTrace(@"%@ '%@' %@:\nresponse.headers=%@\nresponse.body=%@", [HTTPRequestOperation.request HTTPMethod], [[HTTPRequestOperation.request URL] absoluteString], statusCodeAndElapsedTime, [HTTPRequestOperation.response allHeaderFields], RKLogTruncateString(HTTPRequestOperation.responseString)); - } else { - RKLogInfo(@"%@ '%@' %@", [HTTPRequestOperation.request HTTPMethod], [[HTTPRequestOperation.request URL] absoluteString], statusCodeAndElapsedTime); - } + RKLogInfo(@"%@ '%@' %@", request.HTTPMethod, request.URL.absoluteString, statusCodeAndElapsedTime); + RKLogDebug(@"response.headers=%@", response.allHeaderFields); + } + if (RKLogIsTrace()) { + RKLogTrace(@"response.body=%@", RKLogTruncateString(HTTPRequestOperation.responseString)); } } @@ -478,6 +437,9 @@ - (void)setCompletionBlockWithSuccess:(void (^)(RKObjectRequestOperation *operat } else { if (success) { dispatch_async(self.successCallbackQueue ?: dispatch_get_main_queue(), ^{ + NSDictionary *responseDict=[NSJSONSerialization JSONObjectWithData:self.HTTPRequestOperation.responseData options:NSJSONReadingMutableLeaves error:nil]; + NSNotification *notification=[NSNotification notificationWithName:@"com.molescope.csrf" object:nil userInfo:responseDict]; + [[NSNotificationQueue defaultQueue] enqueueNotification:notification postingStyle:NSPostWhenIdle coalesceMask:NSNotificationCoalescingOnName forModes:nil]; success(self, self.mappingResult); }); } diff --git a/Code/Network/RKPaginator.h b/Code/Network/RKPaginator.h index 32cda58328..f53b722f6f 100644 --- a/Code/Network/RKPaginator.h +++ b/Code/Network/RKPaginator.h @@ -18,10 +18,10 @@ // limitations under the License. // -#import "RKHTTPRequestOperation.h" -#import "RKObjectRequestOperation.h" -#import "RKObjectMapping.h" -#import "RKMappingResult.h" +#import +#import +#import +#import @protocol RKManagedObjectCaching; @@ -63,8 +63,8 @@ @return The receiver, initialized with the request, pagination mapping, and response descriptors. */ - (instancetype)initWithRequest:(NSURLRequest *)request - paginationMapping:(RKObjectMapping *)paginationMapping - responseDescriptors:(NSArray *)responseDescriptors NS_DESIGNATED_INITIALIZER; + paginationMapping:(RKObjectMapping *)paginationMapping + responseDescriptors:(NSArray *)responseDescriptors; ///----------------------------- /// @name Configuring Networking diff --git a/Code/Network/RKPaginator.m b/Code/Network/RKPaginator.m index f5ef61d402..86a4700138 100644 --- a/Code/Network/RKPaginator.m +++ b/Code/Network/RKPaginator.m @@ -18,17 +18,17 @@ // limitations under the License. // -#import "RKPaginator.h" -#import "RKMappingOperation.h" -#import "SOCKit.h" -#import "RKLog.h" -#import "RKPathMatcher.h" -#import "RKHTTPUtilities.h" +#import +#import +#import +#import +#import +#import #ifdef _COREDATADEFINES_H #if __has_include("RKCoreData.h") #define RKCoreDataIncluded -#import "RKManagedObjectRequestOperation.h" +#import #endif #endif @@ -60,6 +60,7 @@ @interface RKPaginator () @implementation RKPaginator + - (instancetype)initWithRequest:(NSURLRequest *)request paginationMapping:(RKObjectMapping *)paginationMapping responseDescriptors:(NSArray *)responseDescriptors; diff --git a/Code/Network/RKPathMatcher.m b/Code/Network/RKPathMatcher.m index a8ce9bc3ee..d75b62d9e5 100644 --- a/Code/Network/RKPathMatcher.m +++ b/Code/Network/RKPathMatcher.m @@ -18,10 +18,10 @@ // limitations under the License. // -#import "RKPathMatcher.h" -#import "SOCKit.h" -#import "RKLog.h" -#import "RKDictionaryUtilities.h" +#import +#import +#import +#import static NSString *RKEncodeURLString(NSString *unencodedString); extern NSDictionary *RKQueryParametersFromStringWithEncoding(NSString *string, NSStringEncoding stringEncoding); diff --git a/Code/Network/RKRequestDescriptor.h b/Code/Network/RKRequestDescriptor.h index 3b45e17319..83b6e6c322 100644 --- a/Code/Network/RKRequestDescriptor.h +++ b/Code/Network/RKRequestDescriptor.h @@ -19,7 +19,7 @@ // #import -#import "RKHTTPUtilities.h" +#import @class RKMapping; diff --git a/Code/Network/RKRequestDescriptor.m b/Code/Network/RKRequestDescriptor.m index 0a1ddd5c8c..b00c0b7ca8 100644 --- a/Code/Network/RKRequestDescriptor.m +++ b/Code/Network/RKRequestDescriptor.m @@ -21,9 +21,9 @@ // limitations under the License. // -#import "RKRequestDescriptor.h" -#import "RKObjectMapping.h" -#import "RKDynamicMapping.h" +#import +#import +#import static void RKAssertValidMappingForRequestDescriptor(RKMapping *mapping) { diff --git a/Code/Network/RKResponseDescriptor.h b/Code/Network/RKResponseDescriptor.h index d2d99289a5..857d1ecc8b 100644 --- a/Code/Network/RKResponseDescriptor.h +++ b/Code/Network/RKResponseDescriptor.h @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKHTTPUtilities.h" +#import @class RKMapping; diff --git a/Code/Network/RKResponseDescriptor.m b/Code/Network/RKResponseDescriptor.m index 9c6bc0ceef..dc51ea6862 100644 --- a/Code/Network/RKResponseDescriptor.m +++ b/Code/Network/RKResponseDescriptor.m @@ -18,10 +18,10 @@ // limitations under the License. // -#import "RKPathMatcher.h" -#import "RKResponseDescriptor.h" -#import "RKHTTPUtilities.h" -#import "RKMapping.h" +#import +#import +#import +#import // Cloned from AFStringFromIndexSet -- method should be non-static for reuse NSString *RKStringFromIndexSet(NSIndexSet *indexSet); diff --git a/Code/Network/RKResponseMapperOperation.h b/Code/Network/RKResponseMapperOperation.h index 7fc04f2774..b45fab4571 100644 --- a/Code/Network/RKResponseMapperOperation.h +++ b/Code/Network/RKResponseMapperOperation.h @@ -18,9 +18,9 @@ // limitations under the License. // -#import "RKMappingOperationDataSource.h" -#import "RKMapperOperation.h" -#import "RKMappingResult.h" +#import +#import +#import #ifdef _COREDATADEFINES_H @protocol RKManagedObjectCaching; diff --git a/Code/Network/RKResponseMapperOperation.m b/Code/Network/RKResponseMapperOperation.m index 81787e8c8f..e8b057f35c 100644 --- a/Code/Network/RKResponseMapperOperation.m +++ b/Code/Network/RKResponseMapperOperation.m @@ -18,20 +18,20 @@ // limitations under the License. // -#import "RKObjectMappingOperationDataSource.h" -#import "RKLog.h" -#import "RKResponseDescriptor.h" -#import "RKPathMatcher.h" -#import "RKHTTPUtilities.h" -#import "RKResponseMapperOperation.h" -#import "RKMappingErrors.h" -#import "RKMIMETypeSerialization.h" -#import "RKDictionaryUtilities.h" +#import +#import +#import +#import +#import +#import +#import +#import +#import #ifdef _COREDATADEFINES_H #if __has_include("RKCoreData.h") #define RKCoreDataIncluded -#import "RKManagedObjectMappingOperationDataSource.h" +#import #endif #endif @@ -173,6 +173,14 @@ + (void)registerMappingOperationDataSourceClass:(Class /** 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. diff --git a/Code/Network/RKRoute.m b/Code/Network/RKRoute.m index 8dbc9ebbdd..23e61b9dd2 100644 --- a/Code/Network/RKRoute.m +++ b/Code/Network/RKRoute.m @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKRoute.h" +#import NSString *RKStringDescribingRequestMethod(RKRequestMethod method); NSString *RKStringDescribingRequestMethod(RKRequestMethod method) diff --git a/Code/Network/RKRouteSet.h b/Code/Network/RKRouteSet.h index 6cb3502774..6565705363 100644 --- a/Code/Network/RKRouteSet.h +++ b/Code/Network/RKRouteSet.h @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKRoute.h" +#import /** 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. diff --git a/Code/Network/RKRouteSet.m b/Code/Network/RKRouteSet.m index 1038b61517..dc4dcb7891 100644 --- a/Code/Network/RKRouteSet.m +++ b/Code/Network/RKRouteSet.m @@ -18,8 +18,8 @@ // limitations under the License. // -#import "RKRouteSet.h" -#import "RKPathMatcher.h" +#import +#import @interface RKRouteSet () diff --git a/Code/Network/RKRouter.h b/Code/Network/RKRouter.h index f8f7221ba7..e554d0d231 100644 --- a/Code/Network/RKRouter.h +++ b/Code/Network/RKRouter.h @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKHTTPUtilities.h" +#import @class RKRouteSet; @class RKRoute; diff --git a/Code/Network/RKRouter.m b/Code/Network/RKRouter.m index 2d5565f6d7..aff6a40193 100644 --- a/Code/Network/RKRouter.m +++ b/Code/Network/RKRouter.m @@ -18,10 +18,10 @@ // limitations under the License. // -#import "RKRouter.h" -#import "RKRouteSet.h" -#import "RKRoute.h" -#import "RKPathMatcher.h" +#import +#import +#import +#import #import @interface RKRouter () diff --git a/Code/ObjectMapping.h b/Code/ObjectMapping.h index 54c84dfdbd..f9c5325ffe 100644 --- a/Code/ObjectMapping.h +++ b/Code/ObjectMapping.h @@ -18,11 +18,12 @@ // limitations under the License. // -#import "RKObjectMapping.h" -#import "RKAttributeMapping.h" -#import "RKRelationshipMapping.h" -#import "RKValueTransformers.h" -#import "RKMappingResult.h" -#import "RKMapperOperation.h" -#import "RKDynamicMapping.h" -#import "RKErrorMessage.h" +#import + +#import +#import +#import +#import +#import +#import +#import diff --git a/Code/ObjectMapping/RKAttributeMapping.h b/Code/ObjectMapping/RKAttributeMapping.h index 6d08f968cf..ff1aff4e76 100644 --- a/Code/ObjectMapping/RKAttributeMapping.h +++ b/Code/ObjectMapping/RKAttributeMapping.h @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKPropertyMapping.h" +#import /** 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. diff --git a/Code/ObjectMapping/RKAttributeMapping.m b/Code/ObjectMapping/RKAttributeMapping.m index 6d83f06a46..a2b4d6f575 100644 --- a/Code/ObjectMapping/RKAttributeMapping.m +++ b/Code/ObjectMapping/RKAttributeMapping.m @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKAttributeMapping.h" +#import @interface RKPropertyMapping () @property (nonatomic, copy, readwrite) NSString *sourceKeyPath; diff --git a/Code/ObjectMapping/RKDynamicMapping.h b/Code/ObjectMapping/RKDynamicMapping.h index ba60aca730..e39d5a283d 100644 --- a/Code/ObjectMapping/RKDynamicMapping.h +++ b/Code/ObjectMapping/RKDynamicMapping.h @@ -18,8 +18,8 @@ // limitations under the License. // -#import "RKMapping.h" -#import "RKObjectMappingMatcher.h" +#import +#import /** The `RKDynamicMapping` class is an `RKMapping` subclass that provides an interface for deferring the decision about how a given object representation is to be mapped until run time. This enables many interesting mapping strategies, such as mapping similarly structured data differently and constructing object mappings at run time by examining the data being mapped. diff --git a/Code/ObjectMapping/RKDynamicMapping.m b/Code/ObjectMapping/RKDynamicMapping.m index f7138ba361..799e5b3dd2 100644 --- a/Code/ObjectMapping/RKDynamicMapping.m +++ b/Code/ObjectMapping/RKDynamicMapping.m @@ -18,9 +18,9 @@ // limitations under the License. // -#import "RKDynamicMapping.h" -#import "RKObjectMappingMatcher.h" -#import "RKLog.h" +#import +#import +#import // Set Logging Component #undef RKLogComponent diff --git a/Code/ObjectMapping/RKErrorMessage.m b/Code/ObjectMapping/RKErrorMessage.m index 1a102c4aa7..e9dae5863d 100644 --- a/Code/ObjectMapping/RKErrorMessage.m +++ b/Code/ObjectMapping/RKErrorMessage.m @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKErrorMessage.h" +#import @implementation RKErrorMessage diff --git a/Code/ObjectMapping/RKHTTPUtilities.m b/Code/ObjectMapping/RKHTTPUtilities.m index e789c4b47a..a2597d7532 100644 --- a/Code/ObjectMapping/RKHTTPUtilities.m +++ b/Code/ObjectMapping/RKHTTPUtilities.m @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKHTTPUtilities.h" +#import NSUInteger RKStatusCodeRangeLength = 100; @@ -344,8 +344,19 @@ RKRequestMethod RKRequestMethodFromString(NSString *methodName) int parsed = 0, cs = 1; NSDate *date = NULL; +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && (__IPHONE_OS_VERSION_MAX_ALLOWED < 70000)) || \ +(defined(MAC_OS_X_VERSION_MAX_ALLOWED) && (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_9)) CFGregorianDate gdate; memset(&gdate, 0, sizeof(CFGregorianDate)); +#else + NSDateComponents *gdate = [[NSDateComponents alloc] init]; + gdate.year = 0; + gdate.month = 0; + gdate.day = 0; + gdate.hour = 0; + gdate.minute = 0; + gdate.second = 0; +#endif { int _slen, _trans; @@ -397,11 +408,29 @@ RKRequestMethod RKRequestMethodFromString(NSString *methodName) _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)]; } +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && (__IPHONE_OS_VERSION_MAX_ALLOWED < 70000)) || \ +(defined(MAC_OS_X_VERSION_MAX_ALLOWED) && (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_9)) + static CFTimeZoneRef gmtTimeZone; + dispatch_once(&onceToken, ^{ + gmtTimeZone = CFTimeZoneCreateWithTimeIntervalFromGMT(NULL, 0.0); + }); + + if (parsed == 1) { + date = [NSDate dateWithTimeIntervalSinceReferenceDate:CFGregorianDateGetAbsoluteTime(gdate, gmtTimeZone)]; + } +#else + static NSCalendar *gregorian; + dispatch_once(&onceToken, ^{ + gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; + gregorian.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0]; + }); + + if (parsed == 1) { + date = [gregorian dateFromComponents:gdate]; + } +#endif return(date); } @@ -474,7 +503,16 @@ RKRequestMethod RKRequestMethodFromString(NSString *methodName) [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(maxAge > 0) + { + const NSInteger age = ((NSString *)headers[@"Age"]).integerValue; + if(age > 0) + return [[NSDate alloc] initWithTimeIntervalSinceNow:(maxAge - age)]; + else + return [[NSDate alloc] initWithTimeInterval:maxAge sinceDate:now]; + } + else + return nil; } } } diff --git a/Code/ObjectMapping/RKMapperOperation.h b/Code/ObjectMapping/RKMapperOperation.h index 94489d0301..ac9bbd3dda 100644 --- a/Code/ObjectMapping/RKMapperOperation.h +++ b/Code/ObjectMapping/RKMapperOperation.h @@ -19,11 +19,11 @@ // #import -#import "RKObjectMapping.h" -#import "RKMappingOperation.h" -#import "RKMappingResult.h" -#import "RKMappingOperationDataSource.h" -#import "RKErrors.h" +#import +#import +#import +#import +#import @protocol RKMapperOperationDelegate; diff --git a/Code/ObjectMapping/RKMapperOperation.m b/Code/ObjectMapping/RKMapperOperation.m index db0cdcbf77..b4ebb8225d 100644 --- a/Code/ObjectMapping/RKMapperOperation.m +++ b/Code/ObjectMapping/RKMapperOperation.m @@ -18,14 +18,14 @@ // limitations under the License. // -#import "RKMapperOperation.h" -#import "RKMapperOperation_Private.h" -#import "RKObjectMapping.h" -#import "RKObjectMappingOperationDataSource.h" -#import "RKMappingErrors.h" -#import "RKDynamicMapping.h" -#import "RKLog.h" -#import "RKDictionaryUtilities.h" +#import +#import +#import +#import +#import +#import +#import +#import NSString * const RKMappingErrorKeyPathErrorKey = @"keyPath"; @@ -80,6 +80,11 @@ @interface RKMapperOperation () @implementation RKMapperOperation +- (instancetype)init +{ + return [self initWithRepresentation:nil mappingsDictionary:nil]; +} + - (instancetype)initWithRepresentation:(id)representation mappingsDictionary:(NSDictionary *)mappingsDictionary; { self = [super init]; @@ -229,6 +234,8 @@ - (NSArray *)mapRepresentations:(id)representations atKeyPath:(NSString *)keyPat NSArray *metadataList = [NSArray arrayWithObjects:metadata, self.metadata, nil]; NSMutableArray *mappedObjects = [NSMutableArray arrayWithCapacity:[representations count]]; [objectsToMap enumerateObjectsUsingBlock:^(id mappableObject, NSUInteger index, BOOL *stop) { + if (mappableObject == [NSNull null]) { return; } + id destinationObject = [self objectForRepresentation:mappableObject withMapping:mapping]; if (destinationObject) { mappingData.collectionIndex = index; diff --git a/Code/ObjectMapping/RKMapping.m b/Code/ObjectMapping/RKMapping.m index 9f60f3b9ed..73f11f6a6e 100644 --- a/Code/ObjectMapping/RKMapping.m +++ b/Code/ObjectMapping/RKMapping.m @@ -6,7 +6,7 @@ // Copyright (c) 2009-2012 RestKit. All rights reserved. // -#import "RKMapping.h" +#import @implementation RKMapping diff --git a/Code/ObjectMapping/RKMappingErrors.h b/Code/ObjectMapping/RKMappingErrors.h index 794e70340a..b9ef3b9334 100644 --- a/Code/ObjectMapping/RKMappingErrors.h +++ b/Code/ObjectMapping/RKMappingErrors.h @@ -18,10 +18,9 @@ // limitations under the License. // -#import "RKErrors.h" +#import -typedef UInt32 RKMappingErrorCode; -enum { +typedef NS_ENUM(NSInteger, RKMappingErrorCode) { 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 diff --git a/Code/ObjectMapping/RKMappingOperation.h b/Code/ObjectMapping/RKMappingOperation.h index 7c5d782052..a59cd9882d 100644 --- a/Code/ObjectMapping/RKMappingOperation.h +++ b/Code/ObjectMapping/RKMappingOperation.h @@ -18,8 +18,8 @@ // limitations under the License. // -#import "RKObjectMapping.h" -#import "RKAttributeMapping.h" +#import +#import @class RKMappingOperation, RKDynamicMapping, RKConnectionDescription, RKMappingInfo; @protocol RKMappingOperationDataSource; diff --git a/Code/ObjectMapping/RKMappingOperation.m b/Code/ObjectMapping/RKMappingOperation.m index 9787f171f5..9bc27c760c 100644 --- a/Code/ObjectMapping/RKMappingOperation.m +++ b/Code/ObjectMapping/RKMappingOperation.m @@ -18,20 +18,20 @@ // limitations under the License. // +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import #import -#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" -#import "RKValueTransformers.h" -#import "RKDictionaryUtilities.h" // Set Logging Component #undef RKLogComponent @@ -158,6 +158,14 @@ - (instancetype)initWithMappingSource:(RKMappingSourceObject *)source NS_DESIGNA @implementation RKMetadataWrapper +- (instancetype)init +{ + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"-init is not a valid initializer for the class %@, use designated initilizer -initWithMappingSource:", NSStringFromClass([self class])] + userInfo:nil]; + return [self init]; +} + - (instancetype)initWithMappingSource:(RKMappingSourceObject *)source { if (self = [super init]) { self.mappingSource = source; @@ -317,22 +325,27 @@ - (id)valueForKeyPath:(NSString *)keyPath /* Using firstChar as a small performance enhancement -- one check can avoid several hasPrefix calls */ unichar firstChar = [keyPath length] > 0 ? [keyPath characterAtIndex:0] : 0; - if (firstChar == 's' && [keyPath hasPrefix:RKSelfKeyPathPrefix]) { - NSString *selfKeyPath = [keyPath substringFromIndex:[RKSelfKeyPathPrefix length]]; - return [_object valueForKeyPath:selfKeyPath]; - } else if (firstChar != '@') { - return [_object valueForKeyPath:keyPath]; - } else if ([keyPath hasPrefix:RKMetadataKeyPathPrefix]) { - NSString *metadataKeyPath = [keyPath substringFromIndex:[RKMetadataKeyPathPrefix length]]; - return [self metadataValueForKeyPath:metadataKeyPath]; - } else if ([keyPath hasPrefix:RKParentKeyPathPrefix]) { - NSString *parentKeyPath = [keyPath substringFromIndex:[RKParentKeyPathPrefix length]]; - return [self.parentObject valueForKeyPath:parentKeyPath]; - } else if ([keyPath hasPrefix:RKRootKeyPathPrefix]) { - NSString *rootKeyPath = [keyPath substringFromIndex:[RKRootKeyPathPrefix length]]; - return [self.rootObject valueForKeyPath:rootKeyPath]; - } else { - return [_object valueForKeyPath:keyPath]; + @try { + if (firstChar == 's' && [keyPath hasPrefix:RKSelfKeyPathPrefix]) { + NSString *selfKeyPath = [keyPath substringFromIndex:[RKSelfKeyPathPrefix length]]; + return [_object valueForKeyPath:selfKeyPath]; + } else if (firstChar != '@') { + return [_object valueForKeyPath:keyPath]; + } else if ([keyPath hasPrefix:RKMetadataKeyPathPrefix]) { + NSString *metadataKeyPath = [keyPath substringFromIndex:[RKMetadataKeyPathPrefix length]]; + return [self metadataValueForKeyPath:metadataKeyPath]; + } else if ([keyPath hasPrefix:RKParentKeyPathPrefix]) { + NSString *parentKeyPath = [keyPath substringFromIndex:[RKParentKeyPathPrefix length]]; + return [self.parentObject valueForKeyPath:parentKeyPath]; + } else if ([keyPath hasPrefix:RKRootKeyPathPrefix]) { + NSString *rootKeyPath = [keyPath substringFromIndex:[RKRootKeyPathPrefix length]]; + return [self.rootObject valueForKeyPath:rootKeyPath]; + } else { + return [_object valueForKeyPath:keyPath]; + } + } + @catch (NSException *exception) { + return nil; } } @@ -1204,18 +1217,34 @@ - (void)main } } - BOOL canSkipMapping = [dataSource respondsToSelector:@selector(mappingOperationShouldSkipPropertyMapping:)] && [dataSource mappingOperationShouldSkipPropertyMapping:self]; - if (! canSkipMapping) { - [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) { + BOOL canSkipProperties = [dataSource respondsToSelector:@selector(mappingOperationShouldSkipPropertyMapping:)] && [dataSource mappingOperationShouldSkipPropertyMapping:self]; + BOOL canSkipAttributes = canSkipProperties; + BOOL canSkipRelationships = canSkipProperties; + if ([dataSource respondsToSelector:@selector(mappingOperationShouldSkipRelationshipMapping:)]) { + canSkipRelationships = [dataSource mappingOperationShouldSkipRelationshipMapping:self]; + } + if ([dataSource respondsToSelector:@selector(mappingOperationShouldSkipAttributeMapping:)]) { + canSkipAttributes = [dataSource mappingOperationShouldSkipAttributeMapping:self]; + } + if (!canSkipRelationships || !canSkipAttributes) { + BOOL foundNoSimpleAttributes = NO; + BOOL foundNoRelationships = NO; + BOOL foundNoKeyPathAttributes = NO; + if (!canSkipAttributes) { + [self applyNestedMappings]; + if ([self isCancelled]) return; + foundNoSimpleAttributes = ![self applyAttributeMappings:[self simpleAttributeMappings]]; + } + if (!canSkipRelationships) { + if ([self isCancelled]) return; + foundNoRelationships = [[self relationshipMappings] count] ? ![self applyRelationshipMappings] : YES; + } + if (!canSkipAttributes) { + 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 + foundNoKeyPathAttributes = ![self applyAttributeMappings:[self keyPathAttributeMappings]]; + } + if (foundNoSimpleAttributes && foundNoRelationships && foundNoKeyPathAttributes) { // 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" }; diff --git a/Code/ObjectMapping/RKMappingOperationDataSource.h b/Code/ObjectMapping/RKMappingOperationDataSource.h index 2d06b34163..4bf9545754 100644 --- a/Code/ObjectMapping/RKMappingOperationDataSource.h +++ b/Code/ObjectMapping/RKMappingOperationDataSource.h @@ -93,7 +93,36 @@ */ - (BOOL)mappingOperationShouldSetUnchangedValues:(RKMappingOperation *)mappingOperation; -- (BOOL)mappingOperationShouldSkipPropertyMapping:(RKMappingOperation *)mappingOperation; +/** + **Deprecated in v0.26.0** + Asks the data source if it should skip mapping. This method can significantly improve performance if, for example, the data source has determined that the properties in the representation are not newer than the current target object's properties. See `modificationAttribute` in `RKEntityMapping` for an example of when skipping property mapping would be appropriate. + + If this method is not implemented by the data source, then the mapping operation defaults to `NO`. + + @param mappingOperation The mapping operation that is querying the data source. + @return `YES` if the mapping operation should skip mapping properties, else `NO`. + */ +- (BOOL)mappingOperationShouldSkipPropertyMapping:(RKMappingOperation *)mappingOperation DEPRECATED_MSG_ATTRIBUTE("use mappingOperationShouldSkipAttributeMapping: and mappingOperationShouldSkipRelationshipMapping: instead"); + +/** + Asks the data source if it should skip mapping attributes. This method can significantly improve performance if, for example, the data source has determined that the attributes in the representation are not newer than the current target object's attributes. See `modificationAttribute` in `RKEntityMapping` for an example of when skipping attribute mapping would be appropriate. + + If this method is not implemented by the data source, then the mapping operation defaults to `NO`. + + @param mappingOperation The mapping operation that is querying the data source. + @return `YES` if the mapping operation should skip mapping attributes, else `NO`. + */ +- (BOOL)mappingOperationShouldSkipAttributeMapping:(RKMappingOperation *)mappingOperation; + +/** + Asks the data source if it should skip mapping relationships. This method can significantly improve performance if, for example, the data source has determined that the relationships in the representation are not newer than the current target object's relationships. See `modificationAttribute` and `shouldMapRelationshipsIfObjectIsUnmodified` in `RKEntityMapping` for an example of when skipping relationship mapping might be appropriate. + + If this method is not implemented by the data source, then the mapping operation defaults to `NO`. + + @param mappingOperation The mapping operation that is querying the data source. + @return `YES` if the mapping operation should skip mapping relationships, else `NO`. + */ +- (BOOL)mappingOperationShouldSkipRelationshipMapping:(RKMappingOperation *)mappingOperation; /** Asks the data source if the mapping operation should collect `RKMappingInfo` information during the mapping diff --git a/Code/ObjectMapping/RKMappingResult.m b/Code/ObjectMapping/RKMappingResult.m index d3b7f5828d..49eef18537 100644 --- a/Code/ObjectMapping/RKMappingResult.m +++ b/Code/ObjectMapping/RKMappingResult.m @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKMappingResult.h" +#import @interface RKMappingResult () @property (nonatomic, strong) NSDictionary *keyPathToMappedObjects; diff --git a/Code/ObjectMapping/RKObjectMapping.h b/Code/ObjectMapping/RKObjectMapping.h index 888477806c..d77e61fb7c 100644 --- a/Code/ObjectMapping/RKObjectMapping.h +++ b/Code/ObjectMapping/RKObjectMapping.h @@ -18,9 +18,10 @@ // limitations under the License. // -#import "RKMacros.h" -#import "RKMapping.h" -#import "RKValueTransformers.h" +#import +#import + +#import @class RKPropertyMapping, RKAttributeMapping, RKRelationshipMapping; @protocol RKValueTransforming; @@ -339,7 +340,7 @@ @return A new mapping that will map the inverse of the receiver. */ -- (instancetype)inverseMapping; +- (RKObjectMapping *)inverseMapping; /** Generates an inverse mapping with all property mappings of the receiver that pass the given test. Each `RKAttributeMapping` and `RKRelationshipMapping` added to the receiver is yielded to the block for evaluation. The block is also invoked for any nested relationships that are traversed during the inversion process. @@ -348,7 +349,7 @@ @return A new mapping that will map the inverse of the receiver. @see inverseMapping */ -- (instancetype)inverseMappingWithPropertyMappingsPassingTest:(BOOL (^)(RKPropertyMapping *propertyMapping))predicate; +- (RKObjectMapping *)inverseMappingWithPropertyMappingsPassingTest:(BOOL (^)(RKPropertyMapping *propertyMapping))predicate; ///--------------------------------------------------- /// @name Obtaining Information About the Target Class diff --git a/Code/ObjectMapping/RKObjectMapping.m b/Code/ObjectMapping/RKObjectMapping.m index 74243b4b75..f28eeb39a3 100644 --- a/Code/ObjectMapping/RKObjectMapping.m +++ b/Code/ObjectMapping/RKObjectMapping.m @@ -19,14 +19,13 @@ // #import -#import "RKObjectMapping.h" -#import "RKRelationshipMapping.h" -#import "RKPropertyInspector.h" -#import "RKLog.h" -#import "RKAttributeMapping.h" -#import "RKRelationshipMapping.h" -#import "RKValueTransformers.h" -#import "ISO8601DateFormatterValueTransformer.h" +#import +#import +#import +#import +#import +#import +#import typedef NSString * (^RKSourceToDesinationKeyTransformationBlock)(RKObjectMapping *, NSString *); diff --git a/Code/ObjectMapping/RKObjectMappingMatcher.h b/Code/ObjectMapping/RKObjectMappingMatcher.h index 577550cd98..a00b66d05e 100644 --- a/Code/ObjectMapping/RKObjectMappingMatcher.h +++ b/Code/ObjectMapping/RKObjectMappingMatcher.h @@ -7,7 +7,7 @@ // #import -#import "RKObjectMapping.h" +#import /** The `RKObjectMappingMatcher` class provides an interface for encapsulating the selection of an object mapping based on runtime values. Matcher objects may be configured by key path and expected value or with a predicate object. diff --git a/Code/ObjectMapping/RKObjectMappingMatcher.m b/Code/ObjectMapping/RKObjectMappingMatcher.m index 4efebc37ac..6475b869db 100644 --- a/Code/ObjectMapping/RKObjectMappingMatcher.m +++ b/Code/ObjectMapping/RKObjectMappingMatcher.m @@ -6,8 +6,8 @@ // Copyright (c) 2009-2012 RestKit. All rights reserved. // -#import "RKObjectMappingMatcher.h" -#import "RKObjectUtilities.h" +#import +#import /////////////////////////////////////////////////////////////////////////////////////////////////// @@ -110,6 +110,14 @@ - (BOOL)matches:(id)object @implementation RKKeyPathObjectMappingMatcher +- (instancetype)init +{ + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"-init is not a valid initializer for the class %@, use -initWithKeyPath:expectedValue:objectMapping:", NSStringFromClass([self class])] + userInfo:nil]; + return [self init]; +} + - (instancetype)initWithKeyPath:(NSString *)keyPath expectedValue:(id)expectedValue objectMapping:(RKObjectMapping *)objectMapping { NSParameterAssert(keyPath); @@ -141,6 +149,14 @@ - (NSString *)description @implementation RKKeyPathClassObjectMappingMatcher +- (instancetype)init +{ + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"-init is not a valid initializer for the class %@, use initilizer -initWithKeyPath:expectedClass:objectMapping:", NSStringFromClass([self class])] + userInfo:nil]; + return [self init]; +} + - (instancetype)initWithKeyPath:(NSString *)keyPath expectedClass:(Class)expectedClass objectMapping:(RKObjectMapping *)objectMapping { NSParameterAssert(keyPath); @@ -171,6 +187,14 @@ - (NSString *)description @implementation RKKeyPathValueMapObjectMappingMatcher +- (instancetype)init +{ + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"-init is not a valid initializer for the class %@, use initilizer -initWithKeyPath:expectedValueMap:", NSStringFromClass([self class])] + userInfo:nil]; + return [self init]; +} + - (instancetype)initWithKeyPath:(NSString *)keyPath expectedValueMap:(NSDictionary *)valueToObjectMapping { NSParameterAssert(keyPath); @@ -210,6 +234,14 @@ - (NSString *)description @implementation RKPredicateObjectMappingMatcher +- (instancetype)init +{ + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"-init is not a valid initializer for the class %@, use initilizer -initWithPredicate:objectMapping:", NSStringFromClass([self class])] + userInfo:nil]; + return [self init]; +} + - (instancetype)initWithPredicate:(NSPredicate *)predicate objectMapping:(RKObjectMapping *)objectMapping { NSParameterAssert(predicate); @@ -237,6 +269,14 @@ - (NSString *)description @implementation RKBlockObjectMatchingMatcher +- (instancetype)init +{ + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"-init is not a valid initializer for the class %@, use initilizer -initWithPossibleMappings:block:", NSStringFromClass([self class])] + userInfo:nil]; + return [self init]; +} + - (instancetype)initWithPossibleMappings:(NSArray *)mappings block:(RKObjectMapping *(^)(id representation))block { NSParameterAssert(block); diff --git a/Code/ObjectMapping/RKObjectMappingOperationDataSource.h b/Code/ObjectMapping/RKObjectMappingOperationDataSource.h index 3daf2166f8..46b41f92dd 100644 --- a/Code/ObjectMapping/RKObjectMappingOperationDataSource.h +++ b/Code/ObjectMapping/RKObjectMappingOperationDataSource.h @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKMappingOperationDataSource.h" +#import /** 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). diff --git a/Code/ObjectMapping/RKObjectMappingOperationDataSource.m b/Code/ObjectMapping/RKObjectMappingOperationDataSource.m index e8aba71f7f..01c6304ed4 100644 --- a/Code/ObjectMapping/RKObjectMappingOperationDataSource.m +++ b/Code/ObjectMapping/RKObjectMappingOperationDataSource.m @@ -18,9 +18,9 @@ // limitations under the License. // -#import "RKObjectMappingOperationDataSource.h" -#import "RKObjectMapping.h" -#import "RKMappingOperation.h" +#import +#import +#import @implementation RKObjectMappingOperationDataSource diff --git a/Code/ObjectMapping/RKObjectUtilities.m b/Code/ObjectMapping/RKObjectUtilities.m index 052335e75e..65a5712965 100644 --- a/Code/ObjectMapping/RKObjectUtilities.m +++ b/Code/ObjectMapping/RKObjectUtilities.m @@ -18,9 +18,9 @@ // limitations under the License. // +#import #import #import -#import "RKObjectUtilities.h" BOOL RKObjectIsEqualToObject(id object, id anotherObject) { NSCAssert(object, @"Expected object not to be nil"); diff --git a/Code/ObjectMapping/RKPropertyInspector.m b/Code/ObjectMapping/RKPropertyInspector.m index 7106713582..3ee197d169 100644 --- a/Code/ObjectMapping/RKPropertyInspector.m +++ b/Code/ObjectMapping/RKPropertyInspector.m @@ -18,10 +18,10 @@ // limitations under the License. // +#import +#import +#import #import -#import "RKPropertyInspector.h" -#import "RKLog.h" -#import "RKObjectUtilities.h" // Set Logging Component #undef RKLogComponent diff --git a/Code/ObjectMapping/RKPropertyMapping.m b/Code/ObjectMapping/RKPropertyMapping.m index 6d4debd251..5002c8667e 100644 --- a/Code/ObjectMapping/RKPropertyMapping.m +++ b/Code/ObjectMapping/RKPropertyMapping.m @@ -18,8 +18,8 @@ // limitations under the License. // -#import "RKPropertyMapping.h" -#import "RKObjectMapping.h" +#import +#import /** For consistency with URI Templates (and most web templating languages in general) we are transitioning @@ -44,6 +44,8 @@ - (id)copyWithZone:(NSZone *)zone RKPropertyMapping *copy = [[[self class] allocWithZone:zone] init]; copy.sourceKeyPath = self.sourceKeyPath; copy.destinationKeyPath = self.destinationKeyPath; + copy.propertyValueClass = self.propertyValueClass; + copy.valueTransformer = self.valueTransformer; return copy; } diff --git a/Code/ObjectMapping/RKRelationshipMapping.h b/Code/ObjectMapping/RKRelationshipMapping.h index 5c81276af6..6d73bd0db0 100644 --- a/Code/ObjectMapping/RKRelationshipMapping.h +++ b/Code/ObjectMapping/RKRelationshipMapping.h @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKPropertyMapping.h" +#import @class RKMapping; diff --git a/Code/ObjectMapping/RKRelationshipMapping.m b/Code/ObjectMapping/RKRelationshipMapping.m index ae867c09ab..fc407131a4 100644 --- a/Code/ObjectMapping/RKRelationshipMapping.m +++ b/Code/ObjectMapping/RKRelationshipMapping.m @@ -18,8 +18,8 @@ // limitations under the License. // -#import "RKRelationshipMapping.h" -#import "RKMapping.h" +#import +#import @interface RKPropertyMapping () @property (nonatomic, copy, readwrite) NSString *sourceKeyPath; diff --git a/Code/RestKit.h b/Code/RestKit.h index 30e1951360..d690812855 100644 --- a/Code/RestKit.h +++ b/Code/RestKit.h @@ -22,19 +22,19 @@ #define _RESTKIT_ #if __has_include("ObjectMapping.h") -#import "ObjectMapping.h" +#import #endif #if __has_include("Network.h") -#import "Network.h" +#import #endif #if __has_include("Support.h") -#import "Support.h" +#import #endif #if __has_include("RKCoreData.h") -#import "RKCoreData.h" +#import #endif /** diff --git a/Code/Search.h b/Code/Search.h index e7ac7da942..d1a5510ceb 100644 --- a/Code/Search.h +++ b/Code/Search.h @@ -18,9 +18,9 @@ // limitations under the License. // -#import "RKSearchPredicate.h" +#import #ifdef _COREDATADEFINES_H -#import "RKSearchIndexer.h" -#import "RKManagedObjectStore+RKSearchAdditions.h" +#import +#import #endif diff --git a/Code/Search/RKManagedObjectStore+RKSearchAdditions.h b/Code/Search/RKManagedObjectStore+RKSearchAdditions.h index 980ec4e768..38fce74ccd 100644 --- a/Code/Search/RKManagedObjectStore+RKSearchAdditions.h +++ b/Code/Search/RKManagedObjectStore+RKSearchAdditions.h @@ -18,8 +18,8 @@ // limitations under the License. // -#import "RKManagedObjectStore.h" -#import "RKSearchIndexer.h" +#import +#import /** The search additions category provides support for configuring search indexing for entities in a managed object store. diff --git a/Code/Search/RKManagedObjectStore+RKSearchAdditions.m b/Code/Search/RKManagedObjectStore+RKSearchAdditions.m index 45c6dbfd1b..c455218a39 100644 --- a/Code/Search/RKManagedObjectStore+RKSearchAdditions.m +++ b/Code/Search/RKManagedObjectStore+RKSearchAdditions.m @@ -18,9 +18,9 @@ // limitations under the License. // +#import +#import #import -#import "RKManagedObjectStore+RKSearchAdditions.h" -#import "RKSearchWordEntity.h" static char searchIndexerAssociationKey; diff --git a/Code/Search/RKSearchIndexer.m b/Code/Search/RKSearchIndexer.m index 87f7dbdca2..be86fcd537 100644 --- a/Code/Search/RKSearchIndexer.m +++ b/Code/Search/RKSearchIndexer.m @@ -18,13 +18,13 @@ // limitations under the License. // -#import "RKSearchIndexer.h" -#import "RKSearchWordEntity.h" -#import "RKSearchWord.h" -#import "RKLog.h" -#import "RKStringTokenizer.h" -#import "NSManagedObjectContext+RKAdditions.h" -#import "RKObjectUtilities.h" +#import +#import +#import +#import +#import +#import +#import // Set Logging Component #undef RKLogComponent diff --git a/Code/Search/RKSearchPredicate.m b/Code/Search/RKSearchPredicate.m index e5fda9005f..57f6e48658 100644 --- a/Code/Search/RKSearchPredicate.m +++ b/Code/Search/RKSearchPredicate.m @@ -6,8 +6,14 @@ // Copyright (c) 2012 RestKit. All rights reserved. // -#import "RKSearchPredicate.h" -#import "RKStringTokenizer.h" +#import +#import + +@interface RKSearchPredicate() + +- (instancetype)initWithType:(NSCompoundPredicateType)type subpredicates:(NSArray *)subpredicates NS_DESIGNATED_INITIALIZER; + +@end @implementation RKSearchPredicate @@ -16,6 +22,19 @@ + (NSPredicate *)searchPredicateWithText:(NSString *)searchText type:(NSCompound return [[self alloc] initWithSearchText:searchText type:type]; } +- (instancetype)initWithCoder:(NSCoder *)coder +{ + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"-initWithcoder: is not a valid initializer for the class %@, use designated initilizer -initWithSearchText:type:", NSStringFromClass([self class])] + userInfo:nil]; + return [self init]; +} + +- (instancetype)initWithType:(NSCompoundPredicateType)type subpredicates:(NSArray *)subpredicates +{ + return [super initWithType:type subpredicates:subpredicates]; +} + - (instancetype)initWithSearchText:(NSString *)searchText type:(NSCompoundPredicateType)type { RKStringTokenizer *tokenizer = [RKStringTokenizer new]; diff --git a/Code/Search/RKSearchWord.m b/Code/Search/RKSearchWord.m index 9853728ef2..a824eb9a8f 100644 --- a/Code/Search/RKSearchWord.m +++ b/Code/Search/RKSearchWord.m @@ -18,8 +18,8 @@ // limitations under the License. // -#import "RKSearchWord.h" -#import "RKLog.h" +#import +#import // Set Logging Component #undef RKLogComponent diff --git a/Code/Search/RKSearchWordEntity.m b/Code/Search/RKSearchWordEntity.m index 07265c3c5c..ed70a5e34e 100644 --- a/Code/Search/RKSearchWordEntity.m +++ b/Code/Search/RKSearchWordEntity.m @@ -6,7 +6,7 @@ // Copyright (c) 2012 RestKit. All rights reserved. // -#import "RKSearchWordEntity.h" +#import NSString * const RKSearchWordEntityName = @"RKSearchWord"; NSString * const RKSearchWordAttributeName = @"word"; diff --git a/Code/Support.h b/Code/Support.h index ba3e127477..f901886bd9 100644 --- a/Code/Support.h +++ b/Code/Support.h @@ -19,13 +19,13 @@ // // Load shared support code -#import "RKErrors.h" -#import "RKMIMETypes.h" -#import "RKLog.h" -#import "RKDotNetDateFormatter.h" -#import "RKPathUtilities.h" -#import "RKDictionaryUtilities.h" -#import "RKURLEncodedSerialization.h" -#import "RKNSJSONSerialization.h" -#import "RKMIMETypeSerialization.h" -#import "RKStringTokenizer.h" +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/Code/Support/RKDictionaryUtilities.m b/Code/Support/RKDictionaryUtilities.m index 66b09cee27..dd0661a235 100644 --- a/Code/Support/RKDictionaryUtilities.m +++ b/Code/Support/RKDictionaryUtilities.m @@ -6,7 +6,7 @@ // Copyright (c) 2012 RestKit. All rights reserved. // -#import "RKDictionaryUtilities.h" +#import NSDictionary *RKDictionaryByMergingDictionaryWithDictionary(NSDictionary *dict1, NSDictionary *dict2) { diff --git a/Code/Support/RKDotNetDateFormatter.m b/Code/Support/RKDotNetDateFormatter.m index 11e2a53238..c43c278a6b 100644 --- a/Code/Support/RKDotNetDateFormatter.m +++ b/Code/Support/RKDotNetDateFormatter.m @@ -18,8 +18,8 @@ // limitations under the License. // -#import "RKDotNetDateFormatter.h" -#import "RKLog.h" +#import +#import static BOOL RKDotNetDateFormatterIsValidRange(NSRange rangeOfMatch) { diff --git a/Code/Support/RKErrors.m b/Code/Support/RKErrors.m index ae9a1541d4..9f094a0c29 100644 --- a/Code/Support/RKErrors.m +++ b/Code/Support/RKErrors.m @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKErrors.h" +#import NSString * const RKErrorDomain = @"org.restkit.RestKit.ErrorDomain"; diff --git a/Code/Support/RKLog.h b/Code/Support/RKLog.h index da5de948f3..fc26861274 100644 --- a/Code/Support/RKLog.h +++ b/Code/Support/RKLog.h @@ -24,7 +24,7 @@ @see lcl_config_components_RK.h @see lcl_config_logger_RK.h */ -#import "lcl_RK.h" +#import /** * Protocol which classes can implement to determine how RestKit log messages actually get handled. diff --git a/Code/Support/RKLog.m b/Code/Support/RKLog.m index 100798ed56..a991f24d5e 100644 --- a/Code/Support/RKLog.m +++ b/Code/Support/RKLog.m @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKLog.h" +#import @interface RKNSLogLogger : NSObject @end @@ -27,8 +27,8 @@ @interface RKNSLogLogger : NSObject #import "LCLNSLogger_RK.h" #define RKLOG_CLASS LCLNSLogger_RK -#elif __has_include("DDLog.h") - #import "RKLumberjackLogger.h" +#elif __has_include() + #import #define RKLOG_CLASS RKLumberjackLogger #else diff --git a/Code/Support/RKLumberjackLogger.m b/Code/Support/RKLumberjackLogger.m deleted file mode 100644 index 34b2cc8ca7..0000000000 --- a/Code/Support/RKLumberjackLogger.m +++ /dev/null @@ -1,107 +0,0 @@ -// -// RKLumberjackLogger.m -// Pods -// -// Created by C_Lindberg,Carl on 10/31/14. -// -// - -#if __has_include("DDLog.h") -#import "RKLumberjackLogger.h" -#import "DDLog.h" - -@implementation RKLumberjackLogger - -+ (int)ddLogLevelFromRKLogLevel:(_RKlcl_level_t)rkLevel -{ - switch (rkLevel) - { - case RKLogLevelOff: return LOG_LEVEL_OFF; - case RKLogLevelCritical: return LOG_LEVEL_ERROR; - case RKLogLevelError: return LOG_LEVEL_ERROR; - case RKLogLevelWarning: return LOG_LEVEL_WARN; - case RKLogLevelInfo: return LOG_LEVEL_INFO; - case RKLogLevelDebug: return LOG_LEVEL_DEBUG; - case RKLogLevelTrace: return LOG_LEVEL_VERBOSE; - } - - return LOG_LEVEL_DEBUG; -} - -+ (int)ddLogFlagFromRKLogLevel:(_RKlcl_level_t)rkLevel -{ - switch (rkLevel) - { - case RKLogLevelOff: return 0; - case RKLogLevelCritical: return LOG_FLAG_ERROR; - case RKLogLevelError: return LOG_FLAG_ERROR; - case RKLogLevelWarning: return LOG_FLAG_WARN; - case RKLogLevelInfo: return LOG_FLAG_INFO; - case RKLogLevelDebug: return LOG_FLAG_DEBUG; - case RKLogLevelTrace: return LOG_FLAG_VERBOSE; - } - - return LOG_FLAG_DEBUG; -} - -+ (_RKlcl_level_t)rkLogLevelFromDDLogLevel:(int)ddLogLevel -{ - if (ddLogLevel & LOG_FLAG_VERBOSE) return RKLogLevelTrace; - if (ddLogLevel & LOG_FLAG_DEBUG) return RKLogLevelDebug; - if (ddLogLevel & LOG_FLAG_INFO) return RKLogLevelInfo; - if (ddLogLevel & LOG_FLAG_WARN) return RKLogLevelWarning; - if (ddLogLevel & LOG_FLAG_ERROR) return RKLogLevelError; - - return RKLogLevelOff; -} - - -#pragma mark RKLogging - -+ (void)logWithComponent:(_RKlcl_component_t)component - level:(_RKlcl_level_t)level - path:(const char *)path - line:(uint32_t)line - function:(const char *)function - format:(NSString *)format, ... -{ - va_list args; - va_start(args, format); - - int flag = [self ddLogFlagFromRKLogLevel:level]; - int componentLevel = [self ddLogLevelFromRKLogLevel:_RKlcl_component_level[component]]; - BOOL async = LOG_ASYNC_ENABLED && ((flag & LOG_FLAG_ERROR) == 0); - - [DDLog log:async - level:componentLevel - flag:flag - context:0 /* Could define a special value here to identify RestKit logs to any backend loggers */ - file:path function:function line:line - tag:nil - format:format args:args]; - va_end(args); -} - -@end - -/* Create a DDRegisteredDynamicLogging class for each RestKit component */ - -#undef _RKlcl_component -#define _RKlcl_component(_identifier, _header, _name) \ - @interface RKLumberjackLog##_identifier : NSObject \ - @end \ - @implementation RKLumberjackLog##_identifier \ - + (int)ddLogLevel { \ - _RKlcl_level_t level = _RKlcl_component_level[RKlcl_c##_identifier]; \ - return [RKLumberjackLogger ddLogLevelFromRKLogLevel:level]; \ - } \ - + (void)ddSetLogLevel:(int)logLevel { \ - RKLogConfigureByName(_name, [RKLumberjackLogger rkLogLevelFromDDLogLevel:logLevel]); \ - } \ - @end - -#include "lcl_config_components_RK.h" -#undef _RKlcl_component - - -#endif diff --git a/Code/Support/RKMIMETypeSerialization.h b/Code/Support/RKMIMETypeSerialization.h index 071869afd1..4ef7213486 100644 --- a/Code/Support/RKMIMETypeSerialization.h +++ b/Code/Support/RKMIMETypeSerialization.h @@ -18,8 +18,8 @@ // limitations under the License. // -#import "RKMIMETypes.h" -#import "RKSerialization.h" +#import +#import /** 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. diff --git a/Code/Support/RKMIMETypeSerialization.m b/Code/Support/RKMIMETypeSerialization.m index caf414510e..931b4e6133 100644 --- a/Code/Support/RKMIMETypeSerialization.m +++ b/Code/Support/RKMIMETypeSerialization.m @@ -18,12 +18,12 @@ // limitations under the License. // -#import "RKMIMETypeSerialization.h" -#import "RKErrors.h" -#import "RKSerialization.h" -#import "RKLog.h" -#import "RKURLEncodedSerialization.h" -#import "RKNSJSONSerialization.h" +#import +#import +#import +#import +#import +#import // Define logging component #undef RKLogComponent @@ -40,6 +40,14 @@ - (BOOL)matchesMIMEType:(NSString *)MIMEType; @implementation RKMIMETypeSerializationRegistration +- (instancetype)init +{ + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"-init is not a valid initializer for the class %@, use designated initilizer -initWithMIMEType:serializationClass:", NSStringFromClass([self class])] + userInfo:nil]; + return [self init]; +} + - (instancetype)initWithMIMEType:(id)MIMETypeStringOrRegularExpression serializationClass:(Class)serializationClass { NSParameterAssert(MIMETypeStringOrRegularExpression); diff --git a/Code/Support/RKMIMETypes.m b/Code/Support/RKMIMETypes.m index c22ff5fbc9..fe256d51f3 100644 --- a/Code/Support/RKMIMETypes.m +++ b/Code/Support/RKMIMETypes.m @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKMIMETypes.h" +#import NSString * const RKMIMETypeJSON = @"application/json"; NSString * const RKMIMETypeFormURLEncoded = @"application/x-www-form-urlencoded"; diff --git a/Code/Support/RKNSJSONSerialization.h b/Code/Support/RKNSJSONSerialization.h index 598e250304..8670141446 100644 --- a/Code/Support/RKNSJSONSerialization.h +++ b/Code/Support/RKNSJSONSerialization.h @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKSerialization.h" +#import /** 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. diff --git a/Code/Support/RKNSJSONSerialization.m b/Code/Support/RKNSJSONSerialization.m index 3b277ea260..baa48d2a22 100644 --- a/Code/Support/RKNSJSONSerialization.m +++ b/Code/Support/RKNSJSONSerialization.m @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKNSJSONSerialization.h" +#import @implementation RKNSJSONSerialization diff --git a/Code/Support/RKOperationStateMachine.m b/Code/Support/RKOperationStateMachine.m index 33bb1abe28..b090f3690d 100644 --- a/Code/Support/RKOperationStateMachine.m +++ b/Code/Support/RKOperationStateMachine.m @@ -18,8 +18,8 @@ // limitations under the License. // -#import "TransitionKit.h" -#import "RKOperationStateMachine.h" +#import +#import NSString *const RKOperationFailureException = @"RKOperationFailureException"; diff --git a/Code/Support/RKPathUtilities.m b/Code/Support/RKPathUtilities.m index 373657a544..12ee04786d 100644 --- a/Code/Support/RKPathUtilities.m +++ b/Code/Support/RKPathUtilities.m @@ -13,9 +13,9 @@ #import #endif #import +#import +#import #import -#import "RKPathUtilities.h" -#import "RKLog.h" NSString *RKExecutableName(void); diff --git a/Code/Support/RKStringTokenizer.m b/Code/Support/RKStringTokenizer.m index 48e36449c1..b8ccd86b47 100644 --- a/Code/Support/RKStringTokenizer.m +++ b/Code/Support/RKStringTokenizer.m @@ -6,7 +6,7 @@ // Copyright (c) 2012 RestKit. All rights reserved. // -#import "RKStringTokenizer.h" +#import @implementation RKStringTokenizer diff --git a/Code/Support/RKURLEncodedSerialization.h b/Code/Support/RKURLEncodedSerialization.h index 3c109d2c51..0b41fccdd9 100644 --- a/Code/Support/RKURLEncodedSerialization.h +++ b/Code/Support/RKURLEncodedSerialization.h @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKSerialization.h" +#import /** 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`. diff --git a/Code/Support/RKURLEncodedSerialization.m b/Code/Support/RKURLEncodedSerialization.m index 09f7ae7557..88f135b17e 100644 --- a/Code/Support/RKURLEncodedSerialization.m +++ b/Code/Support/RKURLEncodedSerialization.m @@ -18,7 +18,7 @@ // limitations under the License. // -#import "RKURLEncodedSerialization.h" +#import #pragma mark - AFNetworking @@ -49,6 +49,14 @@ - (NSString *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding @implementation RKAFQueryStringPair +- (instancetype)init +{ + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"-init is not a valid initializer for the class %@, use designated initilizer -initWithField:", NSStringFromClass([self class])] + userInfo:nil]; + return [self init]; +} + - (instancetype)initWithField:(id)field value:(id)value { self = [super init]; if (!self) { diff --git a/Code/Support/RestKit-Prefix.pch b/Code/Support/RestKit-Prefix.pch index 2297f18246..37c35ba574 100644 --- a/Code/Support/RestKit-Prefix.pch +++ b/Code/Support/RestKit-Prefix.pch @@ -5,6 +5,11 @@ #ifdef __OBJC__ #import +// Fix for compilation on iOS 6 where this is not defined. +#if !defined NS_DESIGNATED_INITIALIZER +#define NS_DESIGNATED_INITIALIZER +#endif + #import #if __IPHONE_OS_VERSION_MIN_REQUIRED #import diff --git a/Code/Support/lcl_RK.h b/Code/Support/lcl_RK.h new file mode 120000 index 0000000000..d33d5de37f --- /dev/null +++ b/Code/Support/lcl_RK.h @@ -0,0 +1 @@ +../../Vendor/LibComponentLogging/Core/lcl_RK.h \ No newline at end of file diff --git a/Code/Support/lcl_RK.m b/Code/Support/lcl_RK.m new file mode 120000 index 0000000000..23c8a00edf --- /dev/null +++ b/Code/Support/lcl_RK.m @@ -0,0 +1 @@ +../../Vendor/LibComponentLogging/Core/lcl_RK.m \ No newline at end of file diff --git a/Code/Support/lcl_config_components_RK.h b/Code/Support/lcl_config_components_RK.h index 3638292044..e71025472b 100644 --- a/Code/Support/lcl_config_components_RK.h +++ b/Code/Support/lcl_config_components_RK.h @@ -49,14 +49,15 @@ // 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(RestKitNetworkCoreData, "restkit.network.core_data", "RestKit/Network/CoreData") -_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") +#define RKLCLComponentDefinitions \ +_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(RestKitNetworkCoreData, "restkit.network.core_data", "RestKit/Network/CoreData") \ +_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/Code/Testing.h b/Code/Testing.h index a76696a158..844762d2c6 100644 --- a/Code/Testing.h +++ b/Code/Testing.h @@ -19,13 +19,13 @@ // -#import "RKTestFixture.h" -#import "RKTestNotificationObserver.h" -#import "RKTestFactory.h" -#import "RKTestHelpers.h" -#import "RKMappingTest.h" +#import +#import +#import +#import +#import #ifdef _COREDATADEFINES_H -#import "RKConnectionTestExpectation.h" +#import #endif diff --git a/Code/Testing/RKBenchmark.m b/Code/Testing/RKBenchmark.m index 844e06c706..8584a272c1 100644 --- a/Code/Testing/RKBenchmark.m +++ b/Code/Testing/RKBenchmark.m @@ -7,7 +7,7 @@ // Copyleft 2009. Some rights reserved. // -#import "RKBenchmark.h" +#import @interface RKBenchmark () @property (nonatomic, assign, readwrite) CFAbsoluteTime startTime; diff --git a/Code/Testing/RKConnectionTestExpectation.m b/Code/Testing/RKConnectionTestExpectation.m index 7f86eb7f4e..64a3e7471f 100644 --- a/Code/Testing/RKConnectionTestExpectation.m +++ b/Code/Testing/RKConnectionTestExpectation.m @@ -20,8 +20,8 @@ #ifdef _COREDATADEFINES_H -#import "RKConnectionTestExpectation.h" -#import "RKObjectUtilities.h" +#import +#import @interface RKConnectionTestExpectation () @property (nonatomic, copy, readwrite) NSString *relationshipName; diff --git a/Code/Testing/RKMappingTest.h b/Code/Testing/RKMappingTest.h index 737588459e..0e18e61b42 100644 --- a/Code/Testing/RKMappingTest.h +++ b/Code/Testing/RKMappingTest.h @@ -19,8 +19,8 @@ // #import -#import "RKMappingOperation.h" -#import "RKPropertyMappingTestExpectation.h" +#import +#import @protocol RKMappingOperationDataSource, RKManagedObjectCaching; diff --git a/Code/Testing/RKMappingTest.m b/Code/Testing/RKMappingTest.m index 9ef84e5224..65a666dfad 100644 --- a/Code/Testing/RKMappingTest.m +++ b/Code/Testing/RKMappingTest.m @@ -18,22 +18,22 @@ // limitations under the License. // -#import "RKMappingTest.h" -#import "RKObjectMappingOperationDataSource.h" -#import "RKRelationshipMapping.h" -#import "RKErrors.h" -#import "RKObjectUtilities.h" -#import "RKLog.h" +#import +#import +#import +#import +#import +#import // Core Data #ifdef _COREDATADEFINES_H #if __has_include("RKCoreData.h") #define RKCoreDataIncluded -#import "RKEntityMapping.h" -#import "RKConnectionDescription.h" -#import "RKConnectionTestExpectation.h" -#import "RKFetchRequestManagedObjectCache.h" -#import "RKManagedObjectMappingOperationDataSource.h" +#import +#import +#import +#import +#import #endif #endif @@ -152,6 +152,14 @@ + (instancetype)testForMapping:(RKMapping *)mapping sourceObject:(id)sourceObjec return [[self alloc] initWithMapping:mapping sourceObject:sourceObject destinationObject:destinationObject]; } +- (instancetype)init +{ + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"-init is not a valid initializer for the class %@, use designated initilizer -initWithMapping", NSStringFromClass([self class])] + userInfo:nil]; + return [self init]; +} + - (instancetype)initWithMapping:(RKMapping *)mapping sourceObject:(id)sourceObject destinationObject:(id)destinationObject { NSAssert(sourceObject != nil, @"Cannot perform a mapping operation without a sourceObject object"); diff --git a/Code/Testing/RKPropertyMappingTestExpectation.m b/Code/Testing/RKPropertyMappingTestExpectation.m index 8023f57426..342cb40a5b 100644 --- a/Code/Testing/RKPropertyMappingTestExpectation.m +++ b/Code/Testing/RKPropertyMappingTestExpectation.m @@ -18,8 +18,8 @@ // limitations under the License. // -#import "RKPropertyMappingTestExpectation.h" -#import "RKPropertyMapping.h" +#import +#import @interface RKPropertyMappingTestExpectation () @property (nonatomic, copy, readwrite) NSString *sourceKeyPath; diff --git a/Code/Testing/RKTestFactory.m b/Code/Testing/RKTestFactory.m index c3eb6c59e8..0b96883265 100644 --- a/Code/Testing/RKTestFactory.m +++ b/Code/Testing/RKTestFactory.m @@ -18,18 +18,18 @@ // limitations under the License. // -#import "AFHTTPClient.h" -#import "RKTestFactory.h" -#import "RKLog.h" -#import "RKObjectManager.h" -#import "RKPathUtilities.h" -#import "RKMIMETypeSerialization.h" -#import "RKObjectRequestOperation.h" +#import +#import +#import +#import +#import +#import +#import #ifdef _COREDATADEFINES_H #if __has_include("RKCoreData.h") #define RKCoreDataIncluded -#import "RKManagedObjectStore.h" +#import #endif #endif @@ -277,7 +277,7 @@ + (void)tearDown #ifdef RKCoreDataIncluded // Ensure the existing defaultStore is shut down [[NSNotificationCenter defaultCenter] removeObserver:[RKManagedObjectStore defaultStore]]; - + #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wundeclared-selector" if ([[RKManagedObjectStore defaultStore] respondsToSelector:@selector(stopIndexingPersistentStoreManagedObjectContext)]) { diff --git a/Code/Testing/RKTestFixture.m b/Code/Testing/RKTestFixture.m index 920fd6c653..53f44bc0ad 100644 --- a/Code/Testing/RKTestFixture.m +++ b/Code/Testing/RKTestFixture.m @@ -18,10 +18,10 @@ // limitations under the License. // -#import "RKTestFixture.h" -#import "RKLog.h" -#import "RKPathUtilities.h" -#import "RKMIMETypeSerialization.h" +#import +#import +#import +#import static NSBundle *fixtureBundle = nil; diff --git a/Code/Testing/RKTestHelpers.h b/Code/Testing/RKTestHelpers.h index 0c924ce165..bab4e252b4 100644 --- a/Code/Testing/RKTestHelpers.h +++ b/Code/Testing/RKTestHelpers.h @@ -19,7 +19,7 @@ // #import -#import "RKHTTPUtilities.h" +#import #ifdef _COREDATADEFINES_H #if __has_include("RKCoreData.h") diff --git a/Code/Testing/RKTestHelpers.m b/Code/Testing/RKTestHelpers.m index 3884fbafd2..daf7c58e29 100644 --- a/Code/Testing/RKTestHelpers.m +++ b/Code/Testing/RKTestHelpers.m @@ -18,18 +18,18 @@ // limitations under the License. // -#import "RKTestHelpers.h" -#import "RKObjectManager.h" -#import "RKRoute.h" -#import "RKPathUtilities.h" -#import "RKLog.h" -#import "SOCKit.h" -#import "RKRouteSet.h" +#import +#import +#import +#import +#import +#import +#import #ifdef _COREDATADEFINES_H #if __has_include("RKCoreData.h") #define RKCoreDataIncluded -#import "RKManagedObjectRequestOperation.h" +#import #endif #endif @@ -80,7 +80,7 @@ + (void)copyFetchRequestBlocksMatchingPathPattern:(NSString *)pathPattern onObjectManager:(RKObjectManager *)nilOrObjectManager { RKObjectManager *objectManager = nilOrObjectManager ?: [RKObjectManager sharedManager]; - + // Extract the dynamic portions of the path pattern to construct a set of parameters SOCPattern *pattern = [SOCPattern patternWithString:pathPattern]; NSArray *parameterNames = [pattern valueForKeyPath:@"parameters.string"]; @@ -89,7 +89,7 @@ + (void)copyFetchRequestBlocksMatchingPathPattern:(NSString *)pathPattern [stubbedParameters setValue:@"value" forKey:parameter]; } NSString *stubbedPathPattern = [pattern stringFromObject:stubbedParameters]; - + NSURL *URL = [NSURL URLWithString:stubbedPathPattern relativeToURL:objectManager.HTTPClient.baseURL]; NSAssert(URL, @"Failed to build URL from path pattern '%@' relative to base URL '%@'", pathPattern, objectManager.HTTPClient.baseURL); for (RKFetchRequestBlock block in objectManager.fetchRequestBlocks) { @@ -102,10 +102,10 @@ + (void)copyFetchRequestBlocksMatchingPathPattern:(NSString *)pathPattern if ([[URL path] isEqualToString:relativeString]) { return fetchRequest; } - + return nil; }]; - + break; } } @@ -122,16 +122,16 @@ + (NSCachedURLResponse *)cacheResponseForRequest:(NSURLRequest *)request withRes { NSParameterAssert(request); NSParameterAssert(responseData); - + NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:[request URL] statusCode:200 HTTPVersion:@"1.1" headerFields:nil]; NSAssert(response, @"Failed to build cached response"); NSCachedURLResponse *cachedResponse = [[NSCachedURLResponse alloc] initWithResponse:response data:responseData]; [[NSURLCache sharedURLCache] storeCachedResponse:cachedResponse forRequest:request]; - + // Verify that we can get the cached response back NSCachedURLResponse *__unused storedResponse = [[NSURLCache sharedURLCache] cachedResponseForRequest:request]; NSAssert(storedResponse, @"Expected to retrieve cached response for request '%@', instead got nil.", request); - + return cachedResponse; } @@ -140,7 +140,7 @@ + (NSCachedURLResponse *)cacheResponseForURL:(NSURL *)URL HTTPMethod:(NSString * NSParameterAssert(URL); NSParameterAssert(HTTPMethod); NSParameterAssert(responseData); - + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL]; request.HTTPMethod = HTTPMethod; [request setAllHTTPHeaderFields:requestHeaders]; diff --git a/Code/Testing/RKTestNotificationObserver.m b/Code/Testing/RKTestNotificationObserver.m index d5a531ba41..71ea78e343 100644 --- a/Code/Testing/RKTestNotificationObserver.m +++ b/Code/Testing/RKTestNotificationObserver.m @@ -6,7 +6,7 @@ // Copyright (c) 2009-2012 RestKit. All rights reserved. // -#import "RKTestNotificationObserver.h" +#import @interface RKTestNotificationObserver () @property (nonatomic, assign, getter = isObserverAdded) BOOL observerAdded; diff --git a/Docs/MobileTuts Advanced RestKit/Advanced_RestKit_Tutorial.md b/Docs/MobileTuts Advanced RestKit/Advanced_RestKit_Tutorial.md index f3f3e853c8..3790c6fe2b 100644 --- a/Docs/MobileTuts Advanced RestKit/Advanced_RestKit_Tutorial.md +++ b/Docs/MobileTuts Advanced RestKit/Advanced_RestKit_Tutorial.md @@ -717,7 +717,7 @@ We hope that you have found learning about RestKit fun and rewarding. At this po ## Learning More * RestKit: [http://restkit.org]() -* Github: [https://github.com/twotoasters/RestKit]() -* API Docs: [http://restkit.org/api/]() +* Github: [https://github.com/RestKit/RestKit]() +* API Docs: [http://cocoadocs.org/docsets/RestKit/]() * Google Group: [http://groups.google.com/group/restkit]() * Brought to you by Two Toasters: [http://twotoasters.com/]() diff --git a/Docs/MobileTuts Introduction to RestKit/index.html b/Docs/MobileTuts Introduction to RestKit/index.html index d8d1429ebe..a63765795b 100644 --- a/Docs/MobileTuts Introduction to RestKit/index.html +++ b/Docs/MobileTuts Introduction to RestKit/index.html @@ -381,7 +381,7 @@

Learning More

\ No newline at end of file diff --git a/Docs/WRITING_DOCS.md b/Docs/WRITING_DOCS.md index 2314f7799d..10c4721f06 100644 --- a/Docs/WRITING_DOCS.md +++ b/Docs/WRITING_DOCS.md @@ -1,7 +1,7 @@ Writing Documentation ===================== -RestKit utilizes the excellent [Appledoc](http://www.gentlebytes.com/home/appledocapp/) utility from [Gentle Bytes](http://www.gentlebytes.com/). +RestKit utilizes the excellent [Appledoc](http://www.gentlebytes.com/appledoc/) utility from [Gentle Bytes](http://www.gentlebytes.com/). Appledoc provides a commandline utility for parsing and generating documentation from Objective-C code in HTML and DocSet format. This HTML can be published to the Web and installed directly within Xcode. @@ -21,7 +21,7 @@ The tasks available for working with Appledoc are: ## Writing Documentation -Writing documentation in Appledoc markup is simple. There is extensive documentation available on the [Appledoc project page](http://tomaz.github.com/appledoc/comments.html), but +Writing documentation in Appledoc markup is simple. There is extensive documentation available on the [Appledoc project page](https://github.com/tomaz/appledoc), but the guidelines below should be sufficient for basic authoring tasks. For clarity, let's consider the following example class: /** @@ -107,6 +107,6 @@ If you want to contribute documentation, the process is simple: 1. Edit the headers in Code/ and regenerate the docs via `rake docs` 1. Repeat the editing and reload cycle until your are happy. 1. Commit the code and push to Github -1. Submit a Pull Request to the RestKit repository on Github at: https://github.com/RestKit/RestKit/pull/new/master +1. Submit a Pull Request to the RestKit repository on Github at: https://github.com/RestKit/RestKit/compare You may want to coordinate your efforts via the mailing list to ensure nobody else is working on documentation in the same place. diff --git a/Examples/RKMacOSX/Podfile b/Examples/RKMacOSX/Podfile new file mode 100644 index 0000000000..eb9c2b72ff --- /dev/null +++ b/Examples/RKMacOSX/Podfile @@ -0,0 +1,5 @@ +# Install via CocoaPods pointing at current local codebase +use_frameworks! +pod 'RestKit/Network', :path => '../../' +pod 'RestKit/ObjectMapping', :path => '../../' +pod 'RestKit/CoreData', :path => '../../' diff --git a/Examples/RKMacOSX/RKMacOSX.xcodeproj/project.pbxproj b/Examples/RKMacOSX/RKMacOSX.xcodeproj/project.pbxproj index 5f9f7175d0..fb6735df27 100644 --- a/Examples/RKMacOSX/RKMacOSX.xcodeproj/project.pbxproj +++ b/Examples/RKMacOSX/RKMacOSX.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 250DF24F14C67F560001DEFA /* RestKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 250DF24B14C67E9A0001DEFA /* RestKit.framework */; }; 25D63919135184CE000879B1 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 25D63918135184CE000879B1 /* Cocoa.framework */; }; 25D63923135184CE000879B1 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 25D63921135184CE000879B1 /* InfoPlist.strings */; }; 25D63926135184CE000879B1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 25D63925135184CE000879B1 /* main.m */; }; @@ -17,47 +16,11 @@ 25D6397F13518574000879B1 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 25D6397E13518574000879B1 /* CoreData.framework */; }; 25D639811351858A000879B1 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 25D639801351858A000879B1 /* AppKit.framework */; }; 25D63983135185B6000879B1 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 25D63982135185B6000879B1 /* SystemConfiguration.framework */; }; + 71754387C10576ABC5CC4966 /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 148AFEC0CCE8D1725077BDEC /* Pods.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - 250DF24614C67E9A0001DEFA /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 25D63938135184F0000879B1 /* RestKit.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 25160D1614564E810060A5C5; - remoteInfo = RestKit; - }; - 250DF24814C67E9A0001DEFA /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 25D63938135184F0000879B1 /* RestKit.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 25160D2614564E820060A5C5; - remoteInfo = RestKitTests; - }; - 250DF24A14C67E9A0001DEFA /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 25D63938135184F0000879B1 /* RestKit.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 25160E62145651060060A5C5; - remoteInfo = RestKitFramework; - }; - 250DF24C14C67E9A0001DEFA /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 25D63938135184F0000879B1 /* RestKit.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 25160E78145651060060A5C5; - remoteInfo = RestKitFrameworkTests; - }; - 250DF25014C67F630001DEFA /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 25D63938135184F0000879B1 /* RestKit.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 25160E61145651060060A5C5; - remoteInfo = RestKitFramework; - }; -/* End PBXContainerItemProxy section */ - /* Begin PBXFileReference section */ + 148AFEC0CCE8D1725077BDEC /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 25D63914135184CE000879B1 /* RKMacOSX.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RKMacOSX.app; sourceTree = BUILT_PRODUCTS_DIR; }; 25D63918135184CE000879B1 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 25D6391B135184CE000879B1 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; @@ -71,10 +34,11 @@ 25D6392A135184CE000879B1 /* RKMacOSXAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RKMacOSXAppDelegate.h; sourceTree = ""; }; 25D6392B135184CE000879B1 /* RKMacOSXAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RKMacOSXAppDelegate.m; sourceTree = ""; }; 25D6392E135184CF000879B1 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; - 25D63938135184F0000879B1 /* RestKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RestKit.xcodeproj; path = ../../RestKit.xcodeproj; sourceTree = ""; }; 25D6397E13518574000879B1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 25D639801351858A000879B1 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 25D63982135185B6000879B1 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + 663395048EDD9B445E77BF72 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; + CDF0146ADF834F0317B19719 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -82,11 +46,11 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 250DF24F14C67F560001DEFA /* RestKit.framework in Frameworks */, 25D63983135185B6000879B1 /* SystemConfiguration.framework in Frameworks */, 25D639811351858A000879B1 /* AppKit.framework in Frameworks */, 25D6397F13518574000879B1 /* CoreData.framework in Frameworks */, 25D63919135184CE000879B1 /* Cocoa.framework in Frameworks */, + 71754387C10576ABC5CC4966 /* Pods.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -97,11 +61,12 @@ isa = PBXGroup; children = ( 25D6391E135184CE000879B1 /* RKMacOSX */, - 25D639841351868E000879B1 /* RestKit */, 25D63917135184CE000879B1 /* Frameworks */, 25D63915135184CE000879B1 /* Products */, + F73078E151260A102FEB82F9 /* Pods */, ); sourceTree = ""; + usesTabs = 0; }; 25D63915135184CE000879B1 /* Products */ = { isa = PBXGroup; @@ -119,6 +84,7 @@ 25D6397E13518574000879B1 /* CoreData.framework */, 25D63918135184CE000879B1 /* Cocoa.framework */, 25D6391A135184CE000879B1 /* Other Frameworks */, + 148AFEC0CCE8D1725077BDEC /* Pods.framework */, ); name = Frameworks; sourceTree = ""; @@ -156,23 +122,13 @@ name = "Supporting Files"; sourceTree = ""; }; - 25D63939135184F0000879B1 /* Products */ = { - isa = PBXGroup; - children = ( - 250DF24714C67E9A0001DEFA /* libRestKit.a */, - 250DF24914C67E9A0001DEFA /* RestKitTests.xctest */, - 250DF24B14C67E9A0001DEFA /* RestKit.framework */, - 250DF24D14C67E9A0001DEFA /* RestKitFrameworkTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 25D639841351868E000879B1 /* RestKit */ = { + F73078E151260A102FEB82F9 /* Pods */ = { isa = PBXGroup; children = ( - 25D63938135184F0000879B1 /* RestKit.xcodeproj */, + 663395048EDD9B445E77BF72 /* Pods.debug.xcconfig */, + CDF0146ADF834F0317B19719 /* Pods.release.xcconfig */, ); - name = RestKit; + name = Pods; sourceTree = ""; }; /* End PBXGroup section */ @@ -182,14 +138,16 @@ isa = PBXNativeTarget; buildConfigurationList = 25D63935135184CF000879B1 /* Build configuration list for PBXNativeTarget "RKMacOSX" */; buildPhases = ( + 0E7867D148FBAD64B7DE1EB6 /* Check Pods Manifest.lock */, 25D63910135184CE000879B1 /* Sources */, 25D63911135184CE000879B1 /* Frameworks */, 25D63912135184CE000879B1 /* Resources */, + E02916F51F1155DFDAB83400 /* Copy Pods Resources */, + 6CFBD5D31A295A90E94A1A6A /* Embed Pods Frameworks */, ); buildRules = ( ); dependencies = ( - 250DF25114C67F630001DEFA /* PBXTargetDependency */, ); name = RKMacOSX; productName = RKMacOSX; @@ -202,7 +160,7 @@ 25D6390B135184CE000879B1 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0620; + LastUpgradeCheck = 0700; }; buildConfigurationList = 25D6390E135184CE000879B1 /* Build configuration list for PBXProject "RKMacOSX" */; compatibilityVersion = "Xcode 3.2"; @@ -214,12 +172,6 @@ mainGroup = 25D63909135184CE000879B1; productRefGroup = 25D63915135184CE000879B1 /* Products */; projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 25D63939135184F0000879B1 /* Products */; - ProjectRef = 25D63938135184F0000879B1 /* RestKit.xcodeproj */; - }, - ); projectRoot = ""; targets = ( 25D63913135184CE000879B1 /* RKMacOSX */, @@ -227,37 +179,6 @@ }; /* End PBXProject section */ -/* Begin PBXReferenceProxy section */ - 250DF24714C67E9A0001DEFA /* libRestKit.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRestKit.a; - remoteRef = 250DF24614C67E9A0001DEFA /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 250DF24914C67E9A0001DEFA /* RestKitTests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = RestKitTests.xctest; - remoteRef = 250DF24814C67E9A0001DEFA /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 250DF24B14C67E9A0001DEFA /* RestKit.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = RestKit.framework; - remoteRef = 250DF24A14C67E9A0001DEFA /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 250DF24D14C67E9A0001DEFA /* RestKitFrameworkTests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = RestKitFrameworkTests.xctest; - remoteRef = 250DF24C14C67E9A0001DEFA /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - /* Begin PBXResourcesBuildPhase section */ 25D63912135184CE000879B1 /* Resources */ = { isa = PBXResourcesBuildPhase; @@ -271,6 +192,54 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 0E7867D148FBAD64B7DE1EB6 /* Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + 6CFBD5D31A295A90E94A1A6A /* Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + E02916F51F1155DFDAB83400 /* Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 25D63910135184CE000879B1 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -283,14 +252,6 @@ }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXTargetDependency section */ - 250DF25114C67F630001DEFA /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = RestKitFramework; - targetProxy = 250DF25014C67F630001DEFA /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - /* Begin PBXVariantGroup section */ 25D63921135184CE000879B1 /* InfoPlist.strings */ = { isa = PBXVariantGroup; @@ -330,7 +291,9 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; @@ -360,6 +323,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; @@ -375,6 +339,7 @@ }; 25D63936135184CF000879B1 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 663395048EDD9B445E77BF72 /* Pods.debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_ARC = YES; @@ -384,14 +349,9 @@ GCC_ENABLE_OBJC_EXCEPTIONS = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "RKMacOSX/RKMacOSX-Prefix.pch"; - HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/../../Headers\""; INFOPLIST_FILE = "RKMacOSX/RKMacOSX-Info.plist"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)\"", - ); MACOSX_DEPLOYMENT_TARGET = 10.7; - OTHER_LDFLAGS = "-ObjC"; + PRODUCT_BUNDLE_IDENTIFIER = "com.twotoasters.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; @@ -399,6 +359,7 @@ }; 25D63937135184CF000879B1 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = CDF0146ADF834F0317B19719 /* Pods.release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_ARC = YES; @@ -408,14 +369,9 @@ GCC_ENABLE_OBJC_EXCEPTIONS = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "RKMacOSX/RKMacOSX-Prefix.pch"; - HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/../../Headers\""; INFOPLIST_FILE = "RKMacOSX/RKMacOSX-Info.plist"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)\"", - ); MACOSX_DEPLOYMENT_TARGET = 10.7; - OTHER_LDFLAGS = "-ObjC"; + PRODUCT_BUNDLE_IDENTIFIER = "com.twotoasters.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; diff --git a/Examples/RKMacOSX/RKMacOSX/RKMacOSX-Info.plist b/Examples/RKMacOSX/RKMacOSX/RKMacOSX-Info.plist index 6884487220..ba0e84af5c 100644 --- a/Examples/RKMacOSX/RKMacOSX/RKMacOSX-Info.plist +++ b/Examples/RKMacOSX/RKMacOSX/RKMacOSX-Info.plist @@ -9,7 +9,7 @@ CFBundleIconFile CFBundleIdentifier - com.twotoasters.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Examples/RKSearchExample/Podfile b/Examples/RKSearchExample/Podfile new file mode 100644 index 0000000000..8deb679bf0 --- /dev/null +++ b/Examples/RKSearchExample/Podfile @@ -0,0 +1,7 @@ +platform :ios, '8.0' +use_frameworks! + +# Install via CocoaPods pointing at current local codebase +pod 'RestKit/Network', :path => '../../' +pod 'RestKit/ObjectMapping', :path => '../../' +pod 'RestKit/Search', :path => '../../' diff --git a/Examples/RKSearchExample/RKSearchExample.xcodeproj/project.pbxproj b/Examples/RKSearchExample/RKSearchExample.xcodeproj/project.pbxproj index f9ed76f09d..c5fe0c7f67 100644 --- a/Examples/RKSearchExample/RKSearchExample.xcodeproj/project.pbxproj +++ b/Examples/RKSearchExample/RKSearchExample.xcodeproj/project.pbxproj @@ -16,7 +16,6 @@ 259C800B15D20B5600F447D2 /* RKSAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 259C800A15D20B5600F447D2 /* RKSAppDelegate.m */; }; 259C800E15D20B5600F447D2 /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 259C800C15D20B5600F447D2 /* MainStoryboard.storyboard */; }; 259C801115D20B5600F447D2 /* RKSViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 259C801015D20B5600F447D2 /* RKSViewController.m */; }; - 259C802E15D20BAA00F447D2 /* libRestKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 259C802315D20B7100F447D2 /* libRestKit.a */; }; 259C803415D20BAA00F447D2 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 259C802F15D20BAA00F447D2 /* CFNetwork.framework */; }; 259C803515D20BAA00F447D2 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 259C803015D20BAA00F447D2 /* CoreData.framework */; }; 259C803615D20BAA00F447D2 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 259C803115D20BAA00F447D2 /* QuartzCore.framework */; }; @@ -26,46 +25,9 @@ 259C803C15D20C4000F447D2 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 259C803B15D20C4000F447D2 /* libxml2.dylib */; }; 25AA7D1415D4C3A700A1B4E7 /* RKSearchExampleModel.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 25AA7D1215D4C3A700A1B4E7 /* RKSearchExampleModel.xcdatamodeld */; }; 25AABCF017B69B590061DC5B /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 25AABCEF17B69B590061DC5B /* Default-568h@2x.png */; }; + 45F73EB9D2311FFAF6C1338B /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F88520F4AEA4E5CA9B38E99 /* Pods.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - 259C802215D20B7100F447D2 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 259C801715D20B7100F447D2 /* RestKit.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 25160D1614564E810060A5C5; - remoteInfo = RestKit; - }; - 259C802415D20B7100F447D2 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 259C801715D20B7100F447D2 /* RestKit.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 25160D2614564E820060A5C5; - remoteInfo = RestKitTests; - }; - 259C802615D20B7100F447D2 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 259C801715D20B7100F447D2 /* RestKit.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 25160E62145651060060A5C5; - remoteInfo = RestKitFramework; - }; - 259C802815D20B7100F447D2 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 259C801715D20B7100F447D2 /* RestKit.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 25160E78145651060060A5C5; - remoteInfo = RestKitFrameworkTests; - }; - 259C802C15D20B7B00F447D2 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 259C801715D20B7100F447D2 /* RestKit.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 25160D1514564E810060A5C5; - remoteInfo = RestKit; - }; -/* End PBXContainerItemProxy section */ - /* Begin PBXFileReference section */ 2583C49B15D96D4000E05CAE /* contacts.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = contacts.json; sourceTree = ""; }; 259C7FF615D20B5600F447D2 /* RKSearchExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RKSearchExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -81,7 +43,6 @@ 259C800D15D20B5600F447D2 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard.storyboard; sourceTree = ""; }; 259C800F15D20B5600F447D2 /* RKSViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RKSViewController.h; sourceTree = ""; }; 259C801015D20B5600F447D2 /* RKSViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RKSViewController.m; sourceTree = ""; }; - 259C801715D20B7100F447D2 /* RestKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RestKit.xcodeproj; path = ../../RestKit.xcodeproj; sourceTree = ""; }; 259C802F15D20BAA00F447D2 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; 259C803015D20BAA00F447D2 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 259C803115D20BAA00F447D2 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; @@ -91,6 +52,9 @@ 259C803B15D20C4000F447D2 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; 25AA7D1315D4C3A700A1B4E7 /* RKSearchExampleModel.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = RKSearchExampleModel.xcdatamodel; sourceTree = ""; }; 25AABCEF17B69B590061DC5B /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + 4839D63C1F0B427271E84C9B /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; + 5F88520F4AEA4E5CA9B38E99 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 97374605117FDAA6FDA05691 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -105,10 +69,10 @@ 259C803615D20BAA00F447D2 /* QuartzCore.framework in Frameworks */, 259C803715D20BAA00F447D2 /* Security.framework in Frameworks */, 259C803815D20BAA00F447D2 /* SystemConfiguration.framework in Frameworks */, - 259C802E15D20BAA00F447D2 /* libRestKit.a in Frameworks */, 259C7FFF15D20B5600F447D2 /* CoreGraphics.framework in Frameworks */, 259C7FFB15D20B5600F447D2 /* UIKit.framework in Frameworks */, 259C7FFD15D20B5600F447D2 /* Foundation.framework in Frameworks */, + 45F73EB9D2311FFAF6C1338B /* Pods.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -122,9 +86,10 @@ 259C800015D20B5600F447D2 /* RKSearchExample */, 259C7FF915D20B5600F447D2 /* Frameworks */, 259C7FF715D20B5600F447D2 /* Products */, - 259C801715D20B7100F447D2 /* RestKit.xcodeproj */, + 8045C6A1DC1A7B372A75E95F /* Pods */, ); sourceTree = ""; + usesTabs = 0; }; 259C7FF715D20B5600F447D2 /* Products */ = { isa = PBXGroup; @@ -147,6 +112,7 @@ 259C7FFA15D20B5600F447D2 /* UIKit.framework */, 259C7FFC15D20B5600F447D2 /* Foundation.framework */, 259C7FFE15D20B5600F447D2 /* CoreGraphics.framework */, + 5F88520F4AEA4E5CA9B38E99 /* Pods.framework */, ); name = Frameworks; sourceTree = ""; @@ -177,15 +143,13 @@ name = "Supporting Files"; sourceTree = ""; }; - 259C801815D20B7100F447D2 /* Products */ = { + 8045C6A1DC1A7B372A75E95F /* Pods */ = { isa = PBXGroup; children = ( - 259C802315D20B7100F447D2 /* libRestKit.a */, - 259C802515D20B7100F447D2 /* RestKitTests.octest */, - 259C802715D20B7100F447D2 /* RestKit.framework */, - 259C802915D20B7100F447D2 /* RestKitFrameworkTests.octest */, + 97374605117FDAA6FDA05691 /* Pods.debug.xcconfig */, + 4839D63C1F0B427271E84C9B /* Pods.release.xcconfig */, ); - name = Products; + name = Pods; sourceTree = ""; }; /* End PBXGroup section */ @@ -195,14 +159,16 @@ isa = PBXNativeTarget; buildConfigurationList = 259C801415D20B5600F447D2 /* Build configuration list for PBXNativeTarget "RKSearchExample" */; buildPhases = ( + 647A518E7D82E5FBFCACA0DF /* Check Pods Manifest.lock */, 259C7FF215D20B5600F447D2 /* Sources */, 259C7FF315D20B5600F447D2 /* Frameworks */, 259C7FF415D20B5600F447D2 /* Resources */, + 64884B0BE0AA32A1480DCC81 /* Embed Pods Frameworks */, + 750345EDEDC2028EA5111217 /* Copy Pods Resources */, ); buildRules = ( ); dependencies = ( - 259C802D15D20B7B00F447D2 /* PBXTargetDependency */, ); name = RKSearchExample; productName = RKSearchExample; @@ -216,7 +182,7 @@ isa = PBXProject; attributes = { CLASSPREFIX = RKS; - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0700; ORGANIZATIONNAME = "Blake Watters"; }; buildConfigurationList = 259C7FF015D20B5600F447D2 /* Build configuration list for PBXProject "RKSearchExample" */; @@ -229,12 +195,6 @@ mainGroup = 259C7FEB15D20B5600F447D2; productRefGroup = 259C7FF715D20B5600F447D2 /* Products */; projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 259C801815D20B7100F447D2 /* Products */; - ProjectRef = 259C801715D20B7100F447D2 /* RestKit.xcodeproj */; - }, - ); projectRoot = ""; targets = ( 259C7FF515D20B5600F447D2 /* RKSearchExample */, @@ -242,37 +202,6 @@ }; /* End PBXProject section */ -/* Begin PBXReferenceProxy section */ - 259C802315D20B7100F447D2 /* libRestKit.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRestKit.a; - remoteRef = 259C802215D20B7100F447D2 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 259C802515D20B7100F447D2 /* RestKitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = RestKitTests.octest; - remoteRef = 259C802415D20B7100F447D2 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 259C802715D20B7100F447D2 /* RestKit.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = RestKit.framework; - remoteRef = 259C802615D20B7100F447D2 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 259C802915D20B7100F447D2 /* RestKitFrameworkTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = RestKitFrameworkTests.octest; - remoteRef = 259C802815D20B7100F447D2 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - /* Begin PBXResourcesBuildPhase section */ 259C7FF415D20B5600F447D2 /* Resources */ = { isa = PBXResourcesBuildPhase; @@ -287,6 +216,54 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 647A518E7D82E5FBFCACA0DF /* Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + 64884B0BE0AA32A1480DCC81 /* Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 750345EDEDC2028EA5111217 /* Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 259C7FF215D20B5600F447D2 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -301,14 +278,6 @@ }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXTargetDependency section */ - 259C802D15D20B7B00F447D2 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = RestKit; - targetProxy = 259C802C15D20B7B00F447D2 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - /* Begin PBXVariantGroup section */ 259C800315D20B5600F447D2 /* InfoPlist.strings */ = { isa = PBXVariantGroup; @@ -332,13 +301,13 @@ 259C801215D20B5600F447D2 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; @@ -359,7 +328,6 @@ 259C801315D20B5600F447D2 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_OBJC_ARC = YES; @@ -379,16 +347,13 @@ }; 259C801515D20B5600F447D2 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 97374605117FDAA6FDA05691 /* Pods.debug.xcconfig */; buildSettings = { GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "RKSearchExample/RKSearchExample-Prefix.pch"; - HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/../../Headers\""; INFOPLIST_FILE = "RKSearchExample/RKSearchExample-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_LDFLAGS = ( - "-ObjC", - "-all_load", - ); + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + PRODUCT_BUNDLE_IDENTIFIER = "org.restkit.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; @@ -396,16 +361,13 @@ }; 259C801615D20B5600F447D2 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 4839D63C1F0B427271E84C9B /* Pods.release.xcconfig */; buildSettings = { GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "RKSearchExample/RKSearchExample-Prefix.pch"; - HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/../../Headers\""; INFOPLIST_FILE = "RKSearchExample/RKSearchExample-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_LDFLAGS = ( - "-ObjC", - "-all_load", - ); + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + PRODUCT_BUNDLE_IDENTIFIER = "org.restkit.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; diff --git a/Examples/RKSearchExample/RKSearchExample/RKSAppDelegate.h b/Examples/RKSearchExample/RKSearchExample/RKSAppDelegate.h index aa9dcd696d..5bfbead775 100644 --- a/Examples/RKSearchExample/RKSearchExample/RKSAppDelegate.h +++ b/Examples/RKSearchExample/RKSearchExample/RKSAppDelegate.h @@ -6,8 +6,8 @@ // Copyright (c) 2012 Blake Watters. All rights reserved. // -#import #import +#import @interface RKSAppDelegate : UIResponder diff --git a/Examples/RKSearchExample/RKSearchExample/RKSearchExample-Info.plist b/Examples/RKSearchExample/RKSearchExample/RKSearchExample-Info.plist index e6d3e99f87..8a34c1e729 100644 --- a/Examples/RKSearchExample/RKSearchExample/RKSearchExample-Info.plist +++ b/Examples/RKSearchExample/RKSearchExample/RKSearchExample-Info.plist @@ -9,7 +9,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - org.restkit.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Examples/RKTwitter/Classes/RKTwitterViewController.h b/Examples/RKTwitter/Classes/RKTwitterViewController.h index 64fa598104..1a8e2cf732 100644 --- a/Examples/RKTwitter/Classes/RKTwitterViewController.h +++ b/Examples/RKTwitter/Classes/RKTwitterViewController.h @@ -6,8 +6,8 @@ // Copyright (c) 2009-2012 RestKit. All rights reserved. // -#import #import +#import @interface RKTwitterViewController : UIViewController { UITableView *_tableView; diff --git a/Examples/RKTwitter/Podfile b/Examples/RKTwitter/Podfile index ff8da2784e..d48f0d84d2 100644 --- a/Examples/RKTwitter/Podfile +++ b/Examples/RKTwitter/Podfile @@ -1,7 +1,6 @@ -platform :ios, '6.0' +platform :ios, '8.0' +use_frameworks! # Install via CocoaPods pointing at current local codebase -target 'RKTwitterCocoaPods' do - pod 'RestKit/Network', :path => '../../' - pod 'RestKit/ObjectMapping', :path => '../../' -end +pod 'RestKit/Network', :path => '../../' +pod 'RestKit/ObjectMapping', :path => '../../' diff --git a/Examples/RKTwitter/RKTwitter.xcodeproj/project.pbxproj b/Examples/RKTwitter/RKTwitter.xcodeproj/project.pbxproj index 18dbabeb9e..0c69e0326e 100755 --- a/Examples/RKTwitter/RKTwitter.xcodeproj/project.pbxproj +++ b/Examples/RKTwitter/RKTwitter.xcodeproj/project.pbxproj @@ -7,18 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 001D8303A88B451D830741B8 /* libPods-RKTwitterCocoaPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7666CC5642F94148AF23256A /* libPods-RKTwitterCocoaPods.a */; }; - 1D3623260D0F684500981E51 /* RKTwitterAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* RKTwitterAppDelegate.m */; }; - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 25063C9116021B16007CAC2B /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 25063C9016021B16007CAC2B /* Default-568h@2x.png */; }; - 250CA69A147D8FCC0047D347 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 250CA699147D8FCC0047D347 /* Security.framework */; }; - 250CA69B147D8FD30047D347 /* libRestKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 25160FB31456E8A30060A5C5 /* libRestKit.a */; }; - 250CA69C147D8FFD0047D347 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2538E864123424F000ACB5D7 /* CoreData.framework */; }; - 2538E811123419CA00ACB5D7 /* RKTUser.m in Sources */ = {isa = PBXBuildFile; fileRef = 2538E810123419CA00ACB5D7 /* RKTUser.m */; }; - 2538E814123419EC00ACB5D7 /* RKTweet.m in Sources */ = {isa = PBXBuildFile; fileRef = 2538E813123419EC00ACB5D7 /* RKTweet.m */; }; - 2538E8671234250100ACB5D7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2538E8661234250100ACB5D7 /* SystemConfiguration.framework */; }; 25AABCF817B69CC50061DC5B /* listbg.png in Resources */ = {isa = PBXBuildFile; fileRef = 3F3CE3FA125B9A6E0083FDCB /* listbg.png */; }; 25AABCF917B69CC50061DC5B /* listbg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3F3CE3FB125B9A6E0083FDCB /* listbg@2x.png */; }; 25AABCFA17B69CC50061DC5B /* BG.png in Resources */ = {isa = PBXBuildFile; fileRef = 3F3CE40A125B9B450083FDCB /* BG.png */; }; @@ -35,74 +23,15 @@ 25AABD0B17B69CC50061DC5B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 25AABD0C17B69CC50061DC5B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 25AABD0D17B69CC50061DC5B /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; - 25BE936614F96729008BC1C0 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 25BE936514F96729008BC1C0 /* QuartzCore.framework */; }; - 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; - 28D7ACF80DDB3853001CB0EB /* RKTwitterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* RKTwitterViewController.m */; }; - 3F02F592131D683A004E1F54 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 3F02F591131D683A004E1F54 /* libxml2.dylib */; }; - 3F3CE3FC125B9A6E0083FDCB /* listbg.png in Resources */ = {isa = PBXBuildFile; fileRef = 3F3CE3FA125B9A6E0083FDCB /* listbg.png */; }; - 3F3CE3FD125B9A6E0083FDCB /* listbg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3F3CE3FB125B9A6E0083FDCB /* listbg@2x.png */; }; - 3F3CE40E125B9B450083FDCB /* BG.png in Resources */ = {isa = PBXBuildFile; fileRef = 3F3CE40A125B9B450083FDCB /* BG.png */; }; - 3F3CE40F125B9B450083FDCB /* BG@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3F3CE40B125B9B450083FDCB /* BG@2x.png */; }; - 3F3CE410125B9B450083FDCB /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 3F3CE40C125B9B450083FDCB /* Default.png */; }; - 3F3CE411125B9B450083FDCB /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3F3CE40D125B9B450083FDCB /* Default@2x.png */; }; - 84F524C212824D5000C370EA /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84F524C112824D5000C370EA /* CFNetwork.framework */; }; - 84F524C612824D5B00C370EA /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84F524C512824D5B00C370EA /* MobileCoreServices.framework */; }; + 73D990C2D2D5A068521FACEF /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F0C5817426474EE329BB79E2 /* Pods.framework */; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - 250AC4BA1358C7A8006F084F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 250AC48A1358C79C006F084F /* RestKit.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 25160D1514564E810060A5C5; - remoteInfo = RestKit; - }; - 25160FB21456E8A30060A5C5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 250AC48A1358C79C006F084F /* RestKit.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 25160D1614564E810060A5C5; - remoteInfo = RestKit; - }; - 25160FB41456E8A30060A5C5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 250AC48A1358C79C006F084F /* RestKit.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 25160D2614564E820060A5C5; - remoteInfo = RestKitTests; - }; - 25160FB61456E8A30060A5C5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 250AC48A1358C79C006F084F /* RestKit.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 25160E62145651060060A5C5; - remoteInfo = RestKitFramework; - }; - 25160FB81456E8A30060A5C5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 250AC48A1358C79C006F084F /* RestKit.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 25160E78145651060060A5C5; - remoteInfo = RestKitFrameworkTests; - }; - 25AABCF617B69CC50061DC5B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 250AC48A1358C79C006F084F /* RestKit.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 25160D1514564E810060A5C5; - remoteInfo = RestKit; - }; -/* End PBXContainerItemProxy section */ - /* Begin PBXFileReference section */ - 1BBF770CA495AD12361E6DA5 /* Pods-RKTwitterCocoaPods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RKTwitterCocoaPods.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RKTwitterCocoaPods/Pods-RKTwitterCocoaPods.debug.xcconfig"; sourceTree = ""; }; 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 1D3623240D0F684500981E51 /* RKTwitterAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKTwitterAppDelegate.h; sourceTree = ""; }; 1D3623250D0F684500981E51 /* RKTwitterAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKTwitterAppDelegate.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* RKTwitter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RKTwitter.app; sourceTree = BUILT_PRODUCTS_DIR; }; 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 25063C9016021B16007CAC2B /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; - 250AC48A1358C79C006F084F /* RestKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RestKit.xcodeproj; path = ../../RestKit.xcodeproj; sourceTree = ""; }; 250CA699147D8FCC0047D347 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; 2538E80F123419CA00ACB5D7 /* RKTUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKTUser.h; sourceTree = ""; }; 2538E810123419CA00ACB5D7 /* RKTUser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKTUser.m; sourceTree = ""; }; @@ -110,12 +39,13 @@ 2538E813123419EC00ACB5D7 /* RKTweet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKTweet.m; sourceTree = ""; }; 2538E864123424F000ACB5D7 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 2538E8661234250100ACB5D7 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; - 25AABD1417B69CC50061DC5B /* RKTwitter copy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "RKTwitter copy.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 25AABD1417B69CC50061DC5B /* RKTwitter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RKTwitter.app; sourceTree = BUILT_PRODUCTS_DIR; }; 25BE936514F96729008BC1C0 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 28D7ACF60DDB3853001CB0EB /* RKTwitterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKTwitterViewController.h; sourceTree = ""; }; 28D7ACF70DDB3853001CB0EB /* RKTwitterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKTwitterViewController.m; sourceTree = ""; }; 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 2C4E0FC1267B5DE1E5594342 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; 32CA4F630368D1EE00C91783 /* RKTwitter_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKTwitter_Prefix.pch; sourceTree = ""; }; 3F02F591131D683A004E1F54 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; 3F3CE3FA125B9A6E0083FDCB /* listbg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = listbg.png; sourceTree = ""; }; @@ -124,32 +54,14 @@ 3F3CE40B125B9B450083FDCB /* BG@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "BG@2x.png"; sourceTree = ""; }; 3F3CE40C125B9B450083FDCB /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; 3F3CE40D125B9B450083FDCB /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; - 7666CC5642F94148AF23256A /* libPods-RKTwitterCocoaPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RKTwitterCocoaPods.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 84F524C112824D5000C370EA /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; 84F524C512824D5B00C370EA /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; 8D1107310486CEB800E47090 /* RKTwitter-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "RKTwitter-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; - EC32B4B0491C719850D46F92 /* Pods-RKTwitterCocoaPods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RKTwitterCocoaPods.release.xcconfig"; path = "Pods/Target Support Files/Pods-RKTwitterCocoaPods/Pods-RKTwitterCocoaPods.release.xcconfig"; sourceTree = ""; }; + 9459B171A0B89699CB1F7ECC /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; + F0C5817426474EE329BB79E2 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 25BE936614F96729008BC1C0 /* QuartzCore.framework in Frameworks */, - 250CA69C147D8FFD0047D347 /* CoreData.framework in Frameworks */, - 250CA69B147D8FD30047D347 /* libRestKit.a in Frameworks */, - 250CA69A147D8FCC0047D347 /* Security.framework in Frameworks */, - 3F02F592131D683A004E1F54 /* libxml2.dylib in Frameworks */, - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, - 2538E8671234250100ACB5D7 /* SystemConfiguration.framework in Frameworks */, - 84F524C212824D5000C370EA /* CFNetwork.framework in Frameworks */, - 84F524C612824D5B00C370EA /* MobileCoreServices.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 25AABD0517B69CC50061DC5B /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -158,7 +70,7 @@ 25AABD0B17B69CC50061DC5B /* Foundation.framework in Frameworks */, 25AABD0C17B69CC50061DC5B /* UIKit.framework in Frameworks */, 25AABD0D17B69CC50061DC5B /* CoreGraphics.framework in Frameworks */, - 001D8303A88B451D830741B8 /* libPods-RKTwitterCocoaPods.a in Frameworks */, + 73D990C2D2D5A068521FACEF /* Pods.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -183,19 +95,7 @@ 19C28FACFE9D520D11CA2CBB /* Products */ = { isa = PBXGroup; children = ( - 1D6058910D05DD3D006BFB54 /* RKTwitter.app */, - 25AABD1417B69CC50061DC5B /* RKTwitter copy.app */, - ); - name = Products; - sourceTree = ""; - }; - 250AC48B1358C79C006F084F /* Products */ = { - isa = PBXGroup; - children = ( - 25160FB31456E8A30060A5C5 /* libRestKit.a */, - 25160FB51456E8A30060A5C5 /* RestKitTests.octest */, - 25160FB71456E8A30060A5C5 /* RestKit.framework */, - 25160FB91456E8A30060A5C5 /* RestKitFrameworkTests.octest */, + 25AABD1417B69CC50061DC5B /* RKTwitter.app */, ); name = Products; sourceTree = ""; @@ -204,7 +104,6 @@ isa = PBXGroup; children = ( 25063C9016021B16007CAC2B /* Default-568h@2x.png */, - 250AC48A1358C79C006F084F /* RestKit.xcodeproj */, 080E96DDFE201D6D7F000001 /* Classes */, 29B97315FDCFA39411CA2CEA /* Other Sources */, 29B97317FDCFA39411CA2CEA /* Resources */, @@ -214,6 +113,7 @@ ); name = CustomTemplate; sourceTree = ""; + usesTabs = 0; }; 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; @@ -251,7 +151,7 @@ 2538E8661234250100ACB5D7 /* SystemConfiguration.framework */, 84F524C112824D5000C370EA /* CFNetwork.framework */, 84F524C512824D5B00C370EA /* MobileCoreServices.framework */, - 7666CC5642F94148AF23256A /* libPods-RKTwitterCocoaPods.a */, + F0C5817426474EE329BB79E2 /* Pods.framework */, ); name = Frameworks; sourceTree = ""; @@ -259,8 +159,8 @@ A54F9C18924391E57B4EFF4D /* Pods */ = { isa = PBXGroup; children = ( - 1BBF770CA495AD12361E6DA5 /* Pods-RKTwitterCocoaPods.debug.xcconfig */, - EC32B4B0491C719850D46F92 /* Pods-RKTwitterCocoaPods.release.xcconfig */, + 9459B171A0B89699CB1F7ECC /* Pods.debug.xcconfig */, + 2C4E0FC1267B5DE1E5594342 /* Pods.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -268,42 +168,24 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* RKTwitter */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "RKTwitter" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 250AC4BB1358C7A8006F084F /* PBXTargetDependency */, - ); - name = RKTwitter; - productName = RKTwitter; - productReference = 1D6058910D05DD3D006BFB54 /* RKTwitter.app */; - productType = "com.apple.product-type.application"; - }; - 25AABCF417B69CC50061DC5B /* RKTwitterCocoaPods */ = { + 25AABCF417B69CC50061DC5B /* RKTwitter */ = { isa = PBXNativeTarget; - buildConfigurationList = 25AABD1117B69CC50061DC5B /* Build configuration list for PBXNativeTarget "RKTwitterCocoaPods" */; + buildConfigurationList = 25AABD1117B69CC50061DC5B /* Build configuration list for PBXNativeTarget "RKTwitter" */; buildPhases = ( B2D422E3401D465BACF8687A /* Check Pods Manifest.lock */, 25AABCF717B69CC50061DC5B /* Resources */, 25AABCFF17B69CC50061DC5B /* Sources */, 25AABD0517B69CC50061DC5B /* Frameworks */, BA14B331096F49758212B549 /* Copy Pods Resources */, + B73887517504A74F7323976B /* Embed Pods Frameworks */, ); buildRules = ( ); dependencies = ( - 25AABCF517B69CC50061DC5B /* PBXTargetDependency */, ); - name = RKTwitterCocoaPods; + name = RKTwitter; productName = RKTwitter; - productReference = 25AABD1417B69CC50061DC5B /* RKTwitter copy.app */; + productReference = 25AABD1417B69CC50061DC5B /* RKTwitter.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -312,7 +194,7 @@ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0700; }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "RKTwitter" */; compatibilityVersion = "Xcode 3.2"; @@ -326,66 +208,14 @@ ); mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 250AC48B1358C79C006F084F /* Products */; - ProjectRef = 250AC48A1358C79C006F084F /* RestKit.xcodeproj */; - }, - ); projectRoot = ""; targets = ( - 1D6058900D05DD3D006BFB54 /* RKTwitter */, - 25AABCF417B69CC50061DC5B /* RKTwitterCocoaPods */, + 25AABCF417B69CC50061DC5B /* RKTwitter */, ); }; /* End PBXProject section */ -/* Begin PBXReferenceProxy section */ - 25160FB31456E8A30060A5C5 /* libRestKit.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRestKit.a; - remoteRef = 25160FB21456E8A30060A5C5 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 25160FB51456E8A30060A5C5 /* RestKitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = RestKitTests.xctest; - remoteRef = 25160FB41456E8A30060A5C5 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 25160FB71456E8A30060A5C5 /* RestKit.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = RestKit.framework; - remoteRef = 25160FB61456E8A30060A5C5 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 25160FB91456E8A30060A5C5 /* RestKitFrameworkTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = RestKitFrameworkTests.xctest; - remoteRef = 25160FB81456E8A30060A5C5 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - /* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 3F3CE3FC125B9A6E0083FDCB /* listbg.png in Resources */, - 3F3CE3FD125B9A6E0083FDCB /* listbg@2x.png in Resources */, - 3F3CE40E125B9B450083FDCB /* BG.png in Resources */, - 3F3CE40F125B9B450083FDCB /* BG@2x.png in Resources */, - 3F3CE410125B9B450083FDCB /* Default.png in Resources */, - 3F3CE411125B9B450083FDCB /* Default@2x.png in Resources */, - 25063C9116021B16007CAC2B /* Default-568h@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 25AABCF717B69CC50061DC5B /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -418,36 +248,39 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - BA14B331096F49758212B549 /* Copy Pods Resources */ = { + B73887517504A74F7323976B /* Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Copy Pods Resources"; + name = "Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RKTwitterCocoaPods/Pods-RKTwitterCocoaPods-resources.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; + BA14B331096F49758212B549 /* Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 1D3623260D0F684500981E51 /* RKTwitterAppDelegate.m in Sources */, - 28D7ACF80DDB3853001CB0EB /* RKTwitterViewController.m in Sources */, - 2538E811123419CA00ACB5D7 /* RKTUser.m in Sources */, - 2538E814123419EC00ACB5D7 /* RKTweet.m in Sources */, + ); + inputPaths = ( + ); + name = "Copy Pods Resources"; + outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; + showEnvVarsInLog = 0; }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ 25AABCFF17B69CC50061DC5B /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -462,59 +295,10 @@ }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXTargetDependency section */ - 250AC4BB1358C7A8006F084F /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = RestKit; - targetProxy = 250AC4BA1358C7A8006F084F /* PBXContainerItemProxy */; - }; - 25AABCF517B69CC50061DC5B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = RestKit; - targetProxy = 25AABCF617B69CC50061DC5B /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - /* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUILD_STYLE = Debug; - CLANG_ENABLE_OBJC_ARC = YES; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = RKTwitter_Prefix.pch; - HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/../../Headers\""; - INFOPLIST_FILE = "Resources/RKTwitter-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; - ONLY_ACTIVE_ARCH = YES; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = RKTwitter; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUILD_STYLE = Release; - CLANG_ENABLE_OBJC_ARC = YES; - COPY_PHASE_STRIP = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = RKTwitter_Prefix.pch; - HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/../../Headers\""; - INFOPLIST_FILE = "Resources/RKTwitter-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = RKTwitter; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; 25AABD1217B69CC50061DC5B /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1BBF770CA495AD12361E6DA5 /* Pods-RKTwitterCocoaPods.debug.xcconfig */; + baseConfigurationReference = 9459B171A0B89699CB1F7ECC /* Pods.debug.xcconfig */; buildSettings = { BUILD_STYLE = Debug; CLANG_ENABLE_OBJC_ARC = YES; @@ -524,15 +308,16 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = RKTwitter_Prefix.pch; INFOPLIST_FILE = "Resources/RKTwitter-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "RKTwitter copy"; + PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.RKTwitter; + PRODUCT_NAME = RKTwitter; }; name = Debug; }; 25AABD1317B69CC50061DC5B /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = EC32B4B0491C719850D46F92 /* Pods-RKTwitterCocoaPods.release.xcconfig */; + baseConfigurationReference = 2C4E0FC1267B5DE1E5594342 /* Pods.release.xcconfig */; buildSettings = { BUILD_STYLE = Release; CLANG_ENABLE_OBJC_ARC = YES; @@ -540,8 +325,9 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = RKTwitter_Prefix.pch; INFOPLIST_FILE = "Resources/RKTwitter-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; - PRODUCT_NAME = "RKTwitter copy"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.RKTwitter; + PRODUCT_NAME = RKTwitter; VALIDATE_PRODUCT = YES; }; name = Release; @@ -551,6 +337,7 @@ buildSettings = { BUILD_STYLE = Debug; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_TESTABILITY = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; @@ -573,16 +360,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "RKTwitter" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 25AABD1117B69CC50061DC5B /* Build configuration list for PBXNativeTarget "RKTwitterCocoaPods" */ = { + 25AABD1117B69CC50061DC5B /* Build configuration list for PBXNativeTarget "RKTwitter" */ = { isa = XCConfigurationList; buildConfigurations = ( 25AABD1217B69CC50061DC5B /* Debug */, diff --git a/Examples/RKTwitter/RKTwitter.xcworkspace/xcshareddata/xcschemes/RKTwitterCocoaPods.xcscheme b/Examples/RKTwitter/RKTwitter.xcodeproj/xcshareddata/xcschemes/RKTwitter.xcscheme similarity index 79% rename from Examples/RKTwitter/RKTwitter.xcworkspace/xcshareddata/xcschemes/RKTwitterCocoaPods.xcscheme rename to Examples/RKTwitter/RKTwitter.xcodeproj/xcshareddata/xcschemes/RKTwitter.xcscheme index 0efc43b842..2480cf7a25 100644 --- a/Examples/RKTwitter/RKTwitter.xcworkspace/xcshareddata/xcschemes/RKTwitterCocoaPods.xcscheme +++ b/Examples/RKTwitter/RKTwitter.xcodeproj/xcshareddata/xcschemes/RKTwitter.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> + + - + @@ -61,17 +65,18 @@ - + diff --git a/Examples/RKTwitter/RKTwitter.xcworkspace/contents.xcworkspacedata b/Examples/RKTwitter/RKTwitter.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1ed22467a5..0000000000 --- a/Examples/RKTwitter/RKTwitter.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/Examples/RKTwitter/Resources/RKTwitter-Info.plist b/Examples/RKTwitter/Resources/RKTwitter-Info.plist index 15665856b0..8cd6b8ca0c 100644 --- a/Examples/RKTwitter/Resources/RKTwitter-Info.plist +++ b/Examples/RKTwitter/Resources/RKTwitter-Info.plist @@ -11,7 +11,7 @@ CFBundleIconFile CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Examples/RKTwitterCoreData/Podfile b/Examples/RKTwitterCoreData/Podfile new file mode 100644 index 0000000000..ed20a7af61 --- /dev/null +++ b/Examples/RKTwitterCoreData/Podfile @@ -0,0 +1,9 @@ +platform :ios, '8.0' +use_frameworks! + +link_with 'RKTwitterCoreData', 'Generate Seed Database' + +# Install via CocoaPods pointing at current local codebase +pod 'RestKit/Network', :path => '../../' +pod 'RestKit/ObjectMapping', :path => '../../' +pod 'RestKit/CoreData', :path => '../../' diff --git a/Examples/RKTwitterCoreData/RKTwitterCoreData.xcodeproj/project.pbxproj b/Examples/RKTwitterCoreData/RKTwitterCoreData.xcodeproj/project.pbxproj index 94d6420875..4798afb517 100755 --- a/Examples/RKTwitterCoreData/RKTwitterCoreData.xcodeproj/project.pbxproj +++ b/Examples/RKTwitterCoreData/RKTwitterCoreData.xcodeproj/project.pbxproj @@ -12,9 +12,7 @@ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 25014071153706FD004E0466 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 250CA6CF147D90C50047D347 /* Security.framework */; }; - 25014085153707CB004E0466 /* libRestKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 250CA6C6147D90A50047D347 /* libRestKit.a */; }; 25014086153707E2004E0466 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD39C14D14EEED8700E84874 /* QuartzCore.framework */; }; - 250CA6CE147D90BA0047D347 /* libRestKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 250CA6C6147D90A50047D347 /* libRestKit.a */; }; 250CA6D0147D90C50047D347 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 250CA6CF147D90C50047D347 /* Security.framework */; }; 252E157D16397DCA000B729E /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2536AF3B16397A0200AD803D /* MainStoryboard.storyboard */; }; 2536AF3C16397A0200AD803D /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2536AF3B16397A0200AD803D /* MainStoryboard.storyboard */; }; @@ -55,54 +53,13 @@ 3FB46641131D78A400E37C51 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 3FB46640131D78A400E37C51 /* libxml2.dylib */; }; 8452D3F9128244D90069F4A9 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8452D3F8128244D90069F4A9 /* CFNetwork.framework */; }; 8452D3FD128244E60069F4A9 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8452D3FC128244E60069F4A9 /* MobileCoreServices.framework */; }; + 91E489421B66047A004B5AB5 /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A0702A131DA8B31559EADB35 /* Pods.framework */; }; + 91E489431B6604A9004B5AB5 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 3FB46640131D78A400E37C51 /* libxml2.dylib */; }; + 91E489461B660547004B5AB5 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 259D0FC318076E40007C66D6 /* Default-568h@2x.png */; }; + A4AAAC70510CB014ED4378BD /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A0702A131DA8B31559EADB35 /* Pods.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; CD39C14E14EEED8700E84874 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD39C14D14EEED8700E84874 /* QuartzCore.framework */; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - 250CA6C5147D90A50047D347 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 2538E7FF123417E500ACB5D7 /* RestKit.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 25160D1614564E810060A5C5; - remoteInfo = RestKit; - }; - 250CA6C7147D90A50047D347 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 2538E7FF123417E500ACB5D7 /* RestKit.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 25160D2614564E820060A5C5; - remoteInfo = RestKitTests; - }; - 250CA6C9147D90A50047D347 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 2538E7FF123417E500ACB5D7 /* RestKit.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 25160E62145651060060A5C5; - remoteInfo = RestKitFramework; - }; - 250CA6CB147D90A50047D347 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 2538E7FF123417E500ACB5D7 /* RestKit.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 25160E78145651060060A5C5; - remoteInfo = RestKitFrameworkTests; - }; - 25F2A1771322D59400A33DE4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 2538E7FF123417E500ACB5D7 /* RestKit.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 25160D1514564E810060A5C5; - remoteInfo = RestKit; - }; - 3F3CE2E3125B93EB0083FDCB /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 2538E7FF123417E500ACB5D7 /* RestKit.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 25160D1514564E810060A5C5; - remoteInfo = RestKit; - }; -/* End PBXContainerItemProxy section */ - /* Begin PBXFileReference section */ 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 1D3623240D0F684500981E51 /* RKTwitterAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKTwitterAppDelegate.h; sourceTree = ""; }; @@ -111,12 +68,11 @@ 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 250CA6CF147D90C50047D347 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; 2536AF3B16397A0200AD803D /* MainStoryboard.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = MainStoryboard.storyboard; sourceTree = ""; }; - 2538E7FF123417E500ACB5D7 /* RestKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RestKit.xcodeproj; path = ../../RestKit.xcodeproj; sourceTree = SOURCE_ROOT; }; 2538E812123419EC00ACB5D7 /* RKTweet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKTweet.h; sourceTree = ""; }; 2538E813123419EC00ACB5D7 /* RKTweet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKTweet.m; sourceTree = ""; }; 2538E864123424F000ACB5D7 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 2538E8661234250100ACB5D7 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; - 259D0FC318076E40007C66D6 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + 259D0FC318076E40007C66D6 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "../Default-568h@2x.png"; sourceTree = ""; }; 25F2A1961322D59400A33DE4 /* Generate Seed Database.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Generate Seed Database.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 25F2A1981322D93500A33DE4 /* restkit.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = restkit.json; sourceTree = SOURCE_ROOT; }; 25F2A19A1322DCDC00A33DE4 /* users.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = users.json; path = ../users.json; sourceTree = ""; }; @@ -134,9 +90,12 @@ 3F3CE40D125B9B450083FDCB /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; 3F94E0C6125BA8C0001E8585 /* RKTwitterCoreData.xcdatamodel */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wrapper.xcdatamodel; path = RKTwitterCoreData.xcdatamodel; sourceTree = ""; }; 3FB46640131D78A400E37C51 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; + 4C54AB4C3537B4FFC4CDAA11 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; + 76894C65C72E67BEB1D13573 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; 8452D3F8128244D90069F4A9 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; 8452D3FC128244E60069F4A9 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; 8D1107310486CEB800E47090 /* RKTwitter-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "RKTwitter-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; + A0702A131DA8B31559EADB35 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; CD39C14D14EEED8700E84874 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ @@ -147,7 +106,6 @@ files = ( CD39C14E14EEED8700E84874 /* QuartzCore.framework in Frameworks */, 250CA6D0147D90C50047D347 /* Security.framework in Frameworks */, - 250CA6CE147D90BA0047D347 /* libRestKit.a in Frameworks */, 3FB46641131D78A400E37C51 /* libxml2.dylib in Frameworks */, 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, @@ -156,6 +114,7 @@ 2538E8671234250100ACB5D7 /* SystemConfiguration.framework in Frameworks */, 8452D3F9128244D90069F4A9 /* CFNetwork.framework in Frameworks */, 8452D3FD128244E60069F4A9 /* MobileCoreServices.framework in Frameworks */, + A4AAAC70510CB014ED4378BD /* Pods.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -164,8 +123,8 @@ buildActionMask = 2147483647; files = ( 25014086153707E2004E0466 /* QuartzCore.framework in Frameworks */, - 25014085153707CB004E0466 /* libRestKit.a in Frameworks */, 25014071153706FD004E0466 /* Security.framework in Frameworks */, + 91E489431B6604A9004B5AB5 /* libxml2.dylib in Frameworks */, 25F2A1871322D59400A33DE4 /* Foundation.framework in Frameworks */, 25F2A1881322D59400A33DE4 /* UIKit.framework in Frameworks */, 25F2A1891322D59400A33DE4 /* CoreGraphics.framework in Frameworks */, @@ -173,6 +132,7 @@ 25F2A18B1322D59400A33DE4 /* SystemConfiguration.framework in Frameworks */, 25F2A1911322D59400A33DE4 /* CFNetwork.framework in Frameworks */, 25F2A1921322D59400A33DE4 /* MobileCoreServices.framework in Frameworks */, + 91E489421B66047A004B5AB5 /* Pods.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -201,30 +161,19 @@ name = Products; sourceTree = ""; }; - 2538E800123417E500ACB5D7 /* Products */ = { - isa = PBXGroup; - children = ( - 250CA6C6147D90A50047D347 /* libRestKit.a */, - 250CA6C8147D90A50047D347 /* RestKitTests.octest */, - 250CA6CA147D90A50047D347 /* RestKit.framework */, - 250CA6CC147D90A50047D347 /* RestKitFrameworkTests.octest */, - ); - name = Products; - sourceTree = ""; - }; 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( - 259D0FC318076E40007C66D6 /* Default-568h@2x.png */, - 2538E7FF123417E500ACB5D7 /* RestKit.xcodeproj */, 080E96DDFE201D6D7F000001 /* Classes */, 29B97315FDCFA39411CA2CEA /* Other Sources */, 29B97317FDCFA39411CA2CEA /* Resources */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, + 753DD8BB8B8DB90C68C1122C /* Pods */, ); name = CustomTemplate; sourceTree = ""; + usesTabs = 0; }; 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; @@ -238,6 +187,7 @@ 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( + 259D0FC318076E40007C66D6 /* Default-568h@2x.png */, 25F2A2D813240CEC00A33DE4 /* RKSeedDatabase.sqlite */, 25F2A19A1322DCDC00A33DE4 /* users.json */, 25F2A1981322D93500A33DE4 /* restkit.json */, @@ -267,10 +217,20 @@ 8452D3F8128244D90069F4A9 /* CFNetwork.framework */, 8452D3FC128244E60069F4A9 /* MobileCoreServices.framework */, 3FB46640131D78A400E37C51 /* libxml2.dylib */, + A0702A131DA8B31559EADB35 /* Pods.framework */, ); name = Frameworks; sourceTree = ""; }; + 753DD8BB8B8DB90C68C1122C /* Pods */ = { + isa = PBXGroup; + children = ( + 4C54AB4C3537B4FFC4CDAA11 /* Pods.debug.xcconfig */, + 76894C65C72E67BEB1D13573 /* Pods.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -285,7 +245,6 @@ buildRules = ( ); dependencies = ( - 3F3CE2E4125B93EB0083FDCB /* PBXTargetDependency */, ); name = RKTwitterCoreData; productName = RKTwitter; @@ -303,7 +262,6 @@ buildRules = ( ); dependencies = ( - 25F2A1761322D59400A33DE4 /* PBXTargetDependency */, ); name = "Generate Seed Database"; productName = RKTwitter; @@ -316,7 +274,7 @@ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0700; }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "RKTwitterCoreData" */; compatibilityVersion = "Xcode 3.2"; @@ -330,12 +288,6 @@ ); mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 2538E800123417E500ACB5D7 /* Products */; - ProjectRef = 2538E7FF123417E500ACB5D7 /* RestKit.xcodeproj */; - }, - ); projectRoot = ""; targets = ( 1D6058900D05DD3D006BFB54 /* RKTwitterCoreData */, @@ -344,37 +296,6 @@ }; /* End PBXProject section */ -/* Begin PBXReferenceProxy section */ - 250CA6C6147D90A50047D347 /* libRestKit.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRestKit.a; - remoteRef = 250CA6C5147D90A50047D347 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 250CA6C8147D90A50047D347 /* RestKitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = RestKitTests.octest; - remoteRef = 250CA6C7147D90A50047D347 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 250CA6CA147D90A50047D347 /* RestKit.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = RestKit.framework; - remoteRef = 250CA6C9147D90A50047D347 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 250CA6CC147D90A50047D347 /* RestKitFrameworkTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = RestKitFrameworkTests.octest; - remoteRef = 250CA6CB147D90A50047D347 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - /* Begin PBXResourcesBuildPhase section */ 1D60588D0D05DD3D006BFB54 /* Resources */ = { isa = PBXResourcesBuildPhase; @@ -399,6 +320,7 @@ 25F2A19C1322DD1800A33DE4 /* users.json in Resources */, 25F2A1791322D59400A33DE4 /* listbg.png in Resources */, 25F2A17A1322D59400A33DE4 /* listbg@2x.png in Resources */, + 91E489461B660547004B5AB5 /* Default-568h@2x.png in Resources */, 25F2A17B1322D59400A33DE4 /* BG.png in Resources */, 25F2A17C1322D59400A33DE4 /* BG@2x.png in Resources */, 25F2A17D1322D59400A33DE4 /* Default.png in Resources */, @@ -437,22 +359,10 @@ }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXTargetDependency section */ - 25F2A1761322D59400A33DE4 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = RestKit; - targetProxy = 25F2A1771322D59400A33DE4 /* PBXContainerItemProxy */; - }; - 3F3CE2E4125B93EB0083FDCB /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = RestKit; - targetProxy = 3F3CE2E3125B93EB0083FDCB /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - /* Begin XCBuildConfiguration section */ 1D6058940D05DD3E006BFB54 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 4C54AB4C3537B4FFC4CDAA11 /* Pods.debug.xcconfig */; buildSettings = { BUILD_STYLE = Debug; CLANG_ENABLE_OBJC_ARC = YES; @@ -463,14 +373,15 @@ GCC_PREFIX_HEADER = RKTwitter_Prefix.pch; HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/../../Headers\""; INFOPLIST_FILE = "Resources/RKTwitter-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_LDFLAGS = "-ObjC"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.yourcompany.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = RKTwitterCoreData; }; name = Debug; }; 1D6058950D05DD3E006BFB54 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 76894C65C72E67BEB1D13573 /* Pods.release.xcconfig */; buildSettings = { BUILD_STYLE = Release; CLANG_ENABLE_OBJC_ARC = YES; @@ -479,8 +390,8 @@ GCC_PREFIX_HEADER = RKTwitter_Prefix.pch; HEADER_SEARCH_PATHS = "${TARGET_BUILD_DIR}/../../Headers"; INFOPLIST_FILE = "Resources/RKTwitter-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_LDFLAGS = "-ObjC"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.yourcompany.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = RKTwitterCoreData; VALIDATE_PRODUCT = YES; }; @@ -488,6 +399,7 @@ }; 25F2A1941322D59400A33DE4 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 4C54AB4C3537B4FFC4CDAA11 /* Pods.debug.xcconfig */; buildSettings = { BUILD_STYLE = Debug; CLANG_ENABLE_OBJC_ARC = YES; @@ -496,28 +408,35 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = RKTwitter_Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = RESTKIT_GENERATE_SEED_DB; + GCC_PREPROCESSOR_DEFINITIONS = ( + RESTKIT_GENERATE_SEED_DB, + "$(inherited)", + ); HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/../../Headers\""; INFOPLIST_FILE = "Resources/RKTwitter-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_LDFLAGS = "-ObjC"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.yourcompany.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "Generate Seed Database"; }; name = Debug; }; 25F2A1951322D59400A33DE4 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 76894C65C72E67BEB1D13573 /* Pods.release.xcconfig */; buildSettings = { BUILD_STYLE = Release; CLANG_ENABLE_OBJC_ARC = YES; COPY_PHASE_STRIP = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = RKTwitter_Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = RESTKIT_GENERATE_SEED_DB; + GCC_PREPROCESSOR_DEFINITIONS = ( + RESTKIT_GENERATE_SEED_DB, + "$(inherited)", + ); HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/../../Headers\""; INFOPLIST_FILE = "Resources/RKTwitter-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_LDFLAGS = "-ObjC"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.yourcompany.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "Generate Seed Database"; VALIDATE_PRODUCT = YES; }; @@ -528,6 +447,7 @@ buildSettings = { BUILD_STYLE = Debug; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; diff --git a/Examples/RKTwitterCoreData/Resources/RKTwitter-Info.plist b/Examples/RKTwitterCoreData/Resources/RKTwitter-Info.plist index f1ef695d34..07799f3e43 100644 --- a/Examples/RKTwitterCoreData/Resources/RKTwitter-Info.plist +++ b/Examples/RKTwitterCoreData/Resources/RKTwitter-Info.plist @@ -11,7 +11,7 @@ CFBundleIconFile CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Gemfile b/Gemfile index a2cb1129af..1756b7e756 100644 --- a/Gemfile +++ b/Gemfile @@ -4,6 +4,9 @@ gem 'rakeup', '~> 1.2.0' gem 'sinatra', '~> 1.4.0' gem 'sinatra-contrib', '~> 1.4.0' gem 'thin', '~> 1.5.0' -gem 'cocoapods', '~> 0.36.0' gem 'xctasks', '~> 0.5.0' gem 'xcpretty', '~> 0.1.6' + +gem 'cocoapods', git: 'https://github.com/CocoaPods/CocoaPods' +gem 'cocoapods-core', git: 'https://github.com/CocoaPods/Core' +gem 'xcodeproj', git: 'https://github.com/CocoaPods/Xcodeproj' diff --git a/Gemfile.lock b/Gemfile.lock index a0e4dbad65..4474b859ad 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,56 +1,77 @@ +GIT + remote: https://github.com/CocoaPods/CocoaPods + revision: 6923c9784460f9cac5d51bebb90344c55d8a2ab7 + specs: + cocoapods (0.39.0) + activesupport (>= 4.0.2) + claide (~> 0.9.1) + cocoapods-core (= 0.39.0) + cocoapods-downloader (~> 0.9.3) + cocoapods-plugins (~> 0.4.2) + cocoapods-search (~> 0.1.0) + cocoapods-stats (~> 0.6.2) + cocoapods-trunk (~> 0.6.4) + cocoapods-try (~> 0.5.1) + colored (~> 1.2) + escape (~> 0.0.4) + molinillo (~> 0.4.0) + nap (~> 1.0) + xcodeproj (~> 0.28.2) + +GIT + remote: https://github.com/CocoaPods/Core + revision: 6f85c4fcff81960c0983616082bc345763a15dc6 + specs: + cocoapods-core (0.39.0) + activesupport (>= 4.0.2) + fuzzy_match (~> 2.0.4) + nap (~> 1.0) + +GIT + remote: https://github.com/CocoaPods/Xcodeproj + revision: 7a3d0c6520d995353b7ec09c4585aebf43e6c613 + specs: + xcodeproj (0.28.2) + activesupport (>= 3) + claide (~> 0.9.1) + colored (~> 1.2) + GEM remote: https://rubygems.org/ specs: - activesupport (4.2.1) + activesupport (4.2.4) i18n (~> 0.7) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - backports (3.6.4) - claide (0.8.1) - cocoapods (0.36.4) - activesupport (>= 3.2.15) - claide (~> 0.8.1) - cocoapods-core (= 0.36.4) - cocoapods-downloader (~> 0.9.0) - cocoapods-plugins (~> 0.4.1) - cocoapods-trunk (~> 0.6.0) - cocoapods-try (~> 0.4.3) - colored (~> 1.2) - escape (~> 0.0.4) - molinillo (~> 0.2.1) - nap (~> 0.8) - open4 (~> 1.3) - xcodeproj (~> 0.23.1) - cocoapods-core (0.36.4) - activesupport (>= 3.2.15) - fuzzy_match (~> 2.0.4) - nap (~> 0.8.0) - cocoapods-downloader (0.9.0) + backports (3.6.5) + claide (0.9.1) + cocoapods-downloader (0.9.3) cocoapods-plugins (0.4.2) nap - cocoapods-trunk (0.6.0) - nap (>= 0.8) + cocoapods-search (0.1.0) + cocoapods-stats (0.6.2) + cocoapods-trunk (0.6.4) + nap (>= 0.8, < 2.0) netrc (= 0.7.8) - cocoapods-try (0.4.3) + cocoapods-try (0.5.1) colored (1.2) - daemons (1.2.2) + daemons (1.2.3) escape (0.0.4) eventmachine (1.0.7) fuzzy_match (2.0.4) i18n (0.7.0) - json (1.8.2) + json (1.8.3) mini_portile (0.6.2) - minitest (5.6.0) - molinillo (0.2.3) - multi_json (1.11.0) - nap (0.8.0) + minitest (5.8.2) + molinillo (0.4.0) + multi_json (1.11.2) + nap (1.0.0) netrc (0.7.8) nokogiri (1.6.6.2) mini_portile (~> 0.6.0) - open4 (1.3.4) - rack (1.5.2) + rack (1.5.5) rack-protection (1.5.3) rack rack-test (0.6.3) @@ -63,25 +84,22 @@ GEM rack (~> 1.4) rack-protection (~> 1.4) tilt (>= 1.3, < 3) - sinatra-contrib (1.4.2) + sinatra-contrib (1.4.6) backports (>= 2.0) multi_json rack-protection rack-test sinatra (~> 1.4.0) - tilt (~> 1.3) + tilt (>= 1.3, < 3) thin (1.5.1) daemons (>= 1.0.9) eventmachine (>= 0.12.6) rack (>= 1.0.0) thread_safe (0.3.5) - tilt (1.4.1) + tilt (2.0.1) tzinfo (1.2.2) thread_safe (~> 0.1) - xcodeproj (0.23.1) - activesupport (>= 3) - colored (~> 1.2) - xcpretty (0.1.9) + xcpretty (0.1.12) xctasks (0.5.0) nokogiri (~> 1.6, >= 1.6.3.1) rake (~> 10.0, >= 10.0.0) @@ -90,10 +108,15 @@ PLATFORMS ruby DEPENDENCIES - cocoapods (~> 0.36.0) + cocoapods! + cocoapods-core! rakeup (~> 1.2.0) sinatra (~> 1.4.0) sinatra-contrib (~> 1.4.0) thin (~> 1.5.0) + xcodeproj! xcpretty (~> 0.1.6) xctasks (~> 0.5.0) + +BUNDLED WITH + 1.10.6 diff --git a/Podfile b/Podfile index 5a87788340..574faf356d 100644 --- a/Podfile +++ b/Podfile @@ -2,16 +2,27 @@ source 'https://github.com/CocoaPods/Specs.git' inhibit_all_warnings! +target :RestKit do + platform :ios, '5.1.1' + podspec +end + +target :RestKitFramework do + platform :osx, '10.7' + podspec +end + def import_pods pod 'RestKit', :path => '.' - pod 'RestKit/Testing', :path => '.' + pod 'RestKit/CocoaLumberjack', :path => '.' pod 'RestKit/Search', :path => '.' - + pod 'RestKit/Testing', :path => '.' + pod 'Specta', '0.2.1' pod 'OCMock', '2.2.4' pod 'OCHamcrest', '3.0.1' pod 'Expecta', '0.3.1' - + # Used for testing Value Transformer integration pod 'RKCLLocationValueTransformer', '~> 1.1.0' end diff --git a/Podfile.lock b/Podfile.lock index 72a146e7c9..466734d586 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,49 +1,67 @@ PODS: - AFNetworking (1.3.4) + - CocoaLumberjack (2.2.0): + - CocoaLumberjack/Default (= 2.2.0) + - CocoaLumberjack/Extensions (= 2.2.0) + - CocoaLumberjack/Core (2.2.0) + - CocoaLumberjack/Default (2.2.0): + - CocoaLumberjack/Core + - CocoaLumberjack/Extensions (2.2.0): + - CocoaLumberjack/Default - Expecta (0.3.1) - - ISO8601DateFormatterValueTransformer (0.6.0): + - ISO8601DateFormatterValueTransformer (0.6.1): - RKValueTransformers (~> 1.1.0) - OCHamcrest (3.0.1) - OCMock (2.2.4) - - RestKit (0.24.1): - - RestKit/Core (= 0.24.1) - - RestKit/Core (0.24.1): + - RestKit (0.26.0): + - RestKit/Core (= 0.26.0) + - RestKit/CocoaLumberjack (0.26.0): + - CocoaLumberjack + - RestKit/Support + - RestKit/Core (0.26.0): - RestKit/CoreData - RestKit/Network - RestKit/ObjectMapping - - RestKit/CoreData (0.24.1): + - RestKit/CoreData (0.26.0): - RestKit/ObjectMapping - - RestKit/Network (0.24.1): + - RestKit/Network (0.26.0): - AFNetworking (~> 1.3.0) - RestKit/ObjectMapping - RestKit/Support - SOCKit - - RestKit/ObjectMapping (0.24.1): - - ISO8601DateFormatterValueTransformer (~> 0.6.0) + - RestKit/ObjectMapping (0.26.0): + - ISO8601DateFormatterValueTransformer (~> 0.6.1) - RestKit/Support - RKValueTransformers (~> 1.1.0) - - RestKit/Search (0.24.1): + - RestKit/Search (0.26.0): - RestKit/CoreData - - RestKit/Support (0.24.1): - - TransitionKit (~> 2.1.0) - - RestKit/Testing (0.24.1): + - RestKit/Support (0.26.0): + - TransitionKit (~> 2.2) + - RestKit/Testing (0.26.0): - RestKit/Network - RKCLLocationValueTransformer (1.1.0): - RKValueTransformers (~> 1.1.0) - RKValueTransformers (1.1.2) - SOCKit (1.1) - Specta (0.2.1) - - TransitionKit (2.1.1) + - TransitionKit (2.2.1) DEPENDENCIES: + - AFNetworking (~> 1.3.0) + - CocoaLumberjack - Expecta (= 0.3.1) + - ISO8601DateFormatterValueTransformer (~> 0.6.1) - OCHamcrest (= 3.0.1) - OCMock (= 2.2.4) - RestKit (from `.`) + - RestKit/CocoaLumberjack (from `.`) - RestKit/Search (from `.`) - RestKit/Testing (from `.`) - RKCLLocationValueTransformer (~> 1.1.0) + - RKValueTransformers (~> 1.1.0) + - SOCKit - Specta (= 0.2.1) + - TransitionKit (~> 2.2) EXTERNAL SOURCES: RestKit: @@ -51,15 +69,18 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: AFNetworking: cf8e418e16f0c9c7e5c3150d019a3c679d015018 + CocoaLumberjack: 17fe8581f84914d5d7e6360f7c70022b173c3ae0 Expecta: a354d4633409dd9fe8c4f5ff5130426adbe31628 - ISO8601DateFormatterValueTransformer: 3ac3a721381697cab4e792d8049ce2f2e9ad3036 + ISO8601DateFormatterValueTransformer: 52da467d6ec899d6aedda8e48280ac92e8ee97e6 OCHamcrest: e19857683e4eefab64b878668eac04c2f4567118 OCMock: a6a7dc0e3997fb9f35d99f72528698ebf60d64f2 - RestKit: 1987b5efef289c6b27bd980714d6ca48d3871b78 + RestKit: 112fba5bd1f97598aac0db7981863d5fdc0263a2 RKCLLocationValueTransformer: 2cf0ea0fb7cd4bc70c56834fb92abc717c66f982 RKValueTransformers: 66ac5e4f077fdbe3496e792d89eeff4c3eb67701 SOCKit: c7376ac262bea9115b8f749358f762522a47d392 Specta: 15a276a6343867b426d5ed135d5aa4d04123a573 - TransitionKit: 3a14b6acc7cf2d1dd3e454e24dbad1cfab9a1ef1 + TransitionKit: 9ceccda4cd0cdc0a05ef85eb235e5a3292c3c250 + +PODFILE CHECKSUM: 91f6f04d66d133ff760630c4003e5a332894bb0f -COCOAPODS: 0.36.3 +COCOAPODS: 0.39.0 diff --git a/README.md b/README.md index 8037e42866..e0324ee1eb 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ RKObjectRequestOperation *operation = [[RKObjectRequestOperation alloc] initWith - First time with RestKit? Read the ["Overview"](#overview) section below and then check out the ["Getting Acquainted with RestKit"](https://github.com/RestKit/RKGist/blob/master/TUTORIAL.md) 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"](https://github.com/RestKit/RestKit/wiki/Upgrading-from-v0.10.x-to-v0.20.0) guide in the wiki - Adding RestKit to an existing [AFNetworking](https://github.com/AFNetworking/AFNetworking) application? Read the [AFNetworking Integration](https://github.com/RestKit/RestKit/wiki/AFNetworking-Integration) document to learn details about how the frameworks fit together. -- Review the [source code API documentation](http://restkit.org/api/latest) for a detailed look at the classes and API's in RestKit. A great place to start is [RKObjectManager](http://restkit.org/api/latest/Classes/RKObjectManager.html). +- Review the [source code API documentation](http://cocoadocs.org/docsets/RestKit/) for a detailed look at the classes and API's in RestKit. A great place to start is [RKObjectManager](http://restkit.org/api/latest/Classes/RKObjectManager.html). - Still need some help? Ask questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/restkit) or the [mailing list](http://groups.google.com/group/restkit), ping us on [Twitter](http://twitter.com/RestKit) or chat with us on [IRC](https://kiwiirc.com/client/irc.freenode.net/?nick=rkuser|?&theme=basic#RestKit). ## Overview @@ -60,7 +60,7 @@ Object mapping is a deep topic and is explored in exhaustive detail in the [Obje 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. - + @@ -534,7 +534,7 @@ 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 +3. [SOCKit](https://github.com/NimbusKit/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: @@ -590,11 +590,11 @@ $ touch Podfile $ edit Podfile platform :ios, '5.0' # Or platform :osx, '10.7' -pod 'RestKit', '~> 0.20.0' +pod 'RestKit', '~> 0.24.0' # Testing and Search are optional components -pod 'RestKit/Testing', '~> 0.20.0' -pod 'RestKit/Search', '~> 0.20.0' +pod 'RestKit/Testing', '~> 0.24.0' +pod 'RestKit/Search', '~> 0.24.0' ``` Install into your project: @@ -615,6 +615,10 @@ Please note that if your installation fails, it may be because you are installin 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. +## Using RestKit in a Swift Project + +Install RestKit using one of the above methods. Then add `@import RestKit;` (if RestKit is built as a dynamic framework) or `#import ` (if RestKit is built as a static library) into the bridging header for your Swift project. To enable the Core Data functionality in RestKit, add `@import CoreData;` into your bridging header _before_ you import RestKit. + ## 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](LICENSE) file for full details. diff --git a/Rakefile b/Rakefile index 4ceb190796..cc608e36f4 100644 --- a/Rakefile +++ b/Rakefile @@ -15,7 +15,7 @@ XCTasks::TestTask.new(:test) do |t| t.workspace = 'RestKit.xcworkspace' t.schemes_dir = 'Tests/Schemes' t.runner = :xcpretty - t.actions = %w{test} + t.actions = %w(test) t.subtask(ios: 'RestKitTests') do |s| s.sdk = :iphonesimulator @@ -33,101 +33,101 @@ namespace :test do # Provides validation that RestKit continues to build without Core Data. This requires conditional compilation that is error prone task :building_without_core_data do title 'Testing without Core Data' - run("cd Examples/RKTwitter && pod install") - run("xctool -workspace Examples/RKTwitter/RKTwitter.xcworkspace -scheme RKTwitterCocoaPods -sdk iphonesimulator clean build ONLY_ACTIVE_ARCH=NO") + run('cd Examples/RKTwitter && pod install') + run('xctool -workspace Examples/RKTwitter/RKTwitter.xcworkspace -scheme RKTwitter -sdk iphonesimulator clean build ONLY_ACTIVE_ARCH=NO') end end -task :default => ["server:autostart", :test, "server:autostop"] +task default: ['server:autostart', :test, 'server:autostop'] def restkit_version - @restkit_version ||= ENV['VERSION'] || File.read("VERSION").chomp + @restkit_version ||= ENV['VERSION'] || File.read('VERSION').chomp end def apple_doc_command - "/usr/local/bin/appledoc -o Docs/API -p RestKit -v #{restkit_version} -c \"RestKit\" " + - "--company-id org.restkit --warn-undocumented-object --warn-undocumented-member --warn-empty-description --warn-unknown-directive " + - "--warn-invalid-crossref --warn-missing-arg --no-repeat-first-par " + "/usr/local/bin/appledoc -o Docs/API -p RestKit -v #{restkit_version} -c \"RestKit\" " \ + '--company-id org.restkit --warn-undocumented-object --warn-undocumented-member --warn-empty-description --warn-unknown-directive ' \ + '--warn-invalid-crossref --warn-missing-arg --no-repeat-first-par ' end def run(command, min_exit_status = 0) puts "Executing: `#{command}`" - sh(command) + system(command) if $?.exitstatus > min_exit_status puts "[!] Failed with exit code #{$?.exitstatus} while running: `#{command}`" exit($?.exitstatus) end - return $?.exitstatus + $?.exitstatus end -desc "Build RestKit for iOS and Mac OS X" +desc 'Build RestKit for iOS and Mac OS X' task :build do title 'Building RestKit' - run("xcodebuild -workspace RestKit.xcworkspace -scheme RestKit -sdk iphonesimulator5.0 clean build") - run("xcodebuild -workspace RestKit.xcworkspace -scheme RestKit -sdk iphoneos clean build") - run("xcodebuild -workspace RestKit.xcworkspace -scheme RestKit -sdk macosx10.6 clean build") + run('xcodebuild -workspace RestKit.xcworkspace -scheme RestKit -sdk iphonesimulator5.0 clean build') + run('xcodebuild -workspace RestKit.xcworkspace -scheme RestKit -sdk iphoneos clean build') + run('xcodebuild -workspace RestKit.xcworkspace -scheme RestKit -sdk macosx10.6 clean build') end -desc "Generate documentation via appledoc" -task :docs => 'docs:generate' +desc 'Generate documentation via appledoc' +task docs: 'docs:generate' namespace :appledoc do task :check do - unless File.exists?('/usr/local/bin/appledoc') - puts "appledoc not found at /usr/local/bin/appledoc: Install via homebrew and try again: `brew install --HEAD appledoc`" + unless File.exist?('/usr/local/bin/appledoc') + puts 'appledoc not found at /usr/local/bin/appledoc: Install via homebrew and try again: `brew install --HEAD appledoc`' exit 1 end end end namespace :docs do - task :generate => 'appledoc:check' do + task generate: 'appledoc:check' do command = apple_doc_command << " --no-create-docset --keep-intermediate-files --create-html `find Code/ -name '*.h'`" run(command, 1) - puts "Generated HTML documentation at Docs/API/html" + puts 'Generated HTML documentation at Docs/API/html' end - desc "Check that documentation can be built from the source code via appledoc successfully." - task :check => 'appledoc:check' do + desc 'Check that documentation can be built from the source code via appledoc successfully.' + task check: 'appledoc:check' do command = apple_doc_command << " --no-create-html --verbose 5 `find Code/ -name '*.h'`" exitstatus = run(command, 1) if exitstatus == 0 - puts "appledoc generation completed successfully!" + puts 'appledoc generation completed successfully!' elsif exitstatus == 1 - puts "appledoc generation produced warnings" + puts 'appledoc generation produced warnings' elsif exitstatus == 2 - puts "! appledoc generation encountered an error" + puts '! appledoc generation encountered an error' exit(exitstatus) else - puts "!! appledoc generation failed with a fatal error" + puts '!! appledoc generation failed with a fatal error' end exit(exitstatus) end - desc "Generate & install a docset into Xcode from the current sources" - task :install => 'appledoc:check' do + desc 'Generate & install a docset into Xcode from the current sources' + task install: 'appledoc:check' do command = apple_doc_command << " --install-docset `find Code/ -name '*.h'`" run(command, 1) end - desc "Build and publish the documentation set to the remote server (using rsync over SSH)" - task :publish, :version, :destination, :publish_feed do |t, args| - args.with_defaults(:version => File.read("VERSION").chomp, :destination => "restkit.org:/var/www/public/restkit.org/public/api/", :publish_feed => 'true') + desc 'Build and publish the documentation set to the remote server (using rsync over SSH)' + task :publish, :version, :destination, :publish_feed do |_t, args| + args.with_defaults(version: File.read('VERSION').chomp, destination: 'restkit.org:/var/www/public/restkit.org/public/api/', publish_feed: 'true') version = args[:version] destination = args[:destination] puts "Generating RestKit docset for version #{version}..." command = apple_doc_command << - " --keep-intermediate-files" << - " --docset-feed-name \"RestKit #{version} Documentation\"" << - " --docset-feed-url http://restkit.org/api/%DOCSETATOMFILENAME" << - " --docset-package-url http://restkit.org/api/%DOCSETPACKAGEFILENAME --publish-docset --verbose 3 `find Code/ -name '*.h'`" + ' --keep-intermediate-files' \ + " --docset-feed-name \"RestKit #{version} Documentation\"" \ + ' --docset-feed-url http://restkit.org/api/%DOCSETATOMFILENAME' \ + " --docset-package-url http://restkit.org/api/%DOCSETPACKAGEFILENAME --publish-docset --verbose 3 `find Code/ -name '*.h'`" run(command, 1) puts "Uploading docset to #{destination}..." versioned_destination = File.join(destination, version) command = "rsync -rvpPe ssh --delete Docs/API/html/ #{versioned_destination}" run(command) - should_publish_feed = %{yes true 1}.include?(args[:publish_feed].downcase) + should_publish_feed = %(yes true 1).include?(args[:publish_feed].downcase) if $?.exitstatus == 0 && should_publish_feed command = "rsync -rvpPe ssh Docs/API/publish/* #{destination}" run(command) @@ -136,11 +136,11 @@ namespace :docs do end namespace :build do - desc "Build all Example projects to ensure they are building properly" + desc 'Build all Example projects to ensure they are building properly' task :examples do - ios_sdks = %w{iphonesimulator5.0 iphonesimulator6.0} - osx_sdks = %w{macosx} - osx_projects = %w{RKMacOSX} + ios_sdks = %w(iphonesimulator5.0 iphonesimulator6.0) + osx_sdks = %w(macosx) + osx_projects = %w(RKMacOSX) examples_path = File.join(File.expand_path(File.dirname(__FILE__)), 'Examples') example_projects = `find #{examples_path} -name '*.xcodeproj'`.split("\n") @@ -157,24 +157,72 @@ namespace :build do end end -desc "Validate a branch is ready for merging by checking for common issues" -task :validate => ['build:examples', 'docs:check', :test] do - puts "Project state validated successfully. Proceed with merge." +desc 'Validate a branch is ready for merging by checking for common issues' +task validate: ['build:examples', 'docs:check', :test] do + puts 'Project state validated successfully. Proceed with merge.' end task :lint do title 'Linting pod' - run('bundle exec pod lib lint') + run('bundle exec pod lib lint --allow-warnings ') + run('bundle exec pod lib lint --allow-warnings --use-libraries') end desc 'Runs the CI suite' -task :ci => ['server:start', :test, 'test:building_without_core_data', :lint] +task ci: ['server:autostart', :test, 'test:building_without_core_data', :lint] + +desc 'Make a new release of RestKit' +task :release do + tag = "v#{restkit_version}" + if `git tag`.strip.split("\n").include?(tag) + error "A tag for version `#{tag}` already exists." + end + if `git symbolic-ref HEAD 2>/dev/null`.strip.split('/').last !~ /(\Adevelopment)|(-stable)\Z/ + error 'You need to be on `development` or a `stable` branch in order to do a release.' + end + + diff_lines = `git diff --name-only`.strip.split("\n") + if diff_lines.size == 0 + error 'Change the version number of the pod yourself' + end + diff_lines.delete('Podfile.lock') + unless diff_lines == %w(VERSION) + error = 'Only change the version and the Podfile.lock files' + error << "\n- " + diff_lines.join("\n- ") + error(error) + end + + podspec = File.read('RestKit.podspec') + podspec.gsub!(/(s\.version\s*=\s*)'#{Gem::Version::VERSION_PATTERN}'/, "\\1'#{restkit_version}'") + File.open('RestKit.podspec', 'w') { |f| f << podspec } + + sh "bundle exec pod install" + + title 'Running tests' + Rake::Task['ci'].invoke + + sh "git checkout -b release/#{restkit_version}" + sh "git commit -am 'Release #{tag}'" + sh "git tag '#{tag}'" + sh 'git checkout master' + sh "git merge --no-ff `#{tag}`" + sh 'git push --tags' + sh "git checkout '#{tag}'" + sh "bundle exec pod trunk push" + sh 'git checkout development' + sh "git merge --no-ff `#{tag}`" + sh 'git push' +end def title(title) cyan_title = "\033[0;36m#{title}\033[0m" puts - puts "-" * 80 + puts '-' * 80 puts cyan_title - puts "-" * 80 + puts '-' * 80 puts end + +def error(string) + fail "\033[0;31m[!] #{string}\e[0m" +end diff --git a/Resources/PLISTs/RestKitFramework-Info.plist b/Resources/PLISTs/RestKitFramework-Info.plist index 4723995c04..4acc7e4c10 100644 --- a/Resources/PLISTs/RestKitFramework-Info.plist +++ b/Resources/PLISTs/RestKitFramework-Info.plist @@ -9,7 +9,7 @@ CFBundleIconFile CFBundleIdentifier - org.restkit.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Resources/PLISTs/RestKitFrameworkTests-Info.plist b/Resources/PLISTs/RestKitFrameworkTests-Info.plist index 883b278e89..169b6f710e 100644 --- a/Resources/PLISTs/RestKitFrameworkTests-Info.plist +++ b/Resources/PLISTs/RestKitFrameworkTests-Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - org.restkit.tests + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType diff --git a/Resources/PLISTs/RestKitTests-Info.plist b/Resources/PLISTs/RestKitTests-Info.plist index 883b278e89..169b6f710e 100644 --- a/Resources/PLISTs/RestKitTests-Info.plist +++ b/Resources/PLISTs/RestKitTests-Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - org.restkit.tests + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType diff --git a/RestKit.podspec b/RestKit.podspec index b1e668f012..346c095451 100644 --- a/RestKit.podspec +++ b/RestKit.podspec @@ -1,11 +1,11 @@ Pod::Spec.new do |s| s.name = 'RestKit' - s.version = '0.24.1' + s.version = '0.24.2' s.summary = 'RestKit is a framework for consuming and modeling RESTful web resources on iOS and OS X.' s.homepage = 'https://github.com/RestKit/RestKit' s.social_media_url = 'https://twitter.com/RestKit' s.author = { 'Blake Watters' => 'blakewatters@gmail.com' } - s.source = { :git => 'https://github.com/RestKit/RestKit.git', :tag => "v#{s.version}" } + s.source = { :git => 'https://github.com/razmara/RestKit.git', :tag => "v#{s.version}" } s.license = 'Apache License, Version 2.0' # Platform setup diff --git a/RestKit.xcodeproj/project.pbxproj b/RestKit.xcodeproj/project.pbxproj index aaf2c412a7..b67a7a41de 100644 --- a/RestKit.xcodeproj/project.pbxproj +++ b/RestKit.xcodeproj/project.pbxproj @@ -7,6 +7,10 @@ objects = { /* Begin PBXBuildFile section */ + 1689DAEF1B87CEA900254FB7 /* RKLumberjackLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 1689DAED1B87CEA900254FB7 /* RKLumberjackLogger.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1689DAF01B87CEA900254FB7 /* RKLumberjackLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 1689DAED1B87CEA900254FB7 /* RKLumberjackLogger.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1689DAF11B87CEA900254FB7 /* RKLumberjackLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 1689DAEE1B87CEA900254FB7 /* RKLumberjackLogger.m */; }; + 1689DAF21B87CEA900254FB7 /* RKLumberjackLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 1689DAEE1B87CEA900254FB7 /* RKLumberjackLogger.m */; }; 2502C8ED15F79CF70060FD75 /* CoreData.h in Headers */ = {isa = PBXBuildFile; fileRef = 2502C8E715F79CF70060FD75 /* CoreData.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2502C8EE15F79CF70060FD75 /* CoreData.h in Headers */ = {isa = PBXBuildFile; fileRef = 2502C8E715F79CF70060FD75 /* CoreData.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2502C8EF15F79CF70060FD75 /* Network.h in Headers */ = {isa = PBXBuildFile; fileRef = 2502C8E815F79CF70060FD75 /* Network.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -107,10 +111,6 @@ 25160EE31456532C0060A5C5 /* lcl_RK.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160EA21456532C0060A5C5 /* lcl_RK.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25160EE41456532C0060A5C5 /* lcl_RK.m in Sources */ = {isa = PBXBuildFile; fileRef = 25160EA31456532C0060A5C5 /* lcl_RK.m */; }; 25160EE51456532C0060A5C5 /* lcl_RK.m in Sources */ = {isa = PBXBuildFile; fileRef = 25160EA31456532C0060A5C5 /* lcl_RK.m */; }; - 25160F081456532C0060A5C5 /* SOCKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160EBD1456532C0060A5C5 /* SOCKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25160F091456532C0060A5C5 /* SOCKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160EBD1456532C0060A5C5 /* SOCKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25160F0A1456532C0060A5C5 /* SOCKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 25160EBE1456532C0060A5C5 /* SOCKit.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 25160F0B1456532C0060A5C5 /* SOCKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 25160EBE1456532C0060A5C5 /* SOCKit.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 25160F25145655AF0060A5C5 /* RestKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160DA1145650490060A5C5 /* RestKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25160F44145655C60060A5C5 /* RKDynamicMapping.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160D7C145650490060A5C5 /* RKDynamicMapping.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25160F45145655C60060A5C5 /* RKDynamicMapping.m in Sources */ = {isa = PBXBuildFile; fileRef = 25160D7D145650490060A5C5 /* RKDynamicMapping.m */; }; @@ -283,18 +283,6 @@ 2520290A1577C78600076FB4 /* RKRouteSetTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 252029081577C78600076FB4 /* RKRouteSetTest.m */; }; 252205CC162B242400F7B11E /* RKHTTPUtilitiesTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 252205CB162B242400F7B11E /* RKHTTPUtilitiesTest.m */; }; 252205CD162B242400F7B11E /* RKHTTPUtilitiesTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 252205CB162B242400F7B11E /* RKHTTPUtilitiesTest.m */; }; - 252CCE6617E08E2D00B7F0BF /* RKValueTransformers.h in Headers */ = {isa = PBXBuildFile; fileRef = 252CCE6017E08E2D00B7F0BF /* RKValueTransformers.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 252CCE6717E08E2D00B7F0BF /* RKValueTransformers.h in Headers */ = {isa = PBXBuildFile; fileRef = 252CCE6017E08E2D00B7F0BF /* RKValueTransformers.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 252CCE6817E08E2D00B7F0BF /* RKValueTransformers.m in Sources */ = {isa = PBXBuildFile; fileRef = 252CCE6117E08E2D00B7F0BF /* RKValueTransformers.m */; }; - 252CCE6917E08E2D00B7F0BF /* RKValueTransformers.m in Sources */ = {isa = PBXBuildFile; fileRef = 252CCE6117E08E2D00B7F0BF /* RKValueTransformers.m */; }; - 252CCE7217E0CA2700B7F0BF /* ISO8601DateFormatterValueTransformer.h in Headers */ = {isa = PBXBuildFile; fileRef = 252CCE6E17E0CA2700B7F0BF /* ISO8601DateFormatterValueTransformer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 252CCE7317E0CA2700B7F0BF /* ISO8601DateFormatterValueTransformer.h in Headers */ = {isa = PBXBuildFile; fileRef = 252CCE6E17E0CA2700B7F0BF /* ISO8601DateFormatterValueTransformer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 252CCE7417E0CA2700B7F0BF /* ISO8601DateFormatterValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 252CCE6F17E0CA2700B7F0BF /* ISO8601DateFormatterValueTransformer.m */; }; - 252CCE7517E0CA2700B7F0BF /* ISO8601DateFormatterValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 252CCE6F17E0CA2700B7F0BF /* ISO8601DateFormatterValueTransformer.m */; }; - 252CCE7617E0CA2700B7F0BF /* RKISO8601DateFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 252CCE7017E0CA2700B7F0BF /* RKISO8601DateFormatter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 252CCE7717E0CA2700B7F0BF /* RKISO8601DateFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 252CCE7017E0CA2700B7F0BF /* RKISO8601DateFormatter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 252CCE7817E0CA2700B7F0BF /* RKISO8601DateFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 252CCE7117E0CA2700B7F0BF /* RKISO8601DateFormatter.m */; }; - 252CCE7917E0CA2700B7F0BF /* RKISO8601DateFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 252CCE7117E0CA2700B7F0BF /* RKISO8601DateFormatter.m */; }; 252EFAFA14D8EAEC004863C8 /* RKEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 252EFAF914D8EAEC004863C8 /* RKEvent.m */; }; 252EFAFB14D8EAEC004863C8 /* RKEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 252EFAF914D8EAEC004863C8 /* RKEvent.m */; }; 252EFB2814DA0689004863C8 /* NakedEvents.json in Resources */ = {isa = PBXBuildFile; fileRef = 252EFB2714DA0689004863C8 /* NakedEvents.json */; }; @@ -407,44 +395,6 @@ 2598889015EC169E006CAE95 /* RKPropertyMapping.m in Sources */ = {isa = PBXBuildFile; fileRef = 2598888C15EC169E006CAE95 /* RKPropertyMapping.m */; }; 259AC481162B05C80012D2F9 /* RKObjectRequestOperationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 259AC480162B05C80012D2F9 /* RKObjectRequestOperationTest.m */; }; 259AC482162B05C80012D2F9 /* RKObjectRequestOperationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 259AC480162B05C80012D2F9 /* RKObjectRequestOperationTest.m */; }; - 259B96D51604CCCC0000C250 /* AFHTTPClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 259B96C21604CCCC0000C250 /* AFHTTPClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 259B96D61604CCCC0000C250 /* AFHTTPClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 259B96C21604CCCC0000C250 /* AFHTTPClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 259B96D71604CCCC0000C250 /* AFHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 259B96C31604CCCC0000C250 /* AFHTTPClient.m */; }; - 259B96D81604CCCC0000C250 /* AFHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 259B96C31604CCCC0000C250 /* AFHTTPClient.m */; }; - 259B96D91604CCCC0000C250 /* AFHTTPRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 259B96C41604CCCC0000C250 /* AFHTTPRequestOperation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 259B96DA1604CCCC0000C250 /* AFHTTPRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 259B96C41604CCCC0000C250 /* AFHTTPRequestOperation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 259B96DB1604CCCC0000C250 /* AFHTTPRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 259B96C51604CCCC0000C250 /* AFHTTPRequestOperation.m */; }; - 259B96DC1604CCCC0000C250 /* AFHTTPRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 259B96C51604CCCC0000C250 /* AFHTTPRequestOperation.m */; }; - 259B96DD1604CCCC0000C250 /* AFImageRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 259B96C61604CCCC0000C250 /* AFImageRequestOperation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 259B96DE1604CCCC0000C250 /* AFImageRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 259B96C61604CCCC0000C250 /* AFImageRequestOperation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 259B96DF1604CCCC0000C250 /* AFImageRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 259B96C71604CCCC0000C250 /* AFImageRequestOperation.m */; }; - 259B96E01604CCCC0000C250 /* AFImageRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 259B96C71604CCCC0000C250 /* AFImageRequestOperation.m */; }; - 259B96E11604CCCC0000C250 /* AFJSONRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 259B96C81604CCCC0000C250 /* AFJSONRequestOperation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 259B96E21604CCCC0000C250 /* AFJSONRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 259B96C81604CCCC0000C250 /* AFJSONRequestOperation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 259B96E31604CCCC0000C250 /* AFJSONRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 259B96C91604CCCC0000C250 /* AFJSONRequestOperation.m */; }; - 259B96E41604CCCC0000C250 /* AFJSONRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 259B96C91604CCCC0000C250 /* AFJSONRequestOperation.m */; }; - 259B96E51604CCCC0000C250 /* AFNetworkActivityIndicatorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 259B96CA1604CCCC0000C250 /* AFNetworkActivityIndicatorManager.m */; }; - 259B96E61604CCCC0000C250 /* AFNetworkActivityIndicatorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 259B96CA1604CCCC0000C250 /* AFNetworkActivityIndicatorManager.m */; }; - 259B96E71604CCCC0000C250 /* AFPropertyListRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 259B96CB1604CCCC0000C250 /* AFPropertyListRequestOperation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 259B96E81604CCCC0000C250 /* AFPropertyListRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 259B96CB1604CCCC0000C250 /* AFPropertyListRequestOperation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 259B96E91604CCCC0000C250 /* AFPropertyListRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 259B96CC1604CCCC0000C250 /* AFPropertyListRequestOperation.m */; }; - 259B96EA1604CCCC0000C250 /* AFPropertyListRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 259B96CC1604CCCC0000C250 /* AFPropertyListRequestOperation.m */; }; - 259B96EB1604CCCC0000C250 /* AFURLConnectionOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 259B96CD1604CCCC0000C250 /* AFURLConnectionOperation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 259B96EC1604CCCC0000C250 /* AFURLConnectionOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 259B96CD1604CCCC0000C250 /* AFURLConnectionOperation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 259B96ED1604CCCC0000C250 /* AFURLConnectionOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 259B96CE1604CCCC0000C250 /* AFURLConnectionOperation.m */; }; - 259B96EE1604CCCC0000C250 /* AFURLConnectionOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 259B96CE1604CCCC0000C250 /* AFURLConnectionOperation.m */; }; - 259B96EF1604CCCC0000C250 /* AFXMLRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 259B96CF1604CCCC0000C250 /* AFXMLRequestOperation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 259B96F01604CCCC0000C250 /* AFXMLRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 259B96CF1604CCCC0000C250 /* AFXMLRequestOperation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 259B96F11604CCCC0000C250 /* AFXMLRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 259B96D01604CCCC0000C250 /* AFXMLRequestOperation.m */; }; - 259B96F21604CCCC0000C250 /* AFXMLRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 259B96D01604CCCC0000C250 /* AFXMLRequestOperation.m */; }; - 259B96F31604CCCC0000C250 /* UIImageView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 259B96D11604CCCC0000C250 /* UIImageView+AFNetworking.m */; }; - 259B96F41604CCCC0000C250 /* UIImageView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 259B96D11604CCCC0000C250 /* UIImageView+AFNetworking.m */; }; - 259B96F51604CCCC0000C250 /* AFNetworkActivityIndicatorManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 259B96D21604CCCC0000C250 /* AFNetworkActivityIndicatorManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 259B96F61604CCCC0000C250 /* AFNetworkActivityIndicatorManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 259B96D21604CCCC0000C250 /* AFNetworkActivityIndicatorManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 259B96F71604CCCC0000C250 /* UIImageView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 259B96D31604CCCC0000C250 /* UIImageView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 259B96F81604CCCC0000C250 /* UIImageView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 259B96D31604CCCC0000C250 /* UIImageView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 259B96F91604CCCC0000C250 /* AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 259B96D41604CCCC0000C250 /* AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 259B96FA1604CCCC0000C250 /* AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 259B96D41604CCCC0000C250 /* AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; 259D983C154F6C90008C90F5 /* benchmark_parents_and_children.json in Resources */ = {isa = PBXBuildFile; fileRef = 259D983B154F6C90008C90F5 /* benchmark_parents_and_children.json */; }; 259D983D154F6C90008C90F5 /* benchmark_parents_and_children.json in Resources */ = {isa = PBXBuildFile; fileRef = 259D983B154F6C90008C90F5 /* benchmark_parents_and_children.json */; }; 259D98541550C69A008C90F5 /* RKEntityByAttributeCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 259D98521550C69A008C90F5 /* RKEntityByAttributeCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -510,20 +460,6 @@ 25C20466160ABC4800D418D5 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 251611281456F50F0060A5C5 /* SystemConfiguration.framework */; }; 25C246A415C83B090032212E /* RKSearchTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 25C246A315C83B090032212E /* RKSearchTest.m */; }; 25C246A515C83B090032212E /* RKSearchTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 25C246A315C83B090032212E /* RKSearchTest.m */; }; - 25C6C0BD1716F6F800C98A73 /* TKEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 25C6C0A51716F6F800C98A73 /* TKEvent.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25C6C0BE1716F6F800C98A73 /* TKEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 25C6C0A51716F6F800C98A73 /* TKEvent.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25C6C0BF1716F6F800C98A73 /* TKEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 25C6C0A61716F6F800C98A73 /* TKEvent.m */; }; - 25C6C0C01716F6F800C98A73 /* TKEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 25C6C0A61716F6F800C98A73 /* TKEvent.m */; }; - 25C6C0C11716F6F800C98A73 /* TKState.h in Headers */ = {isa = PBXBuildFile; fileRef = 25C6C0A71716F6F800C98A73 /* TKState.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25C6C0C21716F6F800C98A73 /* TKState.h in Headers */ = {isa = PBXBuildFile; fileRef = 25C6C0A71716F6F800C98A73 /* TKState.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25C6C0C31716F6F800C98A73 /* TKState.m in Sources */ = {isa = PBXBuildFile; fileRef = 25C6C0A81716F6F800C98A73 /* TKState.m */; }; - 25C6C0C41716F6F800C98A73 /* TKState.m in Sources */ = {isa = PBXBuildFile; fileRef = 25C6C0A81716F6F800C98A73 /* TKState.m */; }; - 25C6C0C51716F6F800C98A73 /* TKStateMachine.h in Headers */ = {isa = PBXBuildFile; fileRef = 25C6C0A91716F6F800C98A73 /* TKStateMachine.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25C6C0C61716F6F800C98A73 /* TKStateMachine.h in Headers */ = {isa = PBXBuildFile; fileRef = 25C6C0A91716F6F800C98A73 /* TKStateMachine.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25C6C0C71716F6F800C98A73 /* TKStateMachine.m in Sources */ = {isa = PBXBuildFile; fileRef = 25C6C0AA1716F6F800C98A73 /* TKStateMachine.m */; }; - 25C6C0C81716F6F800C98A73 /* TKStateMachine.m in Sources */ = {isa = PBXBuildFile; fileRef = 25C6C0AA1716F6F800C98A73 /* TKStateMachine.m */; }; - 25C6C0CB1716F6F800C98A73 /* TransitionKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 25C6C0AC1716F6F800C98A73 /* TransitionKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25C6C0CC1716F6F800C98A73 /* TransitionKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 25C6C0AC1716F6F800C98A73 /* TransitionKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25C6C0E81716F79B00C98A73 /* RKOperationStateMachine.h in Headers */ = {isa = PBXBuildFile; fileRef = 25C6C0E61716F79B00C98A73 /* RKOperationStateMachine.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25C6C0E91716F79B00C98A73 /* RKOperationStateMachine.h in Headers */ = {isa = PBXBuildFile; fileRef = 25C6C0E61716F79B00C98A73 /* RKOperationStateMachine.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25C6C0EA1716F79B00C98A73 /* RKOperationStateMachine.m in Sources */ = {isa = PBXBuildFile; fileRef = 25C6C0E71716F79B00C98A73 /* RKOperationStateMachine.m */; }; @@ -537,10 +473,6 @@ 25CAAA9515254E7800CAE5D7 /* ArrayOfHumans.json in Resources */ = {isa = PBXBuildFile; fileRef = 25CAAA9315254E7800CAE5D7 /* ArrayOfHumans.json */; }; 25CDA0E7161E828D00F583F3 /* RKISODateFormatterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 25CDA0E2161E821000F583F3 /* RKISODateFormatterTest.m */; }; 25CDA0E8161E828E00F583F3 /* RKISODateFormatterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 25CDA0E2161E821000F583F3 /* RKISODateFormatterTest.m */; }; - 25DA356F1836741D001A56A0 /* TKTransition.h in Headers */ = {isa = PBXBuildFile; fileRef = 25DA356D1836741C001A56A0 /* TKTransition.h */; }; - 25DA35701836741D001A56A0 /* TKTransition.h in Headers */ = {isa = PBXBuildFile; fileRef = 25DA356D1836741C001A56A0 /* TKTransition.h */; }; - 25DA35711836741D001A56A0 /* TKTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 25DA356E1836741C001A56A0 /* TKTransition.m */; }; - 25DA35721836741D001A56A0 /* TKTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 25DA356E1836741C001A56A0 /* TKTransition.m */; }; 25DB7508151BD551009F01AF /* NSManagedObjectContext+RKAdditionsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 25DB7507151BD551009F01AF /* NSManagedObjectContext+RKAdditionsTest.m */; }; 25DB7509151BD551009F01AF /* NSManagedObjectContext+RKAdditionsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 25DB7507151BD551009F01AF /* NSManagedObjectContext+RKAdditionsTest.m */; }; 25E36E0215195CED00F9E448 /* RKFetchRequestMappingCacheTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 25E36E0115195CED00F9E448 /* RKFetchRequestMappingCacheTest.m */; }; @@ -577,6 +509,7 @@ 25FBB853159272DD00955D27 /* RKRouter.h in Headers */ = {isa = PBXBuildFile; fileRef = 25FBB850159272DD00955D27 /* RKRouter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25FBB854159272DD00955D27 /* RKRouter.m in Sources */ = {isa = PBXBuildFile; fileRef = 25FBB851159272DD00955D27 /* RKRouter.m */; }; 25FBB855159272DD00955D27 /* RKRouter.m in Sources */ = {isa = PBXBuildFile; fileRef = 25FBB851159272DD00955D27 /* RKRouter.m */; }; + 3304DA75F9D62CBBA0F1D286 /* libPods-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DC09A8FD6016D24B797977A1 /* libPods-ios.a */; }; 54CDB45B17B408B100FAC285 /* RKStringTokenizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 54CDB45917B408B100FAC285 /* RKStringTokenizer.h */; settings = {ATTRIBUTES = (Public, ); }; }; 54CDB45C17B408B100FAC285 /* RKStringTokenizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 54CDB45917B408B100FAC285 /* RKStringTokenizer.h */; settings = {ATTRIBUTES = (Public, ); }; }; 54CDB45D17B408B100FAC285 /* RKStringTokenizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 54CDB45A17B408B100FAC285 /* RKStringTokenizer.m */; }; @@ -591,6 +524,7 @@ 5C927E151608FFFD00DC8B07 /* RKDictionaryUtilitiesTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C927E131608FFFD00DC8B07 /* RKDictionaryUtilitiesTest.m */; }; 5CCC295615B7124A0045F0F5 /* RKMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CCC295515B7124A0045F0F5 /* RKMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5CCC295715B7124A0045F0F5 /* RKMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CCC295515B7124A0045F0F5 /* RKMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6CEFFA4880A12A78BAA45D14 /* libPods-RestKitFramework.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B15BBB1F11B91C32F72DFBF /* libPods-RestKitFramework.a */; }; 73D3907414CA1AE00093E3D6 /* parent.json in Resources */ = {isa = PBXBuildFile; fileRef = 73D3907114CA19F90093E3D6 /* parent.json */; }; 73D3907514CA1AE20093E3D6 /* parent.json in Resources */ = {isa = PBXBuildFile; fileRef = 73D3907114CA19F90093E3D6 /* parent.json */; }; 73D3907614CA1AE60093E3D6 /* child.json in Resources */ = {isa = PBXBuildFile; fileRef = 73D3907314CA1A4A0093E3D6 /* child.json */; }; @@ -598,7 +532,8 @@ 73D3907914CA1DD40093E3D6 /* channels.xml in Resources */ = {isa = PBXBuildFile; fileRef = 73D3907814CA1D710093E3D6 /* channels.xml */; }; 73D3907A14CA1DD50093E3D6 /* channels.xml in Resources */ = {isa = PBXBuildFile; fileRef = 73D3907814CA1D710093E3D6 /* channels.xml */; }; 7AF2905218DF249C009AEB94 /* RKObjectiveCppTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2501405215366000004E0466 /* RKObjectiveCppTest.mm */; }; - 7F9CBC6174004E31AEC35813 /* libPods-osx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 86EC453810D648768BF62304 /* libPods-osx.a */; }; + 80AA296AE84490C074C75E91 /* libPods-osx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DB867C56C81696C5E9366366 /* libPods-osx.a */; }; + 8AB68F0B1AE5B3B300DD655A /* RKFetchedResultsControllerUpdateTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8AB68F0A1AE5B3B300DD655A /* RKFetchedResultsControllerUpdateTest.m */; }; BE05BDD11782109F00F7C9C9 /* RKRouteTest.m in Sources */ = {isa = PBXBuildFile; fileRef = BE05BDCF1782109F00F7C9C9 /* RKRouteTest.m */; }; BE05BDD2178214AA00F7C9C9 /* RKRouteTest.m in Sources */ = {isa = PBXBuildFile; fileRef = BE05BDCF1782109F00F7C9C9 /* RKRouteTest.m */; }; C0F11CE3190883380054AEA0 /* RKPathMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = C0F11CE1190883380054AEA0 /* RKPathMatcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -607,11 +542,7 @@ C0F11CE6190883460054AEA0 /* RKPathMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = C0F11CE2190883380054AEA0 /* RKPathMatcher.m */; }; C0F11CE81908C7E60054AEA0 /* RKCoreData.h in Headers */ = {isa = PBXBuildFile; fileRef = C0F11CE71908C7E60054AEA0 /* RKCoreData.h */; settings = {ATTRIBUTES = (Public, ); }; }; C0F11CE91908C7E60054AEA0 /* RKCoreData.h in Headers */ = {isa = PBXBuildFile; fileRef = C0F11CE71908C7E60054AEA0 /* RKCoreData.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DB1148441A0B26B100C8A00A /* RKLumberjackLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = DB1148421A0B26B100C8A00A /* RKLumberjackLogger.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DB1148451A0B26B100C8A00A /* RKLumberjackLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = DB1148421A0B26B100C8A00A /* RKLumberjackLogger.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DB1148461A0B26B100C8A00A /* RKLumberjackLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DB1148431A0B26B100C8A00A /* RKLumberjackLogger.m */; }; - DB1148471A0B26B100C8A00A /* RKLumberjackLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DB1148431A0B26B100C8A00A /* RKLumberjackLogger.m */; }; - E2F2B89961FC462B981CEB7A /* libPods-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E457EFC3D502479D8B4FCF2A /* libPods-ios.a */; }; + FFD7948D0AE44A4290977909 /* libPods-RestKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5EA1EF52129B3341280753E4 /* libPods-RestKit.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -644,9 +575,10 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 04D69B4B2A54475834B333CF /* Pods-osx.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-osx.release.xcconfig"; path = "Pods/Target Support Files/Pods-osx/Pods-osx.release.xcconfig"; sourceTree = ""; }; - 061E3E4524CE8EF78257C26C /* Pods-ios.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ios.release.xcconfig"; path = "Pods/Target Support Files/Pods-ios/Pods-ios.release.xcconfig"; sourceTree = ""; }; - 147F950728350A64F103F55D /* Pods-ios.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ios.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ios/Pods-ios.debug.xcconfig"; sourceTree = ""; }; + 0B096CE4874E766ECE78D229 /* Pods-ios.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ios.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ios/Pods-ios.debug.xcconfig"; sourceTree = ""; }; + 1689DAED1B87CEA900254FB7 /* RKLumberjackLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKLumberjackLogger.h; sourceTree = ""; }; + 1689DAEE1B87CEA900254FB7 /* RKLumberjackLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKLumberjackLogger.m; sourceTree = ""; }; + 1ABDEC386A27292EF883B0BE /* Pods-RestKitFramework.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RestKitFramework.release.xcconfig"; path = "Pods/Target Support Files/Pods-RestKitFramework/Pods-RestKitFramework.release.xcconfig"; sourceTree = ""; }; 2501405215366000004E0466 /* RKObjectiveCppTest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RKObjectiveCppTest.mm; sourceTree = ""; }; 2502C8E715F79CF70060FD75 /* CoreData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreData.h; sourceTree = ""; }; 2502C8E815F79CF70060FD75 /* Network.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Network.h; sourceTree = ""; }; @@ -727,8 +659,6 @@ 25160EA21456532C0060A5C5 /* lcl_RK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_RK.h; sourceTree = ""; }; 25160EA31456532C0060A5C5 /* lcl_RK.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = lcl_RK.m; sourceTree = ""; }; 25160EA71456532C0060A5C5 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = ""; }; - 25160EBD1456532C0060A5C5 /* SOCKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SOCKit.h; sourceTree = ""; }; - 25160EBE1456532C0060A5C5 /* SOCKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SOCKit.m; sourceTree = ""; }; 25160F161456538B0060A5C5 /* libxml2.dylib */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; 25160F7B145657220060A5C5 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = SDKs/MacOSX10.7.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = DEVELOPER_DIR; }; 25160F7D1456572F0060A5C5 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; }; @@ -816,12 +746,6 @@ 252029021577AE1800076FB4 /* RKRoute.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKRoute.m; sourceTree = ""; }; 252029081577C78600076FB4 /* RKRouteSetTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKRouteSetTest.m; sourceTree = ""; }; 252205CB162B242400F7B11E /* RKHTTPUtilitiesTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKHTTPUtilitiesTest.m; sourceTree = ""; }; - 252CCE6017E08E2D00B7F0BF /* RKValueTransformers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKValueTransformers.h; sourceTree = ""; }; - 252CCE6117E08E2D00B7F0BF /* RKValueTransformers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKValueTransformers.m; sourceTree = ""; }; - 252CCE6E17E0CA2700B7F0BF /* ISO8601DateFormatterValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISO8601DateFormatterValueTransformer.h; sourceTree = ""; }; - 252CCE6F17E0CA2700B7F0BF /* ISO8601DateFormatterValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ISO8601DateFormatterValueTransformer.m; sourceTree = ""; }; - 252CCE7017E0CA2700B7F0BF /* RKISO8601DateFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKISO8601DateFormatter.h; sourceTree = ""; }; - 252CCE7117E0CA2700B7F0BF /* RKISO8601DateFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKISO8601DateFormatter.m; sourceTree = ""; }; 252EFAF814D8EAEC004863C8 /* RKEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKEvent.h; sourceTree = ""; }; 252EFAF914D8EAEC004863C8 /* RKEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKEvent.m; sourceTree = ""; }; 252EFAFC14D8EB30004863C8 /* RKTestNotificationObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RKTestNotificationObserver.h; path = Testing/RKTestNotificationObserver.h; sourceTree = ""; }; @@ -883,25 +807,6 @@ 2598888B15EC169E006CAE95 /* RKPropertyMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKPropertyMapping.h; sourceTree = ""; }; 2598888C15EC169E006CAE95 /* RKPropertyMapping.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKPropertyMapping.m; sourceTree = ""; }; 259AC480162B05C80012D2F9 /* RKObjectRequestOperationTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKObjectRequestOperationTest.m; sourceTree = ""; }; - 259B96C21604CCCC0000C250 /* AFHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPClient.h; sourceTree = ""; }; - 259B96C31604CCCC0000C250 /* AFHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPClient.m; sourceTree = ""; }; - 259B96C41604CCCC0000C250 /* AFHTTPRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPRequestOperation.h; sourceTree = ""; }; - 259B96C51604CCCC0000C250 /* AFHTTPRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPRequestOperation.m; sourceTree = ""; }; - 259B96C61604CCCC0000C250 /* AFImageRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFImageRequestOperation.h; sourceTree = ""; }; - 259B96C71604CCCC0000C250 /* AFImageRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFImageRequestOperation.m; sourceTree = ""; }; - 259B96C81604CCCC0000C250 /* AFJSONRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFJSONRequestOperation.h; sourceTree = ""; }; - 259B96C91604CCCC0000C250 /* AFJSONRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFJSONRequestOperation.m; sourceTree = ""; }; - 259B96CA1604CCCC0000C250 /* AFNetworkActivityIndicatorManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFNetworkActivityIndicatorManager.m; sourceTree = ""; }; - 259B96CB1604CCCC0000C250 /* AFPropertyListRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFPropertyListRequestOperation.h; sourceTree = ""; }; - 259B96CC1604CCCC0000C250 /* AFPropertyListRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFPropertyListRequestOperation.m; sourceTree = ""; }; - 259B96CD1604CCCC0000C250 /* AFURLConnectionOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFURLConnectionOperation.h; sourceTree = ""; }; - 259B96CE1604CCCC0000C250 /* AFURLConnectionOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFURLConnectionOperation.m; sourceTree = ""; }; - 259B96CF1604CCCC0000C250 /* AFXMLRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFXMLRequestOperation.h; sourceTree = ""; }; - 259B96D01604CCCC0000C250 /* AFXMLRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFXMLRequestOperation.m; sourceTree = ""; }; - 259B96D11604CCCC0000C250 /* UIImageView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+AFNetworking.m"; sourceTree = ""; }; - 259B96D21604CCCC0000C250 /* AFNetworkActivityIndicatorManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworkActivityIndicatorManager.h; sourceTree = ""; }; - 259B96D31604CCCC0000C250 /* UIImageView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+AFNetworking.h"; sourceTree = ""; }; - 259B96D41604CCCC0000C250 /* AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworking.h; sourceTree = ""; }; 259D983B154F6C90008C90F5 /* benchmark_parents_and_children.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = benchmark_parents_and_children.json; sourceTree = ""; }; 259D98521550C69A008C90F5 /* RKEntityByAttributeCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKEntityByAttributeCache.h; sourceTree = ""; }; 259D98531550C69A008C90F5 /* RKEntityByAttributeCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKEntityByAttributeCache.m; sourceTree = ""; }; @@ -941,13 +846,6 @@ 25B6EA0714CF947D00B1E881 /* CoreGraphics.framework */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 25BB392D161F4FD700E5C72A /* RKPathUtilitiesTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKPathUtilitiesTest.m; sourceTree = ""; }; 25C246A315C83B090032212E /* RKSearchTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKSearchTest.m; sourceTree = ""; }; - 25C6C0A51716F6F800C98A73 /* TKEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TKEvent.h; path = Code/TKEvent.h; sourceTree = ""; }; - 25C6C0A61716F6F800C98A73 /* TKEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TKEvent.m; path = Code/TKEvent.m; sourceTree = ""; }; - 25C6C0A71716F6F800C98A73 /* TKState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TKState.h; path = Code/TKState.h; sourceTree = ""; }; - 25C6C0A81716F6F800C98A73 /* TKState.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TKState.m; path = Code/TKState.m; sourceTree = ""; }; - 25C6C0A91716F6F800C98A73 /* TKStateMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TKStateMachine.h; path = Code/TKStateMachine.h; sourceTree = ""; }; - 25C6C0AA1716F6F800C98A73 /* TKStateMachine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TKStateMachine.m; path = Code/TKStateMachine.m; sourceTree = ""; }; - 25C6C0AC1716F6F800C98A73 /* TransitionKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TransitionKit.h; path = Code/TransitionKit.h; sourceTree = ""; }; 25C6C0E61716F79B00C98A73 /* RKOperationStateMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKOperationStateMachine.h; sourceTree = ""; }; 25C6C0E71716F79B00C98A73 /* RKOperationStateMachine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKOperationStateMachine.m; sourceTree = ""; }; 25C954A415542A47005C9E08 /* RKTestConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RKTestConstants.m; path = Testing/RKTestConstants.m; sourceTree = ""; }; @@ -955,8 +853,6 @@ 25CAAA9315254E7800CAE5D7 /* ArrayOfHumans.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = ArrayOfHumans.json; sourceTree = ""; }; 25CC5C58161DDADD0008BD21 /* RKResponseDescriptorTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKResponseDescriptorTest.m; sourceTree = ""; }; 25CDA0E2161E821000F583F3 /* RKISODateFormatterTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKISODateFormatterTest.m; sourceTree = ""; }; - 25DA356D1836741C001A56A0 /* TKTransition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TKTransition.h; path = Code/TKTransition.h; sourceTree = ""; }; - 25DA356E1836741C001A56A0 /* TKTransition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TKTransition.m; path = Code/TKTransition.m; sourceTree = ""; }; 25DB7507151BD551009F01AF /* NSManagedObjectContext+RKAdditionsTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSManagedObjectContext+RKAdditionsTest.m"; sourceTree = ""; }; 25E36E0115195CED00F9E448 /* RKFetchRequestMappingCacheTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKFetchRequestMappingCacheTest.m; sourceTree = ""; }; 25E88C86165C5CC30042ABD0 /* RKConnectionDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKConnectionDescription.h; sourceTree = ""; }; @@ -974,12 +870,14 @@ 25FBB851159272DD00955D27 /* RKRouter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKRouter.m; sourceTree = ""; }; 3E886DC0169E10A70069C56B /* has_many_with_to_one_relationship.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = has_many_with_to_one_relationship.json; sourceTree = ""; }; 3EB0D83816ADCEFC00E9CEA2 /* empty_human.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = empty_human.json; sourceTree = ""; }; + 538B0BD51BBCAF8C0068C386 /* with_to_one_relationship_inside_collection.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = with_to_one_relationship_inside_collection.json; sourceTree = ""; }; 54CDB45917B408B100FAC285 /* RKStringTokenizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKStringTokenizer.h; sourceTree = ""; }; 54CDB45A17B408B100FAC285 /* RKStringTokenizer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKStringTokenizer.m; sourceTree = ""; }; 5910B0B01AC9811900721876 /* hoarderWithCats_issue_2192.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = hoarderWithCats_issue_2192.json; sourceTree = ""; }; 5910B0BD1AC9A23E00721876 /* catsWithParent_issue_2194.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = catsWithParent_issue_2194.json; sourceTree = ""; }; 5C927E131608FFFD00DC8B07 /* RKDictionaryUtilitiesTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKDictionaryUtilitiesTest.m; sourceTree = ""; }; 5CCC295515B7124A0045F0F5 /* RKMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKMacros.h; sourceTree = ""; }; + 5EA1EF52129B3341280753E4 /* libPods-RestKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RestKit.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 7394DF3514CF157A00CE7BCE /* RKManagedObjectCaching.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKManagedObjectCaching.h; sourceTree = ""; }; 7394DF3814CF168C00CE7BCE /* RKFetchRequestManagedObjectCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKFetchRequestManagedObjectCache.h; sourceTree = ""; }; 7394DF3914CF168C00CE7BCE /* RKFetchRequestManagedObjectCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKFetchRequestManagedObjectCache.m; sourceTree = ""; }; @@ -988,16 +886,21 @@ 73D3907114CA19F90093E3D6 /* parent.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = parent.json; sourceTree = ""; }; 73D3907314CA1A4A0093E3D6 /* child.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = child.json; sourceTree = ""; }; 73D3907814CA1D710093E3D6 /* channels.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = channels.xml; sourceTree = ""; }; - 86EC453810D648768BF62304 /* libPods-osx.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-osx.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 8AB68F0A1AE5B3B300DD655A /* RKFetchedResultsControllerUpdateTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKFetchedResultsControllerUpdateTest.m; sourceTree = ""; }; + 9B15BBB1F11B91C32F72DFBF /* libPods-RestKitFramework.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RestKitFramework.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + A339C3AFD7C094BEAFE92A93 /* Pods-ios.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ios.release.xcconfig"; path = "Pods/Target Support Files/Pods-ios/Pods-ios.release.xcconfig"; sourceTree = ""; }; + A920AEDAEC3C6599433D2720 /* Pods-osx.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-osx.debug.xcconfig"; path = "Pods/Target Support Files/Pods-osx/Pods-osx.debug.xcconfig"; sourceTree = ""; }; + AD144E244684975F290D70ED /* Pods-RestKit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RestKit.release.xcconfig"; path = "Pods/Target Support Files/Pods-RestKit/Pods-RestKit.release.xcconfig"; sourceTree = ""; }; + AD2DD8D9C9EA769B53865C88 /* Pods-RestKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RestKit.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RestKit/Pods-RestKit.debug.xcconfig"; sourceTree = ""; }; BE05BDCF1782109F00F7C9C9 /* RKRouteTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKRouteTest.m; sourceTree = ""; }; C0F11CE1190883380054AEA0 /* RKPathMatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKPathMatcher.h; sourceTree = ""; }; C0F11CE2190883380054AEA0 /* RKPathMatcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKPathMatcher.m; sourceTree = ""; }; C0F11CE71908C7E60054AEA0 /* RKCoreData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKCoreData.h; sourceTree = ""; }; - D8EFCBE1978F7946E0081FAD /* Pods-osx.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-osx.debug.xcconfig"; path = "Pods/Target Support Files/Pods-osx/Pods-osx.debug.xcconfig"; sourceTree = ""; }; - DB1148421A0B26B100C8A00A /* RKLumberjackLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKLumberjackLogger.h; sourceTree = ""; }; - DB1148431A0B26B100C8A00A /* RKLumberjackLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKLumberjackLogger.m; sourceTree = ""; }; - E457EFC3D502479D8B4FCF2A /* libPods-ios.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ios.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + C5608EB544CBB19BBACC13BA /* Pods-RestKitFramework.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RestKitFramework.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RestKitFramework/Pods-RestKitFramework.debug.xcconfig"; sourceTree = ""; }; + DB867C56C81696C5E9366366 /* libPods-osx.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-osx.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + DC09A8FD6016D24B797977A1 /* libPods-ios.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ios.a"; sourceTree = BUILT_PRODUCTS_DIR; }; F66056291744FF9000A87A45 /* and_cats.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = and_cats.json; sourceTree = ""; }; + F6B428543BF5CF359F239FE1 /* Pods-osx.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-osx.release.xcconfig"; path = "Pods/Target Support Files/Pods-osx/Pods-osx.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -1007,6 +910,7 @@ files = ( 25C20466160ABC4800D418D5 /* SystemConfiguration.framework in Frameworks */, 25160D1A14564E810060A5C5 /* Foundation.framework in Frameworks */, + FFD7948D0AE44A4290977909 /* libPods-RestKit.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1024,7 +928,7 @@ 251611291456F50F0060A5C5 /* SystemConfiguration.framework in Frameworks */, 25160D2A14564E820060A5C5 /* UIKit.framework in Frameworks */, 25160D2B14564E820060A5C5 /* Foundation.framework in Frameworks */, - E2F2B89961FC462B981CEB7A /* libPods-ios.a in Frameworks */, + 3304DA75F9D62CBBA0F1D286 /* libPods-ios.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1035,6 +939,7 @@ 25A34245147D8AAA0009758D /* Security.framework in Frameworks */, 25160F7E145657300060A5C5 /* Cocoa.framework in Frameworks */, 25160F7C145657220060A5C5 /* SystemConfiguration.framework in Frameworks */, + 6CEFFA4880A12A78BAA45D14 /* libPods-RestKitFramework.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1045,20 +950,33 @@ 25565959161FC3CD00F5BB20 /* SystemConfiguration.framework in Frameworks */, 25565956161FC3C300F5BB20 /* CoreServices.framework in Frameworks */, 25160E7A145651060060A5C5 /* Cocoa.framework in Frameworks */, - 7F9CBC6174004E31AEC35813 /* libPods-osx.a in Frameworks */, + 80AA296AE84490C074C75E91 /* libPods-osx.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 15BB5BBD8E8B9B2C9C8B11BC /* Pods */ = { + 1689DAEC1B87CEA900254FB7 /* CocoaLumberjack */ = { isa = PBXGroup; children = ( - 147F950728350A64F103F55D /* Pods-ios.debug.xcconfig */, - 061E3E4524CE8EF78257C26C /* Pods-ios.release.xcconfig */, - D8EFCBE1978F7946E0081FAD /* Pods-osx.debug.xcconfig */, - 04D69B4B2A54475834B333CF /* Pods-osx.release.xcconfig */, + 1689DAED1B87CEA900254FB7 /* RKLumberjackLogger.h */, + 1689DAEE1B87CEA900254FB7 /* RKLumberjackLogger.m */, + ); + path = CocoaLumberjack; + sourceTree = ""; + }; + 21C3ABBAD1E23EF5D671E158 /* Pods */ = { + isa = PBXGroup; + children = ( + AD2DD8D9C9EA769B53865C88 /* Pods-RestKit.debug.xcconfig */, + AD144E244684975F290D70ED /* Pods-RestKit.release.xcconfig */, + C5608EB544CBB19BBACC13BA /* Pods-RestKitFramework.debug.xcconfig */, + 1ABDEC386A27292EF883B0BE /* Pods-RestKitFramework.release.xcconfig */, + 0B096CE4874E766ECE78D229 /* Pods-ios.debug.xcconfig */, + A339C3AFD7C094BEAFE92A93 /* Pods-ios.release.xcconfig */, + A920AEDAEC3C6599433D2720 /* Pods-osx.debug.xcconfig */, + F6B428543BF5CF359F239FE1 /* Pods-osx.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -1099,9 +1017,10 @@ 25160E8D145652E40060A5C5 /* Vendor */, 25160D1814564E810060A5C5 /* Frameworks */, 25160D1714564E810060A5C5 /* Products */, - 15BB5BBD8E8B9B2C9C8B11BC /* Pods */, + 21C3ABBAD1E23EF5D671E158 /* Pods */, ); sourceTree = ""; + usesTabs = 0; }; 25160D1714564E810060A5C5 /* Products */ = { isa = PBXGroup; @@ -1135,8 +1054,10 @@ 25160E63145651060060A5C5 /* Cocoa.framework */, 25EC1B0014F8078100C3CF3F /* CoreFoundation.framework */, 25160E65145651060060A5C5 /* Other Frameworks */, - E457EFC3D502479D8B4FCF2A /* libPods-ios.a */, - 86EC453810D648768BF62304 /* libPods-osx.a */, + 5EA1EF52129B3341280753E4 /* libPods-RestKit.a */, + 9B15BBB1F11B91C32F72DFBF /* libPods-RestKitFramework.a */, + DC09A8FD6016D24B797977A1 /* libPods-ios.a */, + DB867C56C81696C5E9366366 /* libPods-osx.a */, ); name = Frameworks; sourceTree = ""; @@ -1154,6 +1075,7 @@ 2502C8EB15F79CF70060FD75 /* Support.h */, 25160DA2145650490060A5C5 /* Support */, 2502C8EC15F79CF70060FD75 /* Testing.h */, + 1689DAEC1B87CEA900254FB7 /* CocoaLumberjack */, 252EFB1F14D9A8D4004863C8 /* Testing */, 2502C8EA15F79CF70060FD75 /* Search.h */, 25104F0E15C30C7900829135 /* Search */, @@ -1259,8 +1181,6 @@ 25160DBF145650490060A5C5 /* RKDotNetDateFormatter.m */, 25160DC1145650490060A5C5 /* RKLog.h */, 25160DC2145650490060A5C5 /* RKLog.m */, - DB1148421A0B26B100C8A00A /* RKLumberjackLogger.h */, - DB1148431A0B26B100C8A00A /* RKLumberjackLogger.m */, 25160DC3145650490060A5C5 /* RKMIMETypes.h */, 25160DC4145650490060A5C5 /* RKMIMETypes.m */, 25160DC5145650490060A5C5 /* RKSerialization.h */, @@ -1290,12 +1210,7 @@ 25160E8D145652E40060A5C5 /* Vendor */ = { isa = PBXGroup; children = ( - 252CCE6D17E0CA2700B7F0BF /* ISO8601DateFormatterValueTransformer */, - 252CCE5D17E08E2D00B7F0BF /* RKValueTransformers */, - 25C6C0A21716F6F800C98A73 /* TransitionKit */, - 25BCB31715ED57D500EE84DD /* AFNetworking */, 25160EA01456532C0060A5C5 /* LibComponentLogging */, - 25160EB71456532C0060A5C5 /* SOCKit */, ); path = Vendor; sourceTree = ""; @@ -1318,15 +1233,6 @@ path = Core; sourceTree = ""; }; - 25160EB71456532C0060A5C5 /* SOCKit */ = { - isa = PBXGroup; - children = ( - 25160EBD1456532C0060A5C5 /* SOCKit.h */, - 25160EBE1456532C0060A5C5 /* SOCKit.m */, - ); - path = SOCKit; - sourceTree = ""; - }; 25160FC51456F2330060A5C5 /* Tests */ = { isa = PBXGroup; children = ( @@ -1361,6 +1267,7 @@ 2564E40A16173F7B00C12D7D /* RKRelationshipConnectionOperationTest.m */, 2546A95716628EDD0078E044 /* RKConnectionDescriptionTest.m */, 2582F56C173038750043B8BB /* RKInMemoryManagedObjectCacheTest.m */, + 8AB68F0A1AE5B3B300DD655A /* RKFetchedResultsControllerUpdateTest.m */, ); name = CoreData; path = Logic/CoreData; @@ -1437,6 +1344,7 @@ 3E886DC0169E10A70069C56B /* has_many_with_to_one_relationship.json */, 25160FE31456F2330060A5C5 /* with_to_one_relationship.json */, F66056291744FF9000A87A45 /* and_cats.json */, + 538B0BD51BBCAF8C0068C386 /* with_to_one_relationship_inside_collection.json */, ); path = humans; sourceTree = ""; @@ -1582,28 +1490,6 @@ path = Logic/Support; sourceTree = ""; }; - 252CCE5D17E08E2D00B7F0BF /* RKValueTransformers */ = { - isa = PBXGroup; - children = ( - 252CCE6017E08E2D00B7F0BF /* RKValueTransformers.h */, - 252CCE6117E08E2D00B7F0BF /* RKValueTransformers.m */, - ); - name = RKValueTransformers; - path = RKValueTransformers/Code; - sourceTree = ""; - }; - 252CCE6D17E0CA2700B7F0BF /* ISO8601DateFormatterValueTransformer */ = { - isa = PBXGroup; - children = ( - 252CCE6E17E0CA2700B7F0BF /* ISO8601DateFormatterValueTransformer.h */, - 252CCE6F17E0CA2700B7F0BF /* ISO8601DateFormatterValueTransformer.m */, - 252CCE7017E0CA2700B7F0BF /* RKISO8601DateFormatter.h */, - 252CCE7117E0CA2700B7F0BF /* RKISO8601DateFormatter.m */, - ); - name = ISO8601DateFormatterValueTransformer; - path = ISO8601DateFormatterValueTransformer/Code; - sourceTree = ""; - }; 252EFB1F14D9A8D4004863C8 /* Testing */ = { isa = PBXGroup; children = ( @@ -1637,49 +1523,6 @@ path = Logic/Testing; sourceTree = ""; }; - 25BCB31715ED57D500EE84DD /* AFNetworking */ = { - isa = PBXGroup; - children = ( - 259B96C21604CCCC0000C250 /* AFHTTPClient.h */, - 259B96C31604CCCC0000C250 /* AFHTTPClient.m */, - 259B96C41604CCCC0000C250 /* AFHTTPRequestOperation.h */, - 259B96C51604CCCC0000C250 /* AFHTTPRequestOperation.m */, - 259B96C61604CCCC0000C250 /* AFImageRequestOperation.h */, - 259B96C71604CCCC0000C250 /* AFImageRequestOperation.m */, - 259B96C81604CCCC0000C250 /* AFJSONRequestOperation.h */, - 259B96C91604CCCC0000C250 /* AFJSONRequestOperation.m */, - 259B96CA1604CCCC0000C250 /* AFNetworkActivityIndicatorManager.m */, - 259B96CB1604CCCC0000C250 /* AFPropertyListRequestOperation.h */, - 259B96CC1604CCCC0000C250 /* AFPropertyListRequestOperation.m */, - 259B96CD1604CCCC0000C250 /* AFURLConnectionOperation.h */, - 259B96CE1604CCCC0000C250 /* AFURLConnectionOperation.m */, - 259B96CF1604CCCC0000C250 /* AFXMLRequestOperation.h */, - 259B96D01604CCCC0000C250 /* AFXMLRequestOperation.m */, - 259B96D11604CCCC0000C250 /* UIImageView+AFNetworking.m */, - 259B96D21604CCCC0000C250 /* AFNetworkActivityIndicatorManager.h */, - 259B96D31604CCCC0000C250 /* UIImageView+AFNetworking.h */, - 259B96D41604CCCC0000C250 /* AFNetworking.h */, - ); - name = AFNetworking; - path = AFNetworking/AFNetworking; - sourceTree = ""; - }; - 25C6C0A21716F6F800C98A73 /* TransitionKit */ = { - isa = PBXGroup; - children = ( - 25DA356D1836741C001A56A0 /* TKTransition.h */, - 25DA356E1836741C001A56A0 /* TKTransition.m */, - 25C6C0A51716F6F800C98A73 /* TKEvent.h */, - 25C6C0A61716F6F800C98A73 /* TKEvent.m */, - 25C6C0A71716F6F800C98A73 /* TKState.h */, - 25C6C0A81716F6F800C98A73 /* TKState.m */, - 25C6C0A91716F6F800C98A73 /* TKStateMachine.h */, - 25C6C0AA1716F6F800C98A73 /* TKStateMachine.m */, - 25C6C0AC1716F6F800C98A73 /* TransitionKit.h */, - ); - path = TransitionKit; - sourceTree = ""; - }; 25EC1AD614F8022600C3CF3F /* Resources */ = { isa = PBXGroup; children = ( @@ -1799,10 +1642,8 @@ 25160DE5145650490060A5C5 /* RKPropertyInspector+CoreData.h in Headers */, 25160E09145650490060A5C5 /* RKDynamicMapping.h in Headers */, 25160E0B145650490060A5C5 /* RKErrorMessage.h in Headers */, - 252CCE7217E0CA2700B7F0BF /* ISO8601DateFormatterValueTransformer.h in Headers */, 25160E0F145650490060A5C5 /* RKAttributeMapping.h in Headers */, 25160E16145650490060A5C5 /* RKMapperOperation.h in Headers */, - DB1148441A0B26B100C8A00A /* RKLumberjackLogger.h in Headers */, 25160E18145650490060A5C5 /* RKMapperOperation_Private.h in Headers */, 25160E1A145650490060A5C5 /* RKObjectMapping.h in Headers */, 25160E1C145650490060A5C5 /* RKMapping.h in Headers */, @@ -1816,12 +1657,11 @@ 25160E44145650490060A5C5 /* RestKit-Prefix.pch in Headers */, 25160E47145650490060A5C5 /* RKDotNetDateFormatter.h in Headers */, 25160E4A145650490060A5C5 /* RKLog.h in Headers */, - 252CCE7617E0CA2700B7F0BF /* RKISO8601DateFormatter.h in Headers */, 25160E4C145650490060A5C5 /* RKMIMETypes.h in Headers */, 25160E4E145650490060A5C5 /* RKSerialization.h in Headers */, 25160EE21456532C0060A5C5 /* lcl_RK.h in Headers */, - 25160F081456532C0060A5C5 /* SOCKit.h in Headers */, 25160E2E145650490060A5C5 /* RestKit.h in Headers */, + 1689DAEF1B87CEA900254FB7 /* RKLumberjackLogger.h in Headers */, 25B408261491CDDC00F21111 /* RKPathUtilities.h in Headers */, 25B6E95514CF795D00B1E881 /* RKErrors.h in Headers */, 25B6E95C14CF7E3C00B1E881 /* RKObjectMappingMatcher.h in Headers */, @@ -1872,31 +1712,15 @@ 2502C8F715F79CF70060FD75 /* Testing.h in Headers */, 2534781815FFD4A6002C0E4E /* RKURLEncodedSerialization.h in Headers */, 253477F115FFBC61002C0E4E /* RKDictionaryUtilities.h in Headers */, - 259B96D51604CCCC0000C250 /* AFHTTPClient.h in Headers */, - 259B96D91604CCCC0000C250 /* AFHTTPRequestOperation.h in Headers */, - 259B96DD1604CCCC0000C250 /* AFImageRequestOperation.h in Headers */, - 259B96E11604CCCC0000C250 /* AFJSONRequestOperation.h in Headers */, - 259B96E71604CCCC0000C250 /* AFPropertyListRequestOperation.h in Headers */, - 259B96EB1604CCCC0000C250 /* AFURLConnectionOperation.h in Headers */, - 259B96EF1604CCCC0000C250 /* AFXMLRequestOperation.h in Headers */, - 259B96F51604CCCC0000C250 /* AFNetworkActivityIndicatorManager.h in Headers */, - 259B96F71604CCCC0000C250 /* UIImageView+AFNetworking.h in Headers */, - 259B96F91604CCCC0000C250 /* AFNetworking.h in Headers */, 25F53F391606269400A093BE /* RKObjectRequestOperationSubclass.h in Headers */, 25A226D61618A57500952D72 /* RKObjectUtilities.h in Headers */, C0F11CE3190883380054AEA0 /* RKPathMatcher.h in Headers */, - 252CCE6617E08E2D00B7F0BF /* RKValueTransformers.h in Headers */, 2507C327161BD5C700EA71FF /* RKTestHelpers.h in Headers */, C0F11CE81908C7E60054AEA0 /* RKCoreData.h in Headers */, 25E88C88165C5CC30042ABD0 /* RKConnectionDescription.h in Headers */, 25A8C2341673BD480014D9A6 /* RKConnectionTestExpectation.h in Headers */, 25A199D416ED035A00792629 /* RKBenchmark.h in Headers */, - 25C6C0BD1716F6F800C98A73 /* TKEvent.h in Headers */, - 25C6C0C11716F6F800C98A73 /* TKState.h in Headers */, - 25C6C0C51716F6F800C98A73 /* TKStateMachine.h in Headers */, - 25C6C0CB1716F6F800C98A73 /* TransitionKit.h in Headers */, 25C6C0E81716F79B00C98A73 /* RKOperationStateMachine.h in Headers */, - 25DA356F1836741D001A56A0 /* TKTransition.h in Headers */, 54CDB45B17B408B100FAC285 /* RKStringTokenizer.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1906,14 +1730,11 @@ buildActionMask = 2147483647; files = ( 25160EE31456532C0060A5C5 /* lcl_RK.h in Headers */, - 25160F091456532C0060A5C5 /* SOCKit.h in Headers */, 25160F44145655C60060A5C5 /* RKDynamicMapping.h in Headers */, 25160F46145655C60060A5C5 /* RKErrorMessage.h in Headers */, 25160F4A145655C60060A5C5 /* RKAttributeMapping.h in Headers */, - 252CCE7317E0CA2700B7F0BF /* ISO8601DateFormatterValueTransformer.h in Headers */, 25160F51145655C60060A5C5 /* RKMapperOperation.h in Headers */, 25160F53145655C60060A5C5 /* RKMapperOperation_Private.h in Headers */, - DB1148451A0B26B100C8A00A /* RKLumberjackLogger.h in Headers */, 25160F55145655C60060A5C5 /* RKObjectMapping.h in Headers */, 25160F57145655C60060A5C5 /* RKMapping.h in Headers */, 25160F58145655C60060A5C5 /* RKMappingOperation.h in Headers */, @@ -1927,13 +1748,13 @@ 25160F85145657650060A5C5 /* lcl_config_components_RK.h in Headers */, 25160F86145657650060A5C5 /* lcl_config_extensions_RK.h in Headers */, 25160F87145657650060A5C5 /* lcl_config_logger_RK.h in Headers */, - 252CCE7717E0CA2700B7F0BF /* RKISO8601DateFormatter.h in Headers */, 25160F901456576C0060A5C5 /* RKDotNetDateFormatter.h in Headers */, 25160F931456576C0060A5C5 /* RKLog.h in Headers */, 25160F951456576C0060A5C5 /* RKMIMETypes.h in Headers */, 25160F971456576C0060A5C5 /* RKSerialization.h in Headers */, 25160F25145655AF0060A5C5 /* RestKit.h in Headers */, 25B408271491CDDC00F21111 /* RKPathUtilities.h in Headers */, + 1689DAF01B87CEA900254FB7 /* RKLumberjackLogger.h in Headers */, 25B6E95614CF795D00B1E881 /* RKErrors.h in Headers */, 25B6E95D14CF7E3C00B1E881 /* RKObjectMappingMatcher.h in Headers */, 25FABED314E3796C00E609E7 /* RKTestNotificationObserver.h in Headers */, @@ -1982,33 +1803,17 @@ 2502C8F815F79CF70060FD75 /* Testing.h in Headers */, 253477F215FFBC61002C0E4E /* RKDictionaryUtilities.h in Headers */, 2534781915FFD4A6002C0E4E /* RKURLEncodedSerialization.h in Headers */, - 259B96D61604CCCC0000C250 /* AFHTTPClient.h in Headers */, - 259B96DA1604CCCC0000C250 /* AFHTTPRequestOperation.h in Headers */, - 259B96DE1604CCCC0000C250 /* AFImageRequestOperation.h in Headers */, - 259B96E21604CCCC0000C250 /* AFJSONRequestOperation.h in Headers */, - 259B96E81604CCCC0000C250 /* AFPropertyListRequestOperation.h in Headers */, - 259B96EC1604CCCC0000C250 /* AFURLConnectionOperation.h in Headers */, - 259B96F01604CCCC0000C250 /* AFXMLRequestOperation.h in Headers */, - 259B96F61604CCCC0000C250 /* AFNetworkActivityIndicatorManager.h in Headers */, - 259B96F81604CCCC0000C250 /* UIImageView+AFNetworking.h in Headers */, - 259B96FA1604CCCC0000C250 /* AFNetworking.h in Headers */, 25F53F3A1606269400A093BE /* RKObjectRequestOperationSubclass.h in Headers */, 25A226D71618A57500952D72 /* RKObjectUtilities.h in Headers */, 2507C328161BD5C700EA71FF /* RKTestHelpers.h in Headers */, 25E88C89165C5CC30042ABD0 /* RKConnectionDescription.h in Headers */, - 252CCE6717E08E2D00B7F0BF /* RKValueTransformers.h in Headers */, C0F11CE5190883460054AEA0 /* RKPathMatcher.h in Headers */, 255893E3166BA6A20010C70B /* RKObjectParameterization.h in Headers */, 255893E4166BA7400010C70B /* RestKit-Prefix.pch in Headers */, 255893E5166BA7700010C70B /* RKTestFixture.h in Headers */, 25A8C2351673BD480014D9A6 /* RKConnectionTestExpectation.h in Headers */, 25A199D516ED035A00792629 /* RKBenchmark.h in Headers */, - 25C6C0BE1716F6F800C98A73 /* TKEvent.h in Headers */, - 25C6C0C21716F6F800C98A73 /* TKState.h in Headers */, - 25C6C0C61716F6F800C98A73 /* TKStateMachine.h in Headers */, - 25C6C0CC1716F6F800C98A73 /* TransitionKit.h in Headers */, 25C6C0E91716F79B00C98A73 /* RKOperationStateMachine.h in Headers */, - 25DA35701836741D001A56A0 /* TKTransition.h in Headers */, 54CDB45C17B408B100FAC285 /* RKStringTokenizer.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; @@ -2020,9 +1825,11 @@ isa = PBXNativeTarget; buildConfigurationList = 25160D3A14564E820060A5C5 /* Build configuration list for PBXNativeTarget "RestKit" */; buildPhases = ( + 1EC288EEF46DC7EC455B012C /* Check Pods Manifest.lock */, 25160D1214564E810060A5C5 /* Sources */, 25160D1314564E810060A5C5 /* Frameworks */, 25160D1414564E810060A5C5 /* Headers */, + F6534AD38F03B29013ACBE7E /* Copy Pods Resources */, ); buildRules = ( ); @@ -2037,11 +1844,13 @@ isa = PBXNativeTarget; buildConfigurationList = 25160D3D14564E820060A5C5 /* Build configuration list for PBXNativeTarget "RestKitTests" */; buildPhases = ( + 31E61254417653D2A601DDF8 /* Check Pods Manifest.lock */, 25160D2114564E820060A5C5 /* Sources */, 25160D2214564E820060A5C5 /* Frameworks */, 25160D2314564E820060A5C5 /* Resources */, - 212C92B936E847348494D6F7 /* Copy Pods Resources */, 25160D2414564E820060A5C5 /* ShellScript */, + D00A58B091EC84A57A1FB098 /* Copy Pods Resources */, + D53939EC83FE6753732850FE /* Embed Pods Frameworks */, ); buildRules = ( ); @@ -2057,10 +1866,12 @@ isa = PBXNativeTarget; buildConfigurationList = 25160E87145651060060A5C5 /* Build configuration list for PBXNativeTarget "RestKitFramework" */; buildPhases = ( + A7AA769D655643D4F1E58C8C /* Check Pods Manifest.lock */, 25160E5D145651060060A5C5 /* Sources */, 25160E5E145651060060A5C5 /* Frameworks */, 25160E5F145651060060A5C5 /* Headers */, 25160E60145651060060A5C5 /* Resources */, + 8F48B45166853D07B6229593 /* Copy Pods Resources */, ); buildRules = ( ); @@ -2075,12 +1886,14 @@ isa = PBXNativeTarget; buildConfigurationList = 25160E8A145651060060A5C5 /* Build configuration list for PBXNativeTarget "RestKitFrameworkTests" */; buildPhases = ( + 6A5C656B4979C48B2EE74B1A /* Check Pods Manifest.lock */, 25160E73145651060060A5C5 /* Sources */, 25160E74145651060060A5C5 /* Frameworks */, 25160E75145651060060A5C5 /* Resources */, 250CA67F147D8EEC0047D347 /* CopyFiles */, - 0779C6DD2283438BA5EAB1FB /* Copy Pods Resources */, 25160E76145651060060A5C5 /* ShellScript */, + D9DDA304517443E2F6FD2B2C /* Copy Pods Resources */, + 2FFB30DF4A3D492F0C2C5F2C /* Embed Pods Frameworks */, ); buildRules = ( ); @@ -2099,7 +1912,7 @@ isa = PBXProject; attributes = { LastTestingUpgradeCheck = 0510; - LastUpgradeCheck = 0600; + LastUpgradeCheck = 0700; ORGANIZATIONNAME = RestKit; }; buildConfigurationList = 25160D1014564E810060A5C5 /* Build configuration list for PBXProject "RestKit" */; @@ -2227,7 +2040,93 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 0779C6DD2283438BA5EAB1FB /* Copy Pods Resources */ = { + 1EC288EEF46DC7EC455B012C /* Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + 25160D2414564E820060A5C5 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\""; + }; + 25160E76145651060060A5C5 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; + }; + 2FFB30DF4A3D492F0C2C5F2C /* Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-osx/Pods-osx-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 31E61254417653D2A601DDF8 /* Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + 6A5C656B4979C48B2EE74B1A /* Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + 8F48B45166853D07B6229593 /* Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2239,9 +2138,25 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-osx/Pods-osx-resources.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RestKitFramework/Pods-RestKitFramework-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + A7AA769D655643D4F1E58C8C /* Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; }; - 212C92B936E847348494D6F7 /* Copy Pods Resources */ = { + D00A58B091EC84A57A1FB098 /* Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2254,32 +2169,52 @@ runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ios/Pods-ios-resources.sh\"\n"; + showEnvVarsInLog = 0; }; - 25160D2414564E820060A5C5 /* ShellScript */ = { + D53939EC83FE6753732850FE /* Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); + name = "Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\""; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ios/Pods-ios-frameworks.sh\"\n"; + showEnvVarsInLog = 0; }; - 25160E76145651060060A5C5 /* ShellScript */ = { + D9DDA304517443E2F6FD2B2C /* Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); + name = "Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-osx/Pods-osx-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + F6534AD38F03B29013ACBE7E /* Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RestKit/Pods-RestKit-resources.sh\"\n"; + showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -2294,29 +2229,25 @@ 25160DE2145650490060A5C5 /* RKManagedObjectStore.m in Sources */, 25160DE6145650490060A5C5 /* RKPropertyInspector+CoreData.m in Sources */, 25160E0A145650490060A5C5 /* RKDynamicMapping.m in Sources */, - DB1148461A0B26B100C8A00A /* RKLumberjackLogger.m in Sources */, 25160E0C145650490060A5C5 /* RKErrorMessage.m in Sources */, - 25DA35711836741D001A56A0 /* TKTransition.m in Sources */, 25160E10145650490060A5C5 /* RKAttributeMapping.m in Sources */, 25160E17145650490060A5C5 /* RKMapperOperation.m in Sources */, 25160E1B145650490060A5C5 /* RKObjectMapping.m in Sources */, 25160E1E145650490060A5C5 /* RKMappingOperation.m in Sources */, 25160E22145650490060A5C5 /* RKMappingResult.m in Sources */, - 252CCE7817E0CA2700B7F0BF /* RKISO8601DateFormatter.m in Sources */, 25160E24145650490060A5C5 /* RKPropertyInspector.m in Sources */, 25160E26145650490060A5C5 /* RKRelationshipMapping.m in Sources */, - 252CCE7417E0CA2700B7F0BF /* ISO8601DateFormatterValueTransformer.m in Sources */, 25160E48145650490060A5C5 /* RKDotNetDateFormatter.m in Sources */, 25160E4B145650490060A5C5 /* RKLog.m in Sources */, 25160E4D145650490060A5C5 /* RKMIMETypes.m in Sources */, 25160EE41456532C0060A5C5 /* lcl_RK.m in Sources */, - 25160F0A1456532C0060A5C5 /* SOCKit.m in Sources */, 25B408281491CDDC00F21111 /* RKPathUtilities.m in Sources */, 25B6E95814CF7A1C00B1E881 /* RKErrors.m in Sources */, 25FABED114E3796400E609E7 /* RKTestNotificationObserver.m in Sources */, 25CA7A8F14EC570200888FF8 /* RKMapping.m in Sources */, 25055B8614EEF32A00B9C4DD /* RKMappingTest.m in Sources */, 25055B8A14EEF32A00B9C4DD /* RKTestFactory.m in Sources */, + 1689DAF11B87CEA900254FB7 /* RKLumberjackLogger.m in Sources */, 25055B9114EEF40000B9C4DD /* RKPropertyMappingTestExpectation.m in Sources */, 25EC1A3B14F72B1300C3CF3F /* RKFetchRequestManagedObjectCache.m in Sources */, 25EC1A3F14F72B3100C3CF3F /* RKInMemoryManagedObjectCache.m in Sources */, @@ -2350,27 +2281,14 @@ 254372D815F54CE3006E8424 /* RKManagedObjectRequestOperation.m in Sources */, 2595B47115F670530087A59B /* RKMIMETypeSerialization.m in Sources */, 2595B47515F670530087A59B /* RKNSJSONSerialization.m in Sources */, - 252CCE6817E08E2D00B7F0BF /* RKValueTransformers.m in Sources */, 253477F315FFBC61002C0E4E /* RKDictionaryUtilities.m in Sources */, 2534781615FFD4A6002C0E4E /* RKURLEncodedSerialization.m in Sources */, - 259B96D71604CCCC0000C250 /* AFHTTPClient.m in Sources */, - 259B96DB1604CCCC0000C250 /* AFHTTPRequestOperation.m in Sources */, - 259B96DF1604CCCC0000C250 /* AFImageRequestOperation.m in Sources */, - 259B96E31604CCCC0000C250 /* AFJSONRequestOperation.m in Sources */, - 259B96E51604CCCC0000C250 /* AFNetworkActivityIndicatorManager.m in Sources */, - 259B96E91604CCCC0000C250 /* AFPropertyListRequestOperation.m in Sources */, - 259B96ED1604CCCC0000C250 /* AFURLConnectionOperation.m in Sources */, - 259B96F11604CCCC0000C250 /* AFXMLRequestOperation.m in Sources */, - 259B96F31604CCCC0000C250 /* UIImageView+AFNetworking.m in Sources */, 25A226D81618A57500952D72 /* RKObjectUtilities.m in Sources */, 2507C329161BD5C700EA71FF /* RKTestHelpers.m in Sources */, 25E88C8A165C5CC30042ABD0 /* RKConnectionDescription.m in Sources */, 25A8C2361673BD480014D9A6 /* RKConnectionTestExpectation.m in Sources */, 258BEA02168D058300C74C8C /* RKObjectMappingMatcher.m in Sources */, 25A199D616ED035A00792629 /* RKBenchmark.m in Sources */, - 25C6C0BF1716F6F800C98A73 /* TKEvent.m in Sources */, - 25C6C0C31716F6F800C98A73 /* TKState.m in Sources */, - 25C6C0C71716F6F800C98A73 /* TKStateMachine.m in Sources */, 25C6C0EA1716F79B00C98A73 /* RKOperationStateMachine.m in Sources */, 54CDB45D17B408B100FAC285 /* RKStringTokenizer.m in Sources */, ); @@ -2410,6 +2328,7 @@ 25E36E0215195CED00F9E448 /* RKFetchRequestMappingCacheTest.m in Sources */, 25DB7508151BD551009F01AF /* NSManagedObjectContext+RKAdditionsTest.m in Sources */, 259D985A1550C6BE008C90F5 /* RKEntityByAttributeCacheTest.m in Sources */, + 8AB68F0B1AE5B3B300DD655A /* RKFetchedResultsControllerUpdateTest.m in Sources */, 259D986415521B20008C90F5 /* RKEntityCacheTest.m in Sources */, 252029091577C78600076FB4 /* RKRouteSetTest.m in Sources */, 2519764315823BA1004FE9DD /* RKAttributeMappingTest.m in Sources */, @@ -2450,22 +2369,17 @@ buildActionMask = 2147483647; files = ( 25160EE51456532C0060A5C5 /* lcl_RK.m in Sources */, - 25160F0B1456532C0060A5C5 /* SOCKit.m in Sources */, 25160F45145655C60060A5C5 /* RKDynamicMapping.m in Sources */, 25160F47145655C60060A5C5 /* RKErrorMessage.m in Sources */, 25160F4B145655C60060A5C5 /* RKAttributeMapping.m in Sources */, - DB1148471A0B26B100C8A00A /* RKLumberjackLogger.m in Sources */, 25160F52145655C60060A5C5 /* RKMapperOperation.m in Sources */, - 25DA35721836741D001A56A0 /* TKTransition.m in Sources */, 25160F56145655C60060A5C5 /* RKObjectMapping.m in Sources */, 25160F59145655C60060A5C5 /* RKMappingOperation.m in Sources */, 25160F5D145655C60060A5C5 /* RKMappingResult.m in Sources */, 25160F5F145655C60060A5C5 /* RKPropertyInspector.m in Sources */, 25160F61145655C60060A5C5 /* RKRelationshipMapping.m in Sources */, - 252CCE7917E0CA2700B7F0BF /* RKISO8601DateFormatter.m in Sources */, 25160F70145655D10060A5C5 /* RKEntityMapping.m in Sources */, 25160F74145655D10060A5C5 /* RKManagedObjectImporter.m in Sources */, - 252CCE7517E0CA2700B7F0BF /* ISO8601DateFormatterValueTransformer.m in Sources */, 25160F76145655D10060A5C5 /* RKManagedObjectStore.m in Sources */, 25160F7A145655D10060A5C5 /* RKPropertyInspector+CoreData.m in Sources */, 25160F911456576C0060A5C5 /* RKDotNetDateFormatter.m in Sources */, @@ -2478,6 +2392,7 @@ 25CA7A9114EC5C2D00888FF8 /* RKTestFixture.m in Sources */, 25055B8714EEF32A00B9C4DD /* RKMappingTest.m in Sources */, 25055B8B14EEF32A00B9C4DD /* RKTestFactory.m in Sources */, + 1689DAF21B87CEA900254FB7 /* RKLumberjackLogger.m in Sources */, 25055B9214EEF40000B9C4DD /* RKPropertyMappingTestExpectation.m in Sources */, 25EC1A3C14F72B1400C3CF3F /* RKFetchRequestManagedObjectCache.m in Sources */, 25EC1A4014F72B3300C3CF3F /* RKInMemoryManagedObjectCache.m in Sources */, @@ -2511,17 +2426,7 @@ 2595B47215F670530087A59B /* RKMIMETypeSerialization.m in Sources */, 2595B47615F670530087A59B /* RKNSJSONSerialization.m in Sources */, 253477F415FFBC61002C0E4E /* RKDictionaryUtilities.m in Sources */, - 252CCE6917E08E2D00B7F0BF /* RKValueTransformers.m in Sources */, 2534781715FFD4A6002C0E4E /* RKURLEncodedSerialization.m in Sources */, - 259B96D81604CCCC0000C250 /* AFHTTPClient.m in Sources */, - 259B96DC1604CCCC0000C250 /* AFHTTPRequestOperation.m in Sources */, - 259B96E01604CCCC0000C250 /* AFImageRequestOperation.m in Sources */, - 259B96E41604CCCC0000C250 /* AFJSONRequestOperation.m in Sources */, - 259B96E61604CCCC0000C250 /* AFNetworkActivityIndicatorManager.m in Sources */, - 259B96EA1604CCCC0000C250 /* AFPropertyListRequestOperation.m in Sources */, - 259B96EE1604CCCC0000C250 /* AFURLConnectionOperation.m in Sources */, - 259B96F21604CCCC0000C250 /* AFXMLRequestOperation.m in Sources */, - 259B96F41604CCCC0000C250 /* UIImageView+AFNetworking.m in Sources */, 25E9C8F1161290D500647F84 /* RKObjectParameterization.m in Sources */, 25A226D91618A57500952D72 /* RKObjectUtilities.m in Sources */, 2507C32A161BD5C700EA71FF /* RKTestHelpers.m in Sources */, @@ -2529,9 +2434,6 @@ 25A8C2371673BD480014D9A6 /* RKConnectionTestExpectation.m in Sources */, 258BEA03168D058300C74C8C /* RKObjectMappingMatcher.m in Sources */, 25A199D716ED035A00792629 /* RKBenchmark.m in Sources */, - 25C6C0C01716F6F800C98A73 /* TKEvent.m in Sources */, - 25C6C0C41716F6F800C98A73 /* TKState.m in Sources */, - 25C6C0C81716F6F800C98A73 /* TKStateMachine.m in Sources */, 25C6C0EB1716F79B00C98A73 /* RKOperationStateMachine.m in Sources */, 54CDB45E17B408B100FAC285 /* RKStringTokenizer.m in Sources */, ); @@ -2638,8 +2540,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -2677,6 +2581,7 @@ COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; @@ -2695,6 +2600,7 @@ }; 25160D3B14564E820060A5C5 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = AD2DD8D9C9EA769B53865C88 /* Pods-RestKit.debug.xcconfig */; buildSettings = { CLANG_ENABLE_OBJC_ARC = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -2702,7 +2608,6 @@ GCC_WARN_ABOUT_MISSING_NEWLINE = YES; INSTALL_PATH = "@rpath"; OBJROOT = "$(SRCROOT)/Build"; - OTHER_LDFLAGS = "-ObjC"; PRIVATE_HEADERS_FOLDER_PATH = "$(PUBLIC_HEADERS_FOLDER_PATH)/Private"; PRODUCT_NAME = "$(TARGET_NAME)"; PUBLIC_HEADERS_FOLDER_PATH = ../../Headers/RestKit; @@ -2713,6 +2618,7 @@ }; 25160D3C14564E820060A5C5 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = AD144E244684975F290D70ED /* Pods-RestKit.release.xcconfig */; buildSettings = { CLANG_ENABLE_OBJC_ARC = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -2720,7 +2626,6 @@ GCC_WARN_ABOUT_MISSING_NEWLINE = YES; INSTALL_PATH = "@rpath"; OBJROOT = "$(SRCROOT)/Build"; - OTHER_LDFLAGS = "-ObjC"; PRIVATE_HEADERS_FOLDER_PATH = "$(PUBLIC_HEADERS_FOLDER_PATH)/Private"; PRODUCT_NAME = "$(TARGET_NAME)"; PUBLIC_HEADERS_FOLDER_PATH = ../../Headers/RestKit; @@ -2731,7 +2636,7 @@ }; 25160D3E14564E820060A5C5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 147F950728350A64F103F55D /* Pods-ios.debug.xcconfig */; + baseConfigurationReference = 0B096CE4874E766ECE78D229 /* Pods-ios.debug.xcconfig */; buildSettings = { CLANG_ENABLE_OBJC_ARC = YES; FRAMEWORK_SEARCH_PATHS = ( @@ -2743,7 +2648,7 @@ GCC_PREFIX_HEADER = "Code/Support/RestKit-Prefix.pch"; INFOPLIST_FILE = "Resources/PLISTs/RestKitTests-Info.plist"; OBJROOT = "$(SRCROOT)/Build"; - OTHER_LDFLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = org.restkit.tests; PRODUCT_NAME = "$(TARGET_NAME)"; SYMROOT = "$(SRCROOT)/Build/Products"; }; @@ -2751,7 +2656,7 @@ }; 25160D3F14564E820060A5C5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 061E3E4524CE8EF78257C26C /* Pods-ios.release.xcconfig */; + baseConfigurationReference = A339C3AFD7C094BEAFE92A93 /* Pods-ios.release.xcconfig */; buildSettings = { CLANG_ENABLE_OBJC_ARC = YES; FRAMEWORK_SEARCH_PATHS = ( @@ -2763,7 +2668,7 @@ GCC_PREFIX_HEADER = "Code/Support/RestKit-Prefix.pch"; INFOPLIST_FILE = "Resources/PLISTs/RestKitTests-Info.plist"; OBJROOT = "$(SRCROOT)/Build"; - OTHER_LDFLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = org.restkit.tests; PRODUCT_NAME = "$(TARGET_NAME)"; SYMROOT = "$(SRCROOT)/Build/Products"; }; @@ -2771,6 +2676,7 @@ }; 25160E88145651060060A5C5 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = C5608EB544CBB19BBACC13BA /* Pods-RestKitFramework.debug.xcconfig */; buildSettings = { CLANG_ENABLE_OBJC_ARC = YES; COMBINE_HIDPI_IMAGES = YES; @@ -2799,6 +2705,7 @@ }; 25160E89145651060060A5C5 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 1ABDEC386A27292EF883B0BE /* Pods-RestKitFramework.release.xcconfig */; buildSettings = { CLANG_ENABLE_OBJC_ARC = YES; COMBINE_HIDPI_IMAGES = YES; @@ -2827,7 +2734,7 @@ }; 25160E8B145651060060A5C5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D8EFCBE1978F7946E0081FAD /* Pods-osx.debug.xcconfig */; + baseConfigurationReference = A920AEDAEC3C6599433D2720 /* Pods-osx.debug.xcconfig */; buildSettings = { CLANG_ENABLE_OBJC_ARC = YES; COMBINE_HIDPI_IMAGES = YES; @@ -2839,6 +2746,7 @@ INFOPLIST_FILE = "Resources/PLISTs/RestKitFrameworkTests-Info.plist"; MACOSX_DEPLOYMENT_TARGET = 10.7; ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = org.restkit.tests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; }; @@ -2846,7 +2754,7 @@ }; 25160E8C145651060060A5C5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 04D69B4B2A54475834B333CF /* Pods-osx.release.xcconfig */; + baseConfigurationReference = F6B428543BF5CF359F239FE1 /* Pods-osx.release.xcconfig */; buildSettings = { CLANG_ENABLE_OBJC_ARC = YES; COMBINE_HIDPI_IMAGES = YES; @@ -2858,6 +2766,7 @@ GCC_WARN_64_TO_32_BIT_CONVERSION = YES; INFOPLIST_FILE = "Resources/PLISTs/RestKitFrameworkTests-Info.plist"; MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_BUNDLE_IDENTIFIER = org.restkit.tests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; }; diff --git a/RestKit.xcworkspace/xcshareddata/xcschemes/Build All Examples.xcscheme b/RestKit.xcworkspace/xcshareddata/xcschemes/Build All Examples.xcscheme index 19e901e01e..7a400e7cf1 100644 --- a/RestKit.xcworkspace/xcshareddata/xcschemes/Build All Examples.xcscheme +++ b/RestKit.xcworkspace/xcshareddata/xcschemes/Build All Examples.xcscheme @@ -1,6 +1,6 @@ + + + +@interface MockFRCDelegate : NSObject + +@property (nonatomic, copy) void (^controllerDidChangeContentBlock)(); + +@end + +@implementation MockFRCDelegate + +#pragma mark - NSFetchedResultsControllerDelegate +- (void)controllerDidChangeContent:(NSFetchedResultsController *)controller +{ + if (self.controllerDidChangeContentBlock) self.controllerDidChangeContentBlock(); +} + +@end + +//-------- + +@interface RKFetchedResultsControllerUpdateTest : RKTestCase + +@end + +@implementation RKFetchedResultsControllerUpdateTest + +- (void)setUp +{ + [RKTestFactory setUp]; +} + +- (void)tearDown +{ + [RKTestFactory tearDown]; +} + +- (void)testFetchedResultsController +{ + //Managed object store and managed object contexts + RKManagedObjectStore *managedObjectStore = [RKTestFactory managedObjectStore]; + NSManagedObjectContext *persistentStoreContext = managedObjectStore.persistentStoreManagedObjectContext; + NSManagedObjectContext *persistentStoreChild = [managedObjectStore newChildManagedObjectContextWithConcurrencyType:NSPrivateQueueConcurrencyType tracksChanges:NO]; + NSManagedObjectContext *mainQueueContext = managedObjectStore.mainQueueManagedObjectContext; + + //1. Create initial ManagedObjects and save to store + [persistentStoreContext performBlockAndWait:^{ + RKHuman *human1 = [persistentStoreContext insertNewObjectForEntityForName:@"Human"]; + human1.name = @"human1"; + human1.railsID = @1; + + NSError *error = nil; + [persistentStoreContext save:&error]; + if (error) { + XCTAssertNil(error, @"Error: %@", error); + } + }]; + + //2. Create NSFetchedResultsController + NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] initWithEntityName:@"Human"]; + fetchRequest.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"name" ascending:YES]]; + NSFetchedResultsController *fetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:mainQueueContext sectionNameKeyPath:nil cacheName:nil]; + + //3. Add delegate to detect FRC updates + XCTestExpectation *expectation = [self expectationWithDescription:@"NSFetchedResultsController Updates"]; + MockFRCDelegate *frcDelegate = [[MockFRCDelegate alloc] init]; + frcDelegate.controllerDidChangeContentBlock = ^{ + [expectation fulfill]; + }; + fetchedResultsController.delegate = frcDelegate; + [fetchedResultsController performFetch:nil]; + + XCTAssert(fetchedResultsController.fetchedObjects.count == 1, @"Expecting NSFetchedResultsController to contain single human object."); + + //4. Update name of managed object in child managed object context + [persistentStoreChild performBlockAndWait:^{ + NSFetchRequest *human1FetchRequest = [[NSFetchRequest alloc] initWithEntityName:@"Human"]; + NSError *error = nil; + NSArray *results = [persistentStoreChild executeFetchRequest:human1FetchRequest error:&error]; + XCTAssertNil(error, @"Error: %@", error); + + RKHuman *childHuman1 = [results firstObject]; + XCTAssertNotNil(childHuman1, @"Failed to fetch human1"); + + childHuman1.name = @"Updated Human"; + + error = nil; + [persistentStoreChild save:&error]; + if (error) { + XCTAssertNil(error, @"Error: %@", error); + } + }]; + + //5. Save persistent store context to store + [persistentStoreContext performBlockAndWait:^{ + NSError *error = nil; + [persistentStoreContext save:&error]; + XCTAssertNil(error, @"Error: %@", error); + }]; + + //6. Wait for NSFetchedResultsController update expectation + [self waitForExpectationsWithTimeout:1 handler:^(NSError *error) { + XCTAssertNil(error, @"Error: %@", error); + }]; + + //7. Check for new human name update in NSFetchedResultsController + NSArray *humanNames = [fetchedResultsController.fetchedObjects valueForKeyPath:@"name"]; + XCTAssertTrue([humanNames containsObject:@"Updated Human"], @"Does not contain updated human name."); + XCTAssertFalse([humanNames containsObject:@"human1"], @"FetchedResultsController contains original human name."); +} + +@end diff --git a/Tests/Logic/CoreData/RKManagedObjectMappingOperationDataSourceTest.m b/Tests/Logic/CoreData/RKManagedObjectMappingOperationDataSourceTest.m index c5e0bcdc39..ac5b7b5566 100644 --- a/Tests/Logic/CoreData/RKManagedObjectMappingOperationDataSourceTest.m +++ b/Tests/Logic/CoreData/RKManagedObjectMappingOperationDataSourceTest.m @@ -580,6 +580,42 @@ - (void)testEntityIdentifierWithPredicate expect(object).to.equal(human1); } +- (void)testEntityIdentifierWithPredicateBlock +{ + RKManagedObjectStore *managedObjectStore = [RKTestFactory managedObjectStore]; + managedObjectStore.managedObjectCache = [RKFetchRequestManagedObjectCache new]; + RKEntityMapping *mapping = [RKEntityMapping mappingForEntityForName:@"Human" inManagedObjectStore:managedObjectStore]; + mapping.identificationAttributes = @[ @"railsID" ]; + mapping.identificationPredicateBlock = ^(NSDictionary *representation, NSManagedObjectContext *context) { + return [NSPredicate predicateWithFormat:@"age + 94 < %@", representation[@"id"]]; + }; + [mapping addPropertyMapping:[RKAttributeMapping attributeMappingFromKeyPath:@"id" toKeyPath:@"railsID"]]; + + // Create two humans matching the identifier, but differ in matching the + RKHuman *human1 = [NSEntityDescription insertNewObjectForEntityForName:@"Human" inManagedObjectContext:managedObjectStore.persistentStoreManagedObjectContext]; + human1.name = @"Colin"; + human1.railsID = @123; + human1.age = @28; + + RKHuman *human2 = [NSEntityDescription insertNewObjectForEntityForName:@"Human" inManagedObjectContext:managedObjectStore.persistentStoreManagedObjectContext]; + human2.name = @"Blake"; + human2.railsID = @123; + human2.age = @30; + [managedObjectStore.persistentStoreManagedObjectContext save:nil]; + + NSError *error = nil; + NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:@"Human"]; + NSUInteger count = [managedObjectStore.persistentStoreManagedObjectContext countForFetchRequest:fetchRequest error:&error]; + expect(count).to.beGreaterThan(0); + + RKManagedObjectMappingOperationDataSource *dataSource = [[RKManagedObjectMappingOperationDataSource alloc] initWithManagedObjectContext:managedObjectStore.persistentStoreManagedObjectContext + cache:managedObjectStore.managedObjectCache]; + NSDictionary *data = @{@"id": @123}; + id object = [dataSource mappingOperation:nil targetObjectForRepresentation:data withMapping:mapping inRelationship:nil]; + expect(object).notTo.beNil(); + expect(object).to.equal(human1); +} + - (void)testMappingInPrivateQueue { RKManagedObjectStore *managedObjectStore = [RKTestFactory managedObjectStore]; @@ -1592,6 +1628,31 @@ - (void)testThatMappingRequiredHasManyRelationshipDoesNotCrash expect([catHoarder valueForKeyPath:@"hoardedCats"]).to.haveCountOf(1); } +- (void)testThatShouldMapRelationshipsIfObjectIsUnmodifiedFlagWorks { + RKManagedObjectStore *managedObjectStore = [RKTestFactory managedObjectStore]; + RKFetchRequestManagedObjectCache *managedObjectCache = [RKFetchRequestManagedObjectCache new]; + RKManagedObjectMappingOperationDataSource *mappingOperationDataSource = [[RKManagedObjectMappingOperationDataSource alloc] initWithManagedObjectContext:managedObjectStore.persistentStoreManagedObjectContext + cache:managedObjectCache]; + mappingOperationDataSource.operationQueue = [NSOperationQueue new]; + + NSDate *updatedAt = [NSDate date]; + NSDictionary *representation = @{ @"name": @"Blake Watters", @"railsID": @123, @"updatedAt": updatedAt }; + RKEntityMapping *humanMapping = [RKEntityMapping mappingForEntityForName:@"Human" inManagedObjectStore:managedObjectStore]; + [humanMapping addAttributeMappingsFromArray:@[ @"name", @"railsID", @"updatedAt" ]]; + [humanMapping setModificationAttributeForName:@"updatedAt"]; + humanMapping.shouldMapRelationshipsIfObjectIsUnmodified = YES; + + NSManagedObject *human = [NSEntityDescription insertNewObjectForEntityForName:@"Human" inManagedObjectContext:managedObjectStore.persistentStoreManagedObjectContext]; + [human setValue:updatedAt forKey:@"updatedAt"]; + RKMappingOperation *mappingOperation = [[RKMappingOperation alloc] initWithSourceObject:representation destinationObject:human mapping:humanMapping]; + mappingOperation.dataSource = mappingOperationDataSource; + + BOOL canSkipAttrs = [mappingOperationDataSource mappingOperationShouldSkipAttributeMapping:mappingOperation]; + BOOL canSkipRelationships = [mappingOperationDataSource mappingOperationShouldSkipRelationshipMapping:mappingOperation]; + expect(canSkipAttrs).to.equal(YES); + expect(canSkipRelationships).to.equal(NO); +} + - (void)testThatStringEqualityCausesSkipPropertyMappingToReturnYES { RKManagedObjectStore *managedObjectStore = [RKTestFactory managedObjectStore]; @@ -1610,8 +1671,10 @@ - (void)testThatStringEqualityCausesSkipPropertyMappingToReturnYES RKMappingOperation *mappingOperation = [[RKMappingOperation alloc] initWithSourceObject:representation destinationObject:human mapping:humanMapping]; mappingOperation.dataSource = mappingOperationDataSource; - BOOL canSkipMapping = [mappingOperationDataSource mappingOperationShouldSkipPropertyMapping:mappingOperation]; - expect(canSkipMapping).to.equal(YES); + BOOL canSkipAttributes = [mappingOperationDataSource mappingOperationShouldSkipAttributeMapping:mappingOperation]; + BOOL canSkipRelationships = [mappingOperationDataSource mappingOperationShouldSkipRelationshipMapping:mappingOperation]; + expect(canSkipAttributes).to.equal(YES); + expect(canSkipRelationships).to.equal(YES); } - (void)testThatStringInequalityCausesSkipPropertyMappingToReturnNO @@ -1632,8 +1695,10 @@ - (void)testThatStringInequalityCausesSkipPropertyMappingToReturnNO RKMappingOperation *mappingOperation = [[RKMappingOperation alloc] initWithSourceObject:representation destinationObject:human mapping:humanMapping]; mappingOperation.dataSource = mappingOperationDataSource; - BOOL canSkipMapping = [mappingOperationDataSource mappingOperationShouldSkipPropertyMapping:mappingOperation]; - expect(canSkipMapping).to.equal(NO); + BOOL canSkipAttributes = [mappingOperationDataSource mappingOperationShouldSkipAttributeMapping:mappingOperation]; + BOOL canSkipRelationships = [mappingOperationDataSource mappingOperationShouldSkipRelationshipMapping:mappingOperation]; + expect(canSkipAttributes).to.equal(NO); + expect(canSkipRelationships).to.equal(NO); } - (void)testThatDateEqualityCausesSkipPropertyMappingToReturnYES @@ -1655,8 +1720,10 @@ - (void)testThatDateEqualityCausesSkipPropertyMappingToReturnYES RKMappingOperation *mappingOperation = [[RKMappingOperation alloc] initWithSourceObject:representation destinationObject:human mapping:humanMapping]; mappingOperation.dataSource = mappingOperationDataSource; - BOOL canSkipMapping = [mappingOperationDataSource mappingOperationShouldSkipPropertyMapping:mappingOperation]; - expect(canSkipMapping).to.equal(YES); + BOOL canSkipAttributes = [mappingOperationDataSource mappingOperationShouldSkipAttributeMapping:mappingOperation]; + BOOL canSkipRelationships = [mappingOperationDataSource mappingOperationShouldSkipRelationshipMapping:mappingOperation]; + expect(canSkipAttributes).to.equal(YES); + expect(canSkipRelationships).to.equal(YES); } - (void)testThatDateDecensionCausesSkipPropertyMappingToReturnYES @@ -1679,8 +1746,10 @@ - (void)testThatDateDecensionCausesSkipPropertyMappingToReturnYES RKMappingOperation *mappingOperation = [[RKMappingOperation alloc] initWithSourceObject:representation destinationObject:human mapping:humanMapping]; mappingOperation.dataSource = mappingOperationDataSource; - BOOL canSkipMapping = [mappingOperationDataSource mappingOperationShouldSkipPropertyMapping:mappingOperation]; - expect(canSkipMapping).to.equal(YES); + BOOL canSkipAttributes = [mappingOperationDataSource mappingOperationShouldSkipAttributeMapping:mappingOperation]; + BOOL canSkipRelationships = [mappingOperationDataSource mappingOperationShouldSkipRelationshipMapping:mappingOperation]; + expect(canSkipAttributes).to.equal(YES); + expect(canSkipRelationships).to.equal(YES); } - (void)testThatDateAscensionCausesSkipPropertyMappingToReturnNO @@ -1703,8 +1772,10 @@ - (void)testThatDateAscensionCausesSkipPropertyMappingToReturnNO RKMappingOperation *mappingOperation = [[RKMappingOperation alloc] initWithSourceObject:representation destinationObject:human mapping:humanMapping]; mappingOperation.dataSource = mappingOperationDataSource; - BOOL canSkipMapping = [mappingOperationDataSource mappingOperationShouldSkipPropertyMapping:mappingOperation]; - expect(canSkipMapping).to.equal(NO); + BOOL canSkipAttributes = [mappingOperationDataSource mappingOperationShouldSkipAttributeMapping:mappingOperation]; + BOOL canSkipRelationships = [mappingOperationDataSource mappingOperationShouldSkipRelationshipMapping:mappingOperation]; + expect(canSkipAttributes).to.equal(NO); + expect(canSkipRelationships).to.equal(NO); } - (void)testThatNumericEqualityCausesSkipPropertyMappingToReturnYES @@ -1725,8 +1796,10 @@ - (void)testThatNumericEqualityCausesSkipPropertyMappingToReturnYES RKMappingOperation *mappingOperation = [[RKMappingOperation alloc] initWithSourceObject:representation destinationObject:human mapping:humanMapping]; mappingOperation.dataSource = mappingOperationDataSource; - BOOL canSkipMapping = [mappingOperationDataSource mappingOperationShouldSkipPropertyMapping:mappingOperation]; - expect(canSkipMapping).to.equal(YES); + BOOL canSkipAttributes = [mappingOperationDataSource mappingOperationShouldSkipAttributeMapping:mappingOperation]; + BOOL canSkipRelationships = [mappingOperationDataSource mappingOperationShouldSkipRelationshipMapping:mappingOperation]; + expect(canSkipAttributes).to.equal(YES); + expect(canSkipRelationships).to.equal(YES); } - (void)testThatNumericDecensionCausesSkipPropertyMappingToReturnYES @@ -1747,8 +1820,10 @@ - (void)testThatNumericDecensionCausesSkipPropertyMappingToReturnYES RKMappingOperation *mappingOperation = [[RKMappingOperation alloc] initWithSourceObject:representation destinationObject:human mapping:humanMapping]; mappingOperation.dataSource = mappingOperationDataSource; - BOOL canSkipMapping = [mappingOperationDataSource mappingOperationShouldSkipPropertyMapping:mappingOperation]; - expect(canSkipMapping).to.equal(YES); + BOOL canSkipAttributes = [mappingOperationDataSource mappingOperationShouldSkipAttributeMapping:mappingOperation]; + BOOL canSkipRelationships = [mappingOperationDataSource mappingOperationShouldSkipRelationshipMapping:mappingOperation]; + expect(canSkipAttributes).to.equal(YES); + expect(canSkipRelationships).to.equal(YES); } - (void)testThatNumericAscensionCausesSkipPropertyMappingToReturnNO @@ -1769,8 +1844,10 @@ - (void)testThatNumericAscensionCausesSkipPropertyMappingToReturnNO RKMappingOperation *mappingOperation = [[RKMappingOperation alloc] initWithSourceObject:representation destinationObject:human mapping:humanMapping]; mappingOperation.dataSource = mappingOperationDataSource; - BOOL canSkipMapping = [mappingOperationDataSource mappingOperationShouldSkipPropertyMapping:mappingOperation]; - expect(canSkipMapping).to.equal(NO); + BOOL canSkipAttributes = [mappingOperationDataSource mappingOperationShouldSkipAttributeMapping:mappingOperation]; + BOOL canSkipRelationships = [mappingOperationDataSource mappingOperationShouldSkipRelationshipMapping:mappingOperation]; + expect(canSkipAttributes).to.equal(NO); + expect(canSkipRelationships).to.equal(NO); } - (void)testThatDynamicMappingCanSkipPropertyMapping @@ -1802,8 +1879,10 @@ - (void)testThatDynamicMappingCanSkipPropertyMapping [mappingOperationDataSource.operationQueue waitUntilAllOperationsAreFinished]; assertThat(error, is(nilValue())); - BOOL canSkipMapping = [mappingOperationDataSource mappingOperationShouldSkipPropertyMapping:mappingOperation]; - expect(canSkipMapping).to.equal(YES); + BOOL canSkipAttributes = [mappingOperationDataSource mappingOperationShouldSkipAttributeMapping:mappingOperation]; + BOOL canSkipRelationships = [mappingOperationDataSource mappingOperationShouldSkipRelationshipMapping:mappingOperation]; + expect(canSkipAttributes).to.equal(YES); + expect(canSkipRelationships).to.equal(YES); } @end diff --git a/Tests/Logic/Network/RKManagedObjectRequestOperationTest.m b/Tests/Logic/Network/RKManagedObjectRequestOperationTest.m index d10d34832c..ceb4407d8b 100644 --- a/Tests/Logic/Network/RKManagedObjectRequestOperationTest.m +++ b/Tests/Logic/Network/RKManagedObjectRequestOperationTest.m @@ -1364,6 +1364,33 @@ - (void)testThatRefetchingOfNestedNonManagedAndManagedObjectsWorksWithHasOneRela expect([user.bestFriend managedObjectContext]).to.equal(managedObjectStore.persistentStoreManagedObjectContext); } +- (void)testThatEntityMappingUsingNilKeyPathInsideNestedMappingDoesRefetchManagedObjects +{ + RKLogConfigureByName("RestKit/ObjectMapping", RKLogLevelTrace); + RKManagedObjectStore *managedObjectStore = [RKTestFactory managedObjectStore]; + RKObjectMapping *userMapping = [RKObjectMapping mappingForClass:[RKTestUser class]]; + RKEntityMapping *entityMapping = [RKEntityMapping mappingForEntityForName:@"Human" inManagedObjectStore:managedObjectStore]; + [entityMapping addPropertyMapping:[RKAttributeMapping attributeMappingFromKeyPath:nil toKeyPath:@"favoriteCatID"]]; + entityMapping.identificationAttributes = @[@"favoriteCatID"]; + [userMapping addPropertyMapping:[RKRelationshipMapping relationshipMappingFromKeyPath:@"favorite_cat_id" toKeyPath:@"bestFriend" withMapping:entityMapping]]; + [userMapping addPropertyMapping:[RKRelationshipMapping relationshipMappingFromKeyPath:@"children" toKeyPath:@"friends" withMapping:userMapping]]; + RKResponseDescriptor *responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:userMapping method:RKRequestMethodAny pathPattern:nil keyPath:nil statusCodes:[NSIndexSet indexSetWithIndex:200]]; + + NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"/JSON/humans/with_to_one_relationship_inside_collection.json" relativeToURL:[RKTestFactory baseURL]]]; + RKManagedObjectRequestOperation *managedObjectRequestOperation = [[RKManagedObjectRequestOperation alloc] initWithRequest:request responseDescriptors:@[ responseDescriptor ]]; + managedObjectRequestOperation.managedObjectContext = managedObjectStore.persistentStoreManagedObjectContext; + [managedObjectRequestOperation start]; + [managedObjectRequestOperation waitUntilFinished]; + expect(managedObjectRequestOperation.error).to.beNil(); + RKMappableObject *result = managedObjectRequestOperation.mappingResult.firstObject; + RKTestUser *user = (RKTestUser *)result; + expect(user.bestFriend).to.beInstanceOf([RKHuman class]); + expect(user.friends.count).to.equal(1); + RKTestUser *child = (RKTestUser *)user.friends.firstObject; + expect([user.bestFriend managedObjectContext]).to.equal(managedObjectStore.persistentStoreManagedObjectContext); + expect([child.bestFriend managedObjectContext]).to.equal(managedObjectStore.persistentStoreManagedObjectContext); +} + - (void)testThatAnEmptyResultHasTheProperManagedObjectContext { RKManagedObjectStore *managedObjectStore = [RKTestFactory managedObjectStore]; diff --git a/Tests/Logic/ObjectMapping/RKAttributeMappingTest.m b/Tests/Logic/ObjectMapping/RKAttributeMappingTest.m index 6f1ac4202e..bee0d019ac 100644 --- a/Tests/Logic/ObjectMapping/RKAttributeMappingTest.m +++ b/Tests/Logic/ObjectMapping/RKAttributeMappingTest.m @@ -8,6 +8,7 @@ #import "RKTestEnvironment.h" #import "RKAttributeMapping.h" +#import "RKValueTransformers.h" @interface RKAttributeMappingTest : RKTestCase @@ -31,4 +32,20 @@ - (void)testThatAttributeMappingsWithDifferingKeyPathsAreNotConsideredEqual assertThatBool([mapping1 isEqualToMapping:mapping2], is(equalToBool(NO))); } +- (void)testAttributeMappingCopy { + RKAttributeMapping *propertyMapping = [RKAttributeMapping attributeMappingFromKeyPath:@"source" toKeyPath:@"destination"]; + propertyMapping.valueTransformer = [RKBlockValueTransformer valueTransformerWithValidationBlock:^BOOL(__unsafe_unretained Class inputValueClass, __unsafe_unretained Class outputValueClass) { + return [inputValueClass isSubclassOfClass:[NSString class]] && [outputValueClass isSubclassOfClass:[NSString class]]; + } transformationBlock:^BOOL(id inputValue, __autoreleasing id *outputValue, __unsafe_unretained Class outputClass, NSError *__autoreleasing *error) { + return YES; + }]; + propertyMapping.propertyValueClass = [NSString class]; + + RKAttributeMapping *propertyMappingCopy = [propertyMapping copy]; + expect([propertyMappingCopy.sourceKeyPath isEqual:propertyMapping.sourceKeyPath]); + expect([propertyMappingCopy.destinationKeyPath isEqual:propertyMapping.destinationKeyPath]); + expect(propertyMappingCopy.propertyValueClass == propertyMapping.propertyValueClass); + expect([propertyMappingCopy.valueTransformer isEqual:propertyMapping.valueTransformer]); +} + @end diff --git a/Tests/Logic/ObjectMapping/RKMappingOperationTest.m b/Tests/Logic/ObjectMapping/RKMappingOperationTest.m index a204269408..fdf496fb2c 100644 --- a/Tests/Logic/ObjectMapping/RKMappingOperationTest.m +++ b/Tests/Logic/ObjectMapping/RKMappingOperationTest.m @@ -288,6 +288,20 @@ - (void)testShouldFailTheMappingOperationIfKeyValueValidationSetsAnError assertThat(error, isNot(nilValue())); } +- (void)testShouldFailWithoutThrowingIfMappingAnInvalidKeyPath +{ + RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[TestMappable class]]; + [mapping addAttributeMappingsFromDictionary:@{ @"object.number": @"number" }]; + TestMappable *object = [[TestMappable alloc] init]; + NSDictionary *dictionary = @{@"object": @"a string instead of a dictionary"}; + RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:dictionary destinationObject:object mapping:mapping]; + NSError *error = nil; + BOOL success = [operation performMapping:&error]; + assertThatBool(success, is(equalToBool(NO))); + assertThat(error.domain, is(equalTo(RKErrorDomain))); + assertThatInteger(error.code, is(equalToInteger(RKMappingErrorUnmappableRepresentation))); +} + - (void)testShouldNotSetTheAttributeIfKeyValueValidationReturnsNo { RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[TestMappable class]]; diff --git a/Tests/Logic/ObjectMapping/RKObjectMappingNextGenTest.m b/Tests/Logic/ObjectMapping/RKObjectMappingNextGenTest.m index b69b508297..6bb7778128 100644 --- a/Tests/Logic/ObjectMapping/RKObjectMappingNextGenTest.m +++ b/Tests/Logic/ObjectMapping/RKObjectMappingNextGenTest.m @@ -262,6 +262,23 @@ - (void)testShouldMapACollectionOfSimpleObjectDictionaries assertThat(blake.name, is(equalTo(@"Blake Watters"))); } +- (void)testShouldIgnoreNSNullInCollections { + RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[RKTestUser class]]; + RKAttributeMapping *idMapping = [RKAttributeMapping attributeMappingFromKeyPath:@"id" toKeyPath:@"userID"]; + [mapping addPropertyMapping:idMapping]; + RKAttributeMapping *nameMapping = [RKAttributeMapping attributeMappingFromKeyPath:@"name" toKeyPath:@"name"]; + [mapping addPropertyMapping:nameMapping]; + + RKMapperOperation *mapper = [RKMapperOperation new]; + mapper.mappingOperationDataSource = [RKObjectMappingOperationDataSource new]; + id userInfo = [RKTestFixture parsedObjectWithContentsOfFixture:@"users.json"]; + NSArray *friendReps = [userInfo valueForKey:@"friend"]; + NSArray *friends = [mapper mapRepresentations:friendReps atKeyPath:@"" usingMapping:mapping]; + assertThatUnsignedInteger([friends count], is(equalToInt(1))); + RKTestUser *tony = friends[0]; + assertThat(tony.name, is(equalTo(@"Anthony Stark"))); +} + - (void)testShouldDetermineTheObjectMappingByConsultingTheMappingProviderWhenThereIsATargetObject { RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[RKTestUser class]]; diff --git a/Tests/Logic/Support/RKHTTPUtilitiesTest.m b/Tests/Logic/Support/RKHTTPUtilitiesTest.m index 5c2905a37e..e451be4bdb 100644 --- a/Tests/Logic/Support/RKHTTPUtilitiesTest.m +++ b/Tests/Logic/Support/RKHTTPUtilitiesTest.m @@ -137,4 +137,62 @@ - (void)testRequestMethodStringForCompoundValueReturnsNil expect(RKStringFromRequestMethod(RKRequestMethodGET|RKRequestMethodDELETE)).to.beNil(); } +- (void)testRKDateFromHTTPDateString +{ + void (^testBlock)(NSDateComponents *) = ^void(NSDateComponents *dateComponents) { + NSDateFormatter * const dateFormatter = [[NSDateFormatter alloc] init]; + dateFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]; + dateFormatter.timeZone = [NSTimeZone timeZoneWithAbbreviation:@"GMT"]; + dateFormatter.dateFormat = @"EEE',' dd MMM yyyy HH':'mm':'ss z"; + + NSCalendar * const calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; + calendar.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0]; + + NSDate * const sourceDate = [calendar dateFromComponents:dateComponents]; + NSString * const sourceString = [dateFormatter stringFromDate:sourceDate]; + NSDate * const destdate = RKDateFromHTTPDateString(sourceString); + expect(destdate).to.equal(sourceDate); + }; + + NSDateComponents * const dateComponents = [[NSDateComponents alloc] init]; + dateComponents.hour = 0; dateComponents.minute = 0; dateComponents.second = 0; + + // epoch + dateComponents.year = 1970; dateComponents.month = 1; dateComponents.day = 1; + testBlock(dateComponents); + + // pre epoc + dateComponents.year = 1969; dateComponents.month = 1; dateComponents.day = 27; + testBlock(dateComponents); + + // release of U2's Achtung Baby album + dateComponents.year = 1991; dateComponents.month = 11; dateComponents.day = 18; + dateComponents.hour = 12; dateComponents.minute = 34; dateComponents.second = 56; + testBlock(dateComponents); +} + +- (void)testRKHTTPCacheExpirationDateFromHeadersWithStatusCode +{ + const NSInteger maxAge = 3600; + NSDate * const date = [NSDate dateWithTimeIntervalSinceReferenceDate:1234]; + + NSDateFormatter * const dateFormatter = [[NSDateFormatter alloc] init]; + dateFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]; + dateFormatter.timeZone = [NSTimeZone timeZoneWithAbbreviation:@"GMT"]; + dateFormatter.dateFormat = @"EEE',' dd MMM yyyy HH':'mm':'ss z"; + + NSMutableDictionary * const headers = [[NSMutableDictionary alloc] initWithDictionary:@{ + @"Cache-Control" : [NSString stringWithFormat:@"public, max-age=%d", maxAge], + @"Date" : [dateFormatter stringFromDate:date] + }]; + + expect(RKHTTPCacheExpirationDateFromHeadersWithStatusCode(headers, 200)).to.equal([date dateByAddingTimeInterval:maxAge]); + + [headers setObject:[NSNumber numberWithInteger:(maxAge + 60)] forKey:@"Age"]; + expect(RKHTTPCacheExpirationDateFromHeadersWithStatusCode(headers, 200)).to.beLessThan(NSDate.date); + + [headers setObject:[NSNumber numberWithInteger:(maxAge - 60)] forKey:@"Age"]; + expect(RKHTTPCacheExpirationDateFromHeadersWithStatusCode(headers, 200)).to.beGreaterThan(NSDate.date); +} + @end diff --git a/Tests/README.md b/Tests/README.md index e7719e024b..76f23d94ab 100644 --- a/Tests/README.md +++ b/Tests/README.md @@ -6,7 +6,7 @@ RestKit ships with a testing infrastructure built around OCUnit and a Ruby testi 1. Install the Xcode **Command Line Tools** by selecting the **Xcode** > **Preferences…** menu and then navigating to the **Downloads** tab, then clicking the **Install** button next to the appropriate entry in the table. 1. After installation completes, ensure your command line Xcode installation is configured by executing `xcode-select -print-path`. If no path is returned, configure xcode-select by executing `xcode-select -switch /Applications/Xcode.app/Contents/Developer`. 1. Check out the Git submodules: `git submodule update --init --recursive` -1. Ensure that you have **Ruby 2.0.0** available. We recommend installation via [rbenv](https://github.com/sstephenson/rbenv), [RVM](http://beginrescueend.com/rvm/install/) or [Homebrew](http://mxcl.github.com/homebrew/). +1. Ensure that you have **Ruby 2.0.0** available. We recommend installation via [rbenv](https://github.com/sstephenson/rbenv), [RVM](https://rvm.io/) or [Homebrew](http://brew.sh/). 1. Install the Ruby Bundler Gem (if necessary): `gem install bundler` 1. Install the other required Gems via Bundler: `bundle` 1. Install the required CocoaPods: `pod install` @@ -66,13 +66,13 @@ configured and there are integration tests that test the full request/response l 1. Tests are implemented in Objective-C and run inside the Simulator or on the Device. 1. Test files live in sub-directories under Tests/ appropriate to the layer the code under test belongs to 1. Tests begin with "test" and should be camel-cased descriptive. i.e. testShouldConsiderA200ResponseSuccessful -1. Expectations are provided using [Expecta](https://github.com/petejkim/expecta) and [OCHamcrest](http://jonreid.github.com/OCHamcrest/). Expectations are generally of th form: +1. Expectations are provided using [Expecta](https://github.com/specta/expecta) and [OCHamcrest](https://github.com/hamcrest/OCHamcrest). Expectations are generally of th form: expect(someObject).to.equal(@"some value"); // Expecta assertThat([someObject someMethod], is(equalTo(@"some value"))); // OCHamcrest There is a corresponding `notTo` and `isNot` method available as well. 1. The RKTestEnvironment.h header includes a number of helpers for initializing and configuring a clean testing environment. -1. OCMock is available for mock objects support. See [http://www.mulle-kybernetik.com/software/OCMock/](http://www.mulle-kybernetik.com/software/OCMock/) for details. +1. OCMock is available for mock objects support. See [http://ocmock.org/](http://ocmock.org/) for details. 1. RestKit is available for 32bit (iOS) and 64bit (OS X) platforms. This introduces some complexity when working with integer data types as NSInteger and NSUInteger are int's on 32bit and long's on 64bit. Cocoa and OC Hamcrest provide helper methods for dealing with these differences. Rather than using the **Int** flavor of methods (i.e. `[NSNumber numberWithInt:3]`) use the **Integer** flavor (i.e. `[NSNumber numberWithInteger:]`). This will account for the type differences without @@ -125,12 +125,14 @@ That's really all there is to it. Consult the existing test code in Tests/ for r Continuous Integration ------------- +**Note:** RestKit currently uses [Travis CI](https://travis-ci.org/RestKit/RestKit) + The RestKit team keeps the master, development, and active branches of RestKit under the watchful eye of the [Jenkins Continuous Integration Server](http://jenkins-ci.org/). There is a fair amount of complexity involved in getting iOS projects running under Jenkins, so to make things as easy as possible all Jenkins configuration has been collected into a single script within the source code. Currently use of the Jenkins build **requires** the use of RVM for managing the Ruby environment. To configure Jenkins to build RestKit, do the following: 1. Ensure the RestKit test suite executes cleanly on the CI host using the above reference. -1. Install Jenkins (again, we recommend [Homebrew](http://mxcl.github.com/)): `brew install jenkins` +1. Install Jenkins (again, we recommend [Homebrew](https://github.com/Homebrew/homebrew)): `brew install jenkins` 2. Install Jenkins as a system service. Instructions are printed post installation via Homebrew 3. Configure your CI user's OS X account to automatically manage the RVM environment. Create an `~/.rvmrc` file and populate it with the following: ```bash diff --git a/Tests/RKTestEnvironment.m b/Tests/RKTestEnvironment.m index ce7be65108..3ea5201975 100644 --- a/Tests/RKTestEnvironment.m +++ b/Tests/RKTestEnvironment.m @@ -18,7 +18,7 @@ // limitations under the License. // -#include +#import #import "RKTestEnvironment.h" @implementation RKTestCase diff --git a/VERSION b/VERSION index 48b91fd89c..4e8f395fa5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.24.1 +0.26.0 diff --git a/Vendor/AFNetworking b/Vendor/AFNetworking deleted file mode 160000 index 5266874bcc..0000000000 --- a/Vendor/AFNetworking +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5266874bcc79c1afa627e590f982e50f6886f25f diff --git a/Vendor/ISO8601DateFormatterValueTransformer b/Vendor/ISO8601DateFormatterValueTransformer deleted file mode 160000 index 11e4ee0abf..0000000000 --- a/Vendor/ISO8601DateFormatterValueTransformer +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 11e4ee0abfdbb9f81526c462cb7a1452b31a81f4 diff --git a/Vendor/LibComponentLogging/Core/README.md b/Vendor/LibComponentLogging/Core/README.md index 56d8018058..c8f3181406 100644 --- a/Vendor/LibComponentLogging/Core/README.md +++ b/Vendor/LibComponentLogging/Core/README.md @@ -24,15 +24,15 @@ This Git repository contains the library's Core part. Download the files of the library Core and a logging back-end, e.g. the LogFile logger, from their repositories on GitHub: -* [Library Core](http://github.com/aharren/LibComponentLogging-Core/downloads) +* [Library Core](http://github.com/aharren/LibComponentLogging-Core) -* [LogFile Logger](http://github.com/aharren/LibComponentLogging-LogFile/downloads) +* [LogFile Logger](http://github.com/aharren/LibComponentLogging-LogFile) -* [SystemLog Logger](http://github.com/aharren/LibComponentLogging-SystemLog/downloads) +* [SystemLog Logger](http://github.com/aharren/LibComponentLogging-SystemLog) -* [NSLog Logger](http://github.com/aharren/LibComponentLogging-NSLog/downloads) +* [NSLog Logger](http://github.com/aharren/LibComponentLogging-NSLog) -* [NSLogger Logger](http://github.com/aharren/LibComponentLogging-NSLogger/downloads) +* [NSLogger Logger](http://github.com/aharren/LibComponentLogging-NSLogger) Extract the files and copy the extracted files to your application's source directory. diff --git a/Vendor/LibComponentLogging/Core/lcl_RK.h b/Vendor/LibComponentLogging/Core/lcl_RK.h index c4e3324ef0..63785eb9e1 100644 --- a/Vendor/LibComponentLogging/Core/lcl_RK.h +++ b/Vendor/LibComponentLogging/Core/lcl_RK.h @@ -31,6 +31,8 @@ #define _RKLCL_VERSION_BUILD 1 #define _RKLCL_VERSION_SUFFIX "" +#import + // // lcl -- LibComponentLogging, embedded, RestKit/RK // @@ -110,7 +112,7 @@ enum _RKlcl_enum_level_t { 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 @@ -131,7 +133,7 @@ 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" + RKLCLComponentDefinitions # undef _RKlcl_component _RKlcl_component_t_count, @@ -322,7 +324,7 @@ enum { // Include logging back-end and definition of _RKlcl_logger. -#import "lcl_config_logger_RK.h" +#import // For simple configurations where 'lcl_config_logger_RK.h' is empty, define a @@ -381,8 +383,7 @@ enum { // Include extensions. -#import "lcl_config_extensions_RK.h" +#import #endif // __RKLCL_H__ - diff --git a/Vendor/LibComponentLogging/Core/lcl_RK.m b/Vendor/LibComponentLogging/Core/lcl_RK.m index 9c2a6b8cda..847c34b1f8 100644 --- a/Vendor/LibComponentLogging/Core/lcl_RK.m +++ b/Vendor/LibComponentLogging/Core/lcl_RK.m @@ -23,7 +23,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#import "lcl_RK.h" +#import #include @@ -34,7 +34,7 @@ const char * const _RKlcl_component_identifier[] = { # define _RKlcl_component(_identifier, _header, _name) \ #_identifier, -# include "lcl_config_components_RK.h" + RKLCLComponentDefinitions # undef _RKlcl_component }; @@ -42,7 +42,7 @@ const char * const _RKlcl_component_header[] = { # define _RKlcl_component(_identifier, _header, _name) \ _header, -# include "lcl_config_components_RK.h" + RKLCLComponentDefinitions # undef _RKlcl_component }; @@ -50,7 +50,7 @@ const char * const _RKlcl_component_name[] = { # define _RKlcl_component(_identifier, _header, _name) \ _name, -# include "lcl_config_components_RK.h" + RKLCLComponentDefinitions # undef _RKlcl_component }; @@ -97,7 +97,7 @@ // 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) +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; @@ -108,13 +108,13 @@ uint32_t RKlcl_configure_by_component(_RKlcl_component_t component, _RKlcl_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; } @@ -126,12 +126,12 @@ static uint32_t _RKlcl_configure_by_text(uint32_t count, const char * const *tex 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); @@ -173,4 +173,3 @@ 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/Vendor/RKValueTransformers b/Vendor/RKValueTransformers deleted file mode 160000 index 50236b057f..0000000000 --- a/Vendor/RKValueTransformers +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 50236b057fbf3bd1d1e508cd876a19c5a7d6b5a3 diff --git a/Vendor/SOCKit b/Vendor/SOCKit deleted file mode 160000 index 7ec509a329..0000000000 --- a/Vendor/SOCKit +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7ec509a329bbe2eb9aa9f4f40f194c700fb36785 diff --git a/Vendor/TransitionKit b/Vendor/TransitionKit deleted file mode 160000 index efe5eae3ec..0000000000 --- a/Vendor/TransitionKit +++ /dev/null @@ -1 +0,0 @@ -Subproject commit efe5eae3ecfc5afbcbfde2fa5e656e512fa83c34
Object Mapping
Object Mapping
RKObjectMapping Encapsulates configuration for transforming object representations as expressed by key-value coding keypaths.