Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

restart this project.

  • Loading branch information...
commit c642dd8b4850ae40b623730a7ebfb7f9cab5284c 1 parent 62cc069
stig authored
Showing with 2,528 additions and 1,511 deletions.
  1. +31 −0 Classes/SBCouchServer.h
  2. +116 −0 Classes/SBCouchServer.m
  3. +0 −32 Couch.h
  4. +262 −198 CouchObjC.xcodeproj/project.pbxproj
  5. +7 −0 CouchObjC_Prefix.pch
  6. BIN  English.lproj/InfoPlist.strings
  7. +26 −0 Info.plist
  8. +0 −59 SBCouch.h
  9. +0 −300 SBCouch.m
  10. +1 −1  Tests-Info.plist
  11. +0 −56 Tests/Database.m
  12. +0 −155 Tests/Document.m
  13. +0 −47 Tests/Errors.m
  14. +16 −0 Tests/Server.h
  15. +45 −0 Tests/Server.m
  16. +0 −36 Tests/Tests.h
  17. +0 −31 Tests/Tests.m
  18. +0 −51 Tests/View.m
  19. +10 −0 vendor/JSON/CREDITS
  20. +103 −0 vendor/JSON/Docs/JensAlfkePerformanceNotes.txt
  21. +54 −0 vendor/JSON/Docs/benchmark.patch
  22. +37 −0 vendor/JSON/Docs/parser-benchmark.txt
  23. +5 −3 vendor/JSON/JSON-Info.plist
  24. +291 −27 vendor/JSON/JSON.xcodeproj/project.pbxproj
  25. +54 −32 vendor/JSON/Makefile
  26. +135 −110 vendor/JSON/Site/index.html
  27. +103 −1 vendor/JSON/Site/news.xml
  28. +20 −2 vendor/JSON/Site/style.css
  29. +1 −1  vendor/JSON/Source/JSON.h
  30. +1 −1  vendor/JSON/Source/NSObject+SBJSON.h
  31. +107 −47 vendor/JSON/Source/NSObject+SBJSON.m
  32. +0 −261 vendor/JSON/Source/NSScanner+SBJSON.m
  33. +2 −1  vendor/JSON/Source/NSString+SBJSON.h
  34. +23 −8 vendor/JSON/Source/NSString+SBJSON.m
  35. +19 −9 vendor/JSON/Source/{NSScanner+SBJSON.h → SBJSONScanner.h}
  36. +442 −0 vendor/JSON/Source/SBJSONScanner.m
  37. +19 −8 vendor/JSON/Tests/Errors.m
  38. +74 −27 vendor/JSON/Tests/Examples.m
  39. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/README
  40. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail1.json
  41. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail10.json
  42. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail11.json
  43. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail12.json
  44. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail13.json
  45. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail14.json
  46. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail15.json
  47. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail16.json
  48. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail17.json
  49. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail18.json
  50. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail19.json
  51. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail2.json
  52. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail20.json
  53. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail21.json
  54. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail22.json
  55. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail23.json
  56. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail24.json
  57. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail25.json
  58. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail26.json
  59. +2 −0  vendor/JSON/Tests/Examples/JSONChecker/fail27.json
  60. +2 −0  vendor/JSON/Tests/Examples/JSONChecker/fail28.json
  61. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail29.json
  62. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail3.json
  63. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail30.json
  64. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail31.json
  65. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail32.json
  66. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail33.json
  67. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail4.json
  68. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail5.json
  69. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail6.json
  70. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail7.json
  71. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail8.json
  72. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/fail9.json
  73. +58 −0 vendor/JSON/Tests/Examples/JSONChecker/pass1.json
  74. +1 −0  vendor/JSON/Tests/Examples/JSONChecker/pass2.json
  75. +6 −0 vendor/JSON/Tests/Examples/JSONChecker/pass3.json
  76. 0  vendor/JSON/Tests/Examples/{json.org → }/ex1.json
  77. +44 −0 vendor/JSON/Tests/Examples/ex1.plist
  78. 0  vendor/JSON/Tests/Examples/{json.org → }/ex2.json
  79. +37 −0 vendor/JSON/Tests/Examples/ex2.plist
  80. 0  vendor/JSON/Tests/Examples/{json.org → }/ex3.json
  81. +54 −0 vendor/JSON/Tests/Examples/ex3.plist
  82. 0  vendor/JSON/Tests/Examples/{json.org → }/ex4.json
  83. +185 −0 vendor/JSON/Tests/Examples/ex4.plist
  84. 0  vendor/JSON/Tests/Examples/{json.org → }/ex5.json
  85. +0 −1  vendor/JSON/Tests/Examples/json.org/README
  86. 0  vendor/JSON/Tests/Examples/{rfc4627ex1.json → rfc4627a.json}
  87. +31 −0 vendor/JSON/Tests/Examples/rfc4627a.plist
  88. 0  vendor/JSON/Tests/Examples/{rfc4627ex2.json → rfc4627b.json}
  89. +42 −0 vendor/JSON/Tests/Examples/rfc4627b.plist
  90. +27 −3 vendor/JSON/Tests/Types.m
  91. +3 −3 Couch-Info.plist → vendor/JSON/libjsontests-Info.plist
