Search Unity

OSX Player - how to link with -ObjC OTHER_LINKER_FLAGS set

Discussion in 'macOS' started by daveratters, Dec 5, 2017.

  1. daveratters

    daveratters

    Joined:
    Feb 20, 2013
    Posts:
    2
    This is my maiden post here, so hopefully I won't be breaking any unwritten rules here -

    Anyway, here goes.

    We are using a set of plugins on the OSX platform which make use of the Objective C "categories" system to add methods etc. to sealed classes from standard frameworks - in order to get these to work properly they need to be linked with "-ObjC" as an entry in the "Other Linker Flags" as presented by XCode in the link phase.

    We can do this in the resultant iOS target build via the excellent solution shown here:
    https://answers.unity.com/questions/982417/how-to-specify-objc-in-other-linker-flag-in-xcode.html

    However there seems to be no way of instructing whatever linker process is invoked by the Unity editor when building an OSX player.

    Not adding this linker flag results in "selector not found" type errors at runtime.

    Any answers much apprieciated

    Regards

    Dave Roden