ShareKit icon indicating copy to clipboard operation
ShareKit copied to clipboard

convert to ARC (Automatic Reference Counting) problem

Open RAGOpoR opened this issue 13 years ago • 3 comments

How to this fix error for ARC converter tool.

/Classes/RootNewsController.m:682:4: error: receiver 'SHKMail' for class message is a forward declaration [4]

[SHKMail shareItem:myitem];

thank you.

RAGOpoR avatar Jun 25 '11 10:06 RAGOpoR

Same problem here...

FredvanRijswijk avatar Jul 18 '11 19:07 FredvanRijswijk

I had this problem after copying files from a Core Data project to one where I wanted to use Core Data, but hadn't chosen it at project creation. It needed the import for CoreData.h in the "ProjName-Prefix.pch" file in the "Supporting Files" directory.

#ifdef __OBJC__
    #import <UIKit/UIKit.h>
    #import <Foundation/Foundation.h>
    #import <CoreData/CoreData.h>

#endif

That did it for me anyhow.

shepting avatar Aug 04 '11 03:08 shepting

In general: The error is caused by a missing import statement. Import the class that is used and the error will disappear.

berikv avatar Mar 15 '12 11:03 berikv