ideashower / ShareKit

Drop in sharing features for all iPhone and iPad apps
http://getsharekit.com
1.78k stars 375 forks source link

convert to ARC (Automatic Reference Counting) problem #259

Open RAGOpoR opened 13 years ago

RAGOpoR commented 13 years ago

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.

FredvanRijswijk commented 13 years ago

Same problem here...

shepting commented 13 years ago

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.

berikv commented 12 years ago

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