Objective-C Category in iOS Module

I am using a category on a UIKit class (UIImage) in a module and getting an unrecognized selector error (for one of the selectors in the category).

  1. Are Objective-C categories supported?
  2. Is there anything special that needs to be done to get the category included?

2 Answers

  • add linker option -ObjC or -all_load to module.xcconfig.


  • I noticed I had to include the external libraries and any special frameworks also in your Titanium xcode project. I was getting the unrecognized selector too..
    Just add the frameworks, and in your main.m import any headers you are using.

    — answered 5 years ago by Daniel Tome
    1 Comment
    • Actually this issue is specific to Objective-C categories. It works fine without the categories. I am importing headers into the appropriate .m files where they are used and including the frameworks in my module.xcconfig file.

      — commented 5 years ago by Gerry Cardinal III