Permalink
Browse files

Reorganized dir structure for use with/without Xcode, and to facilita…

…te testing.

I like the way that the [touch-code][] projects are organized:
All of the source code goes in a separate dir, which is separate from the .xcodeproj
that references the code. This makes it really easy to build a framework
for testing on OS X, or to simply copy the files to a new Xcode project
(via drag-and-drop) for including in an iPhone project.

[touch-code]: http://code.google.com/p/touchcode/
  • Loading branch information...
1 parent d8ee768 commit 711abd9c22a05c8b4a2da86b922209bb3c76e9e7 @chapados chapados committed Oct 2, 2008
View
@@ -0,0 +1,4 @@
+*.framework/
+build/
+*.mode1v3
+*.pbxuser
View
@@ -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.${PRODUCT_NAME:identifier}</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>
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -210,7 +210,7 @@ - (GITObject *) objectFromSha:(NSString *)sha1;
NSString *objectPath = [self looseObjectPathBySha:sha1];
//NSLog(@"READ FROM FILE: %@", objectPath);
NSFileHandle *fh = [NSFileHandle fileHandleForReadingAtPath:objectPath];
- GITObject *obj = [[GITObject alloc] initWithRaw:[fh availableData] withSha:sha1];
+ GITObject *obj = [[GITObject alloc] initWithRaw:[fh availableData] sha:sha1];
return [obj autorelease];
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -19,7 +19,7 @@ + (id) treeWithGitObject:(GITObject *)object;
return [[[self alloc] initWithGitObject:object] autorelease];
}
-- (id) initFromGitObject:(GITObject *)object {
+- (id) initWithGitObject:(GITObject *)object {
if (! [super init])
return nil;
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,18 @@
+//
+// NSFileManager-DirHelper.h
+// ObjectiveGit
+//
+// Created by chapbr on 9/30/08.
+// Copyright 2008 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface NSFileManager (DirHelpers)
+
++ (BOOL) directoryExistsAtPath:(NSString *) aPath;
++ (BOOL) directoryExistsAtURL:(NSURL *) aURL;
++ (BOOL) fileExistsAtPath:(NSString *) aPath;
++ (BOOL) fileExistsAtURL:(NSURL *) aURL;
+
+@end
@@ -0,0 +1,43 @@
+//
+// NSFileManager-DirHelper.m
+// ObjectiveGit
+//
+// Created by chapbr on 9/30/08.
+// Copyright 2008 __MyCompanyName__. All rights reserved.
+//
+
+#import "NSFileManager-DirHelpers.h"
+
+@implementation NSFileManager (DirHelpers)
+
++ (BOOL) directoryExistsAtPath:(NSString *) aPath;
+{
+ BOOL isDir;
+ return [[self defaultManager] fileExistsAtPath:aPath isDirectory:&isDir] && isDir;
+}
+
++ (BOOL) directoryExistsAtURL:(NSURL *) aURL;
+{
+ if (![aURL isFileURL])
+ return NO;
+
+ NSString *aPath = [aURL path];
+ BOOL isDir;
+ return [[self defaultManager] fileExistsAtPath:aPath isDirectory:&isDir] && isDir;
+}
+
++ (BOOL) fileExistsAtPath:(NSString *) aPath;
+{
+ return [[self defaultManager] fileExistsAtPath:aPath];
+}
+
+
++ (BOOL) fileExistsAtURL:(NSURL *) aURL;
+{
+ if (![aURL isFileURL])
+ return NO;
+
+ NSString *aPath = [aURL path];
+ return [[self defaultManager] fileExistsAtPath:aPath];
+}
+@end
File renamed without changes.
File renamed without changes.

0 comments on commit 711abd9

Please sign in to comment.