Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improving MulticastDelegate test code

  • Loading branch information...
commit fca79f53415d5a666a1fae27fdee81c8831d6782 1 parent 298b503
@robbiehanson authored
Showing with 2,830 additions and 1,822 deletions.
  1. +0 −6 Xcode/Testing/MulticastDelegateTest/Class1.h
  2. +0 −47 Xcode/Testing/MulticastDelegateTest/Class1.m
  3. +0 −6 Xcode/Testing/MulticastDelegateTest/Class2.h
  4. +0 −45 Xcode/Testing/MulticastDelegateTest/Class2.m
  5. +340 −0 Xcode/Testing/MulticastDelegateTest/Desktop/MulticastDelegateTest.xcodeproj/project.pbxproj
  6. 0  ...DelegateTest/{ → Desktop}/MulticastDelegateTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  7. +8 −0 Xcode/Testing/MulticastDelegateTest/Desktop/MulticastDelegateTest/AppDelegate.h
  8. +14 −0 Xcode/Testing/MulticastDelegateTest/Desktop/MulticastDelegateTest/AppDelegate.m
  9. +8 −6 Xcode/Testing/MulticastDelegateTest/{ → Desktop/MulticastDelegateTest}/MulticastDelegateTest-Info.plist
  10. +1 −1  ...st/{MulticastDelegateTest_Prefix.pch → Desktop/MulticastDelegateTest/MulticastDelegateTest-Prefix.pch}
  11. +29 −0 Xcode/Testing/MulticastDelegateTest/Desktop/MulticastDelegateTest/en.lproj/Credits.rtf
  12. 0  ...sting/MulticastDelegateTest/{English.lproj → Desktop/MulticastDelegateTest/en.lproj}/InfoPlist.strings
  13. +1,637 −1,169 Xcode/Testing/MulticastDelegateTest/{English.lproj → Desktop/MulticastDelegateTest/en.lproj}/MainMenu.xib
  14. +14 −0 Xcode/Testing/MulticastDelegateTest/Desktop/MulticastDelegateTest/main.m
  15. +308 −0 Xcode/Testing/MulticastDelegateTest/Mobile/MulticastDelegateTest.xcodeproj/project.pbxproj
  16. +7 −0 ...g/MulticastDelegateTest/Mobile/MulticastDelegateTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  17. +8 −0 Xcode/Testing/MulticastDelegateTest/Mobile/MulticastDelegateTest/AppDelegate.h
  18. +30 −0 Xcode/Testing/MulticastDelegateTest/Mobile/MulticastDelegateTest/AppDelegate.m
  19. +38 −0 Xcode/Testing/MulticastDelegateTest/Mobile/MulticastDelegateTest/MulticastDelegateTest-Info.plist
  20. +14 −0 Xcode/Testing/MulticastDelegateTest/Mobile/MulticastDelegateTest/MulticastDelegateTest-Prefix.pch
  21. +2 −0  Xcode/Testing/MulticastDelegateTest/Mobile/MulticastDelegateTest/en.lproj/InfoPlist.strings
  22. +18 −0 Xcode/Testing/MulticastDelegateTest/Mobile/MulticastDelegateTest/main.m
  23. +0 −318 Xcode/Testing/MulticastDelegateTest/MulticastDelegateTest.xcodeproj/project.pbxproj
  24. +0 −24 Xcode/Testing/MulticastDelegateTest/MulticastDelegateTestAppDelegate.h
  25. +0 −185 Xcode/Testing/MulticastDelegateTest/MulticastDelegateTestAppDelegate.m
  26. +14 −0 Xcode/Testing/MulticastDelegateTest/Shared/DelegateTesters.h
  27. +143 −0 Xcode/Testing/MulticastDelegateTest/Shared/DelegateTesters.m
  28. +10 −0 Xcode/Testing/MulticastDelegateTest/Shared/MulticastDelegateTest.h
  29. +186 −0 Xcode/Testing/MulticastDelegateTest/Shared/MulticastDelegateTest.m
  30. +1 −1  Xcode/Testing/MulticastDelegateTest/{ → Shared}/MyProtocol.h
  31. +0 −14 Xcode/Testing/MulticastDelegateTest/main.m