View
31 Classes/SBCouchServer.h
@@ -0,0 +1,31 @@
+//
+// SBCouchServer.h
+// CouchObjC
+//
+// Created by Stig Brautaset on 21/03/2008.
+// Copyright 2008 Stig Brautaset. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface SBCouchServer : NSObject {
+ NSString *host;
+ NSUInteger port;
+}
+
+@property (readonly) NSString *host;
+@property (readonly) NSUInteger port;
+
+/// Initialise a server object with a host and port
+- (id)initWithHost:(NSString*)h port:(NSUInteger)p;
+
+/// The server version
+- (NSString*)version;
+
+- (NSArray*)listDatabases;
+
+- (BOOL)createDatabase:(NSString*)n;
+- (BOOL)deleteDatabase:(NSString*)n;
+
+@end
View
116 Classes/SBCouchServer.m
@@ -0,0 +1,116 @@
+//
+// SBCouchServer.m
+// CouchObjC
+//
+// Created by Stig Brautaset on 21/03/2008.
+// Copyright 2008 Stig Brautaset. All rights reserved.
+//
+
+#import "SBCouchServer.h"
+#import <JSON/JSON.h>
+
+@implementation SBCouchServer
+
+@synthesize host;
+@synthesize port;
+
+- (id)initWithHost:(NSString*)h port:(NSUInteger)p
+{
+ if (self = [super init]) {
+ host = [h copy];
+ port = p;
+
+ }
+ return self;
+}
+
+- (void)dealloc
+{
+ [host release];
+ [super dealloc];
+}
+
+- (id)init
+{
+ return [self initWithHost:@"localhost" port:5984];
+}
+
+- (NSString*)version
+{
+ NSString *server = [NSString stringWithFormat:@"http://%@:%u", self.host, self.port];
+ NSURL *url = [NSURL URLWithString:server];
+ NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
+
+ NSError *error;
+ NSHTTPURLResponse *response;
+ NSData *data = [NSURLConnection sendSynchronousRequest:request
+ returningResponse:&response
+ error:&error];
+
+ if (data) {
+ NSString *json = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
+ NSDictionary *dict = [json JSONValue];
+ return [dict valueForKey:@"version"];
+ }
+
+ NSLog(@"Error occured.\nError: %@\nResponse: %@", error, response);
+ return nil;
+}
+
+- (BOOL)createDatabase:(NSString*)db
+{
+ NSString *escaped = [db stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
+ NSString *server = [NSString stringWithFormat:@"http://%@:%u/%@", self.host, self.port, escaped];
+ NSURL *url = [NSURL URLWithString:server];
+
+ NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
+ [request setHTTPMethod:@"PUT"];
+
+ NSError *error;
+ NSHTTPURLResponse *response;
+ (void)[NSURLConnection sendSynchronousRequest:request
+ returningResponse:&response
+ error:&error];
+
+ return 201 == [response statusCode];
+}
+
+- (BOOL)deleteDatabase:(NSString*)db
+{
+ NSString *escaped = [db stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
+ NSString *server = [NSString stringWithFormat:@"http://%@:%u/%@", self.host, self.port, escaped];
+ NSURL *url = [NSURL URLWithString:server];
+
+ NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
+ [request setHTTPMethod:@"DELETE"];
+
+ NSError *error;
+ NSHTTPURLResponse *response;
+ (void)[NSURLConnection sendSynchronousRequest:request
+ returningResponse:&response
+ error:&error];
+
+ return 202 == [response statusCode];
+}
+
+- (NSArray*)listDatabases
+{
+ NSString *server = [NSString stringWithFormat:@"http://%@:%u/_all_dbs", self.host, self.port];
+ NSURL *url = [NSURL URLWithString:server];
+ NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
+
+ NSError *error;
+ NSHTTPURLResponse *response;
+ NSData *data = [NSURLConnection sendSynchronousRequest:request
+ returningResponse:&response
+ error:&error];
+
+ if (200 == [response statusCode]) {
+ NSString *json = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
+ return [json JSONValue];
+ }
+
+ return nil;
+}
+
+@end
View
32 Couch.h
@@ -1,32 +0,0 @@
-/*
-Copyright (c) 2007, Stig Brautaset. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- Neither the name of the author nor the names of its contributors may be used
- to endorse or promote products derived from this software without specific
- prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#import <Cocoa/Cocoa.h>
-
-#import <Couch/SBCouch.h>
View
460 CouchObjC.xcodeproj/project.pbxproj
@@ -3,270 +3,329 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 42;
+ objectVersion = 44;
objects = {
/* Begin PBXBuildFile section */
- 53A62D510C9C0BCA000F9C9B /* Errors.m in Sources */ = {isa = PBXBuildFile; fileRef = 53A62D500C9C0BCA000F9C9B /* Errors.m */; };
- E705A4CB0CA59F8F00FD0A97 /* JSON.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = E7464E9A0C9C55CC009D6B34 /* JSON.framework */; };
- E7464EA20C9C5625009D6B34 /* JSON.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7464E9A0C9C55CC009D6B34 /* JSON.framework */; };
- E7464EA80C9C594A009D6B34 /* Document.m in Sources */ = {isa = PBXBuildFile; fileRef = E7464EA70C9C594A009D6B34 /* Document.m */; };
- E7464ECA0C9D796E009D6B34 /* View.m in Sources */ = {isa = PBXBuildFile; fileRef = E7464EC90C9D796E009D6B34 /* View.m */; };
- E7464ECE0C9D79D2009D6B34 /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = E7464ECD0C9D79D2009D6B34 /* Tests.m */; };
- E75D3F820C90559900058F83 /* Database.m in Sources */ = {isa = PBXBuildFile; fileRef = E75D3F810C90559900058F83 /* Database.m */; };
- E75D3F8D0C9055E000058F83 /* Couch.h in Headers */ = {isa = PBXBuildFile; fileRef = E75D3F8A0C9055E000058F83 /* Couch.h */; settings = {ATTRIBUTES = (Public, ); }; };
- E75D3F8E0C9055E000058F83 /* SBCouch.h in Headers */ = {isa = PBXBuildFile; fileRef = E75D3F8B0C9055E000058F83 /* SBCouch.h */; settings = {ATTRIBUTES = (Private, ); }; };
- E75D3F8F0C9055E000058F83 /* SBCouch.m in Sources */ = {isa = PBXBuildFile; fileRef = E75D3F8C0C9055E000058F83 /* SBCouch.m */; };
- E75D3F950C90564900058F83 /* Couch.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E75D3F640C9054B600058F83 /* Couch.framework */; };
+ 5315EE5D0D940717001E3B2E /* SBCouchServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 5315EE5B0D940717001E3B2E /* SBCouchServer.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 5315EE5E0D940717001E3B2E /* SBCouchServer.m in Sources */ = {isa = PBXBuildFile; fileRef = 5315EE5C0D940717001E3B2E /* SBCouchServer.m */; };
+ 5315EE790D940818001E3B2E /* Server.m in Sources */ = {isa = PBXBuildFile; fileRef = 5315EE780D940818001E3B2E /* Server.m */; };
+ 5315EE890D941077001E3B2E /* CouchObjC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* CouchObjC.framework */; };
+ 5315EE8B0D941085001E3B2E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D69BFE84028FC02AAC07 /* Foundation.framework */; };
+ 5315EEB20D94178E001E3B2E /* JSON.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5315EEAB0D941786001E3B2E /* JSON.framework */; };
+ 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
- E7464E990C9C55CC009D6B34 /* PBXContainerItemProxy */ = {
+ 5315EE6B0D940796001E3B2E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
- containerPortal = E7464E910C9C55CC009D6B34 /* JSON.xcodeproj */;
+ containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
+ remoteInfo = CouchObjC;
+ };
+ 5315EEAA0D941786001E3B2E /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 5315EEA00D941786001E3B2E /* JSON.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 53D229810C96121600276605;
remoteInfo = JSON;
};
- E7464E9B0C9C55CC009D6B34 /* PBXContainerItemProxy */ = {
+ 5315EEAC0D941786001E3B2E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
- containerPortal = E7464E910C9C55CC009D6B34 /* JSON.xcodeproj */;
+ containerPortal = 5315EEA00D941786001E3B2E /* JSON.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 53D2298D0C96122A00276605;
remoteInfo = Tests;
};
- E7464E9E0C9C55F8009D6B34 /* PBXContainerItemProxy */ = {
+ 5315EEAE0D941786001E3B2E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
- containerPortal = E7464E910C9C55CC009D6B34 /* JSON.xcodeproj */;
- proxyType = 1;
- remoteGlobalIDString = 53D229800C96121600276605;
- remoteInfo = JSON;
+ containerPortal = 5315EEA00D941786001E3B2E /* JSON.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = FE2BBD800D8B0D3900184787;
+ remoteInfo = json;
};
- E75D3F7B0C90555C00058F83 /* PBXContainerItemProxy */ = {
+ 5315EEB00D941786001E3B2E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
- containerPortal = E75D3F540C90549600058F83 /* Project object */;
+ containerPortal = 5315EEA00D941786001E3B2E /* JSON.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = FE2BBDAB0D8B0EE000184787;
+ remoteInfo = libjsontests;
+ };
+ 5315EEC10D941975001E3B2E /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 5315EEA00D941786001E3B2E /* JSON.xcodeproj */;
proxyType = 1;
- remoteGlobalIDString = E75D3F630C9054B600058F83;
- remoteInfo = Couch;
+ remoteGlobalIDString = 53D229800C96121600276605;
+ remoteInfo = JSON;
};
/* End PBXContainerItemProxy section */
-/* Begin PBXCopyFilesBuildPhase section */
- E705A4C90CA59F7400FD0A97 /* CopyFiles */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = "";
- dstSubfolderSpec = 10;
- files = (
- E705A4CB0CA59F8F00FD0A97 /* JSON.framework in CopyFiles */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXCopyFilesBuildPhase section */
-
/* Begin PBXFileReference section */
- 53A62D500C9C0BCA000F9C9B /* Errors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Errors.m; sourceTree = "<group>"; };
- E7464E910C9C55CC009D6B34 /* JSON.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = JSON.xcodeproj; path = vendor/JSON/JSON.xcodeproj; sourceTree = "<group>"; };
- E7464EA70C9C594A009D6B34 /* Document.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Document.m; sourceTree = "<group>"; };
- E7464EC90C9D796E009D6B34 /* View.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = View.m; sourceTree = "<group>"; };
- E7464ECD0C9D79D2009D6B34 /* Tests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = "<group>"; };
- E75D3F640C9054B600058F83 /* Couch.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Couch.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- E75D3F660C9054B600058F83 /* Couch-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "Couch-Info.plist"; sourceTree = "<group>"; };
- E75D3F740C90555700058F83 /* Tests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
- E75D3F750C90555700058F83 /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "Tests-Info.plist"; sourceTree = "<group>"; };
- E75D3F800C90559900058F83 /* Tests.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Tests.h; sourceTree = "<group>"; };
- E75D3F810C90559900058F83 /* Database.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = Database.m; sourceTree = "<group>"; };
- E75D3F8A0C9055E000058F83 /* Couch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Couch.h; sourceTree = "<group>"; };
- E75D3F8B0C9055E000058F83 /* SBCouch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SBCouch.h; sourceTree = "<group>"; };
- E75D3F8C0C9055E000058F83 /* SBCouch.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = SBCouch.m; sourceTree = "<group>"; };
+ 0867D69BFE84028FC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+ 0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+ 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+ 32DBCF5E0370ADEE00C91783 /* CouchObjC_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CouchObjC_Prefix.pch; sourceTree = "<group>"; };
+ 5315EE5B0D940717001E3B2E /* SBCouchServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBCouchServer.h; sourceTree = "<group>"; };
+ 5315EE5C0D940717001E3B2E /* SBCouchServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBCouchServer.m; sourceTree = "<group>"; };
+ 5315EE640D94078D001E3B2E /* Tests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 5315EE650D94078D001E3B2E /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = "<group>"; };
+ 5315EE770D940818001E3B2E /* Server.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Server.h; sourceTree = "<group>"; };
+ 5315EE780D940818001E3B2E /* Server.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Server.m; sourceTree = "<group>"; };
+ 5315EEA00D941786001E3B2E /* JSON.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = JSON.xcodeproj; path = vendor/JSON/JSON.xcodeproj; sourceTree = "<group>"; };
+ 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ 8DC2EF5B0486A6940098B216 /* CouchObjC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CouchObjC.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ D2F7E79907B2D74100F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
- E75D3F620C9054B600058F83 /* Frameworks */ = {
+ 5315EE610D94078D001E3B2E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- E7464EA20C9C5625009D6B34 /* JSON.framework in Frameworks */,
+ 5315EE890D941077001E3B2E /* CouchObjC.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
- E75D3F710C90555700058F83 /* Frameworks */ = {
+ 8DC2EF560486A6940098B216 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- E75D3F950C90564900058F83 /* Couch.framework in Frameworks */,
+ 5315EE8B0D941085001E3B2E /* Foundation.framework in Frameworks */,
+ 5315EEB20D94178E001E3B2E /* JSON.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
- E7464E920C9C55CC009D6B34 /* Products */ = {
+ 034768DFFF38A50411DB9C8B /* Products */ = {
isa = PBXGroup;
children = (
- E7464E9A0C9C55CC009D6B34 /* JSON.framework */,
- E7464E9C0C9C55CC009D6B34 /* Tests.octest */,
+ 8DC2EF5B0486A6940098B216 /* CouchObjC.framework */,
+ 5315EE640D94078D001E3B2E /* Tests.octest */,
);
name = Products;
sourceTree = "<group>";
};
- E75D3F520C90549600058F83 = {
+ 0867D691FE84028FC02AAC07 /* CouchObjC */ = {
isa = PBXGroup;
children = (
- E7464E910C9C55CC009D6B34 /* JSON.xcodeproj */,
- E75D3F6D0C90551800058F83 /* Classes */,
- E75D3F6E0C90552000058F83 /* Tests */,
- E75D3F650C9054B600058F83 /* Products */,
- E75D3F660C9054B600058F83 /* Couch-Info.plist */,
- E75D3F750C90555700058F83 /* Tests-Info.plist */,
+ 5315EEA00D941786001E3B2E /* JSON.xcodeproj */,
+ 08FB77AEFE84172EC02AAC07 /* Classes */,
+ 5315EE760D9407F0001E3B2E /* Tests */,
+ 32C88DFF0371C24200C91783 /* Other Sources */,
+ 089C1665FE841158C02AAC07 /* Resources */,
+ 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
+ 034768DFFF38A50411DB9C8B /* Products */,
+ 5315EE650D94078D001E3B2E /* Tests-Info.plist */,
);
+ name = CouchObjC;
sourceTree = "<group>";
};
- E75D3F650C9054B600058F83 /* Products */ = {
+ 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
- E75D3F640C9054B600058F83 /* Couch.framework */,
- E75D3F740C90555700058F83 /* Tests.octest */,
+ 1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */,
+ 1058C7B2FEA5585E11CA2CBB /* Other Frameworks */,
);
- name = Products;
+ name = "External Frameworks and Libraries";
+ sourceTree = "<group>";
+ };
+ 089C1665FE841158C02AAC07 /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 8DC2EF5A0486A6940098B216 /* Info.plist */,
+ 089C1666FE841158C02AAC07 /* InfoPlist.strings */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 08FB77AEFE84172EC02AAC07 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ 5315EE5B0D940717001E3B2E /* SBCouchServer.h */,
+ 5315EE5C0D940717001E3B2E /* SBCouchServer.m */,
+ );
+ path = Classes;
+ sourceTree = "<group>";
+ };
+ 1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */,
+ );
+ name = "Linked Frameworks";
+ sourceTree = "<group>";
+ };
+ 1058C7B2FEA5585E11CA2CBB /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 0867D6A5FE840307C02AAC07 /* AppKit.framework */,
+ D2F7E79907B2D74100F64583 /* CoreData.framework */,
+ 0867D69BFE84028FC02AAC07 /* Foundation.framework */,
+ );
+ name = "Other Frameworks";
sourceTree = "<group>";
};
- E75D3F6D0C90551800058F83 /* Classes */ = {
+ 32C88DFF0371C24200C91783 /* Other Sources */ = {
isa = PBXGroup;
children = (
- E75D3F8A0C9055E000058F83 /* Couch.h */,
- E75D3F8B0C9055E000058F83 /* SBCouch.h */,
- E75D3F8C0C9055E000058F83 /* SBCouch.m */,
+ 32DBCF5E0370ADEE00C91783 /* CouchObjC_Prefix.pch */,
);
- name = Classes;
+ name = "Other Sources";
sourceTree = "<group>";
};
- E75D3F6E0C90552000058F83 /* Tests */ = {
+ 5315EE760D9407F0001E3B2E /* Tests */ = {
isa = PBXGroup;
children = (
- E75D3F800C90559900058F83 /* Tests.h */,
- E7464ECD0C9D79D2009D6B34 /* Tests.m */,
- E75D3F810C90559900058F83 /* Database.m */,
- E7464EA70C9C594A009D6B34 /* Document.m */,
- E7464EC90C9D796E009D6B34 /* View.m */,
- 53A62D500C9C0BCA000F9C9B /* Errors.m */,
+ 5315EE770D940818001E3B2E /* Server.h */,
+ 5315EE780D940818001E3B2E /* Server.m */,
);
path = Tests;
- sourceTree = SOURCE_ROOT;
+ sourceTree = "<group>";
+ };
+ 5315EEA10D941786001E3B2E /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 5315EEAB0D941786001E3B2E /* JSON.framework */,
+ 5315EEAD0D941786001E3B2E /* Tests.octest */,
+ 5315EEAF0D941786001E3B2E /* libjson.a */,
+ 5315EEB10D941786001E3B2E /* libjsontests.octest */,
+ );
+ name = Products;
+ sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
- E75D3F5F0C9054B600058F83 /* Headers */ = {
+ 8DC2EF500486A6940098B216 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
- E75D3F8D0C9055E000058F83 /* Couch.h in Headers */,
- E75D3F8E0C9055E000058F83 /* SBCouch.h in Headers */,
+ 5315EE5D0D940717001E3B2E /* SBCouchServer.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
- E75D3F630C9054B600058F83 /* Couch */ = {
+ 5315EE630D94078D001E3B2E /* Tests */ = {
isa = PBXNativeTarget;
- buildConfigurationList = E75D3F670C9054B600058F83 /* Build configuration list for PBXNativeTarget "Couch" */;
+ buildConfigurationList = 5315EE6A0D94078F001E3B2E /* Build configuration list for PBXNativeTarget "Tests" */;
buildPhases = (
- E75D3F5F0C9054B600058F83 /* Headers */,
- E75D3F600C9054B600058F83 /* Resources */,
- E75D3F610C9054B600058F83 /* Sources */,
- E75D3F620C9054B600058F83 /* Frameworks */,
- E705A4C90CA59F7400FD0A97 /* CopyFiles */,
+ 5315EE5F0D94078D001E3B2E /* Resources */,
+ 5315EE600D94078D001E3B2E /* Sources */,
+ 5315EE610D94078D001E3B2E /* Frameworks */,
+ 5315EE620D94078D001E3B2E /* ShellScript */,
);
buildRules = (
);
dependencies = (
- E7464E9F0C9C55F8009D6B34 /* PBXTargetDependency */,
+ 5315EE6C0D940796001E3B2E /* PBXTargetDependency */,
);
- name = Couch;
- productName = Couch;
- productReference = E75D3F640C9054B600058F83 /* Couch.framework */;
- productType = "com.apple.product-type.framework";
+ name = Tests;
+ productName = Tests;
+ productReference = 5315EE640D94078D001E3B2E /* Tests.octest */;
+ productType = "com.apple.product-type.bundle";
};
- E75D3F730C90555700058F83 /* Tests */ = {
+ 8DC2EF4F0486A6940098B216 /* CouchObjC */ = {
isa = PBXNativeTarget;
- buildConfigurationList = E75D3F780C90555700058F83 /* Build configuration list for PBXNativeTarget "Tests" */;
+ buildConfigurationList = 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "CouchObjC" */;
buildPhases = (
- E75D3F6F0C90555700058F83 /* Resources */,
- E75D3F700C90555700058F83 /* Sources */,
- E75D3F710C90555700058F83 /* Frameworks */,
- E75D3F720C90555700058F83 /* ShellScript */,
+ 8DC2EF500486A6940098B216 /* Headers */,
+ 8DC2EF520486A6940098B216 /* Resources */,
+ 8DC2EF540486A6940098B216 /* Sources */,
+ 8DC2EF560486A6940098B216 /* Frameworks */,
);
buildRules = (
);
dependencies = (
- E75D3F7C0C90555C00058F83 /* PBXTargetDependency */,
+ 5315EEC20D941975001E3B2E /* PBXTargetDependency */,
);
- name = Tests;
- productName = Tests;
- productReference = E75D3F740C90555700058F83 /* Tests.octest */;
- productType = "com.apple.product-type.bundle";
+ name = CouchObjC;
+ productInstallPath = "$(HOME)/Library/Frameworks";
+ productName = CouchObjC;
+ productReference = 8DC2EF5B0486A6940098B216 /* CouchObjC.framework */;
+ productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
- E75D3F540C90549600058F83 /* Project object */ = {
+ 0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
- buildConfigurationList = E75D3F550C90549600058F83 /* Build configuration list for PBXProject "CouchObjC" */;
- hasScannedForEncodings = 0;
- mainGroup = E75D3F520C90549600058F83;
- productRefGroup = E75D3F650C9054B600058F83 /* Products */;
+ buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "CouchObjC" */;
+ compatibilityVersion = "Xcode 3.0";
+ hasScannedForEncodings = 1;
+ mainGroup = 0867D691FE84028FC02AAC07 /* CouchObjC */;
+ productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
projectDirPath = "";
projectReferences = (
{
- ProductGroup = E7464E920C9C55CC009D6B34 /* Products */;
- ProjectRef = E7464E910C9C55CC009D6B34 /* JSON.xcodeproj */;
+ ProductGroup = 5315EEA10D941786001E3B2E /* Products */;
+ ProjectRef = 5315EEA00D941786001E3B2E /* JSON.xcodeproj */;
},
);
+ projectRoot = "";
targets = (
- E75D3F630C9054B600058F83 /* Couch */,
- E75D3F730C90555700058F83 /* Tests */,
+ 8DC2EF4F0486A6940098B216 /* CouchObjC */,
+ 5315EE630D94078D001E3B2E /* Tests */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
- E7464E9A0C9C55CC009D6B34 /* JSON.framework */ = {
+ 5315EEAB0D941786001E3B2E /* JSON.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = JSON.framework;
- remoteRef = E7464E990C9C55CC009D6B34 /* PBXContainerItemProxy */;
+ remoteRef = 5315EEAA0D941786001E3B2E /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
- E7464E9C0C9C55CC009D6B34 /* Tests.octest */ = {
+ 5315EEAD0D941786001E3B2E /* Tests.octest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = Tests.octest;
- remoteRef = E7464E9B0C9C55CC009D6B34 /* PBXContainerItemProxy */;
+ remoteRef = 5315EEAC0D941786001E3B2E /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 5315EEAF0D941786001E3B2E /* libjson.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libjson.a;
+ remoteRef = 5315EEAE0D941786001E3B2E /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 5315EEB10D941786001E3B2E /* libjsontests.octest */ = {
+ isa = PBXReferenceProxy;
+ fileType = wrapper.cfbundle;
+ path = libjsontests.octest;
+ remoteRef = 5315EEB00D941786001E3B2E /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
- E75D3F600C9054B600058F83 /* Resources */ = {
+ 5315EE5F0D94078D001E3B2E /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
- E75D3F6F0C90555700058F83 /* Resources */ = {
+ 8DC2EF520486A6940098B216 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
- E75D3F720C90555700058F83 /* ShellScript */ = {
+ 5315EE620D94078D001E3B2E /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -282,121 +341,127 @@
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
- E75D3F610C9054B600058F83 /* Sources */ = {
+ 5315EE600D94078D001E3B2E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- E75D3F8F0C9055E000058F83 /* SBCouch.m in Sources */,
+ 5315EE790D940818001E3B2E /* Server.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
- E75D3F700C90555700058F83 /* Sources */ = {
+ 8DC2EF540486A6940098B216 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- E75D3F820C90559900058F83 /* Database.m in Sources */,
- 53A62D510C9C0BCA000F9C9B /* Errors.m in Sources */,
- E7464EA80C9C594A009D6B34 /* Document.m in Sources */,
- E7464ECA0C9D796E009D6B34 /* View.m in Sources */,
- E7464ECE0C9D79D2009D6B34 /* Tests.m in Sources */,
+ 5315EE5E0D940717001E3B2E /* SBCouchServer.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
- E7464E9F0C9C55F8009D6B34 /* PBXTargetDependency */ = {
+ 5315EE6C0D940796001E3B2E /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
- name = JSON;
- targetProxy = E7464E9E0C9C55F8009D6B34 /* PBXContainerItemProxy */;
+ target = 8DC2EF4F0486A6940098B216 /* CouchObjC */;
+ targetProxy = 5315EE6B0D940796001E3B2E /* PBXContainerItemProxy */;
};
- E75D3F7C0C90555C00058F83 /* PBXTargetDependency */ = {
+ 5315EEC20D941975001E3B2E /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
- target = E75D3F630C9054B600058F83 /* Couch */;
- targetProxy = E75D3F7B0C90555C00058F83 /* PBXContainerItemProxy */;
+ name = JSON;
+ targetProxy = 5315EEC10D941975001E3B2E /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
-/* Begin XCBuildConfiguration section */
- E75D3F560C90549600058F83 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- COPY_PHASE_STRIP = NO;
- };
- name = Debug;
- };
- E75D3F570C90549600058F83 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- COPY_PHASE_STRIP = YES;
- };
- name = Release;
+/* Begin PBXVariantGroup section */
+ 089C1666FE841158C02AAC07 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 089C1667FE841158C02AAC07 /* English */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
};
- E75D3F680C9054B600058F83 /* Debug */ = {
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 1DEB91AE08733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
+ CURRENT_PROJECT_VERSION = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A;
- GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_ENABLE_OBJC_GC = supported;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
- INFOPLIST_FILE = "Couch-Info.plist";
+ GCC_PREFIX_HEADER = CouchObjC_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Library/Frameworks";
- OTHER_LDFLAGS = (
- "-framework",
- Foundation,
- "-framework",
- AppKit,
- );
- PREBINDING = NO;
- PRODUCT_NAME = Couch;
- ZERO_LINK = NO;
+ PRODUCT_NAME = CouchObjC;
+ VERSIONING_SYSTEM = "apple-generic";
+ VERSION_INFO_PREFIX = SB;
+ WRAPPER_EXTENSION = framework;
+ ZERO_LINK = YES;
};
name = Debug;
};
- E75D3F690C9054B600058F83 /* Release */ = {
+ 1DEB91AF08733DA50010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- COPY_PHASE_STRIP = YES;
+ CURRENT_PROJECT_VERSION = "";
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_ENABLE_FIX_AND_CONTINUE = NO;
- GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_ENABLE_OBJC_GC = supported;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
- INFOPLIST_FILE = "Couch-Info.plist";
+ GCC_PREFIX_HEADER = CouchObjC_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Library/Frameworks";
- OTHER_LDFLAGS = (
- "-framework",
- Foundation,
- "-framework",
- AppKit,
+ PRODUCT_NAME = CouchObjC;
+ VERSIONING_SYSTEM = "apple-generic";
+ VERSION_INFO_PREFIX = SB;
+ WRAPPER_EXTENSION = framework;
+ };
+ name = Release;
+ };
+ 1DEB91B208733DA50010E9CD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+ };
+ name = Debug;
+ };
+ 1DEB91B308733DA50010E9CD /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
);
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
- PRODUCT_NAME = Couch;
- ZERO_LINK = NO;
+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
};
name = Release;
};
- E75D3F790C90555700058F83 /* Debug */ = {
+ 5315EE680D94078E001E3B2E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
- GCC_C_LANGUAGE_STANDARD = gnu99;
+ FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks";
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
@@ -412,18 +477,17 @@
PREBINDING = NO;
PRODUCT_NAME = Tests;
WRAPPER_EXTENSION = octest;
- ZERO_LINK = NO;
};
name = Debug;
};
- E75D3F7A0C90555700058F83 /* Release */ = {
+ 5315EE690D94078E001E3B2E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
- GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h";
@@ -445,34 +509,34 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
- E75D3F550C90549600058F83 /* Build configuration list for PBXProject "CouchObjC" */ = {
+ 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "CouchObjC" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- E75D3F560C90549600058F83 /* Debug */,
- E75D3F570C90549600058F83 /* Release */,
+ 1DEB91AE08733DA50010E9CD /* Debug */,
+ 1DEB91AF08733DA50010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
- E75D3F670C9054B600058F83 /* Build configuration list for PBXNativeTarget "Couch" */ = {
+ 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "CouchObjC" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- E75D3F680C9054B600058F83 /* Debug */,
- E75D3F690C9054B600058F83 /* Release */,
+ 1DEB91B208733DA50010E9CD /* Debug */,
+ 1DEB91B308733DA50010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
- E75D3F780C90555700058F83 /* Build configuration list for PBXNativeTarget "Tests" */ = {
+ 5315EE6A0D94078F001E3B2E /* Build configuration list for PBXNativeTarget "Tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- E75D3F790C90555700058F83 /* Debug */,
- E75D3F7A0C90555700058F83 /* Release */,
+ 5315EE680D94078E001E3B2E /* Debug */,
+ 5315EE690D94078E001E3B2E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
- rootObject = E75D3F540C90549600058F83 /* Project object */;
+ rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
}
View
7 CouchObjC_Prefix.pch
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'CouchObjC' target in the 'CouchObjC' project.
+//
+
+#ifdef __OBJC__
+ #import <Cocoa/Cocoa.h>
+#endif
View
BIN  English.lproj/InfoPlist.strings
Binary file not shown
View
26 Info.plist
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.yourcocoaframework</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>NSPrincipalClass</key>
+ <string></string>
+</dict>
+</plist>
View
59 SBCouch.h
@@ -1,59 +0,0 @@
-/*
-Copyright (c) 2007, Stig Brautaset. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- Neither the name of the author nor the names of its contributors may be used
- to endorse or promote products derived from this software without specific
- prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#import <Cocoa/Cocoa.h>
-#import <JSON/JSON.h>
-
-
-@interface SBCouch : NSObject {
- NSString *host;
- unsigned port;
- NSString *currentDatabase;
-}
-
-+ (id)newWithHost:(NSString *)host port:(unsigned)port;
-- (id)initWithHost:(NSString *)host port:(unsigned)port;
-
-- (NSString *)serverVersion;
-
-- (NSArray *)listDatabases;
-- (void)createDatabase:(NSString *)x;
-- (void)deleteDatabase:(NSString *)x;
-- (void)selectDatabase:(NSString *)x;
-
-- (NSDictionary *)databaseMeta:(NSString *)x;
-
-- (NSDictionary *)saveDocument:(NSDictionary *)x;
-- (NSDictionary *)retrieveDocument:(NSString *)x;
-
-- (NSDictionary *)listDocuments;
-- (NSDictionary *)listDocumentsWithArguments:(NSDictionary *)x;
-- (NSDictionary *)listDocumentsInView:(NSString *)x;
-
-@end
View
300 SBCouch.m
@@ -1,300 +0,0 @@
-/*
-Copyright (c) 2007, Stig Brautaset. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- Neither the name of the author nor the names of its contributors may be used
- to endorse or promote products derived from this software without specific
- prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#import "SBCouch.h"
-
-
-@implementation SBCouch
-
-- (id)init
-{
- return [self initWithHost:@"localhost" port:8888];
-}
-
-- (id)initWithHost:(NSString *)newHost port:(unsigned)newPort
-{
- if (!(newHost && newPort))
- [NSException raise:@"enoendpoint" format:@"Must pass host & port for endpoint"];
-
- if (self = [super init]) {
- host = [newHost retain];
- port = newPort;
- }
- return self;
-}
-
-+ (id)newWithHost:(NSString *)h port:(unsigned)p
-{
- return [[self alloc] initWithHost:h port:p];
-}
-
-#pragma mark Private
-
-- (NSString *)serverURL
-{
- return [NSString stringWithFormat:@"http://%@:%u/", host, port];
-}
-
-- (NSString *)databaseURL:(NSString *)x
-{
- return [[self serverURL] stringByAppendingFormat:@"%@/", x];
-}
-
-- (NSString *)curDbURL
-{
- return [self databaseURL:currentDatabase];
-}
-
-- (NSString *)docURL:(NSString *)doc
-{
- return [[self curDbURL] stringByAppendingString:doc];
-}
-
-- (NSMutableURLRequest *)requestWithURLString:(NSString *)urlstring
-{
- NSString *escaped = [urlstring stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
- return [NSMutableURLRequest requestWithURL:[NSURL URLWithString:escaped]];
-}
-
-- (id)performRequest:(NSMutableURLRequest *)request
- method:(NSString *)method
- body:(id)body
- returningResponse:(NSHTTPURLResponse **)response
-{
- [request setHTTPMethod:method];
- if (body)
- [request setHTTPBody:body];
- NSData *data = [NSURLConnection sendSynchronousRequest:request
- returningResponse:response
- error:nil];
- NSString *json = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
- return [json JSONValue];
-}
-
-- (id)performRequest:(NSMutableURLRequest *)request
- method:(NSString *)method
- returningResponse:(NSHTTPURLResponse **)response
-{
- return [self performRequest:request method:method body:nil returningResponse:response];
-}
-
-#pragma mark Server
-
-- (NSString *)serverVersion
-{
- NSMutableURLRequest *request = [self requestWithURLString:[self serverURL]];
- NSHTTPURLResponse *response;
- NSDictionary *dict = [self performRequest:request method:@"GET" returningResponse:&response];
-
- if (200 != [response statusCode]) {
- [NSException raise:@"unknown-error"
- format:@"Server version query failed with code: %u",
- [response statusCode]];
- }
-
- return [dict valueForKey:@"version"];
-}
-
-#pragma mark Database
-
-- (void)createDatabase:(NSString *)x
-{
- NSMutableURLRequest *request = [self requestWithURLString:[self databaseURL:x]];
- NSHTTPURLResponse *response;
- (void)[self performRequest:request method:@"PUT" returningResponse:&response];
-
- if (409 == [response statusCode]) {
- [NSException raise:@"edbexists"
- format:@"The database '%@' already exist", x];
-
- } else if (201 != [response statusCode]) {
- [NSException raise:@"unknown-error"
- format:@"Creating database '%@' failed with code: %u", x, [response statusCode]];
- }
-}
-
-- (void)deleteDatabase:(NSString *)x
-{
- NSMutableURLRequest *request = [self requestWithURLString:[self databaseURL:x]];
- NSHTTPURLResponse *response;
- (void)[self performRequest:request method:@"DELETE" returningResponse:&response];
-
- if (404 == [response statusCode]) {
- [NSException raise:@"enodatabase"
- format:@"The database '%@' doesn't exist", x];
-
- } else if (202 != [response statusCode]) {
- [NSException raise:@"unknown-error"
- format:@"Deleting database '%@' failed with code: %u", x, [response statusCode]];
- }
-}
-
-- (NSArray *)listDatabases
-{
- NSString *all_dbs = [[self serverURL] stringByAppendingString:@"_all_dbs"];
- NSMutableURLRequest *request = [self requestWithURLString:all_dbs];
- NSHTTPURLResponse *response;
- NSArray *dbs = [self performRequest:request method:@"DELETE" returningResponse:&response];
-
- if (200 != [response statusCode]) {
- [NSException raise:@"unknown-error"
- format:@"Listing databases failed with code: %u",
- [response statusCode]];
- }
-
- return dbs;
-}
-
-- (NSDictionary *)databaseMeta:(NSString *)x
-{
- NSMutableURLRequest *request = [self requestWithURLString:[self databaseURL:x]];
- NSHTTPURLResponse *response;
- NSDictionary *ret = [self performRequest:request method:@"GET" returningResponse:&response];
-
- if (200 == [response statusCode])
- return ret;
- if (404 != [response statusCode])
- NSLog(@"Unexpected response code (%u) from server: %@", [response statusCode], request);
-
- return nil;
-}
-
-- (void)selectDatabase:(NSString *)x
-{
- // It is possible to check if a DB exists with a GET call to the path of that DB.
- // I haven't implemented that yet.
- if (![self databaseMeta:x])
- [NSException raise:@"enodatabase"
- format:@"Cannot select '%@': database doesn't exist", x];
-
- if (currentDatabase != x) {
- [currentDatabase release];
- currentDatabase = [x retain];
- }
-}
-
-
-#pragma mark Document
-
-- (NSDictionary *)saveDocument:(NSDictionary *)x
-{
- NSMutableURLRequest *request = [self requestWithURLString:[self curDbURL]];
- NSHTTPURLResponse *response;
- NSDictionary *r = [self performRequest:request
- method:@"POST"
- body:[[x JSONRepresentation] dataUsingEncoding:NSUTF8StringEncoding]
- returningResponse:&response];
-
- if (409 == [response statusCode]) {
- [NSException raise:@"conflict"
- format:@"Document %@ is outdated; cannot save", [x objectForKey:@"_id"]];
- } else if (201 != [response statusCode]) {
- [NSException raise:@"unknown-error"
- format:@"Saving document failed with code: %u", [response statusCode]];
- }
-
- NSMutableDictionary *y = [NSMutableDictionary dictionaryWithDictionary:x];
- [y setObject:[r objectForKey:@"_id"] forKey:@"_id"];
- [y setObject:[r objectForKey:@"_rev"] forKey:@"_rev"];
- return y;
-}
-
-- (NSDictionary *)retrieveDocument:(NSString *)x
-{
- NSMutableURLRequest *request = [self requestWithURLString:[self docURL:x]];
- NSHTTPURLResponse *response;
- NSDictionary *dict = [self performRequest:request method:@"GET" returningResponse:&response];
-
- if (404 == [response statusCode]) {
- [NSException raise:@"notfound"
- format:@"Document %@ not found", x];
-
- } else if (200 != [response statusCode]) {
- [NSException raise:@"unknown-error"
- format:@"Retrieving document failed with code: %u",
- [response statusCode]];
- }
-
- return dict;
-}
-
-- (NSDictionary *)listDocuments
-{
- return [self listDocumentsWithArguments:nil];
-}
-
-- (NSString *)argString:(NSDictionary *)x
-{
- NSMutableArray *args = [NSMutableArray array];
- NSEnumerator *e = [x keyEnumerator];
- for (id k; k = [e nextObject]; )
- [args addObject:[NSString stringWithFormat:@"%@=%@", k, [x objectForKey:k]]];
- return [@"?" stringByAppendingString:[args componentsJoinedByString:@"&"]];
-}
-
-- (NSDictionary *)listDocumentsWithArguments:(NSDictionary *)x
-{
- NSString *all_docs = [[self curDbURL] stringByAppendingString:@"_all_docs"];
- if (x)
- all_docs = [all_docs stringByAppendingString:[self argString:x]];
- NSMutableURLRequest *request = [self requestWithURLString:all_docs];
- NSHTTPURLResponse *response;
- NSDictionary *dict = [self performRequest:request method:@"GET" returningResponse:&response];
-
- if (200 != [response statusCode]) {
- [NSException raise:@"unknown-error"
- format:@"Listing documents failed with code: %u",
- [response statusCode]];
- }
-
- return dict;
-}
-
-#pragma mark View
-
-- (NSDictionary *)listDocumentsInView:(NSString *)x
-{
- NSMutableURLRequest *request = [self requestWithURLString:[self docURL:x]];
- NSHTTPURLResponse *response;
- NSDictionary *dict = [self performRequest:request method:@"GET" returningResponse:&response];
-
- if (404 == [response statusCode]) {
- [NSException raise:@"notfound"
- format:@"View %@ not found", x];
-
- } else if (200 != [response statusCode]) {
- [NSException raise:@"unknown-error"
- format:@"Listing documents in view %@ failed with code: %u",
- x, [response statusCode]];
- }
-
- return dict;
-}
-
-@end
View
2  Tests-Info.plist
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
View
56 Tests/Database.m
@@ -1,56 +0,0 @@
-//
-// Database.m
-// CouchObjC
-//
-// Created by Stig Brautaset on 06/09/2007.
-// Copyright 2007 Stig Brautaset. All rights reserved.
-//
-
-#import "Tests.h"
-
-@implementation Database
-
-- (void)testServerVersion
-{
- STAssertEqualObjects([couch serverVersion], @"0.6.5a", @"Is a supported version");
-}
-
-- (void)testList
-{
- srandom(time(NULL)); // seed the random number generator
- NSString *db = [NSString stringWithFormat:@"z%u", random()];
-
- NSArray *dbs = [couch listDatabases];
- unsigned cnt = [dbs count];
-
- STAssertFalse([dbs containsObject:db], @"%@ is not in %@", db, dbs);
- STAssertNoThrow([couch createDatabase:db], @"Can create db %@", db);
-
- dbs = [couch listDatabases];
- STAssertTrue([dbs containsObject:db], @"%@ is in %@", db, dbs);
- STAssertEquals([dbs count], cnt+1, @"Count has increased by one");
-
- STAssertNoThrow([couch deleteDatabase:db], @"Can delete db %@", db);
- STAssertNil([couch databaseMeta:db], @"%@ is not available", db);
-
- dbs = [couch listDatabases];
- STAssertEquals([dbs count], cnt, @"Back to original number of dbs");
-}
-
-- (void)testMetaEmpty
-{
- NSDictionary *want = [@"{\"db_name\": \"foo\", \"doc_count\":0, \"update_seq\":0}" JSONValue];
- NSDictionary *got = [couch databaseMeta:@"foo"];
- eqo(got, want);
-}
-
-- (void)testInfoWithContent
-{
- for (int i = 0; i < 9; i++)
- [couch saveDocument:[NSDictionary dictionary]];
- NSDictionary *want = [@"{\"db_name\": \"foo\", \"doc_count\":9, \"update_seq\":9}" JSONValue];
- NSDictionary *got = [couch databaseMeta:@"foo"];
- eqo(got, want);
-}
-
-@end
View
155 Tests/Document.m
@@ -1,155 +0,0 @@
-//
-// Document.m
-// CouchObjC
-//
-// Created by Stig Brautaset on 15/09/2007.
-// Copyright 2007 Stig Brautaset. All rights reserved.
-//
-
-#import "Tests.h"
-
-@implementation Document
-
-- (void)setUp
-{
- couch = [SBCouch new];
- [couch createDatabase:@"foo"];
- [couch selectDatabase:@"foo"];
-}
-
-- (void)tearDown
-{
- [couch deleteDatabase:@"foo"];
- [couch release];
-}
-
-- (void)testSaveEmpty
-{
- NSDictionary *doc = [couch saveDocument:[NSDictionary dictionary]];
- eq([doc count], (unsigned)2);
- STAssertTrue([[doc objectForKey:@"_id"] isKindOfClass:[NSString class]], nil);
- STAssertTrue([[doc objectForKey:@"_rev"] isKindOfClass:[NSString class]], nil);
-}
-
-- (void)testSaveNamed
-{
- NSDictionary *doc = [NSDictionary dictionaryWithObject:@"Stig" forKey:@"_id"];
- doc = [couch saveDocument:doc];
- eq([doc count], (unsigned)2);
- eqo([doc objectForKey:@"_id"], @"Stig");
- STAssertTrue([[doc objectForKey:@"_rev"] isKindOfClass:[NSString class]], nil);
-}
-
-- (void)testSaveFilled
-{
- NSDictionary *doc = [NSDictionary dictionaryWithObject:@"Stig" forKey:@"Awesome"];
- doc = [couch saveDocument:doc];
- eq([doc count], (unsigned)3);
- eqo([doc objectForKey:@"Awesome"], @"Stig");
- STAssertTrue([[doc objectForKey:@"_id"] isKindOfClass:[NSString class]], nil);
- STAssertTrue([[doc objectForKey:@"_rev"] isKindOfClass:[NSString class]], nil);
-}
-
-- (void)testRetrieve
-{
- NSDictionary *doc = [NSDictionary dictionaryWithObject:@"Stig" forKey:@"_id"];
- STAssertNotNil(doc = [couch saveDocument:doc], nil);
- eqo([couch retrieveDocument:@"Stig"], doc);
-}
-
-- (void)testRetrieveUnnamed
-{
- NSDictionary *doc = [couch saveDocument:[NSDictionary dictionary]];
- eqo([couch retrieveDocument:[doc objectForKey:@"_id"]], doc);
-}
-
-- (void)testListEmpty
-{
- NSDictionary *docs = [couch listDocuments];
- eq([docs count], (unsigned)2);
- eqo([docs objectForKey:@"view"], @"_all_docs");
- eqo([docs objectForKey:@"rows"], [NSArray array]);
-}
-
-- (void)testListMany
-{
- for (unsigned i = 1; i < 10; i++) {
- [couch saveDocument:[NSDictionary dictionary]];
-
- NSDictionary *docs = [couch listDocuments];
- eq([docs count], (unsigned)2);
- eqo([docs objectForKey:@"view"], @"_all_docs");
-
- NSArray *arr = [docs objectForKey:@"rows"];
- eq([arr count], i);
- }
-}
-
-- (void)testListReverse
-{
- for (unsigned i = 1; i < 10; i++)
- [couch saveDocument:[NSDictionary dictionary]];
-
- NSDictionary *args = [NSDictionary dictionaryWithObject:@"true" forKey:@"reverse"];
- NSArray *a1 = [[couch listDocumentsWithArguments:args] objectForKey:@"rows"];
- NSArray *a2 = [[couch listDocuments] objectForKey:@"rows"];
-
- NSEnumerator *e1 = [a1 objectEnumerator];
- NSEnumerator *e2 = [a2 reverseObjectEnumerator];
- for (id o; o = [e1 nextObject]; )
- eqo(o, [e2 nextObject]);
-}
-
-#define id_for_idx(list, idx) [[[list objectAtIndex:idx] objectForKey:@"_id"] JSONFragment]
-
-- (void)testListStartkeyAndCount
-{
- for (unsigned i = 1; i < 10; i++)
- [couch saveDocument:[NSDictionary dictionary]];
-
- id all = [[couch listDocuments] objectForKey:@"rows"];
- id expected = [all subarrayWithRange:NSMakeRange(2,2)];
- id args = [NSDictionary dictionaryWithObjectsAndKeys:
- id_for_idx(all, 2), @"startkey",
- @"2", @"count",
- nil];
- eqo([[couch listDocumentsWithArguments:args] objectForKey:@"rows"], expected);
-}
-
-- (void)testUpdateUnchanged
-{
- NSDictionary *doc1 = [couch saveDocument:[NSDictionary dictionary]];
- NSDictionary *doc2 = [couch saveDocument:doc1];
- eq([doc1 count], (unsigned)2);
- eq([doc2 count], (unsigned)2);
- eqo([doc2 objectForKey:@"_id"], [doc1 objectForKey:@"_id"]);
- neqo([doc2 objectForKey:@"_rev"], [doc1 objectForKey:@"_rev"]);
-}
-
-- (void)testUpdateChanged
-{
- NSDictionary *doc1 = [couch saveDocument:[NSDictionary dictionary]];
- id doc2 = [NSMutableDictionary dictionaryWithDictionary:doc1];
- [doc2 setObject:@"bar" forKey:@"foo"];
- doc2 = [couch saveDocument:doc2];
-
- STAssertFalse([[doc2 objectForKey:@"_rev"] isEqual:[doc1 objectForKey:@"_rev"]], nil);
- eqo([doc2 objectForKey:@"_id"], [doc1 objectForKey:@"_id"]);
- eqo([doc2 objectForKey:@"foo"], @"bar");
-}
-
-- (void)TODOtestRename
-{
- NSDictionary *doc1 = [couch saveDocument:[NSDictionary dictionary]];
- id doc2 = [NSMutableDictionary dictionaryWithDictionary:doc1];
- [doc2 setObject:@"bar" forKey:@"_id"];
- STAssertNoThrow([couch saveDocument:doc2], nil);
-
- NSDictionary *docs = [couch listDocuments];
- docs = [docs objectForKey:@"rows"];
- eq([docs count], (unsigned)1);
- STAssertNoThrow([couch retrieveDocument:@"bar"], nil);
- tn([couch retrieveDocument:[doc1 objectForKey:@"_id"]], @"enoducument");
-}
-
-@end
View
47 Tests/Errors.m
@@ -1,47 +0,0 @@
-//
-// Errors.m
-// CouchObjC
-//
-// Created by Stig Brautaset on 15/09/2007.
-// Copyright 2007 Stig Brautaset. All rights reserved.
-//
-
-#import "Tests.h"
-
-@implementation Errors
-
-- (void)testInitNoEndpoint
-{
- tn( [SBCouch newWithHost:nil port:8888], @"enoendpoint" );
- tn( [SBCouch newWithHost:@"localhost" port:0], @"enoendpoint" );
-}
-
-- (void)testCreateExistingDatabase
-{
- tn( [couch createDatabase:@"foo"], @"edbexists");
-}
-
-- (void)testDeleteMissingDatabase
-{
- tn( [couch deleteDatabase:@"bar"], @"enodatabase");
-}
-
-- (void)testSelectMissingDatabase
-{
- tn( [couch selectDatabase:@"bar"], @"enodatabase");
-}
-
-- (void)testDocumentOutdated
-{
- NSDictionary *d = [couch saveDocument:[NSDictionary dictionary]];
- [couch saveDocument:d];
- tn( [couch saveDocument:d], @"conflict" );
-}
-
-- (void)testViewNotFound
-{
- tn( [couch listDocumentsInView:@"_design_views:cats"], @"notfound" );
-}
-
-
-@end
View
16 Tests/Server.h
@@ -0,0 +1,16 @@
+//
+// Server.h
+// CouchObjC
+//
+// Created by Stig Brautaset on 21/03/2008.
+// Copyright 2008 Stig Brautaset. All rights reserved.
+//
+
+#import <SenTestingKit/SenTestingKit.h>
+
+@class SBCouchServer;
+@interface Server : SenTestCase {
+ SBCouchServer *couch;
+}
+
+@end
View
45 Tests/Server.m
@@ -0,0 +1,45 @@
+//
+// Server.m
+// CouchObjC
+//
+// Created by Stig Brautaset on 21/03/2008.
+// Copyright 2008 Stig Brautaset. All rights reserved.
+//
+
+#import "Server.h"
+#import <CouchObjC/SBCouchServer.h>
+
+@implementation Server
+
+- (void)setUp {
+ couch = [SBCouchServer new];
+}
+
+- (void)testSupportedVersion {
+ id v = [couch version];
+ STAssertTrue([v isGreaterThanOrEqualTo:@"0.7.2"], @"Version not supported: %@", v);
+}
+
+- (void)testDefaultHost {
+ STAssertEqualObjects(couch.host, @"localhost", nil);
+}
+
+- (void)testDefaultPort {
+ STAssertEquals(couch.port, (NSUInteger)5984, nil);
+}
+
+- (void)testBasics
+{
+ NSString *name = [NSString stringWithFormat:@"tmp%u", random()];
+ STAssertTrue([couch createDatabase:name], nil);
+
+ NSArray *list = [couch listDatabases];
+ STAssertTrue([list containsObject:name], nil);
+
+ STAssertTrue([couch deleteDatabase:name], nil);
+
+ list = [couch listDatabases];
+ STAssertFalse([list containsObject:name], nil);
+}
+
+@end
View
36 Tests/Tests.h
@@ -1,36 +0,0 @@
-//
-// Tests.h
-// CouchObjC
-//
-// Created by Stig Brautaset on 06/09/2007.
-// Copyright 2007 Stig Brautaset. All rights reserved.
-//
-
-#import <SenTestingKit/SenTestingKit.h>
-#import <Couch/Couch.h>
-
-#define eq(x, y) STAssertEquals(x, y, nil)
-#define eqo(x, y) STAssertEqualObjects(x, y, nil)
-#define neqo(x, y) STAssertFalse([x isEqual:y], nil)
-
-// The ST guys sure like typing. Personally, I don't.
-#define tn(expr, name) \
- STAssertThrowsSpecificNamed(expr, NSException, name, nil)
-
-@interface Tests : SenTestCase {
- SBCouch *couch;
-}
-@end
-
-@interface Database : Tests
-@end
-
-@interface Document : Tests
-@end
-
-@interface View : Tests
-@end
-
-@interface Errors : Tests
-@end
-
View
31 Tests/Tests.m
@@ -1,31 +0,0 @@
-//
-// Setup.m
-// CouchObjC
-//
-// Created by Stig Brautaset on 16/09/2007.
-// Copyright 2007 Stig Brautaset. All rights reserved.
-//
-// This test fixture exists simply to kill duplication. The setup and
-// teardown for all the tests turned out to be the same.
-//
-
-#import "Tests.h"
-
-@implementation Tests
-
-- (void)setUp
-{
- couch = [SBCouch new];
- if (![couch databaseMeta:@"foo"])
- [couch createDatabase:@"foo"];
- [couch selectDatabase:@"foo"];
-}
-
-- (void)tearDown
-{
- if ([couch databaseMeta:@"foo"])
- [couch deleteDatabase:@"foo"];
- [couch release];
-}
-
-@end
View
51 Tests/View.m
@@ -1,51 +0,0 @@
-//
-// View.m
-// CouchObjC
-//
-// Created by Stig Brautaset on 16/09/2007.
-// Copyright 2007 Stig Brautaset. All rights reserved.
-//
-
-#import "Tests.h"
-
-
-@implementation View
-
-- (void)setUp
-{
- [super setUp];
- id view = [NSDictionary dictionaryWithObject:@"function (o) { if (o.Type == 'Cat') return o; }"
- forKey:@"cats"];
- id views = [NSDictionary dictionaryWithObjectsAndKeys:
- view, @"views",
- @"_design_views", @"_id",
- nil];
- [couch saveDocument:views];
-}
-
-- (void)testListEmpty
-{
- NSDictionary *docs = [couch listDocumentsInView:@"_design_views:cats"];
- eq([docs count], (unsigned)3);
- eqo([docs objectForKey:@"view"], @"_design_views:cats");
- eqo([docs objectForKey:@"total_rows"], [NSNumber numberWithInt:0]);
- eqo([docs objectForKey:@"rows"], [NSArray array]);
-}
-
-- (void)testListMany
-{
- for (unsigned i = 0; i < 5; i++) {
- [couch saveDocument:[NSDictionary dictionaryWithObject:@"Cat" forKey:@"Type"]];
- [couch saveDocument:[NSDictionary dictionaryWithObject:@"Dog" forKey:@"Type"]];
- }
-
- NSDictionary *docs = [couch listDocumentsInView:@"_design_views:cats"];
- eq([docs count], (unsigned)4);
- eqo([docs objectForKey:@"view"], @"_design_views:cats");
- eqo([docs objectForKey:@"offset"], [NSNumber numberWithInt:0]);
- eqo([docs objectForKey:@"total_rows"], [NSNumber numberWithInt:5]);
- NSArray *arr = [docs objectForKey:@"rows"];
- eq([arr count], (unsigned)5);
-}
-
-@end
View
10 vendor/JSON/CREDITS
@@ -9,3 +9,13 @@ Marc Lehmann
JSON::XS Perl module. I also adopted the way he organised the
tests. Having a separate fixture for testing error conditions
makes a lot of sense.
+
+Jens Alfke <jens@mooseyard.com> - http://mooseyard.com/Jens
+ Jens emailed me out of the blue one day with a couple of patches
+ that gave a speedup of 11x for generation and 5x for parsing of
+ the long (12k) JSON string I've been using for testing.
+
+Greg Bolsinga
+ Provided patches for dropping the dependency on AppKit and thus
+ truly making this a Foundation framework, and for building a
+ static library suitable for use with the iPhone.
View
103 vendor/JSON/Docs/JensAlfkePerformanceNotes.txt
@@ -0,0 +1,103 @@
+A couple of emails accompanying the patches from Jens Alfke.
+
+
+From: Jens Alfke <jens@mooseyard.com>
+Date: 13 January 2008 01:01:10 GMT
+To: stig@brautaset.org
+Subject: Cocoa JSON optimizations
+
+Stig,
+
+Thanks for writing the JSON framework for Cocoa!
+
+> (Note that both our libraries puts up a really bad show compared to
+> all the Perl modules Marc measured. A bit embarrassing that...)
+
+I took a look at optimizing the generation of JSON. With a couple of
+tweaks I made it about 11x faster on the large test string from Yahoo.
+The patch (from SVN top-of-tree) is enclosed.
+
+The main problem was that the way the code was structured, with each
+level of recursion returning its result as a string, results in large
+numbers of temporary NSStrings being generated and appended to each
+other. A more optimal pattern for this is to instead pass an
+NSMutableString to each generator method, which it can append to. That
+way a single mutable string gets re-used.
+
+The next bottleneck was the way -[NSString JSONFragmentWithOptions:]
+iterates over every character in the string. Getting each character is
+slow, and appending the characters one at a time to the output is even
+slower. Fortunately this process is only necessary if the string has
+characters that need escaping, so I built a static NSCharacterSet of
+those characters, and then I test every string to see if it contains
+any of them. If not, it can simply be appended as-is.
+
+A lot of strings were still being escaped because they contained "/"
+characters. I looked at the JSON RFC, and it says that only control
+characters, double-quotes and backslashes need to be escaped, so I
+took out the special case for "/". That helped.
+
+Finally, I changed the array iterations in the NSArray and
+NSDictionary methods to use the new Leopard "for...in" syntax (but
+only if being compiled for Leopard.) That shaved a few percent off the
+time, since for...in uses a new, more efficient iteration mechanism.
+
+I didn't benchmark with any of the pretty-printing options turned on.
+The code for those could be optimized to reduce the number of string
+operations; but on the other hand, any client of the library wanting
+maximum performance is probably going to turn off pretty-printing
+anyway!
+
+If my enthusiasm persists, I might look at the JSON parsing code too,
+but no promises :)
+
+--Jens
+
+
+From: Jens Alfke <jens@mooseyard.com>
+Date: 13 January 2008 06:15:19 GMT
+To: stig@brautaset.org
+Subject: Re: Cocoa JSON optimizations
+
+Stig,
+
+As promised, I looked at the parser as well. This was trickier to
+optimize, but by throwing several tricks at it I got a nice 5x
+speedup.
+
+The main problem was just that NSScanner itself is really slow, for
+some reason. So part of what I did was just to call -scanString: fewer
+times. I wrote a faster -scanJSONChar: method that scans for a single
+character, since that's what most of the -scanString: calls were
+doing.
+
+I also changed the top-level scanning sequence so that -scanJSONValue
+gets the next non-whitespace character and then tests that to see
+which type of entity to scan. That avoids a bunch of repeated scans
+for a '{', a '[', a '"', etc.
+
+I re-ordered some of the logic in -scanJSONObject: to reduce the
+number of strings that get scanned for.
+
+I restructured -scanJSONString: to append substrings in chunks instead
+of character-by-character. I also used a lower-level string iterator
+from CFString that's faster than -characterAtIndex, as well as another
+CFString function to append unichars to a string.
+
+This was fun, actually! Kind of like solving a logic puzzle. I kept on
+running 'sample' and figuring there must be one more thing I could do
+to shave off more time...
+
+I think there's a bit more room, but it would involve rewriting the
+code to stop using NSScanner at all. Instead, a couple of fast scan
+functions based on CFStringInlineBuffer would do the job. I think this
+would also make the code clearer, since I've left it as a mishmash of
+NSScanner and direct string access.
+
+The source changes were extensive, so the entire file is probably
+clearer than a diff:
+
+
+
+
+--Jens
View
54 vendor/JSON/Docs/benchmark.patch
@@ -0,0 +1,54 @@
+=== Docs/benchmark.patch
+==================================================================
+=== Tests/Examples.m
+==================================================================
+--- Tests/Examples.m (revision 3431)
++++ Tests/Examples.m (local)
+@@ -79,4 +79,47 @@
+ STAssertNotNil([self jsonExample:@"ex5"], nil);
+ }
+
++
++// This benchmark uses the same strings that JSON::XS uses for its
++// benchmarks. We can't quite compare with it in terms of speed, but
++// that wasn't the idea either.
++#define encode(x) [x JSONRepresentation]
++#define decode(x) [x JSONValue]
++
++- (void)timeWithString:(NSString *)json
++{
++ id decoded = decode(json);
++ unsigned i, count = 1000;
++ NSDate *start;
++
++ start = [NSDate date];
++ for (i = 0; i < count; i++)
++ decode(json);
++ double decDuration = -[start timeIntervalSinceNow];
++
++ start = [NSDate date];
++ for (i = 0; i < count; i++)
++ encode(decoded);
++ double encDuration = -[start timeIntervalSinceNow];
++
++ NSLog(@" | encode | decode |");
++ NSLog(@"SBJSON | %9.3lf | %9.3f |", count / encDuration, count / decDuration);
++}
++
++- (void)testXSpeed
++{
++ NSString *json = [NSString stringWithContentsOfFile:@"/tmp/short.json"
++ encoding:NSASCIIStringEncoding
++ error:nil];
++ NSLog(@"Short");
++ [self timeWithString:json];
++
++ json = [NSString stringWithContentsOfFile:@"/tmp/long.json"
++ encoding:NSASCIIStringEncoding
++ error:nil];
++ NSLog(@"Long");
++ [self timeWithString:json];
++}
++
++
+ @end
View
37 vendor/JSON/Docs/parser-benchmark.txt
@@ -0,0 +1,37 @@
+In this first benchmark I decided to try speeding up the parser by
+speeding up -[NSScanner scanJSONValue:]. I used the same strings as
+JSON::XS uses for its benchmarking. The things I tried were:
+
+ * Firstly, reordering the calls in -[NSScanner scanJSONValue:] to
+ scan for more common (from my subjective point of view) types first.
+
+ * Further, I wanted to test whether skipping white space before
+ successively trying to match each JSON type would yield a speedup.
+
+ * Finally, I looked at the next character in the string and did
+ dispatched directly to the correct type.
+
+Decoded short/long JSON strings per second (higher is better):
+
+ | original | reordered | +skip ws | +dispatch |
+ ------+-----------+-----------+----------+-----------|
+ Short | 7468.818 | 7817.630 | 6381.824 | 7626.370 |
+ Long | 110.255 | 117.472 | 106.309 | 110.573 |
+
+For the test data I used reordering calls yields a 4.6 to 6.5 percent
+increase in performance. The new order is approximately the reverse of
+the original. (The old order was chosen because the right edge of the
+calls made a pleasant curve, so an improvement here is not unexpected.)
+
+The test data has little optional white space, so skipping white space
+actually turns out to be slower. (Particularly so for short strings.)
+
+The white-space skipping is necessary for the dispatching logic. With
+that added the speed is it back up to about the same as the original.
+But now the code is uglier and there's more of it.
+
+It's my assumption that the performance of parsing human-readable JSON
+will matter less than the performance of parsing JSON meant for
+machine consumption. Given this assumption it makes sense to skip the
+white space skipping and dispatch table, as they make the code more
+complex.
View
8 vendor/JSON/JSON-Info.plist
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
@@ -7,14 +7,16 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
- <string>com.yourcompany.JSON</string>
+ <string>org.brautaset.JSON</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.2.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>0.2</string>
+ <string>1.1.1</string>
</dict>
</plist>
View
318 vendor/JSON/JSON.xcodeproj/project.pbxproj
@@ -3,22 +3,32 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 42;
+ objectVersion = 44;
objects = {
/* Begin PBXBuildFile section */
+ 5390660B0D828B8B0022B8B8 /* SBJSONScanner.h in Headers */ = {isa = PBXBuildFile; fileRef = 539066090D828B8B0022B8B8 /* SBJSONScanner.h */; };
+ 5390660C0D828B8B0022B8B8 /* SBJSONScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 5390660A0D828B8B0022B8B8 /* SBJSONScanner.m */; };
53C45B9C0C98A87600546F66 /* Errors.m in Sources */ = {isa = PBXBuildFile; fileRef = 53C45B9B0C98A87600546F66 /* Errors.m */; };
53D2299C0C96129800276605 /* JSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 53D2299A0C96129800276605 /* JSON.h */; settings = {ATTRIBUTES = (Public, ); }; };
53D229A20C9612E000276605 /* Types.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D229A10C9612E000276605 /* Types.m */; };
53D229AD0C961B9900276605 /* JSON.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53D229810C96121600276605 /* JSON.framework */; };
E7153EE90CAAABDB00054ADB /* Pretty.m in Sources */ = {isa = PBXBuildFile; fileRef = E7153EE80CAAABDB00054ADB /* Pretty.m */; };
- E757163F0C96A8B50084A449 /* NSScanner+SBJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = E757163D0C96A8B50084A449 /* NSScanner+SBJSON.h */; };
- E75716400C96A8B50084A449 /* NSScanner+SBJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = E757163E0C96A8B50084A449 /* NSScanner+SBJSON.m */; };
E75716450C96DB530084A449 /* NSObject+SBJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = E75716430C96DB530084A449 /* NSObject+SBJSON.h */; settings = {ATTRIBUTES = (Private, ); }; };
E75716460C96DB530084A449 /* NSObject+SBJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = E75716440C96DB530084A449 /* NSObject+SBJSON.m */; };
E757164D0C96E39B0084A449 /* NSString+SBJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = E757164B0C96E39B0084A449 /* NSString+SBJSON.h */; settings = {ATTRIBUTES = (Private, ); }; };
E757164E0C96E39B0084A449 /* NSString+SBJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = E757164C0C96E39B0084A449 /* NSString+SBJSON.m */; };
E76A1EBD0C996EFD00A0CC83 /* Examples.m in Sources */ = {isa = PBXBuildFile; fileRef = E76A1EB60C996C2000A0CC83 /* Examples.m */; };
+ FE2BBD860D8B0D6000184787 /* JSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 53D2299A0C96129800276605 /* JSON.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ FE2BBD870D8B0D6000184787 /* NSObject+SBJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = E75716430C96DB530084A449 /* NSObject+SBJSON.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ FE2BBD880D8B0D6000184787 /* NSObject+SBJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = E75716440C96DB530084A449 /* NSObject+SBJSON.m */; };
+ FE2BBD8B0D8B0D6000184787 /* NSString+SBJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = E757164B0C96E39B0084A449 /* NSString+SBJSON.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ FE2BBD8C0D8B0D6000184787 /* NSString+SBJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = E757164C0C96E39B0084A449 /* NSString+SBJSON.m */; };
+ FE2BBDB50D8B0F1D00184787 /* Types.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D229A10C9612E000276605 /* Types.m */; };
+ FE2BBDB60D8B0F1D00184787 /* Examples.m in Sources */ = {isa = PBXBuildFile; fileRef = E76A1EB60C996C2000A0CC83 /* Examples.m */; };
+ FE2BBDB70D8B0F1D00184787 /* Errors.m in Sources */ = {isa = PBXBuildFile; fileRef = 53C45B9B0C98A87600546F66 /* Errors.m */; };
+ FE2BBDB80D8B0F1D00184787 /* Pretty.m in Sources */ = {isa = PBXBuildFile; fileRef = E7153EE80CAAABDB00054ADB /* Pretty.m */; };
+ FE7FFC3E0D8EC98E00EC6B9C /* SBJSONScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 5390660A0D828B8B0022B8B8 /* SBJSONScanner.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -29,9 +39,18 @@
remoteGlobalIDString = 53D229800C96121600276605;
remoteInfo = JSON;
};
+ FE2BBDB30D8B0F0F00184787 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 53D229730C9611FF00276605 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = FE2BBD7F0D8B0D3900184787;
+ remoteInfo = json;
+ };
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
+ 539066090D828B8B0022B8B8 /* SBJSONScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJSONScanner.h; sourceTree = "<group>"; };
+ 5390660A0D828B8B0022B8B8 /* SBJSONScanner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJSONScanner.m; sourceTree = "<group>"; };
53C45B9B0C98A87600546F66 /* Errors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Errors.m; sourceTree = "<group>"; };
53D229810C96121600276605 /* JSON.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JSON.framework; sourceTree = BUILT_PRODUCTS_DIR; };
53D229830C96121600276605 /* JSON-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "JSON-Info.plist"; sourceTree = "<group>"; };
@@ -41,13 +60,14 @@
53D229A00C9612E000276605 /* Tests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tests.h; sourceTree = "<group>"; };
53D229A10C9612E000276605 /* Types.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Types.m; sourceTree = "<group>"; };
E7153EE80CAAABDB00054ADB /* Pretty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Pretty.m; sourceTree = "<group>"; };
- E757163D0C96A8B50084A449 /* NSScanner+SBJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSScanner+SBJSON.h"; sourceTree = "<group>"; };
- E757163E0C96A8B50084A449 /* NSScanner+SBJSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSScanner+SBJSON.m"; sourceTree = "<group>"; };
E75716430C96DB530084A449 /* NSObject+SBJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+SBJSON.h"; sourceTree = "<group>"; };
E75716440C96DB530084A449 /* NSObject+SBJSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+SBJSON.m"; sourceTree = "<group>"; };
E757164B0C96E39B0084A449 /* NSString+SBJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+SBJSON.h"; sourceTree = "<group>"; };
E757164C0C96E39B0084A449 /* NSString+SBJSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+SBJSON.m"; sourceTree = "<group>"; };
E76A1EB60C996C2000A0CC83 /* Examples.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Examples.m; sourceTree = "<group>"; };
+ FE2BBD800D8B0D3900184787 /* libjson.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libjson.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ FE2BBDAB0D8B0EE000184787 /* libjsontests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = libjsontests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
+ FE2BBDAC0D8B0EE100184787 /* libjsontests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "libjsontests-Info.plist"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -66,6 +86,20 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ FE2BBD7E0D8B0D3900184787 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ FE2BBDA80D8B0EE000184787 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
@@ -77,6 +111,7 @@
53D229820C96121600276605 /* Products */,
53D229830C96121600276605 /* JSON-Info.plist */,
53D2298E0C96122A00276605 /* Tests-Info.plist */,
+ FE2BBDAC0D8B0EE100184787 /* libjsontests-Info.plist */,
);
sourceTree = "<group>";
};
@@ -85,6 +120,8 @@
children = (
53D229810C96121600276605 /* JSON.framework */,
53D2298D0C96122A00276605 /* Tests.octest */,
+ FE2BBD800D8B0D3900184787 /* libjson.a */,
+ FE2BBDAB0D8B0EE000184787 /* libjsontests.octest */,
);
name = Products;
sourceTree = "<group>";
@@ -93,12 +130,12 @@
isa = PBXGroup;
children = (
53D2299A0C96129800276605 /* JSON.h */,
- E757163D0C96A8B50084A449 /* NSScanner+SBJSON.h */,
- E757163E0C96A8B50084A449 /* NSScanner+SBJSON.m */,
E75716430C96DB530084A449 /* NSObject+SBJSON.h */,
E75716440C96DB530084A449 /* NSObject+SBJSON.m */,
E757164B0C96E39B0084A449 /* NSString+SBJSON.h */,
E757164C0C96E39B0084A449 /* NSString+SBJSON.m */,
+ 539066090D828B8B0022B8B8 /* SBJSONScanner.h */,
+ 5390660A0D828B8B0022B8B8 /* SBJSONScanner.m */,
);
name = Classes;
path = Source;
@@ -124,9 +161,19 @@
buildActionMask = 2147483647;
files = (
53D2299C0C96129800276605 /* JSON.h in Headers */,
- E757163F0C96A8B50084A449 /* NSScanner+SBJSON.h in Headers */,
E75716450C96DB530084A449 /* NSObject+SBJSON.h in Headers */,
E757164D0C96E39B0084A449 /* NSString+SBJSON.h in Headers */,
+ 5390660B0D828B8B0022B8B8 /* SBJSONScanner.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ FE2BBD7C0D8B0D3900184787 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ FE2BBD860D8B0D6000184787 /* JSON.h in Headers */,
+ FE2BBD870D8B0D6000184787 /* NSObject+SBJSON.h in Headers */,
+ FE2BBD8B0D8B0D6000184787 /* NSString+SBJSON.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -170,19 +217,59 @@
productReference = 53D2298D0C96122A00276605 /* Tests.octest */;
productType = "com.apple.product-type.bundle";
};
+ FE2BBD7F0D8B0D3900184787 /* json */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = FE2BBD950D8B0DC900184787 /* Build configuration list for PBXNativeTarget "json" */;
+ buildPhases = (
+ FE2BBD7C0D8B0D3900184787 /* Headers */,
+ FE2BBD7D0D8B0D3900184787 /* Sources */,
+ FE2BBD7E0D8B0D3900184787 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = json;
+ productName = json;
+ productReference = FE2BBD800D8B0D3900184787 /* libjson.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+ FE2BBDAA0D8B0EE000184787 /* libjsontests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = FE2BBDAF0D8B0EE100184787 /* Build configuration list for PBXNativeTarget "libjsontests" */;
+ buildPhases = (
+ FE2BBDA60D8B0EE000184787 /* Resources */,
+ FE2BBDA70D8B0EE000184787 /* Sources */,
+ FE2BBDA80D8B0EE000184787 /* Frameworks */,
+ FE2BBDA90D8B0EE000184787 /* ShellScript */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ FE2BBDB40D8B0F0F00184787 /* PBXTargetDependency */,
+ );
+ name = libjsontests;
+ productName = libjsontests;
+ productReference = FE2BBDAB0D8B0EE000184787 /* libjsontests.octest */;
+ productType = "com.apple.product-type.bundle";
+ };
/* End PBXNativeTarget section */
/* Begin PBXProject section */
53D229730C9611FF00276605 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 53D229740C9611FF00276605 /* Build configuration list for PBXProject "JSON" */;
+ compatibilityVersion = "Xcode 3.0";
hasScannedForEncodings = 0;
mainGroup = 53D229710C9611FF00276605;
productRefGroup = 53D229820C96121600276605 /* Products */;
projectDirPath = "";
+ projectRoot = "";
targets = (
53D229800C96121600276605 /* JSON */,
53D2298C0C96122A00276605 /* Tests */,
+ FE2BBD7F0D8B0D3900184787 /* json */,
+ FE2BBDAA0D8B0EE000184787 /* libjsontests */,
);
};
/* End PBXProject section */
@@ -202,6 +289,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ FE2BBDA60D8B0EE000184787 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
@@ -218,6 +312,19 @@
shellPath = /bin/sh;
shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
};
+ FE2BBDA90D8B0EE000184787 /* 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";
+ };
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -225,9 +332,9 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- E75716400C96A8B50084A449 /* NSScanner+SBJSON.m in Sources */,
E75716460C96DB530084A449 /* NSObject+SBJSON.m in Sources */,
E757164E0C96E39B0084A449 /* NSString+SBJSON.m in Sources */,
+ 5390660C0D828B8B0022B8B8 /* SBJSONScanner.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -242,6 +349,27 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ FE2BBD7D0D8B0D3900184787 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ FE7FFC3E0D8EC98E00EC6B9C /* SBJSONScanner.m in Sources */,
+ FE2BBD880D8B0D6000184787 /* NSObject+SBJSON.m in Sources */,
+ FE2BBD8C0D8B0D6000184787 /* NSString+SBJSON.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ FE2BBDA70D8B0EE000184787 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ FE2BBDB50D8B0F1D00184787 /* Types.m in Sources */,
+ FE2BBDB60D8B0F1D00184787 /* Examples.m in Sources */,
+ FE2BBDB70D8B0F1D00184787 /* Errors.m in Sources */,
+ FE2BBDB80D8B0F1D00184787 /* Pretty.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
@@ -250,29 +378,42 @@
target = 53D229800C96121600276605 /* JSON */;
targetProxy = 53D229920C96122E00276605 /* PBXContainerItemProxy */;
};
+ FE2BBDB40D8B0F0F00184787 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = FE2BBD7F0D8B0D3900184787 /* json */;
+ targetProxy = FE2BBDB30D8B0F0F00184787 /* PBXContainerItemProxy */;
+ };
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
53D229750C9611FF00276605 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
COPY_PHASE_STRIP = NO;
+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk";
};
name = Debug;
};
53D229760C9611FF00276605 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
COPY_PHASE_STRIP = YES;
+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk";
};
name = Release;
};
53D229860C96121700276605 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- COPY_PHASE_STRIP = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
+ CURRENT_PROJECT_VERSION = 2;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 2;
FRAMEWORK_VERSION = A;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
@@ -281,45 +422,45 @@
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Foundation.framework/Headers/Foundation.h";
INFOPLIST_FILE = "JSON-Info.plist";
INSTALL_PATH = "@loader_path/../Frameworks";
OTHER_LDFLAGS = (
"-framework",
Foundation,
- "-framework",
- AppKit,
);
PREBINDING = NO;
PRODUCT_NAME = JSON;
- ZERO_LINK = NO;
+ VERSIONING_SYSTEM = "apple-generic";
+ VERSION_INFO_PREFIX = SB;
};
name = Debug;
};
53D229870C96121700276605 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- COPY_PHASE_STRIP = YES;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
+ CURRENT_PROJECT_VERSION = 2;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 2;
FRAMEWORK_VERSION = A;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Foundation.framework/Headers/Foundation.h";
INFOPLIST_FILE = "JSON-Info.plist";
INSTALL_PATH = "@loader_path/../Frameworks";
OTHER_LDFLAGS = (
"-framework",
Foundation,
- "-framework",
- AppKit,
);
PREBINDING = NO;
PRODUCT_NAME = JSON;
- ZERO_LINK = NO;
+ VERSIONING_SYSTEM = "apple-generic";
+ VERSION_INFO_PREFIX = SB;
};
name = Release;
};
@@ -327,6 +468,10 @@
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(value)",
+ "$(DEVELOPER_FRAMEWORKS_DIR_QUOTED)",
+ );
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
@@ -335,19 +480,18 @@
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h";
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Foundation.framework/Headers/Foundation.h";
INFOPLIST_FILE = "Tests-Info.plist";
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles";
OTHER_LDFLAGS = (
"-framework",
- Cocoa,
+ Foundation,