mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-24 04:46:01 +08:00
Updates for RestKit master for iOS 6 arm7s build error and Xcode 4.5 build warnings. refs #930
This commit is contained in:
@@ -35,7 +35,7 @@ RK_FIX_CATEGORY_BUG(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 @@ RK_FIX_CATEGORY_BUG(RKObjectPropertyInspector_CoreData)
|
||||
}
|
||||
}
|
||||
|
||||
[_cachedPropertyNamesAndTypes setObject:propertyNamesAndTypes forKey:[entity name]];
|
||||
[_propertyNamesToTypesCache setObject:propertyNamesAndTypes forKey:[entity name]];
|
||||
RKLogDebug(@"Cached property names and types for Entity '%@': %@", entity, propertyNamesAndTypes);
|
||||
return propertyNamesAndTypes;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
@class NSEntityDescription;
|
||||
|
||||
@interface RKObjectPropertyInspector : NSObject {
|
||||
NSMutableDictionary *_cachedPropertyNamesAndTypes;
|
||||
NSCache *_propertyNamesToTypesCache;
|
||||
}
|
||||
|
||||
+ (RKObjectPropertyInspector *)sharedInspector;
|
||||
|
||||
@@ -42,7 +42,7 @@ static RKObjectPropertyInspector *sharedInspector = nil;
|
||||
- (id)init
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
_cachedPropertyNamesAndTypes = [[NSMutableDictionary alloc] init];
|
||||
_propertyNamesToTypesCache = [[NSCache alloc] init];
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -50,7 +50,7 @@ static RKObjectPropertyInspector *sharedInspector = nil;
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[_cachedPropertyNamesAndTypes release];
|
||||
[_propertyNamesToTypesCache release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ static RKObjectPropertyInspector *sharedInspector = nil;
|
||||
|
||||
- (NSDictionary *)propertyNamesAndTypesForClass:(Class)theClass
|
||||
{
|
||||
NSMutableDictionary *propertyNames = [_cachedPropertyNamesAndTypes objectForKey:theClass];
|
||||
NSMutableDictionary *propertyNames = [_propertyNamesToTypesCache objectForKey:theClass];
|
||||
if (propertyNames) {
|
||||
return propertyNames;
|
||||
}
|
||||
@@ -108,7 +108,7 @@ static RKObjectPropertyInspector *sharedInspector = nil;
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -42,12 +42,12 @@
|
||||
- (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 @@
|
||||
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 @@
|
||||
|
||||
// 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;
|
||||
|
||||
@@ -45,17 +45,18 @@
|
||||
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];
|
||||
}
|
||||
|
||||
BIN
Examples/RKTwitter/Default-568h@2x.png
Normal file
BIN
Examples/RKTwitter/Default-568h@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user