ARC (Automatic Reference Counting) is great. It's even better than Nutella sandwich with bacon and sprinkles. But it can be irritating when you use a lot of third party code that doesn't support it and compiler just "won't let you do this Dave".
No worries, there's a simple workaround for this: put this code into a non-ARC library. Here's how you do it:
- Remove all the non-ARC code from the project
- Create new "Cocoa Touch Static Library" (or "Cocoa Library" for Mac projects) target
- Uncheck "Use Automatic Reference Counting"
- Add your non-ARC to your library (there should be a folder in top level of Xcode Navigator with your library name - add them here)
- Go to Build Phases of your main target and:
- Remove non-ARC code from Compile Sources phase
- Add your library target to Target Dependencies phase
- Drag your library product (it's in last group in Navigator) to Link Binary With Libraries phase
- Go to Build Phases of your library target and add all *.m files from library to Compile Sources phase
- Compile and enjoy your non-ARC code in an ARC project :)
Note: If building library still gives you errors about ARC, go to Build Settings of library and set Objective-C Automatic Reference Counting to No (sometimes Xcode ignores unchecking it when creating library).