iOS support

I have a game that's working fine on Windows, but when I test it on my iPad as soon as I try connect to the server it disconnects (saying client disconnected).

Is there something else I have to do for iOS to get networking to work? I've tried both Udp and Tcp.

Running IL2CPP .Net 4.x ARM64 Unity 2019.3.05f
I have "Allow downloads over HTTP (nonsecure)" checked as well as "Requires Persistent Wifi"

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @SniperED007,
    as soon as I try connect to the server it disconnects (saying client disconnected).
    Is this PUN 2? which version?
    What do you see in the logs?
    Which disconnect cause?

    Did you try different Unity version (older?) or different scripting backend?
    Did you try different iOS version or iOS device?
  • PUN 2.16 Photon lib 4.1.2.19
    DisconnectByClientLogic

    "What do you see in the logs?" How do I check the logs on an iOS device?
    "Did you try different Unity version (older?) or different scripting backend?" No & No (large project cannot backport)
    "Did you try different iOS version or iOS device?" Tried both iPad Pro 2018 and iPhone 6s

  • JohnTube
    JohnTube ✭✭✭✭✭
    OK thanks.
    @jeanfabre will look into it.
  • *Note, also using latest version of Photon Voice, if that helps.
  • Hi,

    ok, to check the log on a IOS device, you use Xcode and press play while your device is connected to your computer, then it enters debug mode where Xcode will catch all the unity logs and show them to you within Xcode.

    the other solution is to use something like In Game Debug Console : https://assetstore.unity.com/packages/tools/gui/in-game-debug-console-68068

    it's free and you get the full unity logs in your game on its UI.

    - Can you publish on osX as a standalone and check if it works or not?
    - Can you check inside your app that you have access to the internet by simply using WWW class on a random site like google or your site.
    - Can you make a fresh empty project, add just photon voice, and publish the demo and see if it works?

    let's see what the above does and we'll take it from there.

    Bye,

    Jean
  • The error is that the AppId is unknown, I suspect that the settings are'nt loaded when I do a Unity Cloud build (as the same thing happens if I download the project from GitHub)
    If I look at the PhotonServerSettings on my GitHub project I can see it's there and all the settings are there.
    Yet when I open it on another PC the settings are empty.
    Any idea why?

  • Hi,

    you need to make sure you include the photonServerSettings in your files, it must be present in the Assets at the time of build.

    So double check that the file is not ignored because of the ignore rules defined in your repository.

    Bye,

    Jean
  • As I said, it is visible in the GitHub project so it should be available at the time of build as well.
    I also checked that there are no rules defined to ignore it and there aren't.
  • Hi,

    you said, the same thing happen as you download it, this is where you need to focus, your project rep should contain the pun settings, if you download it and it's not there, it's because it's been ignored or not committed.

    if you see it in the repository online yet when you download it, it's not there, that's odd. is it there when you unzip it before you open it with Unity?

    Bye,

    Jean
  • I just tried downloading it and the file is there and if I open it (in a text editor, not unity I can see all the settings are there and correct).
    But then when I open the project in Unity the PhotonServerSettings are empty.
  • I worked it out. I tried the same steps as above but before loading the project in Unity I deleted the PhotonServerSettings.meta file. The settings remained after doing that. (Still need to test it on iOS Unity Cloud Build but I'm sure it will now work).
  • Hi,

    cool! I am glad you sorted it out.

    Did you moved the PhotonServerSettings to a different location than default?

    bye,

    Jean
  • jeanfabre wrote: »
    Hi,

    cool! I am glad you sorted it out.

    Did you moved the PhotonServerSettings to a different location than default?

    bye,

    Jean

    No, I hadn't, but I tried doing a clean Unity Cloud Build for iOS and it still had the same issue. So I ended up deleting the meta file again and moving the Resource Folder and then doing another build, after that it worked.