Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Conflict between two iOS plugins overriding AppControllerClassName

Discussion in 'Scripting' started by Hellium, May 25, 2018.

  1. Hellium

    Hellium

    Joined:
    Sep 25, 2014
    Posts:
    43
    I am developping an iOS application using two plugins, one to manage notifications, and an other one to handle deep-links.

    These two plugins try to override the AppControllerClassName constant as soon as they get loaded, using the IMPL_APP_CONTROLLER_SUBCLASS macro defined in the UnityAppController.mm. However, this causes a conflict when running the app. The latter crashes when it starts, and throws the following error :

    Code (CSharp):
    1. Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[XXX setGameObjectName:]: unrecognized selector sent to instance YYY'
    Has anyone faced the same problem and found a solution to prevent this?

    Someone on Github suggested to do the following without giving more information.
    I saw a blog post giving advices about how to prevent the problem when developping an iOS plugin but I was unable to apply this to the existing plugins I currently use.

    http://eppz.eu/blog/override-app-delegate-unity-ios-osx-1/

    I have contacted the creators of the two plugins to let them know of the problem, but no response yet.
     
    Last edited: May 26, 2018
  2. sameel

    sameel

    Joined:
    Dec 4, 2015
    Posts:
    16
    Hi @Hellium, I am also having same problem, As I am also trying to get deep-linking work along with a WebView Component Loader that already subclass UnityAppController.mm. Have you got any solution to this ?
     
  3. Hellium

    Hellium

    Joined:
    Sep 25, 2014
    Posts:
    43
    Because I don't know Objective-C, and I was in a hurry, I had to hire a freelance to do the merge for me.

    Check the answer given by @eppz here, it may help you.

    https://answers.unity.com/questions/1510598/appcontrollerclassname-override-conflict-between-t.html
     
  4. sameel

    sameel

    Joined:
    Dec 4, 2015
    Posts:
    16
    I had the source to the WebView plugin I was using, I merged deep-linking into that plugin. It works well now.