Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updates for RestKit master for iOS 6 arm7s build error and Xcode 4.5 …

…build warnings. refs #930
commit 29ba601cfc38560be923f57fba545881d0789ea5 1 parent 48ed605
@blakewatters blakewatters authored
View
4 Code/CoreData/RKObjectPropertyInspector+CoreData.m
@@ -35,7 +35,7 @@ @implementation RKObjectPropertyInspector (CoreData)
- (NSDictionary *)propertyNamesAndTypesForEntity:(NSEntityDescription *)entity
{
- NSMutableDictionary *propertyNamesAndTypes = [_cachedPropertyNamesAndTypes objectForKey:[entity name]];
+ NSMutableDictionary *propertyNamesAndTypes = [_propertyNamesToTypesCache objectForKey:[entity name]];
if (propertyNamesAndTypes) {
return propertyNamesAndTypes;
}
@@ -76,7 +76,7 @@ - (NSDictionary *)propertyNamesAndTypesForEntity:(NSEntityDescription *)entity
}
}
- [_cachedPropertyNamesAndTypes setObject:propertyNamesAndTypes forKey:[entity name]];
+ [_propertyNamesToTypesCache setObject:propertyNamesAndTypes forKey:[entity name]];
RKLogDebug(@"Cached property names and types for Entity '%@': %@", entity, propertyNamesAndTypes);
return propertyNamesAndTypes;
}
View
2  Code/ObjectMapping/RKObjectPropertyInspector.h
@@ -23,7 +23,7 @@
@class NSEntityDescription;
@interface RKObjectPropertyInspector : NSObject {
- NSMutableDictionary *_cachedPropertyNamesAndTypes;
+ NSCache *_propertyNamesToTypesCache;
}
+ (RKObjectPropertyInspector *)sharedInspector;
View
8 Code/ObjectMapping/RKObjectPropertyInspector.m
@@ -42,7 +42,7 @@ + (RKObjectPropertyInspector *)sharedInspector
- (id)init
{
if ((self = [super init])) {
- _cachedPropertyNamesAndTypes = [[NSMutableDictionary alloc] init];
+ _propertyNamesToTypesCache = [[NSCache alloc] init];
}
return self;
@@ -50,7 +50,7 @@ - (id)init
- (void)dealloc
{
- [_cachedPropertyNamesAndTypes release];
+ [_propertyNamesToTypesCache release];
[super dealloc];
}
@@ -72,7 +72,7 @@ + (NSString *)propertyTypeFromAttributeString:(NSString *)attributeString
- (NSDictionary *)propertyNamesAndTypesForClass:(Class)theClass
{
- NSMutableDictionary *propertyNames = [_cachedPropertyNamesAndTypes objectForKey:theClass];
+ NSMutableDictionary *propertyNames = [_propertyNamesToTypesCache objectForKey:theClass];
if (propertyNames) {
return propertyNames;
}
@@ -108,7 +108,7 @@ - (NSDictionary *)propertyNamesAndTypesForClass:(Class)theClass
currentClass = [currentClass superclass];
}
- [_cachedPropertyNamesAndTypes setObject:propertyNames forKey:theClass];
+ [_propertyNamesToTypesCache setObject:propertyNames forKey:theClass];
RKLogDebug(@"Cached property names and types for Class '%@': %@", NSStringFromClass(theClass), propertyNames);
return propertyNames;
}
View
12 Code/ObjectMapping/RKObjectRouter.m
@@ -42,12 +42,12 @@ - (void)dealloc
- (void)routeClass:(Class)theClass toResourcePathPattern:(NSString *)resourcePathPattern forMethodName:(NSString *)methodName escapeRoutedPath:(BOOL)addEscapes
{
NSString *className = NSStringFromClass(theClass);
- if (nil == [_routes objectForKey:theClass]) {
+ if (nil == [_routes objectForKey:className]) {
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
- [_routes setObject:dictionary forKey:theClass];
+ [_routes setObject:dictionary forKey:className];
}
- NSMutableDictionary *classRoutes = [_routes objectForKey:theClass];
+ NSMutableDictionary *classRoutes = [_routes objectForKey:className];
if ([classRoutes objectForKey:methodName]) {
[NSException raise:nil format:@"A route has already been registered for class '%@' and HTTP method '%@'", className, methodName];
}
@@ -106,7 +106,8 @@ - (NSString *)resourcePathForObject:(NSObject *)object method:(RKRequestMethod)m
NSDictionary *classRoutes = nil;
// Check for exact matches
- for (Class possibleClass in _routes) {
+ for (NSString *possibleClassName in _routes) {
+ Class possibleClass = NSClassFromString(possibleClassName);
if ([object isMemberOfClass:possibleClass]) {
classRoutes = [_routes objectForKey:possibleClass];
break;
@@ -115,7 +116,8 @@ - (NSString *)resourcePathForObject:(NSObject *)object method:(RKRequestMethod)m
// Check for superclass matches
if (! classRoutes) {
- for (Class possibleClass in _routes) {
+ for (NSString *possibleClassName in _routes) {
+ Class possibleClass = NSClassFromString(possibleClassName);
if ([object isKindOfClass:possibleClass]) {
classRoutes = [_routes objectForKey:possibleClass];
break;
View
7 Code/UI/RKTableViewCellMappings.m
@@ -45,17 +45,18 @@ - (void)setCellMapping:(RKTableViewCellMapping *)cellMapping forClass:(Class)obj
userInfo:nil];
}
- [_cellMappings setObject:cellMapping forKey:objectClass];
+ [_cellMappings setObject:cellMapping forKey:NSStringFromClass(objectClass)];
}
- (RKTableViewCellMapping *)cellMappingForClass:(Class)objectClass
{
// Exact match
- RKTableViewCellMapping *cellMapping = [_cellMappings objectForKey:objectClass];
+ RKTableViewCellMapping *cellMapping = [_cellMappings objectForKey:NSStringFromClass(objectClass)];
if (cellMapping) return cellMapping;
// Subclass match
- for (Class cellClass in _cellMappings) {
+ for (NSString *cellClassName in _cellMappings) {
+ Class cellClass = NSClassFromString(cellClassName);
if ([objectClass isSubclassOfClass:cellClass]) {
return [_cellMappings objectForKey:cellClass];
}
View
BIN  Examples/RKTwitter/Default-568h@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
5 Examples/RKTwitter/RKTwitter.xcodeproj/project.pbxproj
@@ -11,6 +11,7 @@
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 */; };
@@ -82,6 +83,7 @@
1D3623250D0F684500981E51 /* RKTwitterAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKTwitterAppDelegate.m; sourceTree = "<group>"; };
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 = "<group>"; };
250AC48A1358C79C006F084F /* RestKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RestKit.xcodeproj; path = ../../RestKit.xcodeproj; sourceTree = "<group>"; };
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 = "<group>"; };
@@ -168,6 +170,7 @@
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
isa = PBXGroup;
children = (
+ 25063C9016021B16007CAC2B /* Default-568h@2x.png */,
250AC48A1358C79C006F084F /* RestKit.xcodeproj */,
080E96DDFE201D6D7F000001 /* Classes */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
@@ -321,6 +324,7 @@
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;
};
@@ -354,7 +358,6 @@
isa = XCBuildConfiguration;
buildSettings = {
BUILD_STYLE = Debug;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
View
2  RestKit.xcodeproj/project.pbxproj
@@ -3168,6 +3168,7 @@
armv6,
armv7,
);
+ "ARCHS[sdk=iphoneos6.0]" = "$(ARCHS_STANDARD_32_BIT)";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Code/Support/RestKit-Prefix.pch";
HEADER_SEARCH_PATHS = "${SDKROOT}/usr/include/libxml2";
@@ -3189,6 +3190,7 @@
armv6,
armv7,
);
+ "ARCHS[sdk=iphoneos6.0]" = "$(ARCHS_STANDARD_32_BIT)";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Code/Support/RestKit-Prefix.pch";
HEADER_SEARCH_PATHS = "${SDKROOT}/usr/include/libxml2";
Please sign in to comment.
Something went wrong with that request. Please try again.