Permalink
Browse files

starting to convert examples from chapter 36

  • Loading branch information...
1 parent 412a01c commit 5614878e89d80362e9c6ef7bf2bba3cc577babdd @mattneub committed Feb 12, 2012
@@ -0,0 +1,287 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ A40BE5F214E837AD00C81BDB /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A40BE5F114E837AD00C81BDB /* UIKit.framework */; };
+ A40BE5F414E837AD00C81BDB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A40BE5F314E837AD00C81BDB /* Foundation.framework */; };
+ A40BE5F614E837AD00C81BDB /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A40BE5F514E837AD00C81BDB /* CoreGraphics.framework */; };
+ A40BE5FC14E837AD00C81BDB /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = A40BE5FA14E837AD00C81BDB /* InfoPlist.strings */; };
+ A40BE5FE14E837AD00C81BDB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A40BE5FD14E837AD00C81BDB /* main.m */; };
+ A40BE60214E837AD00C81BDB /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A40BE60114E837AD00C81BDB /* AppDelegate.m */; };
+ A40BE60514E837AD00C81BDB /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A40BE60414E837AD00C81BDB /* ViewController.m */; };
+ A40BE60814E837AD00C81BDB /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A40BE60614E837AD00C81BDB /* ViewController.xib */; };
+ A40BE61014E837F400C81BDB /* Person.m in Sources */ = {isa = PBXBuildFile; fileRef = A40BE60F14E837F400C81BDB /* Person.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ A40BE5ED14E837AD00C81BDB /* p730p748basicFileOperations.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = p730p748basicFileOperations.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ A40BE5F114E837AD00C81BDB /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ A40BE5F314E837AD00C81BDB /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ A40BE5F514E837AD00C81BDB /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ A40BE5F914E837AD00C81BDB /* p730p748basicFileOperations-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "p730p748basicFileOperations-Info.plist"; sourceTree = "<group>"; };
+ A40BE5FB14E837AD00C81BDB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ A40BE5FD14E837AD00C81BDB /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ A40BE5FF14E837AD00C81BDB /* p730p748basicFileOperations-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "p730p748basicFileOperations-Prefix.pch"; sourceTree = "<group>"; };
+ A40BE60014E837AD00C81BDB /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+ A40BE60114E837AD00C81BDB /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+ A40BE60314E837AD00C81BDB /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
+ A40BE60414E837AD00C81BDB /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
+ A40BE60714E837AD00C81BDB /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController.xib; sourceTree = "<group>"; };
+ A40BE60E14E837F400C81BDB /* Person.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Person.h; sourceTree = "<group>"; };
+ A40BE60F14E837F400C81BDB /* Person.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Person.m; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ A40BE5EA14E837AD00C81BDB /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ A40BE5F214E837AD00C81BDB /* UIKit.framework in Frameworks */,
+ A40BE5F414E837AD00C81BDB /* Foundation.framework in Frameworks */,
+ A40BE5F614E837AD00C81BDB /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ A40BE5E214E837AD00C81BDB = {
+ isa = PBXGroup;
+ children = (
+ A40BE5F714E837AD00C81BDB /* p730p748basicFileOperations */,
+ A40BE5F014E837AD00C81BDB /* Frameworks */,
+ A40BE5EE14E837AD00C81BDB /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ A40BE5EE14E837AD00C81BDB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ A40BE5ED14E837AD00C81BDB /* p730p748basicFileOperations.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ A40BE5F014E837AD00C81BDB /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ A40BE5F114E837AD00C81BDB /* UIKit.framework */,
+ A40BE5F314E837AD00C81BDB /* Foundation.framework */,
+ A40BE5F514E837AD00C81BDB /* CoreGraphics.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ A40BE5F714E837AD00C81BDB /* p730p748basicFileOperations */ = {
+ isa = PBXGroup;
+ children = (
+ A40BE60014E837AD00C81BDB /* AppDelegate.h */,
+ A40BE60114E837AD00C81BDB /* AppDelegate.m */,
+ A40BE60314E837AD00C81BDB /* ViewController.h */,
+ A40BE60414E837AD00C81BDB /* ViewController.m */,
+ A40BE60614E837AD00C81BDB /* ViewController.xib */,
+ A40BE60E14E837F400C81BDB /* Person.h */,
+ A40BE60F14E837F400C81BDB /* Person.m */,
+ A40BE5F814E837AD00C81BDB /* Supporting Files */,
+ );
+ path = p730p748basicFileOperations;
+ sourceTree = "<group>";
+ };
+ A40BE5F814E837AD00C81BDB /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ A40BE5F914E837AD00C81BDB /* p730p748basicFileOperations-Info.plist */,
+ A40BE5FA14E837AD00C81BDB /* InfoPlist.strings */,
+ A40BE5FD14E837AD00C81BDB /* main.m */,
+ A40BE5FF14E837AD00C81BDB /* p730p748basicFileOperations-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ A40BE5EC14E837AD00C81BDB /* p730p748basicFileOperations */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = A40BE60B14E837AD00C81BDB /* Build configuration list for PBXNativeTarget "p730p748basicFileOperations" */;
+ buildPhases = (
+ A40BE5E914E837AD00C81BDB /* Sources */,
+ A40BE5EA14E837AD00C81BDB /* Frameworks */,
+ A40BE5EB14E837AD00C81BDB /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = p730p748basicFileOperations;
+ productName = p730p748basicFileOperations;
+ productReference = A40BE5ED14E837AD00C81BDB /* p730p748basicFileOperations.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ A40BE5E414E837AD00C81BDB /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0420;
+ };
+ buildConfigurationList = A40BE5E714E837AD00C81BDB /* Build configuration list for PBXProject "p730p748basicFileOperations" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = A40BE5E214E837AD00C81BDB;
+ productRefGroup = A40BE5EE14E837AD00C81BDB /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ A40BE5EC14E837AD00C81BDB /* p730p748basicFileOperations */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ A40BE5EB14E837AD00C81BDB /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ A40BE5FC14E837AD00C81BDB /* InfoPlist.strings in Resources */,
+ A40BE60814E837AD00C81BDB /* ViewController.xib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ A40BE5E914E837AD00C81BDB /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ A40BE5FE14E837AD00C81BDB /* main.m in Sources */,
+ A40BE60214E837AD00C81BDB /* AppDelegate.m in Sources */,
+ A40BE60514E837AD00C81BDB /* ViewController.m in Sources */,
+ A40BE61014E837F400C81BDB /* Person.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ A40BE5FA14E837AD00C81BDB /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ A40BE5FB14E837AD00C81BDB /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ A40BE60614E837AD00C81BDB /* ViewController.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ A40BE60714E837AD00C81BDB /* en */,
+ );
+ name = ViewController.xib;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ A40BE60914E837AD00C81BDB /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ A40BE60A14E837AD00C81BDB /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ SDKROOT = iphoneos;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ A40BE60C14E837AD00C81BDB /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "p730p748basicFileOperations/p730p748basicFileOperations-Prefix.pch";
+ INFOPLIST_FILE = "p730p748basicFileOperations/p730p748basicFileOperations-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ A40BE60D14E837AD00C81BDB /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "p730p748basicFileOperations/p730p748basicFileOperations-Prefix.pch";
+ INFOPLIST_FILE = "p730p748basicFileOperations/p730p748basicFileOperations-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ A40BE5E714E837AD00C81BDB /* Build configuration list for PBXProject "p730p748basicFileOperations" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ A40BE60914E837AD00C81BDB /* Debug */,
+ A40BE60A14E837AD00C81BDB /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ A40BE60B14E837AD00C81BDB /* Build configuration list for PBXNativeTarget "p730p748basicFileOperations" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ A40BE60C14E837AD00C81BDB /* Debug */,
+ A40BE60D14E837AD00C81BDB /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = A40BE5E414E837AD00C81BDB /* Project object */;
+}
@@ -0,0 +1,13 @@
+
+
+#import <UIKit/UIKit.h>
+
+@class ViewController;
+
+@interface AppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@property (strong, nonatomic) ViewController *viewController;
+
+@end
@@ -0,0 +1,23 @@
+
+
+#import "AppDelegate.h"
+
+#import "ViewController.h"
+
+@implementation AppDelegate
+
+@synthesize window = _window;
+@synthesize viewController = _viewController;
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+ // Override point for customization after application launch.
+ self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
+ self.window.rootViewController = self.viewController;
+ [self.window makeKeyAndVisible];
+ return YES;
+}
+
+
+@end
@@ -0,0 +1,11 @@
+
+
+#import <Foundation/Foundation.h>
+
+
+@interface Person : NSObject <NSCoding>
+
+@property (nonatomic, copy) NSString* firstName;
+@property (nonatomic, copy) NSString* lastName;
+
+@end
@@ -0,0 +1,25 @@
+
+
+#import "Person.h"
+
+
+@implementation Person
+@synthesize firstName, lastName;
+
+
+- (void)encodeWithCoder:(NSCoder *)encoder {
+ //[super encodeWithCoder: encoder]; // not in this case
+ [encoder encodeObject:self->lastName forKey:@"last"];
+ [encoder encodeObject:self->firstName forKey:@"first"];
+}
+
+- (id) initWithCoder:(NSCoder *)decoder {
+ //self = [super initWithCoder: decoder]; // not in this case
+ self = [super init];
+ self->lastName = [decoder decodeObjectForKey:@"last"];
+ self->firstName = [decoder decodeObjectForKey:@"first"];
+ return self;
+}
+
+
+@end
@@ -0,0 +1,6 @@
+
+#import <UIKit/UIKit.h>
+
+@interface ViewController : UIViewController
+
+@end
Oops, something went wrong.

0 comments on commit 5614878

Please sign in to comment.