Permalink
Browse files

Following along in chapter 29.

  • Loading branch information...
1 parent 66c0f69 commit 63464e6592599445c7efba9b765dd67acd262c12 Nick committed Sep 2, 2013
@@ -0,0 +1,261 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 0173A4A817D50BFF006FE079 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0173A4A717D50BFF006FE079 /* Foundation.framework */; };
+ 0173A4AB17D50BFF006FE079 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 0173A4AA17D50BFF006FE079 /* main.m */; };
+ 0173A4AF17D50BFF006FE079 /* Appliances.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = 0173A4AE17D50BFF006FE079 /* Appliances.1 */; };
+ 0173A4B717D50C33006FE079 /* Appliance.m in Sources */ = {isa = PBXBuildFile; fileRef = 0173A4B617D50C33006FE079 /* Appliance.m */; };
+ 0173A4BA17D51080006FE079 /* OwnedAppliance.m in Sources */ = {isa = PBXBuildFile; fileRef = 0173A4B917D51080006FE079 /* OwnedAppliance.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 0173A4A217D50BFF006FE079 /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = /usr/share/man/man1/;
+ dstSubfolderSpec = 0;
+ files = (
+ 0173A4AF17D50BFF006FE079 /* Appliances.1 in CopyFiles */,
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 0173A4A417D50BFF006FE079 /* Appliances */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Appliances; sourceTree = BUILT_PRODUCTS_DIR; };
+ 0173A4A717D50BFF006FE079 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 0173A4AA17D50BFF006FE079 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 0173A4AD17D50BFF006FE079 /* Appliances-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Appliances-Prefix.pch"; sourceTree = "<group>"; };
+ 0173A4AE17D50BFF006FE079 /* Appliances.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = Appliances.1; sourceTree = "<group>"; };
+ 0173A4B517D50C33006FE079 /* Appliance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Appliance.h; sourceTree = "<group>"; };
+ 0173A4B617D50C33006FE079 /* Appliance.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Appliance.m; sourceTree = "<group>"; };
+ 0173A4B817D51080006FE079 /* OwnedAppliance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OwnedAppliance.h; sourceTree = "<group>"; };
+ 0173A4B917D51080006FE079 /* OwnedAppliance.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OwnedAppliance.m; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 0173A4A117D50BFF006FE079 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 0173A4A817D50BFF006FE079 /* Foundation.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 0173A49B17D50BFF006FE079 = {
+ isa = PBXGroup;
+ children = (
+ 0173A4A917D50BFF006FE079 /* Appliances */,
+ 0173A4A617D50BFF006FE079 /* Frameworks */,
+ 0173A4A517D50BFF006FE079 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 0173A4A517D50BFF006FE079 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 0173A4A417D50BFF006FE079 /* Appliances */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 0173A4A617D50BFF006FE079 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 0173A4A717D50BFF006FE079 /* Foundation.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 0173A4A917D50BFF006FE079 /* Appliances */ = {
+ isa = PBXGroup;
+ children = (
+ 0173A4AA17D50BFF006FE079 /* main.m */,
+ 0173A4AE17D50BFF006FE079 /* Appliances.1 */,
+ 0173A4B517D50C33006FE079 /* Appliance.h */,
+ 0173A4B617D50C33006FE079 /* Appliance.m */,
+ 0173A4B817D51080006FE079 /* OwnedAppliance.h */,
+ 0173A4B917D51080006FE079 /* OwnedAppliance.m */,
+ 0173A4AC17D50BFF006FE079 /* Supporting Files */,
+ );
+ path = Appliances;
+ sourceTree = "<group>";
+ };
+ 0173A4AC17D50BFF006FE079 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 0173A4AD17D50BFF006FE079 /* Appliances-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 0173A4A317D50BFF006FE079 /* Appliances */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 0173A4B217D50BFF006FE079 /* Build configuration list for PBXNativeTarget "Appliances" */;
+ buildPhases = (
+ 0173A4A017D50BFF006FE079 /* Sources */,
+ 0173A4A117D50BFF006FE079 /* Frameworks */,
+ 0173A4A217D50BFF006FE079 /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Appliances;
+ productName = Appliances;
+ productReference = 0173A4A417D50BFF006FE079 /* Appliances */;
+ productType = "com.apple.product-type.tool";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 0173A49C17D50BFF006FE079 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0460;
+ ORGANIZATIONNAME = "Nicholas Squire";
+ };
+ buildConfigurationList = 0173A49F17D50BFF006FE079 /* Build configuration list for PBXProject "Appliances" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 0173A49B17D50BFF006FE079;
+ productRefGroup = 0173A4A517D50BFF006FE079 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 0173A4A317D50BFF006FE079 /* Appliances */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 0173A4A017D50BFF006FE079 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 0173A4AB17D50BFF006FE079 /* main.m in Sources */,
+ 0173A4B717D50C33006FE079 /* Appliance.m in Sources */,
+ 0173A4BA17D51080006FE079 /* OwnedAppliance.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ 0173A4B017D50BFF006FE079 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.8;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = macosx;
+ };
+ name = Debug;
+ };
+ 0173A4B117D50BFF006FE079 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.8;
+ SDKROOT = macosx;
+ };
+ name = Release;
+ };
+ 0173A4B317D50BFF006FE079 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "Appliances/Appliances-Prefix.pch";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 0173A4B417D50BFF006FE079 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "Appliances/Appliances-Prefix.pch";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 0173A49F17D50BFF006FE079 /* Build configuration list for PBXProject "Appliances" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 0173A4B017D50BFF006FE079 /* Debug */,
+ 0173A4B117D50BFF006FE079 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 0173A4B217D50BFF006FE079 /* Build configuration list for PBXNativeTarget "Appliances" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 0173A4B317D50BFF006FE079 /* Debug */,
+ 0173A4B417D50BFF006FE079 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 0173A49C17D50BFF006FE079 /* Project object */;
+}
@@ -0,0 +1,23 @@
+//
+// Appliance.h
+// Appliances
+//
+// Created by Nicholas Squire on 9/2/13.
+// Copyright (c) 2013 Nicholas Squire. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface Appliance : NSObject
+{
+ NSString *productName;
+ int voltage;
+}
+
+@property (copy) NSString *productName;
+@property int voltage;
+
+// The designated initializer
+- (id)initWithProductName:(NSString *)pn;
+
+@end
@@ -0,0 +1,43 @@
+//
+// Appliance.m
+// Appliances
+//
+// Created by Nicholas Squire on 9/2/13.
+// Copyright (c) 2013 Nicholas Squire. All rights reserved.
+//
+
+#import "Appliance.h"
+
+@implementation Appliance
+
+@synthesize productName;
+@synthesize voltage;
+
+- (id)init
+{
+ return [self initWithProductName:@"Unknown"];
+}
+
+- (id)initWithProductName:(NSString *)pn
+{
+ // Call the NSObject's init method
+ self = [super init];
+
+ if (self) {
+ // Set the product name
+ [self setProductName:pn];
+
+ // Give voltage a starting value
+ voltage = 120;
+ }
+
+ // Return a pointer to the new object
+ return self;
+}
+
+- (NSString *)description
+{
+ return [NSString stringWithFormat:@"<%@: %d volts>", productName, voltage];
+}
+
+@end
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'Appliances' target in the 'Appliances' project
+//
+
+#ifdef __OBJC__
+ #import <Foundation/Foundation.h>
+#endif
Oops, something went wrong.

0 comments on commit 63464e6

Please sign in to comment.