ARC error - 'current deployment target does not support...'


#1

In the code below, I get the error message “The current deployment target does not support automated _weak references”,
when I downgrade the Project’s deployment Target from iOS 5.1 to 4.0.

Does this mean I cannot use Weak referenced iVar to build App for 4.0 deployment??

The code for weakness.h is below. Any ideas ??? Thanks!

[color=#008000]weakness.h

#import <Foundation/Foundation.h>

@interface weakness : NSObject

{
__weak id myWeakVar;
NSString *someString;
}

@property(nonatomic, copy) NSString *someString;
@property(nonatomic, weak) id myWeakVar;

@end[/color]

[color=#FF8000]weakness.m

#import “weakness.h”

@implementation weakness

@synthesize myWeakVar, someString;

@end [/color]


#2

[color=#FF0000]__unsafe_unretained[/color], is apparently the answer for downward compatibly.