From a298bc4dcf887790070fd4919feef205feff7cc2 Mon Sep 17 00:00:00 2001 From: Blake Watters Date: Sun, 27 Mar 2011 22:53:08 -0400 Subject: [PATCH] Fix build problems --- Code/ObjectMapping/RKObjectLoader.m | 4 ++-- Code/Support/Parsers/XML/RKXMLParser+libXML.m | 4 ++-- RestKit.xcodeproj/project.pbxproj | 7 +++++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Code/ObjectMapping/RKObjectLoader.m b/Code/ObjectMapping/RKObjectLoader.m index 341ad5d7..7ef1144e 100644 --- a/Code/ObjectMapping/RKObjectLoader.m +++ b/Code/ObjectMapping/RKObjectLoader.m @@ -206,8 +206,8 @@ if (NO == [self encounteredErrorWhileProcessingRequest:response]) { // TODO: Should probably be an expected MIME types array set by client/manager - BOOL isAcceptable = (_mapper.format == RKMappingFormatXML && [response isXML]) || - (_mapper.format == RKMappingFormatJSON && [response isJSON]); + BOOL isAcceptable = (self.objectMapper.format == RKMappingFormatXML && [response isXML]) || + (self.objectMapper.format == RKMappingFormatJSON && [response isJSON]); if ([response isSuccessful] && isAcceptable) { [self performSelectorInBackground:@selector(processLoadModelsInBackground:) withObject:response]; } else { diff --git a/Code/Support/Parsers/XML/RKXMLParser+libXML.m b/Code/Support/Parsers/XML/RKXMLParser+libXML.m index dd41898a..39de58fd 100644 --- a/Code/Support/Parsers/XML/RKXMLParser+libXML.m +++ b/Code/Support/Parsers/XML/RKXMLParser+libXML.m @@ -50,8 +50,8 @@ } } } else if (currentNode->type == XML_TEXT_NODE) { - const char* str = xmlNodeGetContent(currentNode); - NSString* part = [NSString stringWithCString:str encoding:NSUTF8StringEncoding]; + xmlChar* str = xmlNodeGetContent(currentNode); + NSString* part = [NSString stringWithCString:(const char*)str encoding:NSUTF8StringEncoding]; if ([[part stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] length] > 0) { [nodes addObject:part]; } diff --git a/RestKit.xcodeproj/project.pbxproj b/RestKit.xcodeproj/project.pbxproj index e1608895..d7e2d833 100644 --- a/RestKit.xcodeproj/project.pbxproj +++ b/RestKit.xcodeproj/project.pbxproj @@ -176,6 +176,7 @@ 259DF7861340294400233DF4 /* RKXMLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 259DF7831340294400233DF4 /* RKXMLParser.h */; }; 259DF7871340294400233DF4 /* RKXMLParser+libXML.m in Sources */ = {isa = PBXBuildFile; fileRef = 259DF7851340294400233DF4 /* RKXMLParser+libXML.m */; }; 259DF7881340299900233DF4 /* RKXMLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 259DF7831340294400233DF4 /* RKXMLParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 259DF78C13402E4D00233DF4 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 259DF78B13402E4D00233DF4 /* libxml2.dylib */; }; 3F032A7910FFB89100F35142 /* RKCat.m in Sources */ = {isa = PBXBuildFile; fileRef = 3F032A7810FFB89100F35142 /* RKCat.m */; }; 3F032AA810FFBBCD00F35142 /* RKHouse.m in Sources */ = {isa = PBXBuildFile; fileRef = 3F032AA710FFBBCD00F35142 /* RKHouse.m */; }; 3F032AAB10FFBC1F00F35142 /* RKResident.m in Sources */ = {isa = PBXBuildFile; fileRef = 3F032AAA10FFBC1F00F35142 /* RKResident.m */; }; @@ -477,6 +478,7 @@ 259DF77A1340290600233DF4 /* libRestKitXMLParser+libxml.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libRestKitXMLParser+libxml.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 259DF7831340294400233DF4 /* RKXMLParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKXMLParser.h; sourceTree = ""; }; 259DF7851340294400233DF4 /* RKXMLParser+libXML.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "RKXMLParser+libXML.m"; sourceTree = ""; }; + 259DF78B13402E4D00233DF4 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; 25E075981279D9AB00B22EC9 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; 3F032A7710FFB89100F35142 /* RKCat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKCat.h; sourceTree = ""; }; 3F032A7810FFB89100F35142 /* RKCat.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKCat.m; sourceTree = ""; }; @@ -557,6 +559,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 259DF78C13402E4D00233DF4 /* libxml2.dylib in Frameworks */, 259DF77B1340290600233DF4 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -611,6 +614,7 @@ 0867D691FE84028FC02AAC07 /* OTRestFramework */ = { isa = PBXGroup; children = ( + 259DF78B13402E4D00233DF4 /* libxml2.dylib */, 253A085F12551D8D00976E89 /* Code */, 3F6C3A9210FE750E008F47C5 /* Specs */, 253A0A8D1255300000976E89 /* Scripts */, @@ -2281,6 +2285,7 @@ GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_VERSION = com.apple.compilers.llvmgcc42; + HEADER_SEARCH_PATHS = /usr/include/libxml2; IPHONEOS_DEPLOYMENT_TARGET = 4.3; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -2295,6 +2300,7 @@ GCC_C_LANGUAGE_STANDARD = gnu99; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_VERSION = com.apple.compilers.llvmgcc42; + HEADER_SEARCH_PATHS = /usr/include/libxml2; IPHONEOS_DEPLOYMENT_TARGET = 4.3; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -2309,6 +2315,7 @@ GCC_C_LANGUAGE_STANDARD = gnu99; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_VERSION = com.apple.compilers.llvmgcc42; + HEADER_SEARCH_PATHS = /usr/include/libxml2; IPHONEOS_DEPLOYMENT_TARGET = 4.3; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)";