iOS5 SDK comes with new feature of ARC.
ARC = Automatic Reference Counting which is used for enabling memory management at compiler level.
But due to this feature, you might not able to compile facebook API, HJCache library or any other libraries developed for iPhone/iPad development.
Here is the one of the example of that error.
Automatic Reference Counting forbids explicit message send of ‘dealloc’
I have shared a trick to enable older library compilation in new iOS5 SDK.
- Click on the Project.
- Click on the target.
- Select build phases tab.
- Select the multiple files in which you want to turn off ARC.
- Press ENTER / Hit Enter key
- Type “-fno-objc-arc” ( without quotes, as shown in image )