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

"Unable to find internal function" with Transport Library on iOS

Discussion in 'Multiplayer' started by kromenak, Aug 21, 2019.

  1. kromenak

    kromenak

    Joined:
    Feb 9, 2011
    Posts:
    266
    Hi everyone, I'm testing out building some network functionality on iOS using the experimental/preview networking library that was used in the FPS Sample (https://github.com/Unity-Technologies/multiplayer). The FPS Sample uses a slightly older version, but I'm using the latest version available in the Github repository.

    I've got the code building and running on my iOS device, but I'm seeing this in the log when I start the game:

    Code (CSharp):
    1. Unable to find internal function `Unity.Networking.Transport.NativeBindings::network_sendmsg`
    2. Unity.Jobs.JobStruct`1:Initialize()
    3. Unity.Jobs.IJobExtensions:Schedule(T, JobHandle)
    4. Unity.Networking.Transport.GenericNetworkDriver`2:.cctor()
    5. SocketTransport:Update()
    6. NetworkClient:Update(INetworkClientCallbacks, ISnapshotConsumer)
    7. ClientGameLoop:Update()
    8. Game:Update()
    I had some similar messages related to ECS that I was able to resolve by adding a number of entries to the "link.xml" file, as described here: https://forum.unity.com/threads/gameobjectconversionmappingsystem-not-found.693820/

    Unfortunately, I don't understand how to resolve this issue for the Transport library. I tried adding this to link.xml:

    Code (CSharp):
    1. <assembly fullname="Unity.Networking.Transport" preserve="all"/>
    This doesn't seem to make a difference. I'm not sure if there's some other assembly I should be putting in link.xml? At the bottom of the manual page (https://docs.unity3d.com/Manual/IL2CPP-BytecodeStripping.html), it says: "A tool like ILSpy can be used to inspect the stripped and unstripped assemblies to determine what parts of the code were removed." But I'm unsure where to look in the Temp directory to determine this.

    Has anyone else had any luck getting Unity.Networking.Transport library running on iOS?
     
  2. kromenak

    kromenak

    Joined:
    Feb 9, 2011
    Posts:
    266
    One other note here - this issue doesn't seem to occur on aOS or for desktop builds with IL2CPP, so I'm not sure if IL2CPP is the real issue here. There seems to be something specifically about the iOS platform that's causing this issue.

    One thought is that perhaps the Transport library hasn't been implemented on iOS yet. However, the Github page does at least mention that it does support iOS.
     
  3. kromenak

    kromenak

    Joined:
    Feb 9, 2011
    Posts:
    266
    Sorry for digging up this older thread, but if anyone else encounters this issue, it seems to be caused by some problem with Burst compilation on iOS. This issue thread explains how to resolve it: https://github.com/Unity-Technologies/multiplayer/issues/51

    You either need to modify the Unity Transport package to not use Burst on iOS or disable Burst entirely on the iOS platform.
     
    KentaTanabe and Kichang-Kim like this.