Kill the CLI example

This commit is contained in:
Blake Watters
2012-10-01 18:03:30 -04:00
parent 7924520be2
commit af4c4f894b
5 changed files with 0 additions and 542 deletions

View File

@@ -1,389 +0,0 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
250DF27B14C684510001DEFA /* RestKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 25A3422B147D885B0009758D /* RestKit.framework */; };
2516F0FC144A8577004631A1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2516F0FB144A8577004631A1 /* Foundation.framework */; };
2516F0FF144A8577004631A1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2516F0FE144A8577004631A1 /* main.m */; };
2516F103144A8577004631A1 /* RestKit_CLI.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2516F102144A8577004631A1 /* RestKit_CLI.1 */; };
2516F15E144A8923004631A1 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2516F15D144A8923004631A1 /* SystemConfiguration.framework */; };
2516F160144A895E004631A1 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2516F15F144A895E004631A1 /* libxml2.dylib */; };
2516F162144A8AED004631A1 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2516F161144A8AED004631A1 /* CoreServices.framework */; };
25A34230147D88630009758D /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 25A3422F147D88620009758D /* Security.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
25678093152D124D000725F5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 2516F10D144A8841004631A1 /* RestKit.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 259C301615128079003066A2;
remoteInfo = RestKitResources;
};
25A34226147D885B0009758D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 2516F10D144A8841004631A1 /* RestKit.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 25160D1614564E810060A5C5;
remoteInfo = RestKit;
};
25A34228147D885B0009758D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 2516F10D144A8841004631A1 /* RestKit.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 25160D2614564E820060A5C5;
remoteInfo = RestKitTests;
};
25A3422A147D885B0009758D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 2516F10D144A8841004631A1 /* RestKit.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 25160E62145651060060A5C5;
remoteInfo = RestKitFramework;
};
25A3422C147D885B0009758D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 2516F10D144A8841004631A1 /* RestKit.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 25160E78145651060060A5C5;
remoteInfo = RestKitFrameworkTests;
};
25A3423E147D89DC0009758D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 2516F10D144A8841004631A1 /* RestKit.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 25160E61145651060060A5C5;
remoteInfo = RestKitFramework;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
2516F0F5144A8577004631A1 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
2516F103144A8577004631A1 /* RestKit_CLI.1 in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
2516F0F7144A8577004631A1 /* rkkeypath */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = rkkeypath; sourceTree = BUILT_PRODUCTS_DIR; };
2516F0FB144A8577004631A1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
2516F0FE144A8577004631A1 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
2516F101144A8577004631A1 /* RestKit CLI-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RestKit CLI-Prefix.pch"; sourceTree = "<group>"; };
2516F102144A8577004631A1 /* RestKit_CLI.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = RestKit_CLI.1; sourceTree = "<group>"; };
2516F10D144A8841004631A1 /* RestKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RestKit.xcodeproj; path = ../../RestKit.xcodeproj; sourceTree = "<group>"; };
2516F15D144A8923004631A1 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
2516F15F144A895E004631A1 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; };
2516F161144A8AED004631A1 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = System/Library/Frameworks/CoreServices.framework; sourceTree = SDKROOT; };
25A3422F147D88620009758D /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
2516F0F4144A8577004631A1 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
250DF27B14C684510001DEFA /* RestKit.framework in Frameworks */,
25A34230147D88630009758D /* Security.framework in Frameworks */,
2516F162144A8AED004631A1 /* CoreServices.framework in Frameworks */,
2516F160144A895E004631A1 /* libxml2.dylib in Frameworks */,
2516F15E144A8923004631A1 /* SystemConfiguration.framework in Frameworks */,
2516F0FC144A8577004631A1 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
2516F0EC144A8577004631A1 = {
isa = PBXGroup;
children = (
2516F0FD144A8577004631A1 /* RestKit CLI */,
2516F0FA144A8577004631A1 /* Frameworks */,
2516F0F8144A8577004631A1 /* Products */,
2516F10D144A8841004631A1 /* RestKit.xcodeproj */,
);
sourceTree = "<group>";
};
2516F0F8144A8577004631A1 /* Products */ = {
isa = PBXGroup;
children = (
2516F0F7144A8577004631A1 /* rkkeypath */,
);
name = Products;
sourceTree = "<group>";
};
2516F0FA144A8577004631A1 /* Frameworks */ = {
isa = PBXGroup;
children = (
25A3422F147D88620009758D /* Security.framework */,
2516F15F144A895E004631A1 /* libxml2.dylib */,
2516F161144A8AED004631A1 /* CoreServices.framework */,
2516F15D144A8923004631A1 /* SystemConfiguration.framework */,
2516F0FB144A8577004631A1 /* Foundation.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
2516F0FD144A8577004631A1 /* RestKit CLI */ = {
isa = PBXGroup;
children = (
2516F0FE144A8577004631A1 /* main.m */,
2516F102144A8577004631A1 /* RestKit_CLI.1 */,
2516F100144A8577004631A1 /* Supporting Files */,
);
path = "RestKit CLI";
sourceTree = "<group>";
};
2516F100144A8577004631A1 /* Supporting Files */ = {
isa = PBXGroup;
children = (
2516F101144A8577004631A1 /* RestKit CLI-Prefix.pch */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
2516F10E144A8841004631A1 /* Products */ = {
isa = PBXGroup;
children = (
25A34227147D885B0009758D /* libRestKit.a */,
25A34229147D885B0009758D /* RestKitTests.octest */,
25A3422B147D885B0009758D /* RestKit.framework */,
25A3422D147D885B0009758D /* RestKitFrameworkTests.octest */,
25678094152D124D000725F5 /* RestKitResources.bundle */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
2516F0F6144A8577004631A1 /* RestKit CLI */ = {
isa = PBXNativeTarget;
buildConfigurationList = 2516F106144A8577004631A1 /* Build configuration list for PBXNativeTarget "RestKit CLI" */;
buildPhases = (
2516F0F3144A8577004631A1 /* Sources */,
2516F0F4144A8577004631A1 /* Frameworks */,
2516F0F5144A8577004631A1 /* CopyFiles */,
2516F28E144AB1F1004631A1 /* Copy to Tools */,
);
buildRules = (
);
dependencies = (
25A3423F147D89DC0009758D /* PBXTargetDependency */,
);
name = "RestKit CLI";
productName = "RestKit CLI";
productReference = 2516F0F7144A8577004631A1 /* rkkeypath */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
2516F0EE144A8577004631A1 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0420;
};
buildConfigurationList = 2516F0F1144A8577004631A1 /* Build configuration list for PBXProject "RestKit CLI" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 2516F0EC144A8577004631A1;
productRefGroup = 2516F0F8144A8577004631A1 /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 2516F10E144A8841004631A1 /* Products */;
ProjectRef = 2516F10D144A8841004631A1 /* RestKit.xcodeproj */;
},
);
projectRoot = "";
targets = (
2516F0F6144A8577004631A1 /* RestKit CLI */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
25678094152D124D000725F5 /* RestKitResources.bundle */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = RestKitResources.bundle;
remoteRef = 25678093152D124D000725F5 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
25A34227147D885B0009758D /* libRestKit.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRestKit.a;
remoteRef = 25A34226147D885B0009758D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
25A34229147D885B0009758D /* RestKitTests.octest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = RestKitTests.octest;
remoteRef = 25A34228147D885B0009758D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
25A3422B147D885B0009758D /* RestKit.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = RestKit.framework;
remoteRef = 25A3422A147D885B0009758D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
25A3422D147D885B0009758D /* RestKitFrameworkTests.octest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = RestKitFrameworkTests.octest;
remoteRef = 25A3422C147D885B0009758D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXShellScriptBuildPhase section */
2516F28E144AB1F1004631A1 /* Copy to Tools */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy to Tools";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "cp \"${BUILT_PRODUCTS_DIR}/rkkeypath\" \"${SOURCE_ROOT}/../../Tools\"";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
2516F0F3144A8577004631A1 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2516F0FF144A8577004631A1 /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
25A3423F147D89DC0009758D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = RestKitFramework;
targetProxy = 25A3423E147D89DC0009758D /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
2516F104144A8577004631A1 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
2516F105144A8577004631A1 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
SDKROOT = macosx;
};
name = Release;
};
2516F107144A8577004631A1 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "RestKit CLI/RestKit CLI-Prefix.pch";
HEADER_SEARCH_PATHS = ../../Build;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = rkkeypath;
};
name = Debug;
};
2516F108144A8577004631A1 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "RestKit CLI/RestKit CLI-Prefix.pch";
HEADER_SEARCH_PATHS = ../../Build;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = rkkeypath;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
2516F0F1144A8577004631A1 /* Build configuration list for PBXProject "RestKit CLI" */ = {
isa = XCConfigurationList;
buildConfigurations = (
2516F104144A8577004631A1 /* Debug */,
2516F105144A8577004631A1 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
2516F106144A8577004631A1 /* Build configuration list for PBXNativeTarget "RestKit CLI" */ = {
isa = XCConfigurationList;
buildConfigurations = (
2516F107144A8577004631A1 /* Debug */,
2516F108144A8577004631A1 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 2516F0EE144A8577004631A1 /* Project object */;
}

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:RestKit CLI.xcodeproj">
</FileRef>
</Workspace>

View File

@@ -1,7 +0,0 @@
//
// Prefix header for all source files of the 'RestKit CLI' target in the 'RestKit CLI' project
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#endif

View File

@@ -1,79 +0,0 @@
.\"Modified from man(1) of FreeBSD, the NetBSD mdoc.template, and mdoc.samples.
.\"See Also:
.\"man mdoc.samples for a complete listing of options
.\"man mdoc for the short list of editing options
.\"/usr/share/misc/mdoc.template
.Dd 10/15/11 \" DATE
.Dt RestKit CLI 1 \" Program name and manual section number
.Os Darwin
.Sh NAME \" Section Header - required - don't modify
.Nm RestKit CLI,
.\" The following lines are read in generating the apropos(man -k) database. Use only key
.\" words here as the database is built based on the words here and in the .ND line.
.Nm Other_name_for_same_program(),
.Nm Yet another name for the same program.
.\" Use .Nm macro to designate other names for the documented program.
.Nd This line parsed for whatis database.
.Sh SYNOPSIS \" Section Header - required - don't modify
.Nm
.Op Fl abcd \" [-abcd]
.Op Fl a Ar path \" [-a path]
.Op Ar file \" [file]
.Op Ar \" [file ...]
.Ar arg0 \" Underlined argument - use .Ar anywhere to underline
arg2 ... \" Arguments
.Sh DESCRIPTION \" Section Header - required - don't modify
Use the .Nm macro to refer to your program throughout the man page like such:
.Nm
Underlining is accomplished with the .Ar macro like this:
.Ar underlined text .
.Pp \" Inserts a space
A list of items with descriptions:
.Bl -tag -width -indent \" Begins a tagged list
.It item a \" Each item preceded by .It macro
Description of item a
.It item b
Description of item b
.El \" Ends the list
.Pp
A list of flags and their descriptions:
.Bl -tag -width -indent \" Differs from above in tag removed
.It Fl a \"-a flag as a list item
Description of -a flag
.It Fl b
Description of -b flag
.El \" Ends the list
.Pp
.\" .Sh ENVIRONMENT \" May not be needed
.\" .Bl -tag -width "ENV_VAR_1" -indent \" ENV_VAR_1 is width of the string ENV_VAR_1
.\" .It Ev ENV_VAR_1
.\" Description of ENV_VAR_1
.\" .It Ev ENV_VAR_2
.\" Description of ENV_VAR_2
.\" .El
.Sh FILES \" File used or created by the topic of the man page
.Bl -tag -width "/Users/joeuser/Library/really_long_file_name" -compact
.It Pa /usr/share/file_name
FILE_1 description
.It Pa /Users/joeuser/Library/really_long_file_name
FILE_2 description
.El \" Ends the list
.\" .Sh DIAGNOSTICS \" May not be needed
.\" .Bl -diag
.\" .It Diagnostic Tag
.\" Diagnostic informtion here.
.\" .It Diagnostic Tag
.\" Diagnostic informtion here.
.\" .El
.Sh SEE ALSO
.\" List links in ascending order by section, alphabetically within a section.
.\" Please do not reference files that do not exist without filing a bug report
.Xr a 1 ,
.Xr b 1 ,
.Xr c 1 ,
.Xr a 2 ,
.Xr b 2 ,
.Xr a 3 ,
.Xr b 3
.\" .Sh BUGS \" Document known, unremedied bugs
.\" .Sh HISTORY \" Document history if command behaves in a unique manner

View File

@@ -1,60 +0,0 @@
//
// main.m
// RestKit CLI
//
// Created by Blake Watters on 10/15/11.
// Copyright (c) 2009-2012 RestKit. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <RestKit/RestKit.h>
int main (int argc, const char *argv[])
{
@autoreleasepool {
RKLogConfigureByName("App", RKLogLevelTrace);
// Validate arguments
if (argc < 2) {
printf("usage: %s path/to/file [keyPath]\n", argv[0]);
printf("Parses the specified file and outputs the payload.\n"
"If keyPath is provided it will be evaluated against the payload and the result printed.\n");
return 0;
}
NSString *filePathOrURL = [NSString stringWithCString:argv[1] encoding:NSUTF8StringEncoding];
NSURL *URL = nil;
NSString *keyPath = nil;
if ([filePathOrURL rangeOfString:@"://"].length == 0) {
// Local file
URL = [NSURL fileURLWithPath:filePathOrURL];
} else {
// Web URL
URL = [NSURL URLWithString:filePathOrURL];
}
if (argc == 3) keyPath = [NSString stringWithCString:argv[2] encoding:NSUTF8StringEncoding];
NSError *error = nil;
NSString *payload = [NSString stringWithContentsOfURL:URL encoding:NSUTF8StringEncoding error:&error];
if (!payload) {
RKLogError(@"Failed to read file at path %@: %@", URL, error);
return 0;
}
NSString *MIMEType = [[URL absoluteString] MIMETypeForPathExtension];
RKLogInfo(@"Parsing %@ using MIME Type: %@", URL, MIMEType);
id<RKParser> parser = [[RKParserRegistry sharedRegistry] parserForMIMEType:MIMEType];
id parsedData = [parser objectFromString:payload error:&error];
if (!parsedData) {
RKLogError(@"Failed to parse file: %@", error);
RKLogError(@"Payload => %@", payload);
return 0;
}
RKLogInfo(@"Parsed data => %@", parsedData);
if (keyPath) RKLogInfo(@"valueForKeyPath:@\"%@\" => %@", keyPath, [parsedData valueForKeyPath:keyPath]);
}
return 0;
}