diff --git a/Classes/KIFTestStep.h b/Classes/KIFTestStep.h index ec56efba4..9954ad21d 100644 --- a/Classes/KIFTestStep.h +++ b/Classes/KIFTestStep.h @@ -21,7 +21,7 @@ #define KIFTestCondition(condition, error, ...) ({ \ if (!(condition)) { \ if (error) { \ - *error = [[[NSError alloc] initWithDomain:@"KIFTest" code:KIFTestStepResultFailure userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:__VA_ARGS__], NSLocalizedDescriptionKey, nil]] autorelease]; \ + *error = [NSError errorWithDomain:@"KIFTest" code:KIFTestStepResultFailure userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:__VA_ARGS__], NSLocalizedDescriptionKey, nil]]; \ } \ [KIFTestStep stepFailed]; \ return KIFTestStepResultFailure; \ diff --git a/Documentation/Examples/Testable/Testable.xcodeproj/project.pbxproj b/Documentation/Examples/Testable/Testable.xcodeproj/project.pbxproj index bdc024925..4a9b2bfe0 100644 --- a/Documentation/Examples/Testable/Testable.xcodeproj/project.pbxproj +++ b/Documentation/Examples/Testable/Testable.xcodeproj/project.pbxproj @@ -405,6 +405,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ENABLE_OBJC_ARC = YES; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -413,6 +414,7 @@ "$(inherited)", RUN_KIF_TESTS, ); + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( "$(inherited)", "$(SRCROOT)/Frameworks/KIF/**", @@ -435,6 +437,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ENABLE_OBJC_ARC = YES; COPY_PHASE_STRIP = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Testable/Testable-Prefix.pch"; @@ -442,6 +445,7 @@ "$(inherited)", RUN_KIF_TESTS, ); + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( "$(inherited)", "$(SRCROOT)/Frameworks/KIF/**", diff --git a/Documentation/Examples/Testable/Testable/RootViewController.h b/Documentation/Examples/Testable/Testable/RootViewController.h index fba4e244f..1ba4f0215 100644 --- a/Documentation/Examples/Testable/Testable/RootViewController.h +++ b/Documentation/Examples/Testable/Testable/RootViewController.h @@ -13,6 +13,6 @@ NSArray *titles; } -@property (nonatomic, retain) NSArray *titles; +@property (nonatomic, strong) NSArray *titles; @end diff --git a/Documentation/Examples/Testable/Testable/RootViewController.m b/Documentation/Examples/Testable/Testable/RootViewController.m index d8b7d6cb2..67f3abb55 100644 --- a/Documentation/Examples/Testable/Testable/RootViewController.m +++ b/Documentation/Examples/Testable/Testable/RootViewController.m @@ -39,7 +39,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; } cell.textLabel.text = [self.titles objectAtIndex:indexPath.row]; diff --git a/Documentation/Examples/Testable/Testable/TestableAppDelegate.h b/Documentation/Examples/Testable/Testable/TestableAppDelegate.h index 7fa8dd9c8..4bea315ec 100644 --- a/Documentation/Examples/Testable/Testable/TestableAppDelegate.h +++ b/Documentation/Examples/Testable/Testable/TestableAppDelegate.h @@ -13,7 +13,7 @@ } -@property (nonatomic, retain) IBOutlet UIWindow *window; -@property (nonatomic, retain) IBOutlet UINavigationController *navigationController; +@property (nonatomic, strong) IBOutlet UIWindow *window; +@property (nonatomic, strong) IBOutlet UINavigationController *navigationController; @end diff --git a/Documentation/Examples/Testable/Testable/TestableAppDelegate.m b/Documentation/Examples/Testable/Testable/TestableAppDelegate.m index 4930f5b7e..54f8ab136 100644 --- a/Documentation/Examples/Testable/Testable/TestableAppDelegate.m +++ b/Documentation/Examples/Testable/Testable/TestableAppDelegate.m @@ -37,11 +37,5 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( return YES; } -- (void)dealloc -{ - [_window release]; - [_navigationController release]; - [super dealloc]; -} @end diff --git a/Documentation/Examples/Testable/Testable/main.m b/Documentation/Examples/Testable/Testable/main.m index 1d0365834..cddbc3d6c 100644 --- a/Documentation/Examples/Testable/Testable/main.m +++ b/Documentation/Examples/Testable/Testable/main.m @@ -11,8 +11,8 @@ int main(int argc, char *argv[]) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, nil); - [pool release]; - return retVal; + @autoreleasepool { + int retVal = UIApplicationMain(argc, argv, nil, nil); + return retVal; + } }