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. Dismiss Notice

iOS __RouteForRecording symbol not found for arm64

Discussion in 'Editor & General Support' started by Rarceth, Feb 11, 2021.

  1. Rarceth

    Rarceth

    Joined:
    Oct 15, 2015
    Posts:
    41
    I am developing a project on multiple platforms. For the mobile version, the Android build is working perfectly. However, I've ported the changes over to iOS for the first time in a while, and Im getting errors.

    The initial build works fine, and generates the xcode project properly. However, when building the release version to device, I'm getting this:

    --------------------------------------------------------------------------------------

    Undefined symbols for architecture arm64:
    "__RouteForRecording", referenced from:
    _iOSSpeaker__RouteForRecording_mE15183F08BA3C79106BDEF319CDDE823809572FE in Assembly-CSharp13.o
    _iOSSpeaker_RouteForRecording_mD05B56B8184C49C704CAD499A64B3C551AE7753E in Assembly-CSharp13.o
    (maybe you meant: _iOSSpeaker__RouteForRecording_mE15183F08BA3C79106BDEF319CDDE823809572FE)
    "__RouteForPlayback", referenced from:
    _iOSSpeaker__RouteForPlayback_m09DA6A97618A4F2EBE79832DC34D80632B70C6CD in Assembly-CSharp13.o
    _iOSSpeaker_RouteForPlayback_mF0BBF6985F12E6DD846397D8D889C4AF6970DF32 in Assembly-CSharp13.o
    (maybe you meant: _iOSSpeaker__RouteForPlayback_m09DA6A97618A4F2EBE79832DC34D80632B70C6CD)
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)[/code]

    --------------------------------------------------------------------------------------

    Anyone seen this before? I cant find anything on google at all.

    Thanks,
    Pete
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,749
    Maybe try deleting the IL2CPP cache... it's a folder called
    il2cpp_cache
    inside the Library folder for your project, the one at the same depth as Assets and ProjectSettings. I would close Unity first, then retry after deleting.
     
  3. Rarceth

    Rarceth

    Joined:
    Oct 15, 2015
    Posts:
    41
    Thanks for the advice! I'll give it a go if my current build doesnt pan out (I restricted it to arm64 only, removing arm7).
    Unfortunately, 4 hours a build so theres a bit of a turnover
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,773
    This failure occurs because the code in the project has extern methods in C#. Methods marked as extern with a the [Dllimport("__Internal")] attribute must be present in a native library that is linked with the Unity player when building with the IL2CPP scripting backend.

    For example, this in this project one function which causes this issue is named: RouteForRecording

    You have two options:

    1. Build a native library with all of the methods marked as extern with the [Dllimport("__Internal")] attribute for the target platform and architecture of the player. See this documentation for details about native plugins: https://docs.unity3d.com/Manual/NativePlugins.html

    2. Remove the C# code which defines this extern method. You can do that with platform dependent compilation: https://docs.unity3d.com/Manual/PlatformDependentCompilation.html
     
    Kurt-Dekker likes this.
  5. Rarceth

    Rarceth

    Joined:
    Oct 15, 2015
    Posts:
    41
    @JoshPeterson This did it! Turns out it was a known issue on our side that two of our third party assets didnt work with iOS, but no one knew why. You solved *all* the riddles haha. Thanks :)
     
    JoshPeterson likes this.