I have the following code and am getting this error before compiling:
Fast Enumeration Variables can't be modified in ARC by default, declare the variable _strong to allow this
for (NSString *name in array){
@try {
S3ObjectController *localS3 = [[S3ObjectController alloc]init];
name = localS3.stringProperty;
}
In this S3ObjectController
class, I have the property declared like this:
@property (nonatomic, strong) NSString *stringProperty;
How should I change the property? I thought I was declaring it strong?
It means declare the fast enumeration variable strong, not your instance variable:
for (NSString __strong *name in array) {
@try {
S3ObjectController *localS3 = [[S3ObjectController alloc]init];
name = localS3.stringProperty;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With