I have an Xcode 3.2 targeted project . I want to convert this project to ARC to improve the
performance.I am following these steps.
Edit->Refactor->Convert to Objective C ARC
I have got some .mm files to which I am disabling the ARC using -fno-objc-arc. But even after
this I am getting lot of errors (ARC issues). For eg mainly in self=[super init]call,the
error is cannot assign to self outside of a method in the init family. Can
anyone tell me am I following the correct steps ?
I was trying to convert a projet to ARC and after creating a new one and including the files from the old one - one of the issues i got was
Cannot assign to 'self' outside of a method in the init family
The selector name MUST begin with init
- not only that - in my case the init selector was:
-(id)initwithPage:(unsigned)pageNum {...}
Notice the small 'w'.
I have changed it to:
-(id)initWithPage:(unsigned)pageNum {...}
Notice the capital 'W'!
My problem was solved.
I hope this helps someone.
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