Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Pushing early C15 samples (still in dev)

  • Loading branch information...
commit 89c78bcdd175675b6a0529991ef7597d38c815b1 1 parent d060e51
Erica Sadun authored
Showing with 6,641 additions and 3 deletions.
  1. +1 −2  C11-Tables/15-Sorting Tables/main.m
  2. +5 −1 C11-Tables/17-Adding Headers and an Index/main.m
  3. BIN  C15-Media/13-Clear BGColor/Default.png
  4. +239 −0 C15-Media/13-Clear BGColor/HelloWorld.xcodeproj/project.pbxproj
  5. +8 −0 C15-Media/13-Clear BGColor/HelloWorld_Prefix.pch
  6. +26 −0 C15-Media/13-Clear BGColor/Info.plist
  7. +180 −0 C15-Media/13-Clear BGColor/TestBedViewController.xib
  8. BIN  C15-Media/13-Clear BGColor/cover320x416.png
  9. BIN  C15-Media/13-Clear BGColor/icon.png
  10. +73 −0 C15-Media/13-Clear BGColor/main.m
  11. +101 −0 C18-Address Book/09-Monsters/ABContact.h
  12. +525 −0 C18-Address Book/09-Monsters/ABContact.m
  13. +47 −0 C18-Address Book/09-Monsters/ABContactsHelper.h
  14. +133 −0 C18-Address Book/09-Monsters/ABContactsHelper.m
  15. +33 −0 C18-Address Book/09-Monsters/ABGroup.h
  16. +112 −0 C18-Address Book/09-Monsters/ABGroup.m
  17. BIN  C18-Address Book/09-Monsters/Default.png
  18. +497 −0 C18-Address Book/09-Monsters/HelloWorld.xcodeproj/project.pbxproj
  19. +8 −0 C18-Address Book/09-Monsters/HelloWorld_Prefix.pch
  20. +26 −0 C18-Address Book/09-Monsters/Info.plist
  21. BIN  C18-Address Book/09-Monsters/Parts/oldarms_1.png
  22. BIN  C18-Address Book/09-Monsters/Parts/oldarms_2.png
  23. BIN  C18-Address Book/09-Monsters/Parts/oldarms_3.png
  24. BIN  C18-Address Book/09-Monsters/Parts/oldarms_4.png
  25. BIN  C18-Address Book/09-Monsters/Parts/oldarms_5.png
  26. BIN  C18-Address Book/09-Monsters/Parts/oldbody_1.png
  27. BIN  C18-Address Book/09-Monsters/Parts/oldbody_10.png
  28. BIN  C18-Address Book/09-Monsters/Parts/oldbody_11.png
  29. BIN  C18-Address Book/09-Monsters/Parts/oldbody_12.png
  30. BIN  C18-Address Book/09-Monsters/Parts/oldbody_13.png
  31. BIN  C18-Address Book/09-Monsters/Parts/oldbody_14.png
  32. BIN  C18-Address Book/09-Monsters/Parts/oldbody_15.png
  33. BIN  C18-Address Book/09-Monsters/Parts/oldbody_2.png
  34. BIN  C18-Address Book/09-Monsters/Parts/oldbody_3.png
  35. BIN  C18-Address Book/09-Monsters/Parts/oldbody_4.png
  36. BIN  C18-Address Book/09-Monsters/Parts/oldbody_5.png
  37. BIN  C18-Address Book/09-Monsters/Parts/oldbody_6.png
  38. BIN  C18-Address Book/09-Monsters/Parts/oldbody_7.png
  39. BIN  C18-Address Book/09-Monsters/Parts/oldbody_8.png
  40. BIN  C18-Address Book/09-Monsters/Parts/oldbody_9.png
  41. BIN  C18-Address Book/09-Monsters/Parts/oldeyes_1.png
  42. BIN  C18-Address Book/09-Monsters/Parts/oldeyes_10.png
  43. BIN  C18-Address Book/09-Monsters/Parts/oldeyes_11.png
  44. BIN  C18-Address Book/09-Monsters/Parts/oldeyes_12.png
  45. BIN  C18-Address Book/09-Monsters/Parts/oldeyes_13.png
  46. BIN  C18-Address Book/09-Monsters/Parts/oldeyes_14.png
  47. BIN  C18-Address Book/09-Monsters/Parts/oldeyes_15.png
  48. BIN  C18-Address Book/09-Monsters/Parts/oldeyes_2.png
  49. BIN  C18-Address Book/09-Monsters/Parts/oldeyes_3.png
  50. BIN  C18-Address Book/09-Monsters/Parts/oldeyes_4.png
  51. BIN  C18-Address Book/09-Monsters/Parts/oldeyes_5.png
  52. BIN  C18-Address Book/09-Monsters/Parts/oldeyes_6.png
  53. BIN  C18-Address Book/09-Monsters/Parts/oldeyes_7.png
  54. BIN  C18-Address Book/09-Monsters/Parts/oldeyes_8.png
  55. BIN  C18-Address Book/09-Monsters/Parts/oldeyes_9.png
  56. BIN  C18-Address Book/09-Monsters/Parts/oldhair_1.png
  57. BIN  C18-Address Book/09-Monsters/Parts/oldhair_2.png
  58. BIN  C18-Address Book/09-Monsters/Parts/oldhair_3.png
  59. BIN  C18-Address Book/09-Monsters/Parts/oldhair_4.png
  60. BIN  C18-Address Book/09-Monsters/Parts/oldhair_5.png
  61. BIN  C18-Address Book/09-Monsters/Parts/oldlegs_1.png
  62. BIN  C18-Address Book/09-Monsters/Parts/oldlegs_2.png
  63. BIN  C18-Address Book/09-Monsters/Parts/oldlegs_3.png
  64. BIN  C18-Address Book/09-Monsters/Parts/oldlegs_4.png
  65. BIN  C18-Address Book/09-Monsters/Parts/oldlegs_5.png
  66. BIN  C18-Address Book/09-Monsters/Parts/oldmouth_1.png
  67. BIN  C18-Address Book/09-Monsters/Parts/oldmouth_10.png
  68. BIN  C18-Address Book/09-Monsters/Parts/oldmouth_2.png
  69. BIN  C18-Address Book/09-Monsters/Parts/oldmouth_3.png
  70. BIN  C18-Address Book/09-Monsters/Parts/oldmouth_4.png
  71. BIN  C18-Address Book/09-Monsters/Parts/oldmouth_5.png
  72. BIN  C18-Address Book/09-Monsters/Parts/oldmouth_6.png
  73. BIN  C18-Address Book/09-Monsters/Parts/oldmouth_7.png
  74. BIN  C18-Address Book/09-Monsters/Parts/oldmouth_8.png
  75. BIN  C18-Address Book/09-Monsters/Parts/oldmouth_9.png
  76. +223 −0 C18-Address Book/09-Monsters/TestBedViewController.xib
  77. BIN  C18-Address Book/09-Monsters/cover320x416.png
  78. +1 −0  C18-Address Book/09-Monsters/docopy
  79. BIN  C18-Address Book/09-Monsters/icon.png
  80. +119 −0 C18-Address Book/09-Monsters/main.m
  81. BIN  C19-CoreData/00-Intro/Default.png
  82. +30 −0 C19-CoreData/00-Intro/Department.h
  83. +18 −0 C19-CoreData/00-Intro/Department.m
  84. +261 −0 C19-CoreData/00-Intro/HelloWorld.xcodeproj/project.pbxproj
  85. +8 −0 C19-CoreData/00-Intro/HelloWorld_Prefix.pch
  86. +26 −0 C19-CoreData/00-Intro/Info.plist
  87. +15 −0 C19-CoreData/00-Intro/ModalAlert.h
  88. +180 −0 C19-CoreData/00-Intro/ModalAlert.m
  89. +24 −0 C19-CoreData/00-Intro/Person.h
  90. +19 −0 C19-CoreData/00-Intro/Person.m
  91. +223 −0 C19-CoreData/00-Intro/TestBedViewController.xib
  92. BIN  C19-CoreData/00-Intro/cover320x416.png
  93. BIN  C19-CoreData/00-Intro/icon.png
  94. +205 −0 C19-CoreData/00-Intro/main.m
  95. BIN  C19-CoreData/00-Intro/newmodel.xcdatamodel/elements
  96. BIN  C19-CoreData/00-Intro/newmodel.xcdatamodel/layout
  97. +23 −0 C19-CoreData/01-Section Color List/Crayon.h
  98. +18 −0 C19-CoreData/01-Section Color List/Crayon.m
  99. BIN  C19-CoreData/01-Section Color List/Default.png
  100. +28 −0 C19-CoreData/01-Section Color List/HelloWorld-Info.plist
  101. +250 −0 C19-CoreData/01-Section Color List/HelloWorld.xcodeproj/project.pbxproj
  102. +8 −0 C19-CoreData/01-Section Color List/HelloWorld_Prefix.pch
  103. +15 −0 C19-CoreData/01-Section Color List/ModalAlert.h
  104. +181 −0 C19-CoreData/01-Section Color List/ModalAlert.m
  105. BIN  C19-CoreData/01-Section Color List/cover320x416.png
  106. +134 −0 C19-CoreData/01-Section Color List/crayons.txt
  107. BIN  C19-CoreData/01-Section Color List/crayons.xcdatamodel/elements
  108. BIN  C19-CoreData/01-Section Color List/crayons.xcdatamodel/layout
  109. BIN  C19-CoreData/01-Section Color List/icon.png
  110. +203 −0 C19-CoreData/01-Section Color List/main.m
  111. +23 −0 C19-CoreData/02-Queried Color List/Crayon.h
  112. +18 −0 C19-CoreData/02-Queried Color List/Crayon.m
  113. BIN  C19-CoreData/02-Queried Color List/Default.png
  114. +28 −0 C19-CoreData/02-Queried Color List/HelloWorld-Info.plist
  115. +250 −0 C19-CoreData/02-Queried Color List/HelloWorld.xcodeproj/project.pbxproj
  116. +8 −0 C19-CoreData/02-Queried Color List/HelloWorld_Prefix.pch
  117. +15 −0 C19-CoreData/02-Queried Color List/ModalAlert.h
  118. +181 −0 C19-CoreData/02-Queried Color List/ModalAlert.m
  119. BIN  C19-CoreData/02-Queried Color List/cover320x416.png
  120. +134 −0 C19-CoreData/02-Queried Color List/crayons.txt
  121. BIN  C19-CoreData/02-Queried Color List/crayons.xcdatamodel/elements
  122. BIN  C19-CoreData/02-Queried Color List/crayons.xcdatamodel/layout
  123. BIN  C19-CoreData/02-Queried Color List/icon.png
  124. +239 −0 C19-CoreData/02-Queried Color List/main.m
  125. BIN  C19-CoreData/03-Editable List/Default.png
  126. +28 −0 C19-CoreData/03-Editable List/HelloWorld-Info.plist
  127. +246 −0 C19-CoreData/03-Editable List/HelloWorld.xcodeproj/project.pbxproj
  128. +8 −0 C19-CoreData/03-Editable List/HelloWorld_Prefix.pch
  129. +15 −0 C19-CoreData/03-Editable List/ModalAlert.h
  130. +181 −0 C19-CoreData/03-Editable List/ModalAlert.m
  131. +22 −0 C19-CoreData/03-Editable List/ToDoItem.h
  132. +17 −0 C19-CoreData/03-Editable List/ToDoItem.m
  133. BIN  C19-CoreData/03-Editable List/ToDoItems.xcdatamodel/elements
  134. BIN  C19-CoreData/03-Editable List/ToDoItems.xcdatamodel/layout
  135. BIN  C19-CoreData/03-Editable List/cover320x416.png
  136. BIN  C19-CoreData/03-Editable List/icon.png
  137. +227 −0 C19-CoreData/03-Editable List/main.m
  138. BIN  C19-CoreData/04-Undo Support/Default.png
  139. +28 −0 C19-CoreData/04-Undo Support/HelloWorld-Info.plist
  140. +246 −0 C19-CoreData/04-Undo Support/HelloWorld.xcodeproj/project.pbxproj
  141. +8 −0 C19-CoreData/04-Undo Support/HelloWorld_Prefix.pch
  142. +15 −0 C19-CoreData/04-Undo Support/ModalAlert.h
  143. +181 −0 C19-CoreData/04-Undo Support/ModalAlert.m
  144. +22 −0 C19-CoreData/04-Undo Support/ToDoItem.h
  145. +17 −0 C19-CoreData/04-Undo Support/ToDoItem.m
  146. BIN  C19-CoreData/04-Undo Support/ToDoItems.xcdatamodel/elements
  147. BIN  C19-CoreData/04-Undo Support/ToDoItems.xcdatamodel/layout
  148. BIN  C19-CoreData/04-Undo Support/cover320x416.png
  149. BIN  C19-CoreData/04-Undo Support/icon.png
  150. +258 −0 C19-CoreData/04-Undo Support/main.m
