Search Unity

libiphone-lib.a name collision in URLUtility

Discussion in 'iOS and tvOS' started by rendermouse, Aug 19, 2016.

  1. rendermouse

    rendermouse

    Joined:
    Dec 9, 2015
    Posts:
    5
    It seems that the URLUtility.o file bundled inside the Unity iOS library contains a class named WebViewController.

    It collides with a class name in another library in my project, and I cannot modify that source code. These are not duplicate classes, they are unrelated classes with identical names and completely different methods and signatures.

    Is there any way for me to resolve this collision? I am also exploring the option of getting the other library vendor to provide a modified build.

    I tried using lipo & ar to remove that one symbol from the Unity libiphone-lib.a file, but did not succeed. If I remove the conflicting .o file from the vendor's library my project does indeed compile and link, but that will break app functionality, so that is not an option.

    I just wish these classnames were prefixed to prevent this sort of thing...
     
  2. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    836
    yeah the options are very few;
    file a bugreport / feature request and hope for the best, or work with the library vendor ( or ideally with sources of the library )

    agree that using prefixes are one of the better things to do wrt the naming problem - unfortunately it's very rare for c/c++ libraries to do so (although exceptions - like two letter acronyms used by Apple/Cocoa - exists and that thing had never problems linking to the outside world)
     
  3. Mantas-Puida

    Mantas-Puida

    Unity Technologies

    Joined:
    Nov 13, 2008
    Posts:
    1,852
    Please report a bug!
    Thanks
     
  4. rendermouse

    rendermouse

    Joined:
    Dec 9, 2015
    Posts:
    5
    Bug reported. I obtained a custom build of the vendor's library to remove the naming conflict.
     
unityunity