The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

iOS support

SniperED007
2020-01-27 09:40:12

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
2020-01-27 14:54:41

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?

SniperED007
2020-01-27 15:10:53

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
2020-01-27 16:42:38

OK thanks.
@jeanfabre will look into it.

SniperED007
2020-01-27 16:59:21

*Note, also using latest version of Photon Voice, if that helps.

jeanfabre
2020-01-28 06:09:43

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

SniperED007
2020-02-01 20:16:34

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?

jeanfabre
2020-02-03 13:58:03

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

SniperED007
2020-02-03 14:03:58

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.

jeanfabre
2020-02-03 14:10:00

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

SniperED007
2020-02-03 15:42:43

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.

SniperED007
2020-02-03 16:23:47

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).

jeanfabre
2020-02-03 17:31:11

Hi,

cool! I am glad you sorted it out.

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

bye,

Jean

SniperED007
2020-02-04 09:08:04

@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.

Back to top