View
6 Xcode/Testing/MulticastDelegateTest/Class1.h
@@ -1,6 +0,0 @@
-#import <Cocoa/Cocoa.h>
-
-
-@interface Class1 : NSObject
-
-@end
View
47 Xcode/Testing/MulticastDelegateTest/Class1.m
@@ -1,47 +0,0 @@
-#import "Class1.h"
-
-#define dispatch_current_queue_label() dispatch_queue_get_label(dispatch_get_current_queue())
-
-@implementation Class1
-
-- (void)didSomething
-{
- NSLog(@"Class1(%s): didSomething", dispatch_current_queue_label());
-}
-
-- (void)didSomethingElse:(BOOL)flag
-{
- NSLog(@"Class1(%s): didSomethingElse:%@", dispatch_current_queue_label(), (flag ? @"YES" : @"NO"));
-}
-
-- (void)foundString:(NSString *)str
-{
- NSLog(@"Class1(%s): foundString:\"%@\"", dispatch_current_queue_label(), str);
-
- [NSThread sleepForTimeInterval:0.2];
-}
-
-- (void)foundString:(NSString *)str andNumber:(NSNumber *)num
-{
- NSLog(@"Class1(%s): foundString:\"%@\" andNumber:%@", dispatch_current_queue_label(), str, num);
-}
-
-- (BOOL)shouldSing
-{
- BOOL answer = NO;
-
- NSLog(@"Class1(%s): shouldSing: returning %@", dispatch_current_queue_label(), (answer ? @"YES" : @"NO"));
-
- return answer;
-}
-
-- (BOOL)shouldDance
-{
- BOOL answer = YES;
-
- NSLog(@"Class1(%s): shouldDance: returning %@", dispatch_current_queue_label(), (answer ? @"YES" : @"NO"));
-
- return answer;
-}
-
-@end
View
6 Xcode/Testing/MulticastDelegateTest/Class2.h
@@ -1,6 +0,0 @@
-#import <Cocoa/Cocoa.h>
-
-
-@interface Class2 : NSObject
-
-@end
View
45 Xcode/Testing/MulticastDelegateTest/Class2.m
@@ -1,45 +0,0 @@
-#import "Class2.h"
-
-#define dispatch_current_queue_label() dispatch_queue_get_label(dispatch_get_current_queue())
-
-@implementation Class2
-
-- (void)didSomething
-{
- NSLog(@"Class2(%s): didSomething", dispatch_current_queue_label());
-}
-
-- (void)didSomethingElse:(BOOL)flag
-{
- NSLog(@"Class2(%s): didSomethingElse:%@", dispatch_current_queue_label(), (flag ? @"YES" : @"NO"));
-}
-
-- (void)foundString:(NSString *)str
-{
- NSLog(@"Class2(%s): foundString:\"%@\"", dispatch_current_queue_label(), str);
-}
-
-- (void)foundString:(NSString *)str andNumber:(NSNumber *)num
-{
- NSLog(@"Class2(%s): foundString:\"%@\" andNumber:%@", dispatch_current_queue_label(), str, num);
-}
-
-- (BOOL)shouldSing
-{
- BOOL answer = YES;
-
- NSLog(@"Class2(%s): shouldSing: returning %@", dispatch_current_queue_label(), (answer ? @"YES" : @"NO"));
-
- return answer;
-}
-
-- (BOOL)shouldDance
-{
- BOOL answer = YES;
-
- NSLog(@"Class2(%s): shouldDance: returning %@", dispatch_current_queue_label(), (answer ? @"YES" : @"NO"));
-
- return answer;
-}
-
-@end
View
340 Xcode/Testing/MulticastDelegateTest/Desktop/MulticastDelegateTest.xcodeproj/project.pbxproj
@@ -0,0 +1,340 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ DCD19178154B458500659E75 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DCD19177154B458500659E75 /* Cocoa.framework */; };
+ DCD19182154B458500659E75 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DCD19180154B458500659E75 /* InfoPlist.strings */; };
+ DCD19184154B458500659E75 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DCD19183154B458500659E75 /* main.m */; };
+ DCD19188154B458500659E75 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = DCD19186154B458500659E75 /* Credits.rtf */; };
+ DCD1918B154B458500659E75 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DCD1918A154B458500659E75 /* AppDelegate.m */; };
+ DCD1918E154B458500659E75 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = DCD1918C154B458500659E75 /* MainMenu.xib */; };
+ DCD1919D154B45D200659E75 /* GCDMulticastDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DCD1919C154B45D200659E75 /* GCDMulticastDelegate.m */; };
+ DCD191A4154B460800659E75 /* DelegateTesters.m in Sources */ = {isa = PBXBuildFile; fileRef = DCD191A0154B460800659E75 /* DelegateTesters.m */; };
+ DCD191A5154B460800659E75 /* MulticastDelegateTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DCD191A2154B460800659E75 /* MulticastDelegateTest.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ DCD19173154B458500659E75 /* MulticastDelegateTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MulticastDelegateTest.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ DCD19177154B458500659E75 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
+ DCD1917A154B458500659E75 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
+ DCD1917B154B458500659E75 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
+ DCD1917C154B458500659E75 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ DCD1917F154B458500659E75 /* MulticastDelegateTest-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "MulticastDelegateTest-Info.plist"; sourceTree = "<group>"; };
+ DCD19181154B458500659E75 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ DCD19183154B458500659E75 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ DCD19185154B458500659E75 /* MulticastDelegateTest-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MulticastDelegateTest-Prefix.pch"; sourceTree = "<group>"; };
+ DCD19187154B458500659E75 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = "<group>"; };
+ DCD19189154B458500659E75 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+ DCD1918A154B458500659E75 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+ DCD1918D154B458500659E75 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
+ DCD1919B154B45D200659E75 /* GCDMulticastDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GCDMulticastDelegate.h; path = ../../../../Utilities/GCDMulticastDelegate.h; sourceTree = "<group>"; };
+ DCD1919C154B45D200659E75 /* GCDMulticastDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GCDMulticastDelegate.m; path = ../../../../Utilities/GCDMulticastDelegate.m; sourceTree = "<group>"; };
+ DCD1919F154B460800659E75 /* DelegateTesters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DelegateTesters.h; path = ../Shared/DelegateTesters.h; sourceTree = "<group>"; };
+ DCD191A0154B460800659E75 /* DelegateTesters.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DelegateTesters.m; path = ../Shared/DelegateTesters.m; sourceTree = "<group>"; };
+ DCD191A1154B460800659E75 /* MulticastDelegateTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MulticastDelegateTest.h; path = ../Shared/MulticastDelegateTest.h; sourceTree = "<group>"; };
+ DCD191A2154B460800659E75 /* MulticastDelegateTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MulticastDelegateTest.m; path = ../Shared/MulticastDelegateTest.m; sourceTree = "<group>"; };
+ DCD191A3154B460800659E75 /* MyProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MyProtocol.h; path = ../Shared/MyProtocol.h; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ DCD19170154B458500659E75 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ DCD19178154B458500659E75 /* Cocoa.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ DCD19168154B458500659E75 = {
+ isa = PBXGroup;
+ children = (
+ DCD19198154B45B500659E75 /* XMPP */,
+ DCD1919E154B45D800659E75 /* Testing */,
+ DCD1917D154B458500659E75 /* MulticastDelegateTest */,
+ DCD19176154B458500659E75 /* Frameworks */,
+ DCD19174154B458500659E75 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ DCD19174154B458500659E75 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ DCD19173154B458500659E75 /* MulticastDelegateTest.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ DCD19176154B458500659E75 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ DCD19177154B458500659E75 /* Cocoa.framework */,
+ DCD19179154B458500659E75 /* Other Frameworks */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ DCD19179154B458500659E75 /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ DCD1917A154B458500659E75 /* AppKit.framework */,
+ DCD1917B154B458500659E75 /* CoreData.framework */,
+ DCD1917C154B458500659E75 /* Foundation.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "<group>";
+ };
+ DCD1917D154B458500659E75 /* MulticastDelegateTest */ = {
+ isa = PBXGroup;
+ children = (
+ DCD19189154B458500659E75 /* AppDelegate.h */,
+ DCD1918A154B458500659E75 /* AppDelegate.m */,
+ DCD1918C154B458500659E75 /* MainMenu.xib */,
+ DCD1917E154B458500659E75 /* Supporting Files */,
+ );
+ path = MulticastDelegateTest;
+ sourceTree = "<group>";
+ };
+ DCD1917E154B458500659E75 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ DCD1917F154B458500659E75 /* MulticastDelegateTest-Info.plist */,
+ DCD19180154B458500659E75 /* InfoPlist.strings */,
+ DCD19183154B458500659E75 /* main.m */,
+ DCD19185154B458500659E75 /* MulticastDelegateTest-Prefix.pch */,
+ DCD19186154B458500659E75 /* Credits.rtf */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ DCD19198154B45B500659E75 /* XMPP */ = {
+ isa = PBXGroup;
+ children = (
+ DCD1919A154B45BA00659E75 /* Utilities */,
+ );
+ name = XMPP;
+ sourceTree = "<group>";
+ };
+ DCD1919A154B45BA00659E75 /* Utilities */ = {
+ isa = PBXGroup;
+ children = (
+ DCD1919B154B45D200659E75 /* GCDMulticastDelegate.h */,
+ DCD1919C154B45D200659E75 /* GCDMulticastDelegate.m */,
+ );
+ name = Utilities;
+ sourceTree = "<group>";
+ };
+ DCD1919E154B45D800659E75 /* Testing */ = {
+ isa = PBXGroup;
+ children = (
+ DCD191A3154B460800659E75 /* MyProtocol.h */,
+ DCD191A1154B460800659E75 /* MulticastDelegateTest.h */,
+ DCD191A2154B460800659E75 /* MulticastDelegateTest.m */,
+ DCD1919F154B460800659E75 /* DelegateTesters.h */,
+ DCD191A0154B460800659E75 /* DelegateTesters.m */,
+ );
+ name = Testing;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ DCD19172154B458500659E75 /* MulticastDelegateTest */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = DCD19191154B458500659E75 /* Build configuration list for PBXNativeTarget "MulticastDelegateTest" */;
+ buildPhases = (
+ DCD1916F154B458500659E75 /* Sources */,
+ DCD19170154B458500659E75 /* Frameworks */,
+ DCD19171154B458500659E75 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = MulticastDelegateTest;
+ productName = MulticastDelegateTest;
+ productReference = DCD19173154B458500659E75 /* MulticastDelegateTest.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ DCD1916A154B458500659E75 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0430;
+ };
+ buildConfigurationList = DCD1916D154B458500659E75 /* Build configuration list for PBXProject "MulticastDelegateTest" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = DCD19168154B458500659E75;
+ productRefGroup = DCD19174154B458500659E75 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ DCD19172154B458500659E75 /* MulticastDelegateTest */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ DCD19171154B458500659E75 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ DCD19182154B458500659E75 /* InfoPlist.strings in Resources */,
+ DCD19188154B458500659E75 /* Credits.rtf in Resources */,
+ DCD1918E154B458500659E75 /* MainMenu.xib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ DCD1916F154B458500659E75 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ DCD19184154B458500659E75 /* main.m in Sources */,
+ DCD1918B154B458500659E75 /* AppDelegate.m in Sources */,
+ DCD1919D154B45D200659E75 /* GCDMulticastDelegate.m in Sources */,
+ DCD191A4154B460800659E75 /* DelegateTesters.m in Sources */,
+ DCD191A5154B460800659E75 /* MulticastDelegateTest.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ DCD19180154B458500659E75 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ DCD19181154B458500659E75 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ DCD19186154B458500659E75 /* Credits.rtf */ = {
+ isa = PBXVariantGroup;
+ children = (
+ DCD19187154B458500659E75 /* en */,
+ );
+ name = Credits.rtf;
+ sourceTree = "<group>";
+ };
+ DCD1918C154B458500659E75 /* MainMenu.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ DCD1918D154B458500659E75 /* en */,
+ );
+ name = MainMenu.xib;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ DCD1918F154B458500659E75 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = macosx;
+ };
+ name = Debug;
+ };
+ DCD19190154B458500659E75 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ SDKROOT = macosx;
+ };
+ name = Release;
+ };
+ DCD19192154B458500659E75 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "MulticastDelegateTest/MulticastDelegateTest-Prefix.pch";
+ INFOPLIST_FILE = "MulticastDelegateTest/MulticastDelegateTest-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ DCD19193154B458500659E75 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "MulticastDelegateTest/MulticastDelegateTest-Prefix.pch";
+ INFOPLIST_FILE = "MulticastDelegateTest/MulticastDelegateTest-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ DCD1916D154B458500659E75 /* Build configuration list for PBXProject "MulticastDelegateTest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ DCD1918F154B458500659E75 /* Debug */,
+ DCD19190154B458500659E75 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ DCD19191154B458500659E75 /* Build configuration list for PBXNativeTarget "MulticastDelegateTest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ DCD19192154B458500659E75 /* Debug */,
+ DCD19193154B458500659E75 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = DCD1916A154B458500659E75 /* Project object */;
+}
View
0  ...proj/project.xcworkspace/contents.xcworkspacedata → ...proj/project.xcworkspace/contents.xcworkspacedata
File renamed without changes
View
8 Xcode/Testing/MulticastDelegateTest/Desktop/MulticastDelegateTest/AppDelegate.h
@@ -0,0 +1,8 @@
+#import <Cocoa/Cocoa.h>
+
+
+@interface AppDelegate : NSObject <NSApplicationDelegate>
+
+@property (assign) IBOutlet NSWindow *window;
+
+@end
View
14 Xcode/Testing/MulticastDelegateTest/Desktop/MulticastDelegateTest/AppDelegate.m
@@ -0,0 +1,14 @@
+#import "AppDelegate.h"
+#import "MulticastDelegateTest.h"
+
+
+@implementation AppDelegate
+
+@synthesize window = _window;
+
+- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
+{
+ [[MulticastDelegateTest sharedInstance] test];
+}
+
+@end
View
14 ...castDelegateTest/MulticastDelegateTest-Info.plist → ...castDelegateTest/MulticastDelegateTest-Info.plist
@@ -3,27 +3,29 @@
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
- <string>English</string>
+ <string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
- <string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
+ <string>com.deusty.${PRODUCT_NAME:rfc1034identifier}</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>CFBundleShortVersionString</key>
<string>1.0</string>
- <key>LSMinimumSystemVersion</key>
- <string>${MACOSX_DEPLOYMENT_TARGET}</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>${MACOSX_DEPLOYMENT_TARGET}</string>
+ <key>NSHumanReadableCopyright</key>
+ <string>Copyright © 2012 __MyCompanyName__. All rights reserved.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
View
2  ...castDelegateTest/MulticastDelegateTest_Prefix.pch → ...castDelegateTest/MulticastDelegateTest-Prefix.pch
@@ -3,5 +3,5 @@
//
#ifdef __OBJC__
- #import <Cocoa/Cocoa.h>
+ #import <Cocoa/Cocoa.h>
#endif
View
29 Xcode/Testing/MulticastDelegateTest/Desktop/MulticastDelegateTest/en.lproj/Credits.rtf
@@ -0,0 +1,29 @@
+{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\paperw9840\paperh8400
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\f0\b\fs24 \cf0 Engineering:
+\b0 \
+ Some people\
+\
+
+\b Human Interface Design:
+\b0 \
+ Some other people\
+\
+
+\b Testing:
+\b0 \
+ Hopefully not nobody\
+\
+
+\b Documentation:
+\b0 \
+ Whoever\
+\
+
+\b With special thanks to:
+\b0 \
+ Mom\
+}
View
0  ...icastDelegateTest/English.lproj/InfoPlist.strings → .../MulticastDelegateTest/en.lproj/InfoPlist.strings
File renamed without changes
View
2,806 .../MulticastDelegateTest/English.lproj/MainMenu.xib → ...sktop/MulticastDelegateTest/en.lproj/MainMenu.xib
1,637 additions, 1,169 deletions not shown
View
14 Xcode/Testing/MulticastDelegateTest/Desktop/MulticastDelegateTest/main.m
@@ -0,0 +1,14 @@
+//
+// main.m
+// MulticastDelegateTest
+//
+// Created by Robbie Hanson on 4/27/12.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+int main(int argc, char *argv[])
+{
+ return NSApplicationMain(argc, (const char **)argv);
+}
View
308 Xcode/Testing/MulticastDelegateTest/Mobile/MulticastDelegateTest.xcodeproj/project.pbxproj
@@ -0,0 +1,308 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ DCD1912C154B3F8900659E75 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DCD1912B154B3F8900659E75 /* UIKit.framework */; };
+ DCD1912E154B3F8900659E75 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DCD1912D154B3F8900659E75 /* Foundation.framework */; };
+ DCD19130154B3F8900659E75 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DCD1912F154B3F8900659E75 /* CoreGraphics.framework */; };
+ DCD19136154B3F8900659E75 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DCD19134154B3F8900659E75 /* InfoPlist.strings */; };
+ DCD19138154B3F8900659E75 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DCD19137154B3F8900659E75 /* main.m */; };
+ DCD1913C154B3F8900659E75 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DCD1913B154B3F8900659E75 /* AppDelegate.m */; };
+ DCD191AF154B4ACB00659E75 /* GCDMulticastDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DCD191AE154B4ACB00659E75 /* GCDMulticastDelegate.m */; };
+ DCD191B6154B4AE000659E75 /* DelegateTesters.m in Sources */ = {isa = PBXBuildFile; fileRef = DCD191B2154B4AE000659E75 /* DelegateTesters.m */; };
+ DCD191B7154B4AE000659E75 /* MulticastDelegateTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DCD191B4154B4AE000659E75 /* MulticastDelegateTest.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ DCD19127154B3F8900659E75 /* MulticastDelegateTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MulticastDelegateTest.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ DCD1912B154B3F8900659E75 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ DCD1912D154B3F8900659E75 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ DCD1912F154B3F8900659E75 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ DCD19133154B3F8900659E75 /* MulticastDelegateTest-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "MulticastDelegateTest-Info.plist"; sourceTree = "<group>"; };
+ DCD19135154B3F8900659E75 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ DCD19137154B3F8900659E75 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ DCD19139154B3F8900659E75 /* MulticastDelegateTest-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MulticastDelegateTest-Prefix.pch"; sourceTree = "<group>"; };
+ DCD1913A154B3F8900659E75 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+ DCD1913B154B3F8900659E75 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+ DCD191AD154B4ACB00659E75 /* GCDMulticastDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GCDMulticastDelegate.h; path = ../../../../Utilities/GCDMulticastDelegate.h; sourceTree = "<group>"; };
+ DCD191AE154B4ACB00659E75 /* GCDMulticastDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GCDMulticastDelegate.m; path = ../../../../Utilities/GCDMulticastDelegate.m; sourceTree = "<group>"; };
+ DCD191B1154B4AE000659E75 /* DelegateTesters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DelegateTesters.h; path = ../Shared/DelegateTesters.h; sourceTree = "<group>"; };
+ DCD191B2154B4AE000659E75 /* DelegateTesters.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DelegateTesters.m; path = ../Shared/DelegateTesters.m; sourceTree = "<group>"; };
+ DCD191B3154B4AE000659E75 /* MulticastDelegateTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MulticastDelegateTest.h; path = ../Shared/MulticastDelegateTest.h; sourceTree = "<group>"; };
+ DCD191B4154B4AE000659E75 /* MulticastDelegateTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MulticastDelegateTest.m; path = ../Shared/MulticastDelegateTest.m; sourceTree = "<group>"; };
+ DCD191B5154B4AE000659E75 /* MyProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MyProtocol.h; path = ../Shared/MyProtocol.h; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ DCD19124154B3F8900659E75 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ DCD1912C154B3F8900659E75 /* UIKit.framework in Frameworks */,
+ DCD1912E154B3F8900659E75 /* Foundation.framework in Frameworks */,
+ DCD19130154B3F8900659E75 /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ DCD1911C154B3F8900659E75 = {
+ isa = PBXGroup;
+ children = (
+ DCD191AA154B4AB500659E75 /* XMPP */,
+ DCD191B0154B4ACF00659E75 /* Testing */,
+ DCD19131154B3F8900659E75 /* MulticastDelegateTest */,
+ DCD1912A154B3F8900659E75 /* Frameworks */,
+ DCD19128154B3F8900659E75 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ DCD19128154B3F8900659E75 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ DCD19127154B3F8900659E75 /* MulticastDelegateTest.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ DCD1912A154B3F8900659E75 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ DCD1912B154B3F8900659E75 /* UIKit.framework */,
+ DCD1912D154B3F8900659E75 /* Foundation.framework */,
+ DCD1912F154B3F8900659E75 /* CoreGraphics.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ DCD19131154B3F8900659E75 /* MulticastDelegateTest */ = {
+ isa = PBXGroup;
+ children = (
+ DCD1913A154B3F8900659E75 /* AppDelegate.h */,
+ DCD1913B154B3F8900659E75 /* AppDelegate.m */,
+ DCD19132154B3F8900659E75 /* Supporting Files */,
+ );
+ path = MulticastDelegateTest;
+ sourceTree = "<group>";
+ };
+ DCD19132154B3F8900659E75 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ DCD19133154B3F8900659E75 /* MulticastDelegateTest-Info.plist */,
+ DCD19134154B3F8900659E75 /* InfoPlist.strings */,
+ DCD19137154B3F8900659E75 /* main.m */,
+ DCD19139154B3F8900659E75 /* MulticastDelegateTest-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ DCD191AA154B4AB500659E75 /* XMPP */ = {
+ isa = PBXGroup;
+ children = (
+ DCD191AC154B4ABA00659E75 /* Utilities */,
+ );
+ name = XMPP;
+ sourceTree = "<group>";
+ };
+ DCD191AC154B4ABA00659E75 /* Utilities */ = {
+ isa = PBXGroup;
+ children = (
+ DCD191AD154B4ACB00659E75 /* GCDMulticastDelegate.h */,
+ DCD191AE154B4ACB00659E75 /* GCDMulticastDelegate.m */,
+ );
+ name = Utilities;
+ sourceTree = "<group>";
+ };
+ DCD191B0154B4ACF00659E75 /* Testing */ = {
+ isa = PBXGroup;
+ children = (
+ DCD191B5154B4AE000659E75 /* MyProtocol.h */,
+ DCD191B3154B4AE000659E75 /* MulticastDelegateTest.h */,
+ DCD191B4154B4AE000659E75 /* MulticastDelegateTest.m */,
+ DCD191B1154B4AE000659E75 /* DelegateTesters.h */,
+ DCD191B2154B4AE000659E75 /* DelegateTesters.m */,
+ );
+ name = Testing;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ DCD19126154B3F8900659E75 /* MulticastDelegateTest */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = DCD1913F154B3F8900659E75 /* Build configuration list for PBXNativeTarget "MulticastDelegateTest" */;
+ buildPhases = (
+ DCD19123154B3F8900659E75 /* Sources */,
+ DCD19124154B3F8900659E75 /* Frameworks */,
+ DCD19125154B3F8900659E75 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = MulticastDelegateTest;
+ productName = MulticastDelegateTest;
+ productReference = DCD19127154B3F8900659E75 /* MulticastDelegateTest.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ DCD1911E154B3F8900659E75 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0430;
+ };
+ buildConfigurationList = DCD19121154B3F8900659E75 /* Build configuration list for PBXProject "MulticastDelegateTest" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = DCD1911C154B3F8900659E75;
+ productRefGroup = DCD19128154B3F8900659E75 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ DCD19126154B3F8900659E75 /* MulticastDelegateTest */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ DCD19125154B3F8900659E75 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ DCD19136154B3F8900659E75 /* InfoPlist.strings in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ DCD19123154B3F8900659E75 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ DCD19138154B3F8900659E75 /* main.m in Sources */,
+ DCD1913C154B3F8900659E75 /* AppDelegate.m in Sources */,
+ DCD191AF154B4ACB00659E75 /* GCDMulticastDelegate.m in Sources */,
+ DCD191B6154B4AE000659E75 /* DelegateTesters.m in Sources */,
+ DCD191B7154B4AE000659E75 /* MulticastDelegateTest.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ DCD19134154B3F8900659E75 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ DCD19135154B3F8900659E75 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ DCD1913D154B3F8900659E75 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ DCD1913E154B3F8900659E75 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ SDKROOT = iphoneos;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ DCD19140154B3F8900659E75 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "MulticastDelegateTest/MulticastDelegateTest-Prefix.pch";
+ INFOPLIST_FILE = "MulticastDelegateTest/MulticastDelegateTest-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ DCD19141154B3F8900659E75 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "MulticastDelegateTest/MulticastDelegateTest-Prefix.pch";
+ INFOPLIST_FILE = "MulticastDelegateTest/MulticastDelegateTest-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ DCD19121154B3F8900659E75 /* Build configuration list for PBXProject "MulticastDelegateTest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ DCD1913D154B3F8900659E75 /* Debug */,
+ DCD1913E154B3F8900659E75 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ DCD1913F154B3F8900659E75 /* Build configuration list for PBXNativeTarget "MulticastDelegateTest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ DCD19140154B3F8900659E75 /* Debug */,
+ DCD19141154B3F8900659E75 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = DCD1911E154B3F8900659E75 /* Project object */;
+}
View
7 ...ulticastDelegateTest/Mobile/MulticastDelegateTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:MulticastDelegateTest.xcodeproj">
+ </FileRef>
+</Workspace>
View
8 Xcode/Testing/MulticastDelegateTest/Mobile/MulticastDelegateTest/AppDelegate.h
@@ -0,0 +1,8 @@
+#import <UIKit/UIKit.h>
+
+
+@interface AppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@end
View
30 Xcode/Testing/MulticastDelegateTest/Mobile/MulticastDelegateTest/AppDelegate.m
@@ -0,0 +1,30 @@
+#import "AppDelegate.h"
+#import "MulticastDelegateTest.h"
+
+
+@implementation AppDelegate
+
+@synthesize window = _window;
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ double delayInSeconds = 2.0;
+
+ dispatch_async(dispatch_get_main_queue(), ^{
+
+ NSLog(@"Starting test in 2 seconds...");
+ });
+
+ dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
+ dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
+
+ [[MulticastDelegateTest sharedInstance] test];
+ });
+
+ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+ self.window.backgroundColor = [UIColor whiteColor];
+ [self.window makeKeyAndVisible];
+ return YES;
+}
+
+@end
View
38 Xcode/Testing/MulticastDelegateTest/Mobile/MulticastDelegateTest/MulticastDelegateTest-Info.plist
@@ -0,0 +1,38 @@
+<?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>CFBundleIdentifier</key>
+ <string>com.deusty.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
View
14 Xcode/Testing/MulticastDelegateTest/Mobile/MulticastDelegateTest/MulticastDelegateTest-Prefix.pch
@@ -0,0 +1,14 @@
+//
+// Prefix header for all source files of the 'MulticastDelegateTest' target in the 'MulticastDelegateTest' project
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_3_0
+#warning "This project uses features only available in iOS SDK 3.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
View
2  Xcode/Testing/MulticastDelegateTest/Mobile/MulticastDelegateTest/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
View
18 Xcode/Testing/MulticastDelegateTest/Mobile/MulticastDelegateTest/main.m
@@ -0,0 +1,18 @@
+//
+// main.m
+// MulticastDelegateTest
+//
+// Created by Robbie Hanson on 4/27/12.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import "AppDelegate.h"
+
+int main(int argc, char *argv[])
+{
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
+ }
+}
View
318 Xcode/Testing/MulticastDelegateTest/MulticastDelegateTest.xcodeproj/project.pbxproj
@@ -1,318 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 46;
- objects = {
-
-/* Begin PBXBuildFile section */
- 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
- 256AC3DA0F4B6AC300CF3369 /* MulticastDelegateTestAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 256AC3D90F4B6AC300CF3369 /* MulticastDelegateTestAppDelegate.m */; };
- 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
- 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
- 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
- DC5016AF10DBDD0100562A7B /* Class1.m in Sources */ = {isa = PBXBuildFile; fileRef = DC5016AE10DBDD0100562A7B /* Class1.m */; };
- DC5016B210DBDD0B00562A7B /* Class2.m in Sources */ = {isa = PBXBuildFile; fileRef = DC5016B110DBDD0B00562A7B /* Class2.m */; };
- DCC0C1541302FABC00EC45D2 /* GCDMulticastDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DCC0C1531302FABC00EC45D2 /* GCDMulticastDelegate.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
- 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
- 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
- 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
- 1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
- 256AC3D80F4B6AC300CF3369 /* MulticastDelegateTestAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MulticastDelegateTestAppDelegate.h; sourceTree = "<group>"; };
- 256AC3D90F4B6AC300CF3369 /* MulticastDelegateTestAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MulticastDelegateTestAppDelegate.m; sourceTree = "<group>"; };
- 256AC3F00F4B6AF500CF3369 /* MulticastDelegateTest_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MulticastDelegateTest_Prefix.pch; sourceTree = "<group>"; };
- 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
- 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
- 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
- 8D1107310486CEB800E47090 /* MulticastDelegateTest-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "MulticastDelegateTest-Info.plist"; sourceTree = "<group>"; };
- 8D1107320486CEB800E47090 /* MulticastDelegateTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MulticastDelegateTest.app; sourceTree = BUILT_PRODUCTS_DIR; };
- DC5016AC10DBDC2100562A7B /* MyProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyProtocol.h; sourceTree = "<group>"; };
- DC5016AD10DBDD0100562A7B /* Class1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Class1.h; sourceTree = "<group>"; };
- DC5016AE10DBDD0100562A7B /* Class1.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Class1.m; sourceTree = "<group>"; };
- DC5016B010DBDD0B00562A7B /* Class2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Class2.h; sourceTree = "<group>"; };
- DC5016B110DBDD0B00562A7B /* Class2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Class2.m; sourceTree = "<group>"; };
- DCC0C1521302FABC00EC45D2 /* GCDMulticastDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GCDMulticastDelegate.h; path = ../../../Utilities/GCDMulticastDelegate.h; sourceTree = SOURCE_ROOT; };
- DCC0C1531302FABC00EC45D2 /* GCDMulticastDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GCDMulticastDelegate.m; path = ../../../Utilities/GCDMulticastDelegate.m; sourceTree = SOURCE_ROOT; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 8D11072E0486CEB800E47090 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 080E96DDFE201D6D7F000001 /* Classes */ = {
- isa = PBXGroup;
- children = (
- DC5016AC10DBDC2100562A7B /* MyProtocol.h */,
- 256AC3D80F4B6AC300CF3369 /* MulticastDelegateTestAppDelegate.h */,
- 256AC3D90F4B6AC300CF3369 /* MulticastDelegateTestAppDelegate.m */,
- DC5016AD10DBDD0100562A7B /* Class1.h */,
- DC5016AE10DBDD0100562A7B /* Class1.m */,
- DC5016B010DBDD0B00562A7B /* Class2.h */,
- DC5016B110DBDD0B00562A7B /* Class2.m */,
- );
- name = Classes;
- sourceTree = "<group>";
- };
- 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
- isa = PBXGroup;
- children = (
- 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
- );
- name = "Linked Frameworks";
- sourceTree = "<group>";
- };
- 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
- isa = PBXGroup;
- children = (
- 29B97324FDCFA39411CA2CEA /* AppKit.framework */,
- 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
- 29B97325FDCFA39411CA2CEA /* Foundation.framework */,
- );
- name = "Other Frameworks";
- sourceTree = "<group>";
- };
- 19C28FACFE9D520D11CA2CBB /* Products */ = {
- isa = PBXGroup;
- children = (
- 8D1107320486CEB800E47090 /* MulticastDelegateTest.app */,
- );
- name = Products;
- sourceTree = "<group>";
- };
- 29B97314FDCFA39411CA2CEA /* MulticastDelegateTest */ = {
- isa = PBXGroup;
- children = (
- DCC0C1521302FABC00EC45D2 /* GCDMulticastDelegate.h */,
- DCC0C1531302FABC00EC45D2 /* GCDMulticastDelegate.m */,
- 080E96DDFE201D6D7F000001 /* Classes */,
- 29B97315FDCFA39411CA2CEA /* Other Sources */,
- 29B97317FDCFA39411CA2CEA /* Resources */,
- 29B97323FDCFA39411CA2CEA /* Frameworks */,
- 19C28FACFE9D520D11CA2CBB /* Products */,
- );
- name = MulticastDelegateTest;
- sourceTree = "<group>";
- };
- 29B97315FDCFA39411CA2CEA /* Other Sources */ = {
- isa = PBXGroup;
- children = (
- 256AC3F00F4B6AF500CF3369 /* MulticastDelegateTest_Prefix.pch */,
- 29B97316FDCFA39411CA2CEA /* main.m */,
- );
- name = "Other Sources";
- sourceTree = "<group>";
- };
- 29B97317FDCFA39411CA2CEA /* Resources */ = {
- isa = PBXGroup;
- children = (
- 8D1107310486CEB800E47090 /* MulticastDelegateTest-Info.plist */,
- 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
- 1DDD58140DA1D0A300B32029 /* MainMenu.xib */,
- );
- name = Resources;
- sourceTree = "<group>";
- };
- 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
- 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
- );
- name = Frameworks;
- sourceTree = "<group>";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 8D1107260486CEB800E47090 /* MulticastDelegateTest */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "MulticastDelegateTest" */;
- buildPhases = (
- 8D1107290486CEB800E47090 /* Resources */,
- 8D11072C0486CEB800E47090 /* Sources */,
- 8D11072E0486CEB800E47090 /* Frameworks */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = MulticastDelegateTest;
- productInstallPath = "$(HOME)/Applications";
- productName = MulticastDelegateTest;
- productReference = 8D1107320486CEB800E47090 /* MulticastDelegateTest.app */;
- productType = "com.apple.product-type.application";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 29B97313FDCFA39411CA2CEA /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastUpgradeCheck = 0430;
- };
- buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MulticastDelegateTest" */;
- compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
- hasScannedForEncodings = 1;
- knownRegions = (
- English,
- Japanese,
- French,
- German,
- );
- mainGroup = 29B97314FDCFA39411CA2CEA /* MulticastDelegateTest */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 8D1107260486CEB800E47090 /* MulticastDelegateTest */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 8D1107290486CEB800E47090 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
- 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 8D11072C0486CEB800E47090 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 8D11072D0486CEB800E47090 /* main.m in Sources */,
- 256AC3DA0F4B6AC300CF3369 /* MulticastDelegateTestAppDelegate.m in Sources */,
- DC5016AF10DBDD0100562A7B /* Class1.m in Sources */,
- DC5016B210DBDD0B00562A7B /* Class2.m in Sources */,
- DCC0C1541302FABC00EC45D2 /* GCDMulticastDelegate.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
- 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
- isa = PBXVariantGroup;
- children = (
- 089C165DFE840E0CC02AAC07 /* English */,
- );
- name = InfoPlist.strings;
- sourceTree = "<group>";
- };
- 1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = {
- isa = PBXVariantGroup;
- children = (
- 1DDD58150DA1D0A300B32029 /* English */,
- );
- name = MainMenu.xib;
- sourceTree = "<group>";
- };
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
- C01FCF4B08A954540054247B /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = "$(ARCHS_STANDARD_64_BIT)";
- CLANG_ENABLE_OBJC_ARC = YES;
- COPY_PHASE_STRIP = NO;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_MODEL_TUNING = G5;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = MulticastDelegateTest_Prefix.pch;
- GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
- INFOPLIST_FILE = "MulticastDelegateTest-Info.plist";
- INSTALL_PATH = "$(HOME)/Applications";
- PRODUCT_NAME = MulticastDelegateTest;
- SDKROOT = macosx;
- };
- name = Debug;
- };
- C01FCF4C08A954540054247B /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = "$(ARCHS_STANDARD_64_BIT)";
- CLANG_ENABLE_OBJC_ARC = YES;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- GCC_MODEL_TUNING = G5;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = MulticastDelegateTest_Prefix.pch;
- GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
- INFOPLIST_FILE = "MulticastDelegateTest-Info.plist";
- INSTALL_PATH = "$(HOME)/Applications";
- PRODUCT_NAME = MulticastDelegateTest;
- SDKROOT = macosx;
- };
- name = Release;
- };
- C01FCF4F08A954540054247B /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = macosx;
- };
- name = Debug;
- };
- C01FCF5008A954540054247B /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- SDKROOT = macosx;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "MulticastDelegateTest" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- C01FCF4B08A954540054247B /* Debug */,
- C01FCF4C08A954540054247B /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MulticastDelegateTest" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- C01FCF4F08A954540054247B /* Debug */,
- C01FCF5008A954540054247B /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
-}
View
24 Xcode/Testing/MulticastDelegateTest/MulticastDelegateTestAppDelegate.h
@@ -1,24 +0,0 @@
-#import <Cocoa/Cocoa.h>
-#import "MyProtocol.h"
-#import "GCDMulticastDelegate.h"
-
-@class Class1;
-@class Class2;
-
-@interface MulticastDelegateTestAppDelegate : NSObject <NSApplicationDelegate>
-{
- GCDMulticastDelegate <MyProtocol> *multicastDelegate;
-
- dispatch_queue_t queue1;
- dispatch_queue_t queue2;
- dispatch_queue_t queue3;
-
- Class1 *del1;
- Class2 *del2;
-
- NSWindow *__unsafe_unretained window;
-}
-
-@property (unsafe_unretained) IBOutlet NSWindow *window;
-
-@end
View
185 Xcode/Testing/MulticastDelegateTest/MulticastDelegateTestAppDelegate.m
@@ -1,185 +0,0 @@
-#import "MulticastDelegateTestAppDelegate.h"
-#import "Class1.h"
-#import "Class2.h"
-#import <libkern/OSAtomic.h>
-
-#define dispatch_current_queue_label() dispatch_queue_get_label(dispatch_get_current_queue())
-
-@interface MulticastDelegateTestAppDelegate (PrivateAPI)
-
-- (void)testVoidMethods;
-- (void)testAnyBoolMethod;
-- (void)testAllBoolMethod;
-
-@end
-
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark -
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-@implementation MulticastDelegateTestAppDelegate
-
-@synthesize window;
-
-- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
-{
- multicastDelegate = (GCDMulticastDelegate <MyProtocol> *)[[GCDMulticastDelegate alloc] init];
-
- del1 = [[Class1 alloc] init];
- del2 = [[Class2 alloc] init];
-
- queue1 = dispatch_queue_create("S", NULL);
- queue2 = dispatch_queue_create("1", NULL);
- queue3 = dispatch_queue_create("2", NULL);
-
- [multicastDelegate addDelegate:self delegateQueue:queue1];
- [multicastDelegate addDelegate:del1 delegateQueue:queue2];
- [multicastDelegate addDelegate:del2 delegateQueue:queue3];
-
- [self testVoidMethods];
- [self testAnyBoolMethod];
- [self testAllBoolMethod];
-}
-
-- (void)testVoidMethods
-{
- [multicastDelegate didSomething];
- [multicastDelegate didSomethingElse:YES];
-
- [multicastDelegate foundString:@"I like cheese"];
- [multicastDelegate foundString:@"The lucky number is" andNumber:[NSNumber numberWithInt:15]];
-}
-
-- (void)testAnyBoolMethod
-{
- // If ANY of the delegates return YES, then the result is YES.
- // Otherwise the result is NO.
- // If there are no delegates, the default result is NO.
-
- SEL selector = @selector(shouldSing);
- BOOL result = NO;
-
- GCDMulticastDelegateEnumerator *delegateEnum = [multicastDelegate delegateEnumerator];
-
- dispatch_group_t delGroup = dispatch_group_create();
- dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
-
- id del;
- dispatch_queue_t dq;
-
- while ([delegateEnum getNextDelegate:&del delegateQueue:&dq forSelector:selector])
- {
- dispatch_group_async(delGroup, dq, ^{ @autoreleasepool {
-
- if ([del shouldSing])
- {
- dispatch_semaphore_signal(semaphore);
- }
- }});
- }
-
- dispatch_group_wait(delGroup, DISPATCH_TIME_FOREVER);
-
- if (dispatch_semaphore_wait(semaphore, DISPATCH_TIME_NOW) == 0)
- result = YES;
- else
- result = NO;
-
- dispatch_release(delGroup);
- dispatch_release(semaphore);
-
- NSLog(@"%@ (ANY) = %@", NSStringFromSelector(selector), (result ? @"YES" : @"NO"));
-}
-
-- (void)testAllBoolMethod
-{
- // If ALL of the delegates return YES, then the result is YES.
- // If ANY of the delegates returns NO, then the result is NO.
- // If there are no delegates, the default answer is YES.
-
- SEL selector = @selector(shouldDance);
- BOOL result = YES;
-
- GCDMulticastDelegateEnumerator *delegateEnum = [multicastDelegate delegateEnumerator];
-
- int32_t total = (int32_t)[delegateEnum countForSelector:selector];
-
- dispatch_group_t delGroup = dispatch_group_create();
- __block int32_t value = 0;
-
- id del;
- dispatch_queue_t dq;
-
- while ([delegateEnum getNextDelegate:&del delegateQueue:&dq forSelector:selector])
- {
- dispatch_group_async(delGroup, dq, ^{ @autoreleasepool {
-
- if ([del shouldDance])
- {
- OSAtomicIncrement32(&value);
- }
- }});
- }
-
- dispatch_group_wait(delGroup, DISPATCH_TIME_FOREVER);
- OSMemoryBarrier();
-
- if (OSAtomicCompareAndSwap32(total, total, &value))
- result = YES;
- else
- result = NO;
-
- NSLog(@"%@ (ALL) = %@", NSStringFromSelector(selector), (result ? @"YES" : @"NO"));
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Delegate Methods
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-- (void)didSomething
-{
- NSLog(@"Self(%s) : didSomething", dispatch_current_queue_label());
-}
-
-- (void)didSomethingElse:(BOOL)flag
-{
- NSLog(@"Self(%s) : didSomethingElse:%@", dispatch_current_queue_label(), (flag ? @"YES" : @"NO"));
-}
-
-- (void)foundString:(NSString *)str
-{
- NSLog(@"Self(%s) : foundString:\"%@\"", dispatch_current_queue_label(), str);
-
-// [multicastDelegate removeDelegate:self];
-// [multicastDelegate removeDelegate:del2];
-}
-
-- (void)foundString:(NSString *)str andNumber:(NSNumber *)num
-{
- NSLog(@"Self(%s) : foundString:\"%@\" andNumber:%@", dispatch_current_queue_label(), str, num);
-}
-
-- (BOOL)shouldSing
-{
- BOOL answer = NO;
-
- NSLog(@"Self(%s) : shouldSing: returning %@", dispatch_current_queue_label(), (answer ? @"YES" : @"NO"));
-
- return answer;
-}
-
-- (BOOL)shouldDance
-{
- BOOL answer = NO;
-
- NSLog(@"Self(%s) : shouldDance: returning %@", dispatch_current_queue_label(), (answer ? @"YES" : @"NO"));
-
- return answer;
-}
-
-- (void)fastTrack
-{
- NSLog(@"Self(%s) : fastTrack", dispatch_current_queue_label());
-}
-
-@end
View
14 Xcode/Testing/MulticastDelegateTest/Shared/DelegateTesters.h
@@ -0,0 +1,14 @@
+#import <Foundation/Foundation.h>
+
+
+@interface DelegateTester1 : NSObject
+
+@end
+
+@interface DelegateTester2 : NSObject
+
+@end
+
+@interface DelegateTester3 : NSObject
+
+@end
View
143 Xcode/Testing/MulticastDelegateTest/Shared/DelegateTesters.m
@@ -0,0 +1,143 @@
+#import "DelegateTesters.h"
+
+#define dispatch_current_queue_label() dispatch_queue_get_label(dispatch_get_current_queue())
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+#pragma mark -
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+@implementation DelegateTester1
+
+- (void)didSomething
+{
+ NSLog(@"%s: didSomething", dispatch_current_queue_label());
+}
+
+- (void)didSomethingElse:(BOOL)flag
+{
+ NSLog(@"%s: didSomethingElse:%@", dispatch_current_queue_label(), (flag ? @"YES" : @"NO"));
+}
+
+- (void)foundString:(NSString *)str
+{
+ NSLog(@"%s: foundString:\"%@\"", dispatch_current_queue_label(), str);
+
+ [NSThread sleepForTimeInterval:0.2];
+}
+
+- (void)foundString:(NSString *)str andNumber:(NSNumber *)num
+{
+ NSLog(@"%s: foundString:\"%@\" andNumber:%@", dispatch_current_queue_label(), str, num);
+}
+
+- (BOOL)shouldSing
+{
+ BOOL answer = NO;
+
+ NSLog(@"%s: shouldSing: returning %@", dispatch_current_queue_label(), (answer ? @"YES" : @"NO"));
+
+ return answer;
+}
+
+- (BOOL)shouldDance
+{
+ BOOL answer = YES;
+
+ NSLog(@"%s: shouldDance: returning %@", dispatch_current_queue_label(), (answer ? @"YES" : @"NO"));
+
+ return answer;
+}
+
+@end
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+#pragma mark -
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+@implementation DelegateTester2
+
+- (void)didSomething
+{
+ NSLog(@"%s: didSomething", dispatch_current_queue_label());
+}
+
+- (void)didSomethingElse:(BOOL)flag
+{
+ NSLog(@"%s: didSomethingElse:%@", dispatch_current_queue_label(), (flag ? @"YES" : @"NO"));
+}
+
+- (void)foundString:(NSString *)str
+{
+ NSLog(@"%s: foundString:\"%@\"", dispatch_current_queue_label(), str);
+}
+
+- (void)foundString:(NSString *)str andNumber:(NSNumber *)num
+{
+ NSLog(@"%s: foundString:\"%@\" andNumber:%@", dispatch_current_queue_label(), str, num);
+}
+
+- (BOOL)shouldSing
+{
+ BOOL answer = NO;
+
+ NSLog(@"%s: shouldSing: returning %@", dispatch_current_queue_label(), (answer ? @"YES" : @"NO"));
+
+ return answer;
+}
+
+- (BOOL)shouldDance
+{
+ BOOL answer = YES;
+
+ NSLog(@"%s: shouldDance: returning %@", dispatch_current_queue_label(), (answer ? @"YES" : @"NO"));
+
+ return answer;
+}
+
+@end
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+#pragma mark -
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+@implementation DelegateTester3
+
+- (void)didSomething
+{
+ NSLog(@"%s: didSomething", dispatch_current_queue_label());
+}
+
+- (void)didSomethingElse:(BOOL)flag
+{
+ NSLog(@"%s: didSomethingElse:%@", dispatch_current_queue_label(), (flag ? @"YES" : @"NO"));
+}
+
+- (void)foundString:(NSString *)str
+{
+ NSLog(@"%s: foundString:\"%@\"", dispatch_current_queue_label(), str);
+}
+
+- (void)foundString:(NSString *)str andNumber:(NSNumber *)num
+{
+ NSLog(@"%s: foundString:\"%@\" andNumber:%@", dispatch_current_queue_label(), str, num);
+}
+
+- (BOOL)shouldSing
+{
+ BOOL answer = YES;
+
+ NSLog(@"%s: shouldSing: returning %@", dispatch_current_queue_label(), (answer ? @"YES" : @"NO"));
+
+ return answer;
+}
+
+- (BOOL)shouldDance
+{
+ BOOL answer = NO;
+
+ NSLog(@"%s: shouldDance: returning %@", dispatch_current_queue_label(), (answer ? @"YES" : @"NO"));
+
+ return answer;
+}
+
+@end
View
10 Xcode/Testing/MulticastDelegateTest/Shared/MulticastDelegateTest.h
@@ -0,0 +1,10 @@
+#import <Foundation/Foundation.h>
+
+
+@interface MulticastDelegateTest : NSObject
+
++ (MulticastDelegateTest *)sharedInstance;
+
+- (void)test;
+
+@end
View
186 Xcode/Testing/MulticastDelegateTest/Shared/MulticastDelegateTest.m
@@ -0,0 +1,186 @@
+#import "MulticastDelegateTest.h"
+#import "GCDMulticastDelegate.h"
+#import "MyProtocol.h"
+#import "DelegateTesters.h"
+
+
+@interface MulticastDelegateTest ()
+{
+ GCDMulticastDelegate <MyProtocol> *multicastDelegate;
+
+ dispatch_queue_t queue1;
+ dispatch_queue_t queue2;
+ dispatch_queue_t queue3;
+
+ DelegateTester1 *del1;
+ DelegateTester2 *del2;
+ DelegateTester3 *del3;
+}
+
+- (void)testVoidMethods;
+- (void)testBoolMethod1;
+- (void)testBoolMethod2;
+- (void)testWeakReferenceSystem;
+
+@end
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+#pragma mark -
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+@implementation MulticastDelegateTest
+
+static MulticastDelegateTest *sharedInstance;
+
++ (MulticastDelegateTest *)sharedInstance
+{
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+
+ sharedInstance = [[MulticastDelegateTest alloc] init];
+ });
+
+ return sharedInstance;
+}
+
+- (id)init
+{
+ if ((self = [super init]))
+ {
+ multicastDelegate = (GCDMulticastDelegate <MyProtocol> *)[[GCDMulticastDelegate alloc] init];
+
+ del1 = [[DelegateTester1 alloc] init];
+ del2 = [[DelegateTester2 alloc] init];
+ del3 = [[DelegateTester3 alloc] init];
+
+ queue1 = dispatch_queue_create("(1 )", NULL);
+ queue2 = dispatch_queue_create("( 2 )", NULL);
+ queue3 = dispatch_queue_create("( 3)", NULL);
+
+ [multicastDelegate addDelegate:del1 delegateQueue:queue1];
+ [multicastDelegate addDelegate:del2 delegateQueue:queue2];
+ [multicastDelegate addDelegate:del3 delegateQueue:queue3];
+ }
+ return self;
+}
+
+- (void)test
+{
+ [self testVoidMethods];
+ [self testBoolMethod1];
+ [self testBoolMethod2];
+
+ dispatch_async(dispatch_get_main_queue(), ^{
+
+ [self testWeakReferenceSystem];
+ });
+}
+
+- (void)testVoidMethods
+{
+ [multicastDelegate didSomething];
+ [multicastDelegate didSomethingElse:YES];
+
+ [multicastDelegate foundString:@"I like cheese"];
+ [multicastDelegate foundString:@"The lucky number is" andNumber:[NSNumber numberWithInt:15]];
+}
+
+- (void)testBoolMethod1
+{
+ // If ANY of the delegates return YES, then the result is YES.
+ // Otherwise the result is NO.
+
+ BOOL result = NO;
+ SEL selector = @selector(shouldSing);
+
+ NSUInteger delegateCount = [multicastDelegate countForSelector:selector];
+ if (delegateCount == 0)
+ {
+ // No delegates implement selector
+ NSLog(@"%@ (Any YES -> YES, otherwise NO) = %@", NSStringFromSelector(selector), (result ? @"YES" : @"NO"));
+ }
+ else
+ {
+ GCDMulticastDelegateEnumerator *delegateEnum = [multicastDelegate delegateEnumerator];
+
+ dispatch_group_t delGroup = dispatch_group_create();
+ dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
+
+ id del;
+ dispatch_queue_t dq;
+
+ while ([delegateEnum getNextDelegate:&del delegateQueue:&dq forSelector:selector])
+ {
+ dispatch_group_async(delGroup, dq, ^{ @autoreleasepool {
+
+ if ([del shouldSing])
+ {
+ dispatch_semaphore_signal(semaphore);
+ }
+ }});
+ }
+
+ dispatch_group_wait(delGroup, DISPATCH_TIME_FOREVER);
+
+ // If the semaphore has been signaled, then dispatch_semaphore_wait will return zero.
+ result = (dispatch_semaphore_wait(semaphore, DISPATCH_TIME_NOW) == 0);
+
+ dispatch_release(delGroup);
+ dispatch_release(semaphore);
+
+ NSLog(@"%@ (Any YES -> YES, otherwise NO) = %@", NSStringFromSelector(selector), (result ? @"YES" : @"NO"));
+ }
+}
+
+- (void)testBoolMethod2
+{
+ // If ANY of the delegates returns NO, then the result is NO.
+ // Otherwise the result is YES.
+
+ BOOL result = YES;
+ SEL selector = @selector(shouldDance);
+
+ NSUInteger delegateCount = [multicastDelegate countForSelector:selector];
+ if (delegateCount == 0)
+ {
+ NSLog(@"%@ (Any NO -> NO, otherwise YES) = %@", NSStringFromSelector(selector), (result ? @"YES" : @"NO"));
+ }
+ else
+ {
+ GCDMulticastDelegateEnumerator *delegateEnum = [multicastDelegate delegateEnumerator];
+
+ dispatch_group_t delGroup = dispatch_group_create();
+ dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
+
+ id del;
+ dispatch_queue_t dq;
+
+ while ([delegateEnum getNextDelegate:&del delegateQueue:&dq forSelector:selector])
+ {
+ dispatch_group_async(delGroup, dq, ^{ @autoreleasepool {
+
+ if (![del shouldDance])
+ {
+ dispatch_semaphore_signal(semaphore);
+ }
+ }});
+ }
+
+ dispatch_group_wait(delGroup, DISPATCH_TIME_FOREVER);
+
+ // If the semaphore has been signaled, then dispatch_semaphore_wait will return zero.
+ result = (dispatch_semaphore_wait(semaphore, DISPATCH_TIME_NOW) != 0);
+
+ NSLog(@"%@ (Any NO -> NO, otherwise YES) = %@", NSStringFromSelector(selector), (result ? @"YES" : @"NO"));
+ }
+}
+
+- (void)testWeakReferenceSystem
+{
+ // Deallocate del1 without removing from multicastDelegate list
+ del1 = nil;
+
+ [multicastDelegate didSomething];
+}
+
+@end
View
2  Xcode/Testing/MulticastDelegateTest/MyProtocol.h → ...Testing/MulticastDelegateTest/Shared/MyProtocol.h
@@ -1,4 +1,4 @@
-#import <Cocoa/Cocoa.h>
+#import <Foundation/Foundation.h>
@protocol MyProtocol
@optional
View
14 Xcode/Testing/MulticastDelegateTest/main.m
@@ -1,14 +0,0 @@
-//
-// main.m
-// MulticastDelegateTest
-//
-// Created by Robbie Hanson on 12/18/09.
-// Copyright 2009 Deusty Designs, LLC.. All rights reserved.
-//
-
-#import <Cocoa/Cocoa.h>
-
-int main(int argc, char *argv[])
-{
- return NSApplicationMain(argc, (const char **) argv);
-}
Please sign in to comment.
Something went wrong with that request. Please try again.