diff --git a/AutoMagicCoding-iOS.xcodeproj/project.pbxproj b/AutoMagicCoding-iOS.xcodeproj/project.pbxproj index aebd394..63d18b5 100644 --- a/AutoMagicCoding-iOS.xcodeproj/project.pbxproj +++ b/AutoMagicCoding-iOS.xcodeproj/project.pbxproj @@ -84,7 +84,7 @@ FD8C3CE1149E366200FAA45D /* NSObject+AutoMagicCoding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+AutoMagicCoding.h"; sourceTree = ""; }; FD8C3CE2149E366200FAA45D /* NSObject+AutoMagicCoding.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+AutoMagicCoding.m"; sourceTree = ""; }; FDA4D40F14D6DABA00B9AE2A /* CHANGELOG */ = {isa = PBXFileReference; lastKnownFileType = text; path = CHANGELOG; sourceTree = ""; }; - FDB80D16149E268F001E95AA /* AutoMagicCoding-iOSTests copy.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = "AutoMagicCoding-iOSTests copy.octest"; path = "AutoMagicCoding-iOSTests-NO_THROW.octest"; sourceTree = BUILT_PRODUCTS_DIR; }; + FDB80D16149E268F001E95AA /* AutoMagicCoding-iOSTests-NO_THROW.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AutoMagicCoding-iOSTests-NO_THROW.octest"; sourceTree = BUILT_PRODUCTS_DIR; }; FDB80DBE149E300F001E95AA /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = ""; }; FDB80DC1149E300F001E95AA /* AutoMagicCoding-iOS-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "AutoMagicCoding-iOS-Info.plist"; sourceTree = ""; }; FDB80DC2149E300F001E95AA /* AutoMagicCoding-iOS-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AutoMagicCoding-iOS-Prefix.pch"; sourceTree = ""; }; @@ -179,7 +179,7 @@ children = ( 6D6D28B81411608600B7EA19 /* AutoMagicCoding-iOS.app */, 6D6D28E11411608600B7EA19 /* AutoMagicCoding-iOSTests.octest */, - FDB80D16149E268F001E95AA /* AutoMagicCoding-iOSTests copy.octest */, + FDB80D16149E268F001E95AA /* AutoMagicCoding-iOSTests-NO_THROW.octest */, ); name = Products; sourceTree = ""; @@ -350,7 +350,7 @@ ); name = "AutoMagicCoding-iOSTests AMC_NO_THROW"; productName = "AutoMagicCoding-iOSTests"; - productReference = FDB80D16149E268F001E95AA /* AutoMagicCoding-iOSTests copy.octest */; + productReference = FDB80D16149E268F001E95AA /* AutoMagicCoding-iOSTests-NO_THROW.octest */; productType = "com.apple.product-type.bundle"; }; /* End PBXNativeTarget section */ @@ -592,11 +592,13 @@ 6D6D28F61411608600B7EA19 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "SupportingFiles/SupportingFiles-iOS/AutoMagicCoding-iOS-Prefix.pch"; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "SupportingFiles/SupportingFiles-iOS/AutoMagicCoding-iOS-Info.plist"; PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; WRAPPER_EXTENSION = app; }; name = Debug; @@ -604,11 +606,13 @@ 6D6D28F71411608600B7EA19 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "SupportingFiles/SupportingFiles-iOS/AutoMagicCoding-iOS-Prefix.pch"; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "SupportingFiles/SupportingFiles-iOS/AutoMagicCoding-iOS-Info.plist"; PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; WRAPPER_EXTENSION = app; }; name = Release; diff --git a/AutoMagicCoding/NSObject+AutoMagicCoding.m b/AutoMagicCoding/NSObject+AutoMagicCoding.m index bf48f39..c592496 100644 --- a/AutoMagicCoding/NSObject+AutoMagicCoding.m +++ b/AutoMagicCoding/NSObject+AutoMagicCoding.m @@ -85,7 +85,7 @@ + (id) objectWithDictionaryRepresentation: (NSDictionary *) aDict Class rClass = NSClassFromString(className); if ( rClass && [rClass instancesRespondToSelector:@selector(initWithDictionaryRepresentation:) ] ) { - id instance = [[[rClass alloc] initWithDictionaryRepresentation: aDict] autorelease]; + id instance = [[rClass alloc] initWithDictionaryRepresentation: aDict]; return instance; } @@ -128,8 +128,6 @@ - (id) initWithDictionaryRepresentation: (NSDictionary *) aDict } @catch (NSException *exception) { - [self release]; - #ifdef AMC_NO_THROW return nil; #else @@ -545,7 +543,6 @@ id AMCDecodeObject (id value, AMCFieldType fieldType, id collectionClass ) object = [object initWithArray: dstCollection]; } @finally { - [object autorelease]; } if (object) @@ -582,7 +579,6 @@ id AMCDecodeObject (id value, AMCFieldType fieldType, id collectionClass ) object = [object initWithDictionary: dstCollection]; } @finally { - [object autorelease]; } if (object) diff --git a/AutomagicCoding.xcodeproj/project.pbxproj b/AutomagicCoding.xcodeproj/project.pbxproj index 14e1e2d..2597872 100644 --- a/AutomagicCoding.xcodeproj/project.pbxproj +++ b/AutomagicCoding.xcodeproj/project.pbxproj @@ -561,6 +561,8 @@ 6D6B98C1140E162700835E88 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "\"$(DEVELOPER_FRAMEWORKS_DIR)\"", @@ -569,6 +571,7 @@ GCC_PREFIX_HEADER = "SupportingFiles/SupportingFiles-Mac/AutomagicCoding-Prefix.pch"; INFOPLIST_FILE = "SupportingFiles/SupportingFiles-Mac/AutomagicCoding-Info.plist"; PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; TEST_AFTER_BUILD = YES; TEST_HOST = ""; TEST_RIG = ""; @@ -579,6 +582,8 @@ 6D6B98C2140E162700835E88 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "\"$(DEVELOPER_FRAMEWORKS_DIR)\"", @@ -587,6 +592,7 @@ GCC_PREFIX_HEADER = "SupportingFiles/SupportingFiles-Mac/AutomagicCoding-Prefix.pch"; INFOPLIST_FILE = "SupportingFiles/SupportingFiles-Mac/AutomagicCoding-Info.plist"; PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; TEST_AFTER_BUILD = YES; TEST_HOST = ""; TEST_RIG = ""; diff --git a/SupportingFiles/SupportingFiles-iOS/AutoMagicCoding_iOSAppDelegate.h b/SupportingFiles/SupportingFiles-iOS/AutoMagicCoding_iOSAppDelegate.h index aae0908..8d43d80 100644 --- a/SupportingFiles/SupportingFiles-iOS/AutoMagicCoding_iOSAppDelegate.h +++ b/SupportingFiles/SupportingFiles-iOS/AutoMagicCoding_iOSAppDelegate.h @@ -10,6 +10,6 @@ @interface AutoMagicCoding_iOSAppDelegate : NSObject -@property (nonatomic, retain) IBOutlet UIWindow *window; +@property (nonatomic, strong) IBOutlet UIWindow *window; @end diff --git a/SupportingFiles/SupportingFiles-iOS/AutoMagicCoding_iOSAppDelegate.m b/SupportingFiles/SupportingFiles-iOS/AutoMagicCoding_iOSAppDelegate.m index a451144..2245318 100644 --- a/SupportingFiles/SupportingFiles-iOS/AutoMagicCoding_iOSAppDelegate.m +++ b/SupportingFiles/SupportingFiles-iOS/AutoMagicCoding_iOSAppDelegate.m @@ -58,10 +58,5 @@ - (void)applicationWillTerminate:(UIApplication *)application */ } -- (void)dealloc -{ - [_window release]; - [super dealloc]; -} @end diff --git a/SupportingFiles/SupportingFiles-iOS/main.m b/SupportingFiles/SupportingFiles-iOS/main.m index 0fbe24d..c2171a5 100644 --- a/SupportingFiles/SupportingFiles-iOS/main.m +++ b/SupportingFiles/SupportingFiles-iOS/main.m @@ -10,8 +10,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; + } }