Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Added CoreDataObjectID
- Loading branch information
湖
authored and
湖
committed
Jun 4, 2010
1 parent
5b20304
commit 8c46a8a
Showing
12 changed files
with
4,890 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// Book.h | ||
// CoreDataObjectID | ||
// | ||
// Created by Hiroshi Hashiguchi on 10/06/05. | ||
// Copyright 2010 Hiroshi Hashiguchi. All rights reserved. | ||
// | ||
|
||
#import <CoreData/CoreData.h> | ||
|
||
|
||
@interface Book : NSManagedObject | ||
{ | ||
} | ||
|
||
@property (nonatomic, retain) NSString * Title; | ||
@property (nonatomic, retain) NSString * Author; | ||
@property (nonatomic, retain) NSString * ObjectID_URI; | ||
|
||
@end | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// Book.m | ||
// CoreDataObjectID | ||
// | ||
// Created by Hiroshi Hashiguchi on 10/06/05. | ||
// Copyright 2010 Hiroshi Hashiguchi. All rights reserved. | ||
// | ||
|
||
#import "Book.h" | ||
|
||
|
||
@implementation Book | ||
|
||
@dynamic Title; | ||
@dynamic Author; | ||
|
||
-(NSString*)ObjectID_URI | ||
{ | ||
NSManagedObjectID* moid = [self objectID]; | ||
return [[moid URIRepresentation] description]; | ||
|
||
if ([moid isTemporaryID]) { | ||
NSLog(@"%@", [moid URIRepresentation]); | ||
return @"(temporary)"; | ||
} else { | ||
return [[moid URIRepresentation] description]; | ||
} | ||
} | ||
-(void)setObjectID_URI:(NSString*)dummy | ||
{ | ||
} | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?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"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundleName</key> | ||
<string>${PRODUCT_NAME}</string> | ||
<key>CFBundleExecutable</key> | ||
<string>${EXECUTABLE_NAME}</string> | ||
<key>CFBundleIconFile</key> | ||
<string></string> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleVersion</key> | ||
<string>1</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>LSMinimumSystemVersion</key> | ||
<string>${MACOSX_DEPLOYMENT_TARGET}</string> | ||
<key>NSMainNibFile</key> | ||
<string>MainMenu</string> | ||
<key>NSPrincipalClass</key> | ||
<string>NSApplication</string> | ||
</dict> | ||
</plist> |
302 changes: 302 additions & 0 deletions
302
CoreDataObjectID/CoreDataObjectID.xcodeproj/project.pbxproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,302 @@ | ||
// !$*UTF8*$! | ||
{ | ||
archiveVersion = 1; | ||
classes = { | ||
}; | ||
objectVersion = 45; | ||
objects = { | ||
|
||
/* Begin PBXBuildFile section */ | ||
2F7446990DB6B7EA00F9684A /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2F7446970DB6B7EA00F9684A /* MainMenu.xib */; }; | ||
4CA50C0311B955EB00D02D28 /* Book.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CA50C0211B955EB00D02D28 /* Book.m */; }; | ||
770B37ED0679A11B001EADE2 /* CoreDataObjectID_DataModel.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 770B37EC0679A11B001EADE2 /* CoreDataObjectID_DataModel.xcdatamodel */; }; | ||
77C8280E06725ACE000B614F /* CoreDataObjectID_AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 77C8280C06725ACE000B614F /* CoreDataObjectID_AppDelegate.m */; }; | ||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; | ||
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; | ||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; | ||
/* End PBXBuildFile section */ | ||
|
||
/* Begin PBXFileReference section */ | ||
089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; }; | ||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; | ||
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; | ||
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; }; | ||
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; }; | ||
2F7446980DB6B7EA00F9684A /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; }; | ||
32CA4F630368D1EE00C91783 /* CoreDataObjectID_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreDataObjectID_Prefix.pch; sourceTree = "<group>"; }; | ||
4CA50C0111B955EB00D02D28 /* Book.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Book.h; sourceTree = "<group>"; }; | ||
4CA50C0211B955EB00D02D28 /* Book.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Book.m; sourceTree = "<group>"; }; | ||
770B37EC0679A11B001EADE2 /* CoreDataObjectID_DataModel.xcdatamodel */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wrapper.xcdatamodel; path = CoreDataObjectID_DataModel.xcdatamodel; sourceTree = "<group>"; }; | ||
77C82804067257F0000B614F /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; }; | ||
77C8280B06725ACE000B614F /* CoreDataObjectID_AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreDataObjectID_AppDelegate.h; sourceTree = "<group>"; }; | ||
77C8280C06725ACE000B614F /* CoreDataObjectID_AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CoreDataObjectID_AppDelegate.m; sourceTree = "<group>"; }; | ||
8D1107310486CEB800E47090 /* CoreDataObjectID-Info.plist */ = {isa = PBXFileReference; explicitFileType = text.plist.xml; fileEncoding = 4; path = "CoreDataObjectID-Info.plist"; sourceTree = "<group>"; }; | ||
8D1107320486CEB800E47090 /* CoreDataObjectID.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CoreDataObjectID.app; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
/* End PBXFileReference section */ | ||
|
||
/* Begin PBXFrameworksBuildPhase section */ | ||
8D11072E0486CEB800E47090 /* Frameworks */ = { | ||
isa = PBXFrameworksBuildPhase; | ||
buildActionMask = 2147483647; | ||
files = ( | ||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, | ||
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
}; | ||
/* End PBXFrameworksBuildPhase section */ | ||
|
||
/* Begin PBXGroup section */ | ||
080E96DDFE201D6D7F000001 /* Classes */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
77C8280B06725ACE000B614F /* CoreDataObjectID_AppDelegate.h */, | ||
77C8280C06725ACE000B614F /* CoreDataObjectID_AppDelegate.m */, | ||
); | ||
name = Classes; | ||
sourceTree = "<group>"; | ||
}; | ||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, | ||
); | ||
name = "Linked Frameworks"; | ||
sourceTree = "<group>"; | ||
}; | ||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
77C82804067257F0000B614F /* CoreData.framework */, | ||
29B97325FDCFA39411CA2CEA /* Foundation.framework */, | ||
29B97324FDCFA39411CA2CEA /* AppKit.framework */, | ||
); | ||
name = "Other Frameworks"; | ||
sourceTree = "<group>"; | ||
}; | ||
19C28FACFE9D520D11CA2CBB /* Products */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
8D1107320486CEB800E47090 /* CoreDataObjectID.app */, | ||
); | ||
name = Products; | ||
sourceTree = "<group>"; | ||
}; | ||
29B97314FDCFA39411CA2CEA /* CoreDataObjectID */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
4CA50C0111B955EB00D02D28 /* Book.h */, | ||
4CA50C0211B955EB00D02D28 /* Book.m */, | ||
7756732906782D8800D1FEB8 /* Models */, | ||
080E96DDFE201D6D7F000001 /* Classes */, | ||
29B97315FDCFA39411CA2CEA /* Other Sources */, | ||
29B97317FDCFA39411CA2CEA /* Resources */, | ||
29B97323FDCFA39411CA2CEA /* Frameworks */, | ||
19C28FACFE9D520D11CA2CBB /* Products */, | ||
); | ||
name = CoreDataObjectID; | ||
sourceTree = "<group>"; | ||
}; | ||
29B97315FDCFA39411CA2CEA /* Other Sources */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
32CA4F630368D1EE00C91783 /* CoreDataObjectID_Prefix.pch */, | ||
29B97316FDCFA39411CA2CEA /* main.m */, | ||
); | ||
name = "Other Sources"; | ||
sourceTree = "<group>"; | ||
}; | ||
29B97317FDCFA39411CA2CEA /* Resources */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
8D1107310486CEB800E47090 /* CoreDataObjectID-Info.plist */, | ||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, | ||
2F7446970DB6B7EA00F9684A /* MainMenu.xib */, | ||
); | ||
name = Resources; | ||
sourceTree = "<group>"; | ||
}; | ||
29B97323FDCFA39411CA2CEA /* Frameworks */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, | ||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, | ||
); | ||
name = Frameworks; | ||
sourceTree = "<group>"; | ||
}; | ||
7756732906782D8800D1FEB8 /* Models */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
770B37EC0679A11B001EADE2 /* CoreDataObjectID_DataModel.xcdatamodel */, | ||
); | ||
name = Models; | ||
sourceTree = "<group>"; | ||
}; | ||
/* End PBXGroup section */ | ||
|
||
/* Begin PBXNativeTarget section */ | ||
8D1107260486CEB800E47090 /* CoreDataObjectID */ = { | ||
isa = PBXNativeTarget; | ||
buildConfigurationList = 26FC0A840875C7B200E6366F /* Build configuration list for PBXNativeTarget "CoreDataObjectID" */; | ||
buildPhases = ( | ||
8D1107290486CEB800E47090 /* Resources */, | ||
8D11072C0486CEB800E47090 /* Sources */, | ||
8D11072E0486CEB800E47090 /* Frameworks */, | ||
); | ||
buildRules = ( | ||
); | ||
dependencies = ( | ||
); | ||
name = CoreDataObjectID; | ||
productInstallPath = "$(HOME)/Applications"; | ||
productName = CoreDataObjectID; | ||
productReference = 8D1107320486CEB800E47090 /* CoreDataObjectID.app */; | ||
productType = "com.apple.product-type.application"; | ||
}; | ||
/* End PBXNativeTarget section */ | ||
|
||
/* Begin PBXProject section */ | ||
29B97313FDCFA39411CA2CEA /* Project object */ = { | ||
isa = PBXProject; | ||
buildConfigurationList = 26FC0A880875C7B200E6366F /* Build configuration list for PBXProject "CoreDataObjectID" */; | ||
compatibilityVersion = "Xcode 3.1"; | ||
hasScannedForEncodings = 1; | ||
mainGroup = 29B97314FDCFA39411CA2CEA /* CoreDataObjectID */; | ||
projectDirPath = ""; | ||
projectRoot = ""; | ||
targets = ( | ||
8D1107260486CEB800E47090 /* CoreDataObjectID */, | ||
); | ||
}; | ||
/* End PBXProject section */ | ||
|
||
/* Begin PBXResourcesBuildPhase section */ | ||
8D1107290486CEB800E47090 /* Resources */ = { | ||
isa = PBXResourcesBuildPhase; | ||
buildActionMask = 2147483647; | ||
files = ( | ||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, | ||
2F7446990DB6B7EA00F9684A /* MainMenu.xib in Resources */, | ||
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
}; | ||
/* End PBXResourcesBuildPhase section */ | ||
|
||
/* Begin PBXSourcesBuildPhase section */ | ||
8D11072C0486CEB800E47090 /* Sources */ = { | ||
isa = PBXSourcesBuildPhase; | ||
buildActionMask = 2147483647; | ||
files = ( | ||
8D11072D0486CEB800E47090 /* main.m in Sources */, | ||
77C8280E06725ACE000B614F /* CoreDataObjectID_AppDelegate.m in Sources */, | ||
770B37ED0679A11B001EADE2 /* CoreDataObjectID_DataModel.xcdatamodel in Sources */, | ||
4CA50C0311B955EB00D02D28 /* Book.m in Sources */, | ||
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
}; | ||
/* End PBXSourcesBuildPhase section */ | ||
|
||
/* Begin PBXVariantGroup section */ | ||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { | ||
isa = PBXVariantGroup; | ||
children = ( | ||
089C165DFE840E0CC02AAC07 /* English */, | ||
); | ||
name = InfoPlist.strings; | ||
sourceTree = "<group>"; | ||
}; | ||
2F7446970DB6B7EA00F9684A /* MainMenu.xib */ = { | ||
isa = PBXVariantGroup; | ||
children = ( | ||
2F7446980DB6B7EA00F9684A /* English */, | ||
); | ||
name = MainMenu.xib; | ||
sourceTree = "<group>"; | ||
}; | ||
/* End PBXVariantGroup section */ | ||
|
||
/* Begin XCBuildConfiguration section */ | ||
26FC0A850875C7B200E6366F /* Debug */ = { | ||
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; | ||
COPY_PHASE_STRIP = NO; | ||
GCC_DYNAMIC_NO_PIC = NO; | ||
GCC_ENABLE_FIX_AND_CONTINUE = YES; | ||
GCC_ENABLE_OBJC_EXCEPTIONS = YES; | ||
GCC_MODEL_TUNING = G5; | ||
GCC_OPTIMIZATION_LEVEL = 0; | ||
GCC_PRECOMPILE_PREFIX_HEADER = YES; | ||
GCC_PREFIX_HEADER = CoreDataObjectID_Prefix.pch; | ||
INFOPLIST_FILE = "CoreDataObjectID-Info.plist"; | ||
INSTALL_PATH = "$(HOME)/Applications"; | ||
PRODUCT_NAME = CoreDataObjectID; | ||
WRAPPER_EXTENSION = app; | ||
}; | ||
name = Debug; | ||
}; | ||
26FC0A860875C7B200E6366F /* Release */ = { | ||
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; | ||
GCC_ENABLE_OBJC_EXCEPTIONS = YES; | ||
GCC_MODEL_TUNING = G5; | ||
GCC_PRECOMPILE_PREFIX_HEADER = YES; | ||
GCC_PREFIX_HEADER = CoreDataObjectID_Prefix.pch; | ||
INFOPLIST_FILE = "CoreDataObjectID-Info.plist"; | ||
INSTALL_PATH = "$(HOME)/Applications"; | ||
PRODUCT_NAME = CoreDataObjectID; | ||
WRAPPER_EXTENSION = app; | ||
}; | ||
name = Release; | ||
}; | ||
26FC0A890875C7B200E6366F /* Debug */ = { | ||
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; | ||
GCC_C_LANGUAGE_STANDARD = gnu99; | ||
GCC_WARN_ABOUT_RETURN_TYPE = YES; | ||
GCC_WARN_UNUSED_VARIABLE = YES; | ||
ONLY_ACTIVE_ARCH = YES; | ||
PREBINDING = NO; | ||
SDKROOT = macosx10.6; | ||
}; | ||
name = Debug; | ||
}; | ||
26FC0A8A0875C7B200E6366F /* Release */ = { | ||
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; | ||
GCC_C_LANGUAGE_STANDARD = gnu99; | ||
GCC_WARN_ABOUT_RETURN_TYPE = YES; | ||
GCC_WARN_UNUSED_VARIABLE = YES; | ||
PREBINDING = NO; | ||
SDKROOT = macosx10.6; | ||
}; | ||
name = Release; | ||
}; | ||
/* End XCBuildConfiguration section */ | ||
|
||
/* Begin XCConfigurationList section */ | ||
26FC0A840875C7B200E6366F /* Build configuration list for PBXNativeTarget "CoreDataObjectID" */ = { | ||
isa = XCConfigurationList; | ||
buildConfigurations = ( | ||
26FC0A850875C7B200E6366F /* Debug */, | ||
26FC0A860875C7B200E6366F /* Release */, | ||
); | ||
defaultConfigurationIsVisible = 0; | ||
defaultConfigurationName = Release; | ||
}; | ||
26FC0A880875C7B200E6366F /* Build configuration list for PBXProject "CoreDataObjectID" */ = { | ||
isa = XCConfigurationList; | ||
buildConfigurations = ( | ||
26FC0A890875C7B200E6366F /* Debug */, | ||
26FC0A8A0875C7B200E6366F /* Release */, | ||
); | ||
defaultConfigurationIsVisible = 0; | ||
defaultConfigurationName = Release; | ||
}; | ||
/* End XCConfigurationList section */ | ||
}; | ||
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; | ||
} |
Oops, something went wrong.