From 501aa8b633433304bb746623cd7a6db9a3a73ac9 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Wed, 15 Feb 2012 08:21:02 +0000 Subject: [PATCH] Added Xcode 4 iOStest project Updated iOS runner for Xcode for and added project --- .../iOSTest/iOSTest.xcodeproj/project.pbxproj | 47 ++++++++++++++----- .../contents.xcworkspacedata | 7 +++ .../iOSTest/en.lproj/InfoPlist.strings | 2 + .../XCode4/iOSTest/iOSTest/iOSTest-Info.plist | 47 +++++++++++++++++++ .../XCode4/iOSTest/iOSTest/iOSTest-Prefix.pch | 14 ++++++ .../iTchRunner/internal/iTchRunnerMainView.h | 28 +++++++---- 6 files changed, 123 insertions(+), 22 deletions(-) create mode 100644 projects/XCode4/iOSTest/iOSTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 projects/XCode4/iOSTest/iOSTest/en.lproj/InfoPlist.strings create mode 100644 projects/XCode4/iOSTest/iOSTest/iOSTest-Info.plist create mode 100644 projects/XCode4/iOSTest/iOSTest/iOSTest-Prefix.pch diff --git a/projects/XCode4/iOSTest/iOSTest.xcodeproj/project.pbxproj b/projects/XCode4/iOSTest/iOSTest.xcodeproj/project.pbxproj index c8f87480..5b4c12f4 100644 --- a/projects/XCode4/iOSTest/iOSTest.xcodeproj/project.pbxproj +++ b/projects/XCode4/iOSTest/iOSTest.xcodeproj/project.pbxproj @@ -11,8 +11,7 @@ 4A73280C14E66CFC0044823F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A73280B14E66CFC0044823F /* Foundation.framework */; }; 4A73280E14E66CFC0044823F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A73280D14E66CFC0044823F /* CoreGraphics.framework */; }; 4A73281414E66CFC0044823F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4A73281214E66CFC0044823F /* InfoPlist.strings */; }; - 4A73281614E66CFC0044823F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A73281514E66CFC0044823F /* main.m */; }; - 4A73281A14E66CFC0044823F /* TBCAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A73281914E66CFC0044823F /* TBCAppDelegate.m */; }; + 4A73282614E66D8B0044823F /* itChRunnerMain.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4A73282514E66D8B0044823F /* itChRunnerMain.mm */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -20,12 +19,13 @@ 4A73280914E66CFC0044823F /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 4A73280B14E66CFC0044823F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 4A73280D14E66CFC0044823F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 4A73281114E66CFC0044823F /* iOSTest-Info.plist */ = {isa = PBXFileReference; path = "iOSTest-Info.plist"; sourceTree = ""; }; + 4A73281114E66CFC0044823F /* iOSTest-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "iOSTest-Info.plist"; sourceTree = ""; }; 4A73281314E66CFC0044823F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 4A73281514E66CFC0044823F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 4A73281714E66CFC0044823F /* iOSTest-Prefix.pch */ = {isa = PBXFileReference; path = "iOSTest-Prefix.pch"; sourceTree = ""; }; - 4A73281814E66CFC0044823F /* TBCAppDelegate.h */ = {isa = PBXFileReference; path = TBCAppDelegate.h; sourceTree = ""; }; - 4A73281914E66CFC0044823F /* TBCAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TBCAppDelegate.m; sourceTree = ""; }; + 4A73281714E66CFC0044823F /* iOSTest-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "iOSTest-Prefix.pch"; sourceTree = ""; }; + 4A73282214E66D8B0044823F /* iTchRunnerAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iTchRunnerAppDelegate.h; sourceTree = ""; }; + 4A73282314E66D8B0044823F /* iTchRunnerMainView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iTchRunnerMainView.h; sourceTree = ""; }; + 4A73282414E66D8B0044823F /* iTchRunnerReporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iTchRunnerReporter.h; sourceTree = ""; }; + 4A73282514E66D8B0044823F /* itChRunnerMain.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = itChRunnerMain.mm; path = ../../../runners/iTchRunner/itChRunnerMain.mm; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -72,8 +72,7 @@ 4A73280F14E66CFC0044823F /* iOSTest */ = { isa = PBXGroup; children = ( - 4A73281814E66CFC0044823F /* TBCAppDelegate.h */, - 4A73281914E66CFC0044823F /* TBCAppDelegate.m */, + 4A73282014E66D6C0044823F /* iTch */, 4A73281014E66CFC0044823F /* Supporting Files */, ); path = iOSTest; @@ -84,12 +83,31 @@ children = ( 4A73281114E66CFC0044823F /* iOSTest-Info.plist */, 4A73281214E66CFC0044823F /* InfoPlist.strings */, - 4A73281514E66CFC0044823F /* main.m */, 4A73281714E66CFC0044823F /* iOSTest-Prefix.pch */, ); name = "Supporting Files"; sourceTree = ""; }; + 4A73282014E66D6C0044823F /* iTch */ = { + isa = PBXGroup; + children = ( + 4A73282114E66D8B0044823F /* internal */, + 4A73282514E66D8B0044823F /* itChRunnerMain.mm */, + ); + name = iTch; + sourceTree = ""; + }; + 4A73282114E66D8B0044823F /* internal */ = { + isa = PBXGroup; + children = ( + 4A73282214E66D8B0044823F /* iTchRunnerAppDelegate.h */, + 4A73282314E66D8B0044823F /* iTchRunnerMainView.h */, + 4A73282414E66D8B0044823F /* iTchRunnerReporter.h */, + ); + name = internal; + path = ../../../runners/iTchRunner/internal; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -151,8 +169,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 4A73281614E66CFC0044823F /* main.m in Sources */, - 4A73281A14E66CFC0044823F /* TBCAppDelegate.m in Sources */, + 4A73282614E66D8B0044823F /* itChRunnerMain.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -175,6 +192,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CODE_SIGN_IDENTITY = "iPhone Developer: Phil Nash (4KJCM5XSVL)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -190,8 +208,10 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 5.0; + PROVISIONING_PROFILE = "95C4758A-E0B8-4714-9DA3-C7E1284444A4"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = ../../../include; }; name = Debug; }; @@ -200,6 +220,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CODE_SIGN_IDENTITY = "iPhone Developer: Phil Nash (4KJCM5XSVL)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -209,8 +230,10 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 5.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + PROVISIONING_PROFILE = "95C4758A-E0B8-4714-9DA3-C7E1284444A4"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = ../../../include; VALIDATE_PRODUCT = YES; }; name = Release; diff --git a/projects/XCode4/iOSTest/iOSTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/projects/XCode4/iOSTest/iOSTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..aaadc7d4 --- /dev/null +++ b/projects/XCode4/iOSTest/iOSTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/projects/XCode4/iOSTest/iOSTest/en.lproj/InfoPlist.strings b/projects/XCode4/iOSTest/iOSTest/en.lproj/InfoPlist.strings new file mode 100644 index 00000000..477b28ff --- /dev/null +++ b/projects/XCode4/iOSTest/iOSTest/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/projects/XCode4/iOSTest/iOSTest/iOSTest-Info.plist b/projects/XCode4/iOSTest/iOSTest/iOSTest-Info.plist new file mode 100644 index 00000000..f74b6db0 --- /dev/null +++ b/projects/XCode4/iOSTest/iOSTest/iOSTest-Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFiles + + CFBundleIdentifier + twobluecubes.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/projects/XCode4/iOSTest/iOSTest/iOSTest-Prefix.pch b/projects/XCode4/iOSTest/iOSTest/iOSTest-Prefix.pch new file mode 100644 index 00000000..403e8e45 --- /dev/null +++ b/projects/XCode4/iOSTest/iOSTest/iOSTest-Prefix.pch @@ -0,0 +1,14 @@ +// +// Prefix header for all source files of the 'iOSTest' target in the 'iOSTest' project +// + +#import + +#ifndef __IPHONE_3_0 +#warning "This project uses features only available in iOS SDK 3.0 and later." +#endif + +#ifdef __OBJC__ + #import + #import +#endif diff --git a/projects/runners/iTchRunner/internal/iTchRunnerMainView.h b/projects/runners/iTchRunner/internal/iTchRunnerMainView.h index b745c216..eee89352 100644 --- a/projects/runners/iTchRunner/internal/iTchRunnerMainView.h +++ b/projects/runners/iTchRunner/internal/iTchRunnerMainView.h @@ -21,6 +21,8 @@ UITextField* appName; } +-(void) showAlert; + @end @implementation iTchRunnerMainView @@ -42,15 +44,8 @@ appName.textAlignment = UITextAlignmentCenter; appName.text = [NSString stringWithFormat:@"CATCH tests"]; - - - UIActionSheet* menu = [[UIActionSheet alloc] initWithTitle:@"Options" - delegate:self - cancelButtonTitle:nil - destructiveButtonTitle:nil - otherButtonTitles:@"Run all tests", nil]; - [menu showInView: self]; - [menu release]; +// [self performSelector: @selector(showAlert) withObject:nil afterDelay:0.1]; + [self performSelectorOnMainThread:@selector(showAlert) withObject:nil waitUntilDone:NO]; } return self; @@ -63,6 +58,19 @@ [super dealloc]; } +/////////////////////////////////////////////////////////////////////////////// +-(void) showAlert +{ + UIActionSheet* menu = [[UIActionSheet alloc] initWithTitle:@"Options" + delegate:self + cancelButtonTitle:nil + destructiveButtonTitle:nil + otherButtonTitles:@"Run all tests", nil]; + [menu showInView: self]; + [menu release]; + +} + /////////////////////////////////////////////////////////////////////////////// -(void) actionSheet: (UIActionSheet*) sheet clickedButtonAtIndex: (NSInteger) index { @@ -82,7 +90,7 @@ } else { - NSLog( @"%d failures", runner.getFailureCount() ); + NSLog( @"%lu failures", runner.getFailureCount() ); appName.textColor = [[UIColor alloc] initWithRed:1 green:0.35 blue:0.35 alpha:1]; } }