View
3  C11-Tables/15-Sorting Tables/main.m
@@ -70,8 +70,7 @@ - (UITableViewCell *)tableView:(UITableView *)tView cellForRowAtIndexPath:(NSInd
{
UITableViewCellStyle style = UITableViewCellStyleDefault;
UITableViewCell *cell = [tView dequeueReusableCellWithIdentifier:@"BaseCell"];
- if (!cell)
- cell = [[[UITableViewCell alloc] initWithStyle:style reuseIdentifier:@"BaseCell"] autorelease];
+ if (!cell) cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"BaseCell"] autorelease];
NSString *crayon = [items objectAtIndex:indexPath.row];
cell.textLabel.text = CRAYON_NAME(crayon);
if (![CRAYON_NAME(crayon) hasPrefix:@"White"])
View
6 C11-Tables/17-Adding Headers and an Index/main.m
@@ -121,7 +121,11 @@ - (NSArray *)sectionIndexTitlesForTableView:(UITableView *)aTableView
- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index
{
- if (title == UITableViewIndexSearch) return 0;
+ if (title == UITableViewIndexSearch)
+ {
+ [self.tableView scrollRectToVisible:self.searchBar.frame animated:NO];
+ return -1;
+ }
return [ALPHA rangeOfString:title].location;
}
View
BIN  C15-Media/13-Clear BGColor/Default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
239 C15-Media/13-Clear BGColor/HelloWorld.xcodeproj/project.pbxproj
@@ -0,0 +1,239 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 45;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1D3623EC0D0F72F000981E51 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */; };
+ 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
+ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
+ 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
+ 8E3A1F090FAA199F009B0518 /* cover320x416.png in Resources */ = {isa = PBXBuildFile; fileRef = 8E3A1F080FAA199F009B0518 /* cover320x416.png */; };
+ 8E4156E90FA4EE0E0006D27C /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 8E4156E70FA4EE0E0006D27C /* Default.png */; };
+ 8E4156EA0FA4EE0E0006D27C /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 8E4156E80FA4EE0E0006D27C /* icon.png */; };
+ 8E785FCB0FCDB853006EA81F /* TestBedViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8E785FCA0FCDB853006EA81F /* TestBedViewController.xib */; };
+ 8ED756FD102BADEF00AF9B7A /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8ED756FC102BADEF00AF9B7A /* MediaPlayer.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 1D6058910D05DD3D006BFB54 /* HelloWorld.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloWorld.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 32CA4F630368D1EE00C91783 /* HelloWorld_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HelloWorld_Prefix.pch; sourceTree = "<group>"; };
+ 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ 8E3A1F080FAA199F009B0518 /* cover320x416.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cover320x416.png; sourceTree = "<group>"; };
+ 8E4156E70FA4EE0E0006D27C /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
+ 8E4156E80FA4EE0E0006D27C /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon.png; sourceTree = "<group>"; };
+ 8E785FCA0FCDB853006EA81F /* TestBedViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TestBedViewController.xib; sourceTree = "<group>"; };
+ 8ED756FC102BADEF00AF9B7A /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 1D60588F0D05DD3D006BFB54 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
+ 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
+ 1D3623EC0D0F72F000981E51 /* CoreGraphics.framework in Frameworks */,
+ 8ED756FD102BADEF00AF9B7A /* MediaPlayer.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 19C28FACFE9D520D11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 1D6058910D05DD3D006BFB54 /* HelloWorld.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
+ isa = PBXGroup;
+ children = (
+ 29B97316FDCFA39411CA2CEA /* main.m */,
+ 8E785FCA0FCDB853006EA81F /* TestBedViewController.xib */,
+ 8EB688610FA64AD100489E4B /* Support */,
+ 29B97323FDCFA39411CA2CEA /* Frameworks */,
+ 19C28FACFE9D520D11CA2CBB /* Products */,
+ );
+ name = CustomTemplate;
+ sourceTree = "<group>";
+ };
+ 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 8ED756FC102BADEF00AF9B7A /* MediaPlayer.framework */,
+ 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */,
+ 1D30AB110D05D00D00671497 /* Foundation.framework */,
+ 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 8EB688610FA64AD100489E4B /* Support */ = {
+ isa = PBXGroup;
+ children = (
+ 8E3A1F080FAA199F009B0518 /* cover320x416.png */,
+ 32CA4F630368D1EE00C91783 /* HelloWorld_Prefix.pch */,
+ 8D1107310486CEB800E47090 /* Info.plist */,
+ 8E4156E80FA4EE0E0006D27C /* icon.png */,
+ 8E4156E70FA4EE0E0006D27C /* Default.png */,
+ );
+ name = Support;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 1D6058900D05DD3D006BFB54 /* HelloWorld */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "HelloWorld" */;
+ buildPhases = (
+ 1D60588D0D05DD3D006BFB54 /* Resources */,
+ 1D60588E0D05DD3D006BFB54 /* Sources */,
+ 1D60588F0D05DD3D006BFB54 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = HelloWorld;
+ productName = HelloWorld;
+ productReference = 1D6058910D05DD3D006BFB54 /* HelloWorld.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 29B97313FDCFA39411CA2CEA /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HelloWorld" */;
+ compatibilityVersion = "Xcode 3.1";
+ hasScannedForEncodings = 1;
+ mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 1D6058900D05DD3D006BFB54 /* HelloWorld */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 1D60588D0D05DD3D006BFB54 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8E4156E90FA4EE0E0006D27C /* Default.png in Resources */,
+ 8E4156EA0FA4EE0E0006D27C /* icon.png in Resources */,
+ 8E3A1F090FAA199F009B0518 /* cover320x416.png in Resources */,
+ 8E785FCB0FCDB853006EA81F /* TestBedViewController.xib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 1D60588E0D05DD3D006BFB54 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 1D60589B0D05DD56006BFB54 /* main.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ 1D6058940D05DD3E006BFB54 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Erica Sadun";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = HelloWorld_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ PREBINDING = NO;
+ PRODUCT_NAME = HelloWorld;
+ };
+ name = Debug;
+ };
+ 1D6058950D05DD3E006BFB54 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = HelloWorld_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ PREBINDING = NO;
+ PRODUCT_NAME = HelloWorld;
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+ C01FCF4F08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CODE_SIGN_IDENTITY = "Erica Sadun";
+ "CODE_SIGN_IDENTITY[sdk=iphonesimulator*]" = "iPhone Developer";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ PREBINDING = NO;
+ PRODUCT_NAME = "Oh Hello";
+ SDKROOT = iphoneos2.0;
+ };
+ name = Debug;
+ };
+ C01FCF5008A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ PREBINDING = NO;
+ SDKROOT = iphoneos2.0;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "HelloWorld" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1D6058940D05DD3E006BFB54 /* Debug */,
+ 1D6058950D05DD3E006BFB54 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HelloWorld" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4F08A954540054247B /* Debug */,
+ C01FCF5008A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
View
8 C15-Media/13-Clear BGColor/HelloWorld_Prefix.pch
@@ -0,0 +1,8 @@
+//
+// Prefix header for all source files of the 'HelloWorld' target in the 'HelloWorld' project
+//
+
+#ifdef __OBJC__
+ #import <Foundation/Foundation.h>
+ #import <UIKit/UIKit.h>
+#endif
View
26 C15-Media/13-Clear BGColor/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>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.sadun.${EXECUTABLE_NAME}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+</dict>
+</plist>
View
180 C15-Media/13-Clear BGColor/TestBedViewController.xib
@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.03">
+ <data>
+ <int key="IBDocument.SystemTarget">768</int>
+ <string key="IBDocument.SystemVersion">9J61</string>
+ <string key="IBDocument.InterfaceBuilderVersion">677</string>
+ <string key="IBDocument.AppKitVersion">949.46</string>
+ <string key="IBDocument.HIToolboxVersion">353.00</string>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="32"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="372490531">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ </object>
+ <object class="IBProxyObject" id="843779117">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ </object>
+ <object class="IBUIView" id="440620744">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">292</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBUIImageView" id="1064941195">
+ <reference key="NSNextResponder" ref="440620744"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrameSize">{320, 416}</string>
+ <reference key="NSSuperview" ref="440620744"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">4</int>
+ <bool key="IBUIMultipleTouchEnabled">YES</bool>
+ <object class="NSCustomResource" key="IBUIImage">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">cover320x416.png</string>
+ </object>
+ </object>
+ </object>
+ <string key="NSFrameSize">{320, 416}</string>
+ <reference key="NSSuperview"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <object class="IBUISimulatedNavigationBarMetrics" key="IBUISimulatedTopBarMetrics">
+ <bool key="IBUIPrompted">NO</bool>
+ </object>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="440620744"/>
+ </object>
+ <int key="connectionID">33</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <object class="NSArray" key="object" id="884947135">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="372490531"/>
+ <reference key="parent" ref="884947135"/>
+ <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="843779117"/>
+ <reference key="parent" ref="884947135"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">32</int>
+ <reference key="object" ref="440620744"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1064941195"/>
+ </object>
+ <reference key="parent" ref="884947135"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">34</int>
+ <reference key="object" ref="1064941195"/>
+ <reference key="parent" ref="440620744"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-2.CustomClassName</string>
+ <string>32.IBEditorWindowLastContentRect</string>
+ <string>32.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>TestBedViewController</string>
+ <string>UIResponder</string>
+ <string>{{21, 492}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">34</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">TestBedViewController</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">view</string>
+ <string key="NS.object.0">UIView</string>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.LastKnownRelativeProjectPath">HelloWorld.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">3.1</string>
+ </data>
+</archive>
View
BIN  C15-Media/13-Clear BGColor/cover320x416.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  C15-Media/13-Clear BGColor/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
73 C15-Media/13-Clear BGColor/main.m
@@ -0,0 +1,73 @@
+/*
+ Erica Sadun, http://ericasadun.com
+ iPhone Developer's Cookbook, 3.0 Edition
+ BSD License, Use at your own risk
+ */
+
+#import <UIKit/UIKit.h>
+#import <MediaPlayer/MediaPlayer.h>
+
+#define COOKBOOK_PURPLE_COLOR [UIColor colorWithRed:0.20392f green:0.19607f blue:0.61176f alpha:1.0f]
+#define BARBUTTON(TITLE, SELECTOR) [[[UIBarButtonItem alloc] initWithTitle:TITLE style:UIBarButtonItemStylePlain target:self action:SELECTOR] autorelease]
+
+// Offsite resource Betty Boop Cinderella @Archive.org
+#define PATHSTRING @"http://www.archive.org/download/bb_poor_cinderella/bb_poor_cinderella_512kb.mp4"
+
+@interface TestBedViewController : UIViewController
+@end
+
+@implementation TestBedViewController
+-(void)myMovieFinishedCallback:(NSNotification*)aNotification
+{
+ MPMoviePlayerController* theMovie=[aNotification object];
+ [[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerPlaybackDidFinishNotification object:theMovie];
+ [theMovie release];
+ self.navigationItem.rightBarButtonItem = BARBUTTON(@"Play", @selector(play:));
+ self.title = nil;
+}
+
+- (void) preloadDidFinishCallback: (NSNotification *) aNotification
+{
+ MPMoviePlayerController* theMovie=[aNotification object];
+ [[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerContentPreloadDidFinishNotification object:theMovie];
+ theMovie.backgroundColor = [UIColor blackColor];
+}
+
+- (void) play: (UIBarButtonItem *) bbi
+{
+ self.navigationItem.rightBarButtonItem = nil;
+ self.title = @"Contacting Server";
+ MPMoviePlayerController* theMovie=[[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:PATHSTRING]];
+ theMovie.scalingMode = MPMovieScalingModeAspectFill;
+ theMovie.backgroundColor = [UIColor clearColor];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myMovieFinishedCallback:) name:MPMoviePlayerPlaybackDidFinishNotification object:theMovie];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(preloadDidFinishCallback:) name:MPMoviePlayerContentPreloadDidFinishNotification object:theMovie];
+ [theMovie play];
+}
+
+- (void) viewDidLoad
+{
+ self.navigationController.navigationBar.tintColor = COOKBOOK_PURPLE_COLOR;
+ self.navigationItem.rightBarButtonItem = BARBUTTON(@"Play", @selector(play:));
+}
+@end
+
+@interface TestBedAppDelegate : NSObject <UIApplicationDelegate>
+@end
+
+@implementation TestBedAppDelegate
+- (void)applicationDidFinishLaunching:(UIApplication *)application {
+ UIWindow *window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+ UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:[[TestBedViewController alloc] init]];
+ [window addSubview:nav.view];
+ [window makeKeyAndVisible];
+}
+@end
+
+int main(int argc, char *argv[])
+{
+ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+ int retVal = UIApplicationMain(argc, argv, nil, @"TestBedAppDelegate");
+ [pool release];
+ return retVal;
+}
View
101 C18-Address Book/09-Monsters/ABContact.h
@@ -0,0 +1,101 @@
+/*
+ Erica Sadun, http://ericasadun.com
+ iPhone Developer's Cookbook, 3.0 Edition
+ BSD License, Use at your own risk
+ */
+
+#import <UIKit/UIKit.h>
+#import <AddressBook/AddressBook.h>
+#import <AddressBookUI/AddressBookUI.h>
+
+@interface ABContact : NSObject
+{
+ ABRecordRef record;
+}
+
+// Convenience allocation methods
++ (id) contact;
++ (id) contactWithRecord: (ABRecordRef) record;
++ (id) contactWithRecordID: (ABRecordID) recordID;
+
+// Class utility methods
++ (NSString *) localizedPropertyName: (ABPropertyID) aProperty;
++ (ABPropertyType) propertyType: (ABPropertyID) aProperty;
++ (NSString *) propertyTypeString: (ABPropertyID) aProperty;
++ (NSString *) propertyString: (ABPropertyID) aProperty;
++ (BOOL) propertyIsMultivalue: (ABPropertyID) aProperty;
++ (NSArray *) arrayForProperty: (ABPropertyID) anID inRecord: (ABRecordRef) record;
++ (id) objectForProperty: (ABPropertyID) anID inRecord: (ABRecordRef) record;
+
+// Creating proper dictionaries
++ (NSDictionary *) dictionaryWithValue: (id) value andLabel: (CFStringRef) label;
++ (NSDictionary *) addressWithStreet: (NSString *) street withCity: (NSString *) city
+ withState:(NSString *) state withZip: (NSString *) zip
+ withCountry: (NSString *) country withCode: (NSString *) code;
++ (NSDictionary *) smsWithService: (CFStringRef) service andUser: (NSString *) userName;
+
+// Instance utility methods
+- (BOOL) removeSelfFromAddressBook: (NSError **) error;
+
+@property (nonatomic, readonly) ABRecordRef record;
+@property (nonatomic, readonly) ABRecordID recordID;
+@property (nonatomic, readonly) ABRecordType recordType;
+@property (nonatomic, readonly) BOOL isPerson;
+
+#pragma mark SINGLE VALUE STRING
+@property (nonatomic, assign) NSString *firstname;
+@property (nonatomic, assign) NSString *lastname;
+@property (nonatomic, assign) NSString *middlename;
+@property (nonatomic, assign) NSString *prefix;
+@property (nonatomic, assign) NSString *suffix;
+@property (nonatomic, assign) NSString *nickname;
+@property (nonatomic, assign) NSString *firstnamephonetic;
+@property (nonatomic, assign) NSString *lastnamephonetic;
+@property (nonatomic, assign) NSString *middlenamephonetic;
+@property (nonatomic, assign) NSString *organization;
+@property (nonatomic, assign) NSString *jobtitle;
+@property (nonatomic, assign) NSString *department;
+@property (nonatomic, assign) NSString *note;
+
+@property (nonatomic, readonly) NSString *contactName; // my friendly utility
+@property (nonatomic, readonly) NSString *compositeName; // via AB
+
+#pragma mark DATE
+@property (nonatomic, assign) NSDate *birthday;
+@property (nonatomic, readonly) NSDate *creationDate;
+@property (nonatomic, readonly) NSDate *modificationDate;
+
+#pragma mark MULTIVALUE
+// Each of these produces an array of NSStrings
+@property (nonatomic, readonly) NSArray *emailArray;
+@property (nonatomic, readonly) NSArray *emailLabels;
+@property (nonatomic, readonly) NSArray *phoneArray;
+@property (nonatomic, readonly) NSArray *phoneLabels;
+@property (nonatomic, readonly) NSArray *relatedNameArray;
+@property (nonatomic, readonly) NSArray *relatedNameLabels;
+@property (nonatomic, readonly) NSArray *urlArray;
+@property (nonatomic, readonly) NSArray *urlLabels;
+@property (nonatomic, readonly) NSArray *dateArray;
+@property (nonatomic, readonly) NSArray *dateLabels;
+@property (nonatomic, readonly) NSArray *addressArray;
+@property (nonatomic, readonly) NSArray *addressLabels;
+@property (nonatomic, readonly) NSArray *smsArray;
+@property (nonatomic, readonly) NSArray *smsLabels;
+
+@property (nonatomic, readonly) NSString *emailaddresses;
+@property (nonatomic, readonly) NSString *phonenumbers;
+@property (nonatomic, readonly) NSString *urls;
+
+// Each of these uses an array of dictionaries
+@property (nonatomic, assign) NSArray *emailDictionaries;
+@property (nonatomic, assign) NSArray *phoneDictionaries;
+@property (nonatomic, assign) NSArray *relatedNameDictionaries;
+@property (nonatomic, assign) NSArray *urlDictionaries;
+@property (nonatomic, assign) NSArray *dateDictionaries;
+@property (nonatomic, assign) NSArray *addressDictionaries;
+@property (nonatomic, assign) NSArray *smsDictionaries;
+
+#pragma mark IMAGES
+@property (nonatomic, assign) UIImage *image;
+
+@end
View
525 C18-Address Book/09-Monsters/ABContact.m
@@ -0,0 +1,525 @@
+/*
+ Erica Sadun, http://ericasadun.com
+ iPhone Developer's Cookbook, 3.0 Edition
+ BSD License, Use at your own risk
+ */
+
+#import "ABContact.h"
+#import "ABContactsHelper.h"
+
+@implementation ABContact
+@synthesize record;
+
+// Thanks to Quentarez, Ciaran
+- (id) initWithRecord: (ABRecordRef) aRecord
+{
+ if (self = [super init]) record = CFRetain(aRecord);
+ return self;
+}
+
++ (id) contactWithRecord: (ABRecordRef) person
+{
+ return [[[ABContact alloc] initWithRecord:person] autorelease];
+}
+
++ (id) contactWithRecordID: (ABRecordID) recordID
+{
+ ABAddressBookRef addressBook = ABAddressBookCreate();
+ ABRecordRef contactrec = ABAddressBookGetPersonWithRecordID(addressBook, recordID);
+ ABContact *contact = [self contactWithRecord:contactrec];
+ CFRelease(contactrec);
+ return contact;
+}
+
+// Thanks to Ciaran
++ (id) contact
+{
+ ABRecordRef person = ABPersonCreate();
+ id contact = [ABContact contactWithRecord:person];
+ CFRelease(person);
+ return contact;
+}
+
+- (void) dealloc
+{
+ if (record) CFRelease(record);
+ [super dealloc];
+}
+
+#pragma mark utilities
++ (NSString *) localizedPropertyName: (ABPropertyID) aProperty
+{
+ return [(NSString *)ABPersonCopyLocalizedPropertyName(aProperty) autorelease];
+}
+
++ (ABPropertyType) propertyType: (ABPropertyID) aProperty
+{
+ return ABPersonGetTypeOfProperty(aProperty);
+}
+
+// Thanks to Eridius for suggestions re switch
++ (NSString *) propertyTypeString: (ABPropertyID) aProperty
+{
+ switch (ABPersonGetTypeOfProperty(aProperty))
+ {
+ case kABInvalidPropertyType: return @"Invalid Property";
+ case kABStringPropertyType: return @"String";
+ case kABIntegerPropertyType: return @"Integer";
+ case kABRealPropertyType: return @"Float";
+ case kABDateTimePropertyType: return @"Date";
+ case kABDictionaryPropertyType: return @"Dictionary";
+ case kABMultiStringPropertyType: return @"Multi String";
+ case kABMultiIntegerPropertyType: return @"Multi Integer";
+ case kABMultiRealPropertyType: return @"Multi Float";
+ case kABMultiDateTimePropertyType: return @"Multi Date";
+ case kABMultiDictionaryPropertyType: return @"Multi Dictionary";
+ default: return @"Invalid Property";
+ }
+}
+
++ (NSString *) propertyString: (ABPropertyID) aProperty
+{
+ /* switch (aProperty) // Sorry, this won't compile
+ {
+ case kABPersonFirstNameProperty: return @"First Name";
+ case kABPersonLastNameProperty: return @"Last Name";
+ case kABPersonMiddleNameProperty: return @"Middle Name";
+ case kABPersonPrefixProperty: return @"Prefix";
+ case kABPersonSuffixProperty: return @"Suffix";
+ case kABPersonNicknameProperty: return @"Nickname";
+ case kABPersonFirstNamePhoneticProperty: return @"Phonetic First Name";
+ case kABPersonLastNamePhoneticProperty: return @"Phonetic Last Name";
+ case kABPersonMiddleNamePhoneticProperty: return @"Phonetic Middle Name";
+ case kABPersonOrganizationProperty: return @"Organization";
+ case kABPersonJobTitleProperty: return @"Job Title";
+ case kABPersonDepartmentProperty: return @"Department";
+ case kABPersonEmailProperty: return @"Email";
+ case kABPersonBirthdayProperty: return @"Birthday";
+ case kABPersonNoteProperty: return @"Note";
+ case kABPersonCreationDateProperty: return @"Creation Date";
+ case kABPersonModificationDateProperty: return @"Modification Date";
+ case kABPersonAddressProperty: return @"Address";
+ case kABPersonDateProperty: return @"Date";
+ case kABPersonKindProperty: return @"Kind";
+ case kABPersonPhoneProperty: return @"Phone";
+ case kABPersonInstantMessageProperty: return @"Instant Message";
+ case kABPersonURLProperty: return @"URL";
+ case kABPersonRelatedNamesProperty: return @"Related Name";
+ } */
+
+ if (aProperty == kABPersonFirstNameProperty) return @"First Name";
+ if (aProperty == kABPersonLastNameProperty) return @"Last Name";
+ if (aProperty == kABPersonMiddleNameProperty) return @"Middle Name";
+ if (aProperty == kABPersonPrefixProperty) return @"Prefix";
+ if (aProperty == kABPersonSuffixProperty) return @"Suffix";
+ if (aProperty == kABPersonNicknameProperty) return @"Nickname";
+ if (aProperty == kABPersonFirstNamePhoneticProperty) return @"Phonetic First Name";
+ if (aProperty == kABPersonLastNamePhoneticProperty) return @"Phonetic Last Name";
+ if (aProperty == kABPersonMiddleNamePhoneticProperty) return @"Phonetic Middle Name";
+ if (aProperty == kABPersonOrganizationProperty) return @"Organization";
+ if (aProperty == kABPersonJobTitleProperty) return @"Job Title";
+ if (aProperty == kABPersonDepartmentProperty) return @"Department";
+ if (aProperty == kABPersonEmailProperty) return @"Email";
+ if (aProperty == kABPersonBirthdayProperty) return @"Birthday";
+ if (aProperty == kABPersonNoteProperty) return @"Note";
+ if (aProperty == kABPersonCreationDateProperty) return @"Creation Date";
+ if (aProperty == kABPersonModificationDateProperty) return @"Modification Date";
+ if (aProperty == kABPersonAddressProperty) return @"Address";
+ if (aProperty == kABPersonDateProperty) return @"Date";
+ if (aProperty == kABPersonKindProperty) return @"Kind";
+ if (aProperty == kABPersonPhoneProperty) return @"Phone";
+ if (aProperty == kABPersonInstantMessageProperty) return @"Instant Message";
+ if (aProperty == kABPersonURLProperty) return @"URL";
+ if (aProperty == kABPersonRelatedNamesProperty) return @"Related Name";
+ return nil;
+}
+
++ (BOOL) propertyIsMultivalue: (ABPropertyID) aProperty;
+{
+ if (aProperty == kABPersonFirstNameProperty) return NO;
+ if (aProperty == kABPersonLastNameProperty) return NO;
+ if (aProperty == kABPersonMiddleNameProperty) return NO;
+ if (aProperty == kABPersonPrefixProperty) return NO;
+ if (aProperty == kABPersonSuffixProperty) return NO;
+ if (aProperty == kABPersonNicknameProperty) return NO;
+ if (aProperty == kABPersonFirstNamePhoneticProperty) return NO;
+ if (aProperty == kABPersonLastNamePhoneticProperty) return NO;
+ if (aProperty == kABPersonMiddleNamePhoneticProperty) return NO;
+ if (aProperty == kABPersonOrganizationProperty) return NO;
+ if (aProperty == kABPersonJobTitleProperty) return NO;
+ if (aProperty == kABPersonDepartmentProperty) return NO;
+ if (aProperty == kABPersonBirthdayProperty) return NO;
+ if (aProperty == kABPersonNoteProperty) return NO;
+ if (aProperty == kABPersonCreationDateProperty) return NO;
+ if (aProperty == kABPersonModificationDateProperty) return NO;
+
+ return YES;
+ /*
+ if (aProperty == kABPersonEmailProperty) return YES;
+ if (aProperty == kABPersonAddressProperty) return YES;
+ if (aProperty == kABPersonDateProperty) return YES;
+ if (aProperty == kABPersonPhoneProperty) return YES;
+ if (aProperty == kABPersonInstantMessageProperty) return YES;
+ if (aProperty == kABPersonURLProperty) return YES;
+ if (aProperty == kABPersonRelatedNamesProperty) return YES;
+ */
+}
+
++ (NSArray *) arrayForProperty: (ABPropertyID) anID inRecord: (ABRecordRef) record
+{
+ // Recover the property for a given record
+ CFTypeRef theProperty = ABRecordCopyValue(record, anID);
+ NSArray *items = (NSArray *)ABMultiValueCopyArrayOfAllValues(theProperty);
+ CFRelease(theProperty);
+ return [items autorelease];
+}
+
++ (id) objectForProperty: (ABPropertyID) anID inRecord: (ABRecordRef) record
+{
+ return [(id) ABRecordCopyValue(record, anID) autorelease];
+}
+
++ (NSDictionary *) dictionaryWithValue: (id) value andLabel: (CFStringRef) label
+{
+ NSMutableDictionary *dict = [NSMutableDictionary dictionary];
+ if (value) [dict setObject:value forKey:@"value"];
+ if (label) [dict setObject:(NSString *)label forKey:@"label"];
+ return dict;
+}
+
++ (NSDictionary *) addressWithStreet: (NSString *) street withCity: (NSString *) city
+ withState:(NSString *) state withZip: (NSString *) zip
+ withCountry: (NSString *) country withCode: (NSString *) code
+{
+ NSMutableDictionary *md = [NSMutableDictionary dictionary];
+ if (street) [md setObject:street forKey:(NSString *) kABPersonAddressStreetKey];
+ if (city) [md setObject:city forKey:(NSString *) kABPersonAddressCityKey];
+ if (state) [md setObject:state forKey:(NSString *) kABPersonAddressStateKey];
+ if (zip) [md setObject:zip forKey:(NSString *) kABPersonAddressZIPKey];
+ if (country) [md setObject:country forKey:(NSString *) kABPersonAddressCountryKey];
+ if (code) [md setObject:code forKey:(NSString *) kABPersonAddressCountryCodeKey];
+ return md;
+}
+
++ (NSDictionary *) smsWithService: (CFStringRef) service andUser: (NSString *) userName
+{
+ NSMutableDictionary *sms = [NSMutableDictionary dictionary];
+ if (service) [sms setObject:(NSString *) service forKey:(NSString *) kABPersonInstantMessageServiceKey];
+ if (userName) [sms setObject:userName forKey:(NSString *) kABPersonInstantMessageUsernameKey];
+ return sms;
+}
+
+// Thanks to Eridius for suggestions re: error
+- (BOOL) removeSelfFromAddressBook: (NSError **) error
+{
+ ABAddressBookRef addressBook = ABAddressBookCreate();
+ if (!ABAddressBookRemoveRecord(addressBook, self.record, (CFErrorRef *) error)) return NO;
+ return ABAddressBookSave(addressBook, (CFErrorRef *) error);
+}
+
+#pragma mark Record ID and Type
+- (ABRecordID) recordID {return ABRecordGetRecordID(record);}
+- (ABRecordType) recordType {return ABRecordGetRecordType(record);}
+- (BOOL) isPerson {return self.recordType == kABPersonType;}
+
+#pragma mark Getting Single Value Strings
+- (NSString *) getRecordString:(ABPropertyID) anID
+{
+ return [(NSString *) ABRecordCopyValue(record, anID) autorelease];
+}
+- (NSString *) firstname {return [self getRecordString:kABPersonFirstNameProperty];}
+- (NSString *) lastname {return [self getRecordString:kABPersonLastNameProperty];}
+- (NSString *) middlename {return [self getRecordString:kABPersonMiddleNameProperty];}
+- (NSString *) prefix {return [self getRecordString:kABPersonPrefixProperty];}
+- (NSString *) suffix {return [self getRecordString:kABPersonSuffixProperty];}
+- (NSString *) nickname {return [self getRecordString:kABPersonNicknameProperty];}
+- (NSString *) firstnamephonetic {return [self getRecordString:kABPersonFirstNamePhoneticProperty];}
+- (NSString *) lastnamephonetic {return [self getRecordString:kABPersonLastNamePhoneticProperty];}
+- (NSString *) middlenamephonetic {return [self getRecordString:kABPersonMiddleNamePhoneticProperty];}
+- (NSString *) organization {return [self getRecordString:kABPersonOrganizationProperty];}
+- (NSString *) jobtitle {return [self getRecordString:kABPersonJobTitleProperty];}
+- (NSString *) department {return [self getRecordString:kABPersonDepartmentProperty];}
+- (NSString *) note {return [self getRecordString:kABPersonNoteProperty];}
+
+#pragma mark Contact Name Utility
+- (NSString *) contactName
+{
+ NSMutableString *string = [NSMutableString string];
+
+ if (self.firstname || self.lastname)
+ {
+ if (self.prefix) [string appendFormat:@"%@ ", self.prefix];
+ if (self.firstname) [string appendFormat:@"%@ ", self.firstname];
+ if (self.nickname) [string appendFormat:@"\"%@\" ", self.nickname];
+ if (self.lastname) [string appendFormat:@"%@", self.lastname];
+
+ if (self.suffix && string.length)
+ [string appendFormat:@", %@ ", self.suffix];
+ else
+ [string appendFormat:@" "];
+ }
+
+ if (self.organization) [string appendString:self.organization];
+ return [string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
+}
+
+- (NSString *) compositeName
+{
+ NSString *string = (NSString *)ABRecordCopyCompositeName(record);
+ return [string autorelease];
+}
+
+#pragma mark Dates
+- (NSDate *) getRecordDate:(ABPropertyID) anID
+{
+ return [(NSDate *) ABRecordCopyValue(record, anID) autorelease];
+}
+
+- (NSDate *) birthday {return [self getRecordDate:kABPersonBirthdayProperty];}
+- (NSDate *) creationDate {return [self getRecordDate:kABPersonCreationDateProperty];}
+- (NSDate *) modificationDate {return [self getRecordDate:kABPersonModificationDateProperty];}
+
+#pragma mark Getting MultiValue Elements
+- (NSArray *) arrayForProperty: (ABPropertyID) anID
+{
+ CFTypeRef theProperty = ABRecordCopyValue(record, anID);
+ NSArray *items = (NSArray *)ABMultiValueCopyArrayOfAllValues(theProperty);
+ CFRelease(theProperty);
+ return [items autorelease];
+}
+
+- (NSArray *) labelsForProperty: (ABPropertyID) anID
+{
+ CFTypeRef theProperty = ABRecordCopyValue(record, anID);
+ NSMutableArray *labels = [NSMutableArray array];
+ for (int i = 0; i < ABMultiValueGetCount(theProperty); i++)
+ {
+ NSString *label = (NSString *)ABMultiValueCopyLabelAtIndex(theProperty, i);
+ [labels addObject:label];
+ [label release];
+ }
+ CFRelease(theProperty);
+ return labels;
+}
+
+- (NSArray *) emailArray {return [self arrayForProperty:kABPersonEmailProperty];}
+- (NSArray *) emailLabels {return [self labelsForProperty:kABPersonEmailProperty];}
+- (NSArray *) phoneArray {return [self arrayForProperty:kABPersonPhoneProperty];}
+- (NSArray *) phoneLabels {return [self labelsForProperty:kABPersonPhoneProperty];}
+- (NSArray *) relatedNameArray {return [self arrayForProperty:kABPersonRelatedNamesProperty];}
+- (NSArray *) relatedNameLabels {return [self labelsForProperty:kABPersonRelatedNamesProperty];}
+- (NSArray *) urlArray {return [self arrayForProperty:kABPersonURLProperty];}
+- (NSArray *) urlLabels {return [self labelsForProperty:kABPersonURLProperty];}
+- (NSArray *) dateArray {return [self arrayForProperty:kABPersonDateProperty];}
+- (NSArray *) dateLabels {return [self labelsForProperty:kABPersonDateProperty];}
+- (NSArray *) addressArray {return [self arrayForProperty:kABPersonAddressProperty];}
+- (NSArray *) addressLabels {return [self labelsForProperty:kABPersonAddressProperty];}
+- (NSArray *) smsArray {return [self arrayForProperty:kABPersonInstantMessageProperty];}
+- (NSArray *) smsLabels {return [self labelsForProperty:kABPersonInstantMessageProperty];}
+
+- (NSString *) phonenumbers {return [self.phoneArray componentsJoinedByString:@" "];}
+- (NSString *) emailaddresses {return [self.emailArray componentsJoinedByString:@" "];}
+- (NSString *) urls {return [self.urlArray componentsJoinedByString:@" "];}
+
+- (NSArray *) dictionaryArrayForProperty: (ABPropertyID) aProperty
+{
+ NSArray *valueArray = [self arrayForProperty:aProperty];
+ NSArray *labelArray = [self labelsForProperty:aProperty];
+
+ int num = MIN(valueArray.count, labelArray.count);
+ NSMutableArray *items = [NSMutableArray array];
+ for (int i = 0; i < num; i++)
+ {
+ NSMutableDictionary *md = [NSMutableDictionary dictionary];
+ [md setObject:[valueArray objectAtIndex:i] forKey:@"value"];
+ [md setObject:[labelArray objectAtIndex:i] forKey:@"label"];
+ [items addObject:md];
+ }
+ return items;
+}
+
+- (NSArray *) emailDictionaries
+{
+ return [self dictionaryArrayForProperty:kABPersonEmailProperty];
+}
+
+- (NSArray *) phoneDictionaries
+{
+ return [self dictionaryArrayForProperty:kABPersonPhoneProperty];
+}
+
+- (NSArray *) relatedNameDictionaries
+{
+ return [self dictionaryArrayForProperty:kABPersonRelatedNamesProperty];
+}
+
+- (NSArray *) urlDictionaries
+{
+ return [self dictionaryArrayForProperty:kABPersonURLProperty];
+}
+
+- (NSArray *) dateDictionaries
+{
+ return [self dictionaryArrayForProperty:kABPersonDateProperty];
+}
+
+- (NSArray *) addressDictionaries
+{
+ return [self dictionaryArrayForProperty:kABPersonAddressProperty];
+}
+
+- (NSArray *) smsDictionaries
+{
+ return [self dictionaryArrayForProperty:kABPersonInstantMessageProperty];
+}
+
+#pragma mark Setting Strings
+- (BOOL) setString: (NSString *) aString forProperty:(ABPropertyID) anID
+{
+ CFErrorRef error;
+ BOOL success = ABRecordSetValue(record, anID, (CFStringRef) aString, &error);
+ if (!success) NSLog(@"Error: %@", [(NSError *)error localizedDescription]);
+ return success;
+}
+
+- (void) setFirstname: (NSString *) aString {[self setString: aString forProperty: kABPersonFirstNameProperty];}
+- (void) setLastname: (NSString *) aString {[self setString: aString forProperty: kABPersonLastNameProperty];}
+- (void) setMiddlename: (NSString *) aString {[self setString: aString forProperty: kABPersonMiddleNameProperty];}
+- (void) setPrefix: (NSString *) aString {[self setString: aString forProperty: kABPersonPrefixProperty];}
+- (void) setSuffix: (NSString *) aString {[self setString: aString forProperty: kABPersonSuffixProperty];}
+- (void) setNickname: (NSString *) aString {[self setString: aString forProperty: kABPersonNicknameProperty];}
+- (void) setFirstnamephonetic: (NSString *) aString {[self setString: aString forProperty: kABPersonFirstNamePhoneticProperty];}
+- (void) setLastnamephonetic: (NSString *) aString {[self setString: aString forProperty: kABPersonLastNamePhoneticProperty];}
+- (void) setMiddlenamephonetic: (NSString *) aString {[self setString: aString forProperty: kABPersonMiddleNamePhoneticProperty];}
+- (void) setOrganization: (NSString *) aString {[self setString: aString forProperty: kABPersonOrganizationProperty];}
+- (void) setJobtitle: (NSString *) aString {[self setString: aString forProperty: kABPersonJobTitleProperty];}
+- (void) setDepartment: (NSString *) aString {[self setString: aString forProperty: kABPersonDepartmentProperty];}
+- (void) setNote: (NSString *) aString {[self setString: aString forProperty: kABPersonNoteProperty];}
+
+#pragma mark Setting Dates
+
+- (BOOL) setDate: (NSDate *) aDate forProperty:(ABPropertyID) anID
+{
+ CFErrorRef error;
+ BOOL success = ABRecordSetValue(record, anID, (CFDateRef) aDate, &error);
+ if (!success) NSLog(@"Error: %@", [(NSError *)error localizedDescription]);
+ return success;
+}
+
+- (void) setBirthday: (NSDate *) aDate {[self setDate: aDate forProperty: kABPersonBirthdayProperty];}
+
+#pragma mark Setting MultiValue
+
+- (BOOL) setMulti: (ABMutableMultiValueRef) multi forProperty: (ABPropertyID) anID
+{
+ CFErrorRef error;
+ BOOL success = ABRecordSetValue(record, anID, multi, &error);
+ if (!success) NSLog(@"Error: %@", [(NSError *)error localizedDescription]);
+ return success;
+}
+
+- (ABMutableMultiValueRef) createMultiValueFromArray: (NSArray *) anArray withType: (ABPropertyType) aType
+{
+ ABMutableMultiValueRef multi = ABMultiValueCreateMutable(aType);
+ for (NSDictionary *dict in anArray)
+ ABMultiValueAddValueAndLabel(multi, (CFTypeRef) [dict objectForKey:@"value"], (CFTypeRef) [dict objectForKey:@"label"], NULL);
+ return multi;
+}
+
+- (void) setEmailDictionaries: (NSArray *) dictionaries
+{
+ // kABWorkLabel, kABHomeLabel, kABOtherLabel
+ ABMutableMultiValueRef multi = [self createMultiValueFromArray:dictionaries withType:kABMultiStringPropertyType];
+ [self setMulti:multi forProperty:kABPersonEmailProperty];
+ CFRelease(multi);
+}
+
+- (void) setPhoneDictionaries: (NSArray *) dictionaries
+{
+ // kABWorkLabel, kABHomeLabel, kABOtherLabel
+ // kABPersonPhoneMobileLabel, kABPersonPhoneIPhoneLabel, kABPersonPhoneMainLabel
+ // kABPersonPhoneHomeFAXLabel, kABPersonPhoneWorkFAXLabel, kABPersonPhonePagerLabel
+ ABMutableMultiValueRef multi = [self createMultiValueFromArray:dictionaries withType:kABMultiStringPropertyType];
+ [self setMulti:multi forProperty:kABPersonPhoneProperty];
+ CFRelease(multi);
+}
+
+- (void) setUrlDictionaries: (NSArray *) dictionaries
+{
+ // kABWorkLabel, kABHomeLabel, kABOtherLabel
+ // kABPersonHomePageLabel
+ ABMutableMultiValueRef multi = [self createMultiValueFromArray:dictionaries withType:kABMultiStringPropertyType];
+ [self setMulti:multi forProperty:kABPersonURLProperty];
+ CFRelease(multi);
+}
+
+// Not used/shown on iPhone
+- (void) setRelatedNameDictionaries: (NSArray *) dictionaries
+{
+ // kABWorkLabel, kABHomeLabel, kABOtherLabel
+ // kABPersonMotherLabel, kABPersonFatherLabel, kABPersonParentLabel,
+ // kABPersonSisterLabel, kABPersonBrotherLabel, kABPersonChildLabel,
+ // kABPersonFriendLabel, kABPersonSpouseLabel, kABPersonPartnerLabel,
+ // kABPersonManagerLabel, kABPersonAssistantLabel
+ ABMutableMultiValueRef multi = [self createMultiValueFromArray:dictionaries withType:kABMultiStringPropertyType];
+ [self setMulti:multi forProperty:kABPersonRelatedNamesProperty];
+}
+
+- (void) setDateDictionaries: (NSArray *) dictionaries
+{
+ // kABWorkLabel, kABHomeLabel, kABOtherLabel
+ // kABPersonAnniversaryLabel
+ ABMutableMultiValueRef multi = [self createMultiValueFromArray:dictionaries withType:kABMultiDateTimePropertyType];
+ [self setMulti:multi forProperty:kABPersonDateProperty];
+ CFRelease(multi);
+}
+
+- (void) setAddressDictionaries: (NSArray *) dictionaries
+{
+ // kABPersonAddressStreetKey, kABPersonAddressCityKey, kABPersonAddressStateKey
+ // kABPersonAddressZIPKey, kABPersonAddressCountryKey, kABPersonAddressCountryCodeKey
+ ABMutableMultiValueRef multi = [self createMultiValueFromArray:dictionaries withType:kABMultiDictionaryPropertyType];
+ [self setMulti:multi forProperty:kABPersonAddressProperty];
+ CFRelease(multi);
+}
+
+- (void) setSmsDictionaries: (NSArray *) dictionaries
+{
+ // kABWorkLabel, kABHomeLabel, kABOtherLabel,
+ // kABPersonInstantMessageServiceKey, kABPersonInstantMessageUsernameKey
+ // kABPersonInstantMessageServiceYahoo, kABPersonInstantMessageServiceJabber
+ // kABPersonInstantMessageServiceMSN, kABPersonInstantMessageServiceICQ
+ // kABPersonInstantMessageServiceAIM,
+ ABMutableMultiValueRef multi = [self createMultiValueFromArray:dictionaries withType:kABMultiDictionaryPropertyType];
+ [self setMulti:multi forProperty:kABPersonInstantMessageProperty];
+ CFRelease(multi);
+}
+
+#pragma mark Images
+- (UIImage *) image
+{
+ if (!ABPersonHasImageData(record)) return nil;
+ CFDataRef imageData = ABPersonCopyImageData(record);
+ UIImage *image = [UIImage imageWithData:(NSData *) imageData];
+ CFRelease(imageData);
+ return image;
+}
+
+- (void) setImage: (UIImage *) image
+{
+ CFErrorRef error;
+ BOOL success;
+
+ if (image == nil) // remove
+ {
+ if (!ABPersonHasImageData(record)) return; // no image to remove
+ success = ABPersonRemoveImageData(record, &error);
+ if (!success) NSLog(@"Error: %@", [(NSError *)error localizedDescription]);
+ return;
+ }
+
+ NSData *data = UIImagePNGRepresentation(image);
+ success = ABPersonSetImageData(record, (CFDataRef) data, &error);
+ if (!success) NSLog(@"Error: %@", [(NSError *)error localizedDescription]);
+}
+@end
View
47 C18-Address Book/09-Monsters/ABContactsHelper.h
@@ -0,0 +1,47 @@
+/*
+ Erica Sadun, http://ericasadun.com
+ iPhone Developer's Cookbook, 3.0 Edition
+ BSD License, Use at your own risk
+ */
+
+#import <UIKit/UIKit.h>
+#import <AddressBook/AddressBook.h>
+#import <AddressBookUI/AddressBookUI.h>
+#import "ABContact.h"
+#import "ABGroup.h"
+
+@interface ABContactsHelper : NSObject
+
+// Address Book
++ (ABAddressBookRef) addressBook;
+
+// Address Book Contacts and Groups
++ (NSArray *) contacts; // people
++ (NSArray *) groups; // groups
+
+// Counting
++ (int) contactsCount;
++ (int) contactsWithImageCount;
++ (int) contactsWithoutImageCount;
++ (int) numberOfGroups;
+
+// Sorting
++ (BOOL) firstNameSorting;
+
+// Add contacts and groups
++ (BOOL) addContact: (ABContact *) aContact withError: (NSError **) error;
++ (BOOL) addGroup: (ABGroup *) aGroup withError: (NSError **) error;
+
+// Find contacts
++ (NSArray *) contactsMatchingName: (NSString *) fname;
++ (NSArray *) contactsMatchingName: (NSString *) fname andName: (NSString *) lname;
++ (NSArray *) contactsMatchingPhone: (NSString *) number;
+
+// Find groups
++ (NSArray *) groupsMatchingName: (NSString *) fname;
+@end
+
+// For the simple utility of it. Feel free to comment out if desired
+@interface NSString (cstring)
+@property (readonly) char *UTF8String;
+@end
View
133 C18-Address Book/09-Monsters/ABContactsHelper.m
@@ -0,0 +1,133 @@
+/*
+ Erica Sadun, http://ericasadun.com
+ iPhone Developer's Cookbook, 3.0 Edition
+ BSD License, Use at your own risk
+ */
+
+#import "ABContactsHelper.h"
+
+@implementation ABContactsHelper
+/*
+ Note: You cannot CFRelease the addressbook after ABAddressBookCreate();
+ */
++ (ABAddressBookRef) addressBook
+{
+ return ABAddressBookCreate();
+}
+
++ (NSArray *) contacts
+{
+ ABAddressBookRef addressBook = ABAddressBookCreate();
+ NSArray *thePeople = (NSArray *)ABAddressBookCopyArrayOfAllPeople(addressBook);
+ NSMutableArray *array = [NSMutableArray arrayWithCapacity:thePeople.count];
+ for (id person in thePeople)
+ [array addObject:[ABContact contactWithRecord:(ABRecordRef)person]];
+ [thePeople release];
+ return array;
+}
+
++ (int) contactsCount
+{
+ ABAddressBookRef addressBook = ABAddressBookCreate();
+ return ABAddressBookGetPersonCount(addressBook);
+}
+
++ (int) contactsWithImageCount
+{
+ ABAddressBookRef addressBook = ABAddressBookCreate();
+ NSArray *peopleArray = (NSArray *)ABAddressBookCopyArrayOfAllPeople(addressBook);
+ int ncount = 0;
+ for (id person in peopleArray) if (ABPersonHasImageData(person)) ncount++;
+ [peopleArray release];
+ return ncount;
+}
+
++ (int) contactsWithoutImageCount
+{
+ ABAddressBookRef addressBook = ABAddressBookCreate();
+ NSArray *peopleArray = (NSArray *)ABAddressBookCopyArrayOfAllPeople(addressBook);
+ int ncount = 0;
+ for (id person in peopleArray) if (!ABPersonHasImageData(person)) ncount++;
+ [peopleArray release];
+ return ncount;
+}
+
+// Groups
++ (int) numberOfGroups
+{
+ ABAddressBookRef addressBook = ABAddressBookCreate();
+ NSArray *groups = (NSArray *)ABAddressBookCopyArrayOfAllGroups(addressBook);
+ int ncount = groups.count;
+ [groups release];
+ return ncount;
+}
+
++ (NSArray *) groups
+{
+ ABAddressBookRef addressBook = ABAddressBookCreate();
+ NSArray *groups = (NSArray *)ABAddressBookCopyArrayOfAllGroups(addressBook);
+ NSMutableArray *array = [NSMutableArray arrayWithCapacity:groups.count];
+ for (id group in groups)
+ [array addObject:[ABGroup groupWithRecord:(ABRecordRef)group]];
+ [groups release];
+ return array;
+}
+
+// Sorting
++ (BOOL) firstNameSorting
+{
+ return (ABPersonGetCompositeNameFormat() == kABPersonCompositeNameFormatFirstNameFirst);
+}
+
+#pragma mark Contact Management
+
+// Thanks to Eridius for suggestions re: error
++ (BOOL) addContact: (ABContact *) aContact withError: (NSError **) error
+{
+ ABAddressBookRef addressBook = ABAddressBookCreate();
+ if (!ABAddressBookAddRecord(addressBook, aContact.record, (CFErrorRef *) error)) return NO;
+ return ABAddressBookSave(addressBook, (CFErrorRef *) error);
+}
+
++ (BOOL) addGroup: (ABGroup *) aGroup withError: (NSError **) error
+{
+ ABAddressBookRef addressBook = ABAddressBookCreate();
+ if (!ABAddressBookAddRecord(addressBook, aGroup.record, (CFErrorRef *) error)) return NO;
+ return ABAddressBookSave(addressBook, (CFErrorRef *) error);
+}
+
++ (NSArray *) contactsMatchingName: (NSString *) fname
+{
+ NSPredicate *pred;
+ NSArray *contacts = [ABContactsHelper contacts];
+ pred = [NSPredicate predicateWithFormat:@"firstname contains[cd] %@ OR lastname contains[cd] %@ OR nickname contains[cd] %@ OR middlename contains[cd] %@", fname, fname, fname, fname];
+ return [contacts filteredArrayUsingPredicate:pred];
+}
+
++ (NSArray *) contactsMatchingName: (NSString *) fname andName: (NSString *) lname
+{
+ NSPredicate *pred;
+ NSArray *contacts = [ABContactsHelper contacts];
+ pred = [NSPredicate predicateWithFormat:@"firstname contains[cd] %@ OR lastname contains[cd] %@ OR nickname contains[cd] %@ OR middlename contains[cd] %@", fname, fname, fname, fname];
+ contacts = [contacts filteredArrayUsingPredicate:pred];
+ pred = [NSPredicate predicateWithFormat:@"firstname contains[cd] %@ OR lastname contains[cd] %@ OR nickname contains[cd] %@ OR middlename contains[cd] %@", lname, lname, lname, lname];
+ contacts = [contacts filteredArrayUsingPredicate:pred];
+ return contacts;
+}
+
++ (NSArray *) contactsMatchingPhone: (NSString *) number
+{
+ NSPredicate *pred;
+ NSArray *contacts = [ABContactsHelper contacts];
+ pred = [NSPredicate predicateWithFormat:@"phonenumbers contains[cd] %@", number];
+ return [contacts filteredArrayUsingPredicate:pred];
+}
+
++ (NSArray *) groupsMatchingName: (NSString *) fname
+{
+ NSPredicate *pred;
+ NSArray *groups = [ABContactsHelper groups];
+ pred = [NSPredicate predicateWithFormat:@"name contains[cd] %@ ", fname];
+ return [groups filteredArrayUsingPredicate:pred];
+}
+@end
View
33 C18-Address Book/09-Monsters/ABGroup.h
@@ -0,0 +1,33 @@
+/*
+ Erica Sadun, http://ericasadun.com
+ iPhone Developer's Cookbook, 3.0 Edition
+ BSD License, Use at your own risk
+ */
+
+#import <AddressBook/AddressBook.h>
+#import <AddressBookUI/AddressBookUI.h>
+#import "ABContact.h"
+
+@interface ABGroup : NSObject
+{
+ ABRecordRef record;
+}
+
++ (id) group;
++ (id) groupWithRecord: (ABRecordRef) record;
++ (id) groupWithRecordID: (ABRecordID) recordID;
+- (BOOL) removeSelfFromAddressBook: (NSError **) error;
+
+@property (nonatomic, readonly) ABRecordRef record;
+@property (nonatomic, readonly) ABRecordID recordID;
+@property (nonatomic, readonly) ABRecordType recordType;
+@property (nonatomic, readonly) BOOL isPerson;
+
+- (NSArray *) membersWithSorting: (ABPersonSortOrdering) ordering;
+- (BOOL) addMember: (ABContact *) contact withError: (NSError **) error;
+- (BOOL) removeMember: (ABContact *) contact withError: (NSError **) error;
+
+@property (nonatomic, assign) NSString *name;
+@property (nonatomic, readonly) NSArray *members;
+
+@end
View
112 C18-Address Book/09-Monsters/ABGroup.m
@@ -0,0 +1,112 @@
+/*
+ Erica Sadun, http://ericasadun.com
+ iPhone Developer's Cookbook, 3.0 Edition
+ BSD License, Use at your own risk
+ */
+
+#import "ABGroup.h"
+#import "ABContactsHelper.h"
+
+@implementation ABGroup
+@synthesize record;
+
+// Thanks to Quentarez, Ciaran
+- (id) initWithRecord: (ABRecordRef) aRecord
+{
+ if (self = [super init]) record = CFRetain(aRecord);
+ return self;
+}
+
++ (id) groupWithRecord: (ABRecordRef) grouprec
+{
+ return [[[ABGroup alloc] initWithRecord:grouprec] autorelease];
+}
+
++ (id) groupWithRecordID: (ABRecordID) recordID
+{
+ ABAddressBookRef addressBook = ABAddressBookCreate();
+ ABRecordRef grouprec = ABAddressBookGetGroupWithRecordID(addressBook, recordID);
+ ABGroup *group = [self groupWithRecord:grouprec];
+ CFRelease(grouprec);
+ return group;
+}
+
+// Thanks to Ciaran
++ (id) group
+{
+ ABRecordRef grouprec = ABGroupCreate();
+ id group = [ABGroup groupWithRecord:grouprec];
+ CFRelease(grouprec);
+ return group;
+}
+
+- (void) dealloc
+{
+ if (record) CFRelease(record);
+ [super dealloc];
+}
+
+- (BOOL) removeSelfFromAddressBook: (NSError **) error
+{
+ ABAddressBookRef addressBook = ABAddressBookCreate();
+ if (!ABAddressBookRemoveRecord(addressBook, self.record, (CFErrorRef *) error)) return NO;
+ return ABAddressBookSave(addressBook, (CFErrorRef *) error);
+}
+
+#pragma mark Record ID and Type
+- (ABRecordID) recordID {return ABRecordGetRecordID(record);}
+- (ABRecordType) recordType {return ABRecordGetRecordType(record);}
+- (BOOL) isPerson {return self.recordType == kABPersonType;}
+
+#pragma mark management
+- (NSArray *) members
+{
+ NSArray *contacts = (NSArray *)ABGroupCopyArrayOfAllMembers(self.record);
+ NSMutableArray *array = [NSMutableArray arrayWithCapacity:contacts.count];
+ for (id contact in contacts)
+ [array addObject:[ABContact contactWithRecord:(ABRecordRef)contact]];
+ [contacts release];
+ return array;
+}
+
+// kABPersonSortByFirstName = 0, kABPersonSortByLastName = 1
+- (NSArray *) membersWithSorting: (ABPersonSortOrdering) ordering
+{
+ NSArray *contacts = (NSArray *)ABGroupCopyArrayOfAllMembersWithSortOrdering(self.record, ordering);
+ NSMutableArray *array = [NSMutableArray arrayWithCapacity:contacts.count];
+ for (id contact in contacts)
+ [array addObject:[ABContact contactWithRecord:(ABRecordRef)contact]];
+ [contacts release];
+ return array;
+}
+
+- (BOOL) addMember: (ABContact *) contact withError: (NSError **) error
+{
+ return ABGroupAddMember(self.record, contact.record, (CFErrorRef *) error);
+}
+
+- (BOOL) removeMember: (ABContact *) contact withError: (NSError **) error
+{
+ return ABGroupRemoveMember(self.record, contact.record, (CFErrorRef *) error);
+}
+
+#pragma mark name
+
+- (NSString *) getRecordString:(ABPropertyID) anID
+{
+ return [(NSString *) ABRecordCopyValue(record, anID) autorelease];
+}
+
+- (NSString *) name
+{
+ NSString *string = (NSString *)ABRecordCopyCompositeName(record);
+ return [string autorelease];
+}
+
+- (void) setName: (NSString *) aString
+{
+ CFErrorRef error;
+ BOOL success = ABRecordSetValue(record, kABGroupNameProperty, (CFStringRef) aString, &error);
+ if (!success) NSLog(@"Error: %@", [(NSError *)error localizedDescription]);
+}
+@end
View
BIN  C18-Address Book/09-Monsters/Default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
497 C18-Address Book/09-Monsters/HelloWorld.xcodeproj/project.pbxproj
@@ -0,0 +1,497 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 45;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1D3623EC0D0F72F000981E51 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */; };
+ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
+ 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
+ 8E1A81A2103DC85F00572A62 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E1A81A0103DC85F00572A62 /* AddressBook.framework */; };
+ 8E1A81A3103DC85F00572A62 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E1A81A1103DC85F00572A62 /* AddressBookUI.framework */; };
+ 8E1A8287103DE3E900572A62 /* TestBedViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8E1A8285103DE3E900572A62 /* TestBedViewController.xib */; };
+ 8E1A8288103DE3E900572A62 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E1A8286103DE3E900572A62 /* main.m */; };
+ 8E1A82CE103DE6D800572A62 /* ABContact.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E1A82CB103DE6D800572A62 /* ABContact.m */; };
+ 8E1A82CF103DE6D800572A62 /* ABContactsHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E1A82CD103DE6D800572A62 /* ABContactsHelper.m */; };
+ 8E3A1F090FAA199F009B0518 /* cover320x416.png in Resources */ = {isa = PBXBuildFile; fileRef = 8E3A1F080FAA199F009B0518 /* cover320x416.png */; };
+ 8E4156E90FA4EE0E0006D27C /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 8E4156E70FA4EE0E0006D27C /* Default.png */; };
+ 8E4156EA0FA4EE0E0006D27C /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 8E4156E80FA4EE0E0006D27C /* icon.png */; };
+ 8E6DF58B103F1E6B00E12A1D /* ABGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E6DF58A103F1E6B00E12A1D /* ABGroup.m */; };
+ 8EBC10751041B5E6007518F7 /* oldarms_1.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10101041B5E5007518F7 /* oldarms_1.png */; };
+ 8EBC10761041B5E6007518F7 /* oldarms_2.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10111041B5E5007518F7 /* oldarms_2.png */; };
+ 8EBC10771041B5E6007518F7 /* oldarms_3.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10121041B5E5007518F7 /* oldarms_3.png */; };
+ 8EBC10781041B5E6007518F7 /* oldarms_4.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10131041B5E5007518F7 /* oldarms_4.png */; };
+ 8EBC10791041B5E6007518F7 /* oldarms_5.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10141041B5E5007518F7 /* oldarms_5.png */; };
+ 8EBC10831041B5E6007518F7 /* oldbody_1.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC101E1041B5E5007518F7 /* oldbody_1.png */; };
+ 8EBC10841041B5E6007518F7 /* oldbody_10.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC101F1041B5E5007518F7 /* oldbody_10.png */; };
+ 8EBC10851041B5E6007518F7 /* oldbody_11.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10201041B5E5007518F7 /* oldbody_11.png */; };
+ 8EBC10861041B5E6007518F7 /* oldbody_12.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10211041B5E5007518F7 /* oldbody_12.png */; };
+ 8EBC10871041B5E6007518F7 /* oldbody_13.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10221041B5E5007518F7 /* oldbody_13.png */; };
+ 8EBC10881041B5E6007518F7 /* oldbody_14.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10231041B5E5007518F7 /* oldbody_14.png */; };
+ 8EBC10891041B5E6007518F7 /* oldbody_15.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10241041B5E5007518F7 /* oldbody_15.png */; };
+ 8EBC108A1041B5E6007518F7 /* oldbody_2.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10251041B5E5007518F7 /* oldbody_2.png */; };
+ 8EBC108B1041B5E6007518F7 /* oldbody_3.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10261041B5E5007518F7 /* oldbody_3.png */; };
+ 8EBC108C1041B5E6007518F7 /* oldbody_4.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10271041B5E5007518F7 /* oldbody_4.png */; };
+ 8EBC108D1041B5E6007518F7 /* oldbody_5.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10281041B5E6007518F7 /* oldbody_5.png */; };
+ 8EBC108E1041B5E6007518F7 /* oldbody_6.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10291041B5E6007518F7 /* oldbody_6.png */; };
+ 8EBC108F1041B5E6007518F7 /* oldbody_7.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC102A1041B5E6007518F7 /* oldbody_7.png */; };
+ 8EBC10901041B5E6007518F7 /* oldbody_8.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC102B1041B5E6007518F7 /* oldbody_8.png */; };
+ 8EBC10911041B5E6007518F7 /* oldbody_9.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC102C1041B5E6007518F7 /* oldbody_9.png */; };
+ 8EBC10971041B5E6007518F7 /* oldeyes_1.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10321041B5E6007518F7 /* oldeyes_1.png */; };
+ 8EBC10981041B5E6007518F7 /* oldeyes_10.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10331041B5E6007518F7 /* oldeyes_10.png */; };
+ 8EBC10991041B5E6007518F7 /* oldeyes_11.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10341041B5E6007518F7 /* oldeyes_11.png */; };
+ 8EBC109A1041B5E6007518F7 /* oldeyes_12.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10351041B5E6007518F7 /* oldeyes_12.png */; };
+ 8EBC109B1041B5E6007518F7 /* oldeyes_13.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10361041B5E6007518F7 /* oldeyes_13.png */; };
+ 8EBC109C1041B5E6007518F7 /* oldeyes_14.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10371041B5E6007518F7 /* oldeyes_14.png */; };
+ 8EBC109D1041B5E6007518F7 /* oldeyes_15.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10381041B5E6007518F7 /* oldeyes_15.png */; };
+ 8EBC109E1041B5E6007518F7 /* oldeyes_2.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10391041B5E6007518F7 /* oldeyes_2.png */; };
+ 8EBC109F1041B5E6007518F7 /* oldeyes_3.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC103A1041B5E6007518F7 /* oldeyes_3.png */; };
+ 8EBC10A01041B5E6007518F7 /* oldeyes_4.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC103B1041B5E6007518F7 /* oldeyes_4.png */; };
+ 8EBC10A11041B5E6007518F7 /* oldeyes_5.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC103C1041B5E6007518F7 /* oldeyes_5.png */; };
+ 8EBC10A21041B5E6007518F7 /* oldeyes_6.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC103D1041B5E6007518F7 /* oldeyes_6.png */; };
+ 8EBC10A31041B5E6007518F7 /* oldeyes_7.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC103E1041B5E6007518F7 /* oldeyes_7.png */; };
+ 8EBC10A41041B5E6007518F7 /* oldeyes_8.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC103F1041B5E6007518F7 /* oldeyes_8.png */; };
+ 8EBC10A51041B5E6007518F7 /* oldeyes_9.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10401041B5E6007518F7 /* oldeyes_9.png */; };
+ 8EBC10AB1041B5E6007518F7 /* oldhair_1.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10461041B5E6007518F7 /* oldhair_1.png */; };
+ 8EBC10AC1041B5E6007518F7 /* oldhair_2.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10471041B5E6007518F7 /* oldhair_2.png */; };
+ 8EBC10AD1041B5E6007518F7 /* oldhair_3.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10481041B5E6007518F7 /* oldhair_3.png */; };
+ 8EBC10AE1041B5E6007518F7 /* oldhair_4.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10491041B5E6007518F7 /* oldhair_4.png */; };
+ 8EBC10AF1041B5E6007518F7 /* oldhair_5.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC104A1041B5E6007518F7 /* oldhair_5.png */; };
+ 8EBC10B71041B5E6007518F7 /* oldlegs_1.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10521041B5E6007518F7 /* oldlegs_1.png */; };
+ 8EBC10B81041B5E6007518F7 /* oldlegs_2.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10531041B5E6007518F7 /* oldlegs_2.png */; };
+ 8EBC10B91041B5E6007518F7 /* oldlegs_3.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10541041B5E6007518F7 /* oldlegs_3.png */; };
+ 8EBC10BA1041B5E6007518F7 /* oldlegs_4.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10551041B5E6007518F7 /* oldlegs_4.png */; };
+ 8EBC10BB1041B5E6007518F7 /* oldlegs_5.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10561041B5E6007518F7 /* oldlegs_5.png */; };
+ 8EBC10C91041B5E6007518F7 /* oldmouth_1.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10641041B5E6007518F7 /* oldmouth_1.png */; };
+ 8EBC10CA1041B5E6007518F7 /* oldmouth_10.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10651041B5E6007518F7 /* oldmouth_10.png */; };
+ 8EBC10CB1041B5E6007518F7 /* oldmouth_2.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10661041B5E6007518F7 /* oldmouth_2.png */; };
+ 8EBC10CC1041B5E6007518F7 /* oldmouth_3.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10671041B5E6007518F7 /* oldmouth_3.png */; };
+ 8EBC10CD1041B5E6007518F7 /* oldmouth_4.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10681041B5E6007518F7 /* oldmouth_4.png */; };
+ 8EBC10CE1041B5E6007518F7 /* oldmouth_5.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC10691041B5E6007518F7 /* oldmouth_5.png */; };
+ 8EBC10CF1041B5E6007518F7 /* oldmouth_6.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC106A1041B5E6007518F7 /* oldmouth_6.png */; };
+ 8EBC10D01041B5E6007518F7 /* oldmouth_7.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC106B1041B5E6007518F7 /* oldmouth_7.png */; };
+ 8EBC10D11041B5E6007518F7 /* oldmouth_8.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC106C1041B5E6007518F7 /* oldmouth_8.png */; };
+ 8EBC10D21041B5E6007518F7 /* oldmouth_9.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EBC106D1041B5E6007518F7 /* oldmouth_9.png */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 1D6058910D05DD3D006BFB54 /* HelloWorld.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloWorld.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 32CA4F630368D1EE00C91783 /* HelloWorld_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HelloWorld_Prefix.pch; sourceTree = "<group>"; };
+ 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ 8E1A81A0103DC85F00572A62 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = "../00DeployedSampleCode/C18-Address Book/Work/SDKStuff/99BOOK/C09 - PeoplePlacesThings/01a - Finding People/iphoneos2.0/System/Library/Frameworks/AddressBook.framework"; sourceTree = SOURCE_ROOT; };
+ 8E1A81A1103DC85F00572A62 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = "../00DeployedSampleCode/C18-Address Book/Work/SDKStuff/99BOOK/C09 - PeoplePlacesThings/01a - Finding People/iphoneos2.0/System/Library/Frameworks/AddressBookUI.framework"; sourceTree = SOURCE_ROOT; };
+ 8E1A8285103DE3E900572A62 /* TestBedViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TestBedViewController.xib; sourceTree = "<group>"; };
+ 8E1A8286103DE3E900572A62 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 8E1A82CA103DE6D800572A62 /* ABContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABContact.h; sourceTree = "<group>"; };
+ 8E1A82CB103DE6D800572A62 /* ABContact.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ABContact.m; sourceTree = "<group>"; };
+ 8E1A82CC103DE6D800572A62 /* ABContactsHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABContactsHelper.h; sourceTree = "<group>"; };
+ 8E1A82CD103DE6D800572A62 /* ABContactsHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ABContactsHelper.m; sourceTree = "<group>"; };
+ 8E3A1F080FAA199F009B0518 /* cover320x416.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cover320x416.png; sourceTree = "<group>"; };
+ 8E4156E70FA4EE0E0006D27C /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
+ 8E4156E80FA4EE0E0006D27C /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon.png; sourceTree = "<group>"; };
+ 8E6DF589103F1E6B00E12A1D /* ABGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABGroup.h; sourceTree = "<group>"; };
+ 8E6DF58A103F1E6B00E12A1D /* ABGroup.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ABGroup.m; sourceTree = "<group>"; };
+ 8EBC10101041B5E5007518F7 /* oldarms_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldarms_1.png; sourceTree = "<group>"; };
+ 8EBC10111041B5E5007518F7 /* oldarms_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldarms_2.png; sourceTree = "<group>"; };
+ 8EBC10121041B5E5007518F7 /* oldarms_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldarms_3.png; sourceTree = "<group>"; };
+ 8EBC10131041B5E5007518F7 /* oldarms_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldarms_4.png; sourceTree = "<group>"; };
+ 8EBC10141041B5E5007518F7 /* oldarms_5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldarms_5.png; sourceTree = "<group>"; };
+ 8EBC101E1041B5E5007518F7 /* oldbody_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldbody_1.png; sourceTree = "<group>"; };
+ 8EBC101F1041B5E5007518F7 /* oldbody_10.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldbody_10.png; sourceTree = "<group>"; };
+ 8EBC10201041B5E5007518F7 /* oldbody_11.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldbody_11.png; sourceTree = "<group>"; };
+ 8EBC10211041B5E5007518F7 /* oldbody_12.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldbody_12.png; sourceTree = "<group>"; };
+ 8EBC10221041B5E5007518F7 /* oldbody_13.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldbody_13.png; sourceTree = "<group>"; };
+ 8EBC10231041B5E5007518F7 /* oldbody_14.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldbody_14.png; sourceTree = "<group>"; };
+ 8EBC10241041B5E5007518F7 /* oldbody_15.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldbody_15.png; sourceTree = "<group>"; };
+ 8EBC10251041B5E5007518F7 /* oldbody_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldbody_2.png; sourceTree = "<group>"; };
+ 8EBC10261041B5E5007518F7 /* oldbody_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldbody_3.png; sourceTree = "<group>"; };
+ 8EBC10271041B5E5007518F7 /* oldbody_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldbody_4.png; sourceTree = "<group>"; };
+ 8EBC10281041B5E6007518F7 /* oldbody_5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldbody_5.png; sourceTree = "<group>"; };
+ 8EBC10291041B5E6007518F7 /* oldbody_6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldbody_6.png; sourceTree = "<group>"; };
+ 8EBC102A1041B5E6007518F7 /* oldbody_7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldbody_7.png; sourceTree = "<group>"; };
+ 8EBC102B1041B5E6007518F7 /* oldbody_8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldbody_8.png; sourceTree = "<group>"; };
+ 8EBC102C1041B5E6007518F7 /* oldbody_9.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldbody_9.png; sourceTree = "<group>"; };
+ 8EBC10321041B5E6007518F7 /* oldeyes_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldeyes_1.png; sourceTree = "<group>"; };
+ 8EBC10331041B5E6007518F7 /* oldeyes_10.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldeyes_10.png; sourceTree = "<group>"; };
+ 8EBC10341041B5E6007518F7 /* oldeyes_11.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldeyes_11.png; sourceTree = "<group>"; };
+ 8EBC10351041B5E6007518F7 /* oldeyes_12.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldeyes_12.png; sourceTree = "<group>"; };
+ 8EBC10361041B5E6007518F7 /* oldeyes_13.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldeyes_13.png; sourceTree = "<group>"; };
+ 8EBC10371041B5E6007518F7 /* oldeyes_14.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldeyes_14.png; sourceTree = "<group>"; };
+ 8EBC10381041B5E6007518F7 /* oldeyes_15.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldeyes_15.png; sourceTree = "<group>"; };
+ 8EBC10391041B5E6007518F7 /* oldeyes_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldeyes_2.png; sourceTree = "<group>"; };
+ 8EBC103A1041B5E6007518F7 /* oldeyes_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldeyes_3.png; sourceTree = "<group>"; };
+ 8EBC103B1041B5E6007518F7 /* oldeyes_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldeyes_4.png; sourceTree = "<group>"; };
+ 8EBC103C1041B5E6007518F7 /* oldeyes_5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldeyes_5.png; sourceTree = "<group>"; };
+ 8EBC103D1041B5E6007518F7 /* oldeyes_6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldeyes_6.png; sourceTree = "<group>"; };
+ 8EBC103E1041B5E6007518F7 /* oldeyes_7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldeyes_7.png; sourceTree = "<group>"; };
+ 8EBC103F1041B5E6007518F7 /* oldeyes_8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldeyes_8.png; sourceTree = "<group>"; };
+ 8EBC10401041B5E6007518F7 /* oldeyes_9.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldeyes_9.png; sourceTree = "<group>"; };
+ 8EBC10461041B5E6007518F7 /* oldhair_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldhair_1.png; sourceTree = "<group>"; };
+ 8EBC10471041B5E6007518F7 /* oldhair_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldhair_2.png; sourceTree = "<group>"; };
+ 8EBC10481041B5E6007518F7 /* oldhair_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldhair_3.png; sourceTree = "<group>"; };
+ 8EBC10491041B5E6007518F7 /* oldhair_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldhair_4.png; sourceTree = "<group>"; };
+ 8EBC104A1041B5E6007518F7 /* oldhair_5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldhair_5.png; sourceTree = "<group>"; };
+ 8EBC10521041B5E6007518F7 /* oldlegs_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldlegs_1.png; sourceTree = "<group>"; };
+ 8EBC10531041B5E6007518F7 /* oldlegs_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldlegs_2.png; sourceTree = "<group>"; };
+ 8EBC10541041B5E6007518F7 /* oldlegs_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldlegs_3.png; sourceTree = "<group>"; };
+ 8EBC10551041B5E6007518F7 /* oldlegs_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldlegs_4.png; sourceTree = "<group>"; };
+ 8EBC10561041B5E6007518F7 /* oldlegs_5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldlegs_5.png; sourceTree = "<group>"; };
+ 8EBC10641041B5E6007518F7 /* oldmouth_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldmouth_1.png; sourceTree = "<group>"; };
+ 8EBC10651041B5E6007518F7 /* oldmouth_10.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldmouth_10.png; sourceTree = "<group>"; };
+ 8EBC10661041B5E6007518F7 /* oldmouth_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldmouth_2.png; sourceTree = "<group>"; };
+ 8EBC10671041B5E6007518F7 /* oldmouth_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldmouth_3.png; sourceTree = "<group>"; };
+ 8EBC10681041B5E6007518F7 /* oldmouth_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldmouth_4.png; sourceTree = "<group>"; };
+ 8EBC10691041B5E6007518F7 /* oldmouth_5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldmouth_5.png; sourceTree = "<group>"; };
+ 8EBC106A1041B5E6007518F7 /* oldmouth_6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldmouth_6.png; sourceTree = "<group>"; };
+ 8EBC106B1041B5E6007518F7 /* oldmouth_7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldmouth_7.png; sourceTree = "<group>"; };
+ 8EBC106C1041B5E6007518F7 /* oldmouth_8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldmouth_8.png; sourceTree = "<group>"; };
+ 8EBC106D1041B5E6007518F7 /* oldmouth_9.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = oldmouth_9.png; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 1D60588F0D05DD3D006BFB54 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
+ 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
+ 1D3623EC0D0F72F000981E51 /* CoreGraphics.framework in Frameworks */,
+ 8E1A81A2103DC85F00572A62 /* AddressBook.framework in Frameworks */,
+ 8E1A81A3103DC85F00572A62 /* AddressBookUI.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 19C28FACFE9D520D11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 1D6058910D05DD3D006BFB54 /* HelloWorld.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
+ isa = PBXGroup;
+ children = (
+ 8E1A8285103DE3E900572A62 /* TestBedViewController.xib */,
+ 8E1A8286103DE3E900572A62 /* main.m */,
+ 8EBC100F1041B5E5007518F7 /* Parts */,
+ 8EB688610FA64AD100489E4B /* Support */,
+ 29B97323FDCFA39411CA2CEA /* Frameworks */,
+ 19C28FACFE9D520D11CA2CBB /* Products */,
+ );
+ name = CustomTemplate;
+ sourceTree = "<group>";
+ };
+ 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 8E1A81A0103DC85F00572A62 /* AddressBook.framework */,
+ 8E1A81A1103DC85F00572A62 /* AddressBookUI.framework */,
+ 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */,
+ 1D30AB110D05D00D00671497 /* Foundation.framework */,
+ 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 8EB688610FA64AD100489E4B /* Support */ = {
+ isa = PBXGroup;
+ children = (
+ 8E6DF589103F1E6B00E12A1D /* ABGroup.h */,
+ 8E6DF58A103F1E6B00E12A1D /* ABGroup.m */,
+ 8E1A82CA103DE6D800572A62 /* ABContact.h */,
+ 8E1A82CB103DE6D800572A62 /* ABContact.m */,
+ 8E1A82CC103DE6D800572A62 /* ABContactsHelper.h */,
+ 8E1A82CD103DE6D800572A62 /* ABContactsHelper.m */,
+ 8E3A1F080FAA199F009B0518 /* cover320x416.png */,
+ 32CA4F630368D1EE00C91783 /* HelloWorld_Prefix.pch */,
+ 8D1107310486CEB800E47090 /* Info.plist */,
+ 8E4156E80FA4EE0E0006D27C /* icon.png */,
+ 8E4156E70FA4EE0E0006D27C /* Default.png */,
+ );
+ name = Support;
+ sourceTree = "<group>";
+ };
+ 8EBC100F1041B5E5007518F7 /* Parts */ = {
+ isa = PBXGroup;
+ children = (
+ 8EBC10101041B5E5007518F7 /* oldarms_1.png */,
+ 8EBC10111041B5E5007518F7 /* oldarms_2.png */,
+ 8EBC10121041B5E5007518F7 /* oldarms_3.png */,
+ 8EBC10131041B5E5007518F7 /* oldarms_4.png */,
+ 8EBC10141041B5E5007518F7 /* oldarms_5.png */,
+ 8EBC101E1041B5E5007518F7 /* oldbody_1.png */,
+ 8EBC101F1041B5E5007518F7 /* oldbody_10.png */,
+ 8EBC10201041B5E5007518F7 /* oldbody_11.png */,
+ 8EBC10211041B5E5007518F7 /* oldbody_12.png */,
+ 8EBC10221041B5E5007518F7 /* oldbody_13.png */,
+ 8EBC10231041B5E5007518F7 /* oldbody_14.png */,
+ 8EBC10241041B5E5007518F7 /* oldbody_15.png */,
+ 8EBC10251041B5E5007518F7 /* oldbody_2.png */,
+ 8EBC10261041B5E5007518F7 /* oldbody_3.png */,
+ 8EBC10271041B5E5007518F7 /* oldbody_4.png */,
+ 8EBC10281041B5E6007518F7 /* oldbody_5.png */,
+ 8EBC10291041B5E6007518F7 /* oldbody_6.png */,
+ 8EBC102A1041B5E6007518F7 /* oldbody_7.png */,
+ 8EBC102B1041B5E6007518F7 /* oldbody_8.png */,
+ 8EBC102C1041B5E6007518F7 /* oldbody_9.png */,
+ 8EBC10321041B5E6007518F7 /* oldeyes_1.png */,
+ 8EBC10331041B5E6007518F7 /* oldeyes_10.png */,
+ 8EBC10341041B5E6007518F7 /* oldeyes_11.png */,
+ 8EBC10351041B5E6007518F7 /* oldeyes_12.png */,
+ 8EBC10361041B5E6007518F7 /* oldeyes_13.png */,
+ 8EBC10371041B5E6007518F7 /* oldeyes_14.png */,
+ 8EBC10381041B5E6007518F7 /* oldeyes_15.png */,
+ 8EBC10391041B5E6007518F7 /* oldeyes_2.png */,
+ 8EBC103A1041B5E6007518F7 /* oldeyes_3.png */,
+ 8EBC103B1041B5E6007518F7 /* oldeyes_4.png */,
+ 8EBC103C1041B5E6007518F7 /* oldeyes_5.png */,
+ 8EBC103D1041B5E6007518F7 /* oldeyes_6.png */,
+ 8EBC103E1041B5E6007518F7 /* oldeyes_7.png */,
+ 8EBC103F1041B5E6007518F7 /* oldeyes_8.png */,
+ 8EBC10401041B5E6007518F7 /* oldeyes_9.png */,
+ 8EBC10461041B5E6007518F7 /* oldhair_1.png */,
+ 8EBC10471041B5E6007518F7 /* oldhair_2.png */,
+ 8EBC10481041B5E6007518F7 /* oldhair_3.png */,
+ 8EBC10491041B5E6007518F7 /* oldhair_4.png */,
+ 8EBC104A1041B5E6007518F7 /* oldhair_5.png */,
+ 8EBC10521041B5E6007518F7 /* oldlegs_1.png */,
+ 8EBC10531041B5E6007518F7 /* oldlegs_2.png */,
+ 8EBC10541041B5E6007518F7 /* oldlegs_3.png */,
+ 8EBC10551041B5E6007518F7 /* oldlegs_4.png */,
+ 8EBC10561041B5E6007518F7 /* oldlegs_5.png */,
+ 8EBC10641041B5E6007518F7 /* oldmouth_1.png */,
+ 8EBC10651041B5E6007518F7 /* oldmouth_10.png */,
+ 8EBC10661041B5E6007518F7 /* oldmouth_2.png */,
+ 8EBC10671041B5E6007518F7 /* oldmouth_3.png */,
+ 8EBC10681041B5E6007518F7 /* oldmouth_4.png */,
+ 8EBC10691041B5E6007518F7 /* oldmouth_5.png */,
+ 8EBC106A1041B5E6007518F7 /* oldmouth_6.png */,
+ 8EBC106B1041B5E6007518F7 /* oldmouth_7.png */,
+ 8EBC106C1041B5E6007518F7 /* oldmouth_8.png */,
+ 8EBC106D1041B5E6007518F7 /* oldmouth_9.png */,
+ );
+ path = Parts;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 1D6058900D05DD3D006BFB54 /* HelloWorld */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "HelloWorld" */;
+ buildPhases = (
+ 1D60588D0D05DD3D006BFB54 /* Resources */,
+ 1D60588E0D05DD3D006BFB54 /* Sources */,
+ 1D60588F0D05DD3D006BFB54 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = HelloWorld;
+ productName = HelloWorld;
+ productReference = 1D6058910D05DD3D006BFB54 /* HelloWorld.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 29B97313FDCFA39411CA2CEA /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HelloWorld" */;
+ compatibilityVersion = "Xcode 3.1";
+ hasScannedForEncodings = 1;
+ mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 1D6058900D05DD3D006BFB54 /* HelloWorld */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 1D60588D0D05DD3D006BFB54 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8E4156E90FA4EE0E0006D27C /* Default.png in Resources */,
+ 8E4156EA0FA4EE0E0006D27C /* icon.png in Resources */,
+ 8E3A1F090FAA199F009B0518 /* cover320x416.png in Resources */,
+ 8E1A8287103DE3E900572A62 /* TestBedViewController.xib in Resources */,
+ 8EBC10751041B5E6007518F7 /* oldarms_1.png in Resources */,
+ 8EBC10761041B5E6007518F7 /* oldarms_2.png in Resources */,
+ 8EBC10771041B5E6007518F7 /* oldarms_3.png in Resources */,
+ 8EBC10781041B5E6007518F7 /* oldarms_4.png in Resources */,
+ 8EBC10791041B5E6007518F7 /* oldarms_5.png in Resources */,
+ 8EBC10831041B5E6007518F7 /* oldbody_1.png in Resources */,
+ 8EBC10841041B5E6007518F7 /* oldbody_10.png in Resources */,
+ 8EBC10851041B5E6007518F7 /* oldbody_11.png in Resources */,
+ 8EBC10861041B5E6007518F7 /* oldbody_12.png in Resources */,
+ 8EBC10871041B5E6007518F7 /* oldbody_13.png in Resources */,
+ 8EBC10881041B5E6007518F7 /* oldbody_14.png in Resources */,
+ 8EBC10891041B5E6007518F7 /* oldbody_15.png in Resources */,
+ 8EBC108A1041B5E6007518F7 /* oldbody_2.png in Resources */,
+ 8EBC108B1041B5E6007518F7 /* oldbody_3.png in Resources */,
+ 8EBC108C1041B5E6007518F7 /* oldbody_4.png in Resources */,
+ 8EBC108D1041B5E6007518F7 /* oldbody_5.png in Resources */,
+ 8EBC108E1041B5E6007518F7 /* oldbody_6.png in Resources */,
+ 8EBC108F1041B5E6007518F7 /* oldbody_7.png in Resources */,
+ 8EBC10901041B5E6007518F7 /* oldbody_8.png in Resources */,
+ 8EBC10911041B5E6007518F7 /* oldbody_9.png in Resources */,
+ 8EBC10971041B5E6007518F7 /* oldeyes_1.png in Resources */,
+ 8EBC10981041B5E6007518F7 /* oldeyes_10.png in Resources */,
+ 8EBC10991041B5E6007518F7 /* oldeyes_11.png in Resources */,
+ 8EBC109A1041B5E6007518F7 /* oldeyes_12.png in Resources */,
+ 8EBC109B1041B5E6007518F7 /* oldeyes_13.png in Resources */,
+ 8EBC109C1041B5E6007518F7 /* oldeyes_14.png in Resources */,
+ 8EBC109D1041B5E6007518F7 /* oldeyes_15.png in Resources */,
+ 8EBC109E1041B5E6007518F7 /* oldeyes_2.png in Resources */,
+ 8EBC109F1041B5E6007518F7 /* oldeyes_3.png in Resources */,
+ 8EBC10A01041B5E6007518F7 /* oldeyes_4.png in Resources */,
+ 8EBC10A11041B5E6007518F7 /* oldeyes_5.png in Resources */,
+ 8EBC10A21041B5E6007518F7 /* oldeyes_6.png in Resources */,
+ 8EBC10A31041B5E6007518F7 /* oldeyes_7.png in Resources */,
+ 8EBC10A41041B5E6007518F7 /* oldeyes_8.png in Resources */,
+ 8EBC10A51041B5E6007518F7 /* oldeyes_9.png in Resources */,
+ 8EBC10AB1041B5E6007518F7 /* oldhair_1.png in Resources */,
+ 8EBC10AC1041B5E6007518F7 /* oldhair_2.png in Resources */,
+ 8EBC10AD1041B5E6007518F7 /* oldhair_3.png in Resources */,
+ 8EBC10AE1041B5E6007518F7 /* oldhair_4.png in Resources */,
+ 8EBC10AF1041B5E6007518F7 /* oldhair_5.png in Resources */,
+ 8EBC10B71041B5E6007518F7 /* oldlegs_1.png in Resources */,
+ 8EBC10B81041B5E6007518F7 /* oldlegs_2.png in Resources */,
+ 8EBC10B91041B5E6007518F7 /* oldlegs_3.png in Resources */,
+ 8EBC10BA1041B5E6007518F7 /* oldlegs_4.png in Resources */,
+ 8EBC10BB1041B5E6007518F7 /* oldlegs_5.png in Resources */,
+ 8EBC10C91041B5E6007518F7 /* oldmouth_1.png in Resources */,
+ 8EBC10CA1041B5E6007518F7 /* oldmouth_10.png in Resources */,
+ 8EBC10CB1041B5E6007518F7 /* oldmouth_2.png in Resources */,
+ 8EBC10CC1041B5E6007518F7 /* oldmouth_3.png in Resources */,
+ 8EBC10CD1041B5E6007518F7 /* oldmouth_4.png in Resources */,
+ 8EBC10CE1041B5E6007518F7 /* oldmouth_5.png in Resources */,
+ 8EBC10CF1041B5E6007518F7 /* oldmouth_6.png in Resources */,
+ 8EBC10D01041B5E6007518F7 /* oldmouth_7.png in Resources */,
+ 8EBC10D11041B5E6007518F7 /* oldmouth_8.png in Resources */,
+ 8EBC10D21041B5E6007518F7 /* oldmouth_9.png in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 1D60588E0D05DD3D006BFB54 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8E1A8288103DE3E900572A62 /* main.m in Sources */,
+ 8E1A82CE103DE6D800572A62 /* ABContact.m in Sources */,
+ 8E1A82CF103DE6D800572A62 /* ABContactsHelper.m in Sources */,
+ 8E6DF58B103F1E6B00E12A1D /* ABGroup.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ 1D6058940D05DD3E006BFB54 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Erica Sadun";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/../00DeployedSampleCode/C18-Address Book/Work/SDKStuff/99BOOK/C09 - PeoplePlacesThings/01a - Finding People/iphoneos2.0/System/Library/Frameworks\"",
+ );
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = HelloWorld_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ PREBINDING = NO;
+ PRODUCT_NAME = HelloWorld;
+ };
+ name = Debug;
+ };
+ 1D6058950D05DD3E006BFB54 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/../00DeployedSampleCode/C18-Address Book/Work/SDKStuff/99BOOK/C09 - PeoplePlacesThings/01a - Finding People/iphoneos2.0/System/Library/Frameworks\"",
+ );
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = HelloWorld_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ PREBINDING = NO;
+ PRODUCT_NAME = HelloWorld;
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+ C01FCF4F08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CODE_SIGN_IDENTITY = "Erica Sadun";
+ "CODE_SIGN_IDENTITY[sdk=iphonesimulator*]" = "iPhone Developer";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ PREBINDING = NO;
+ PRODUCT_NAME = "Oh Hello";
+ SDKROOT = iphoneos2.0;
+ };
+ name = Debug;
+ };
+ C01FCF5008A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ PREBINDING = NO;
+ SDKROOT = iphoneos2.0;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "HelloWorld" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1D6058940D05DD3E006BFB54 /* Debug */,
+ 1D6058950D05DD3E006BFB54 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HelloWorld" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4F08A954540054247B /* Debug */,
+ C01FCF5008A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
View
8 C18-Address Book/09-Monsters/HelloWorld_Prefix.pch
@@ -0,0 +1,8 @@
+//
+// Prefix header for all source files of the 'HelloWorld' target in the 'HelloWorld' project
+//
+
+#ifdef __OBJC__
+ #import <Foundation/Foundation.h>
+ #import <UIKit/UIKit.h>
+#endif
View
26 C18-Address Book/09-Monsters/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>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.sadun.${EXECUTABLE_NAME}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+</dict>
+</plist>
View
BIN  C18-Address Book/09-Monsters/Parts/oldarms_1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  C18-Address Book/09-Monsters/Parts/oldarms_2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  C18-Address Book/09-Monsters/Parts/oldarms_3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  C18-Address Book/09-Monsters/Parts/oldarms_4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  C18-Address Book/09-Monsters/Parts/oldarms_5.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  C18-Address Book/09-Monsters/Parts/oldbody_1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  C18-Address Book/09-Monsters/Parts/oldbody_10.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  C18-Address Book/09-Monsters/Parts/oldbody_11.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  C18-Address Book/09-Monsters/Parts/oldbody_12.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  C18-Address Book/09-Monsters/Parts/oldbody_13.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.