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.

PUN Between Android and iOS

Stribog10
2018-08-13 06:54:04

Hello,
I am working on an AR/Voice Chat app for mobile platforms. Before I published the iOS version to the app store, it had cross platform functionality with Android. However, once I archived it and uploaded it to the app store, this functionality was lost. Is it possible to establish it once again?

I double checked that both versions have the same App ID and Version number. I am using PUN 1.91. Using Unity 2018.2.

Thanks!

Comments

JohnTube
2018-08-13 09:59:25

Hi @Stribog10,

Thank you for choosing Photon!

Review our "Machmaking Checklist" to make sure nothing is wrong.

Stribog10
2018-08-13 12:49:17

@JohnTube wrote:

Hi @Stribog10,

Thank you for choosing Photon!

Review our "Machmaking Checklist" to make sure nothing is wrong.

Hello, thank you for your answer!
I've reviewed them multiple times, all the conditions are fulfilled.

JohnTube
2018-08-13 13:28:58

Hi @Stribog10,

AR/Voice Chat app
So you use Photon Voice (PUN and Voice apps), Photon Chat also?
it had cross platform functionality with Android
What do you mean by "cross platforms functionality"?
However, once I archived it and uploaded it to the app store, this functionality was lost.
This is really weird. I don't think publishing to the app store could have this consequence.
Version number
You mean GameVersion/AppVersion right?

So you confirm that two clients, one Android and one iOS, having exactly the same:

  • AppID
  • AppVersion (GameVersion + PUN version)
    connected to the same Photon Cloud region
    cannot join the same room on the same lobby?

Do you have client logs from Android and iOS to support this?

Stribog10
2018-08-13 13:52:01

@JohnTube wrote:

So you use Photon Voice (PUN and Voice apps), Photon Chat also?

I use PUN and Photon Voice, but not Photon Chat. By cross platform functionality, I mean that a user on an iOS device could connect to the same lobby as an Android user and talk with them.

@JohnTube wrote:

You mean GameVersion/AppVersion right?

Sorry for the poor phrasing, by version number I meant both AppID and the AppVersion are the same.

@JohnTube wrote:

Do you have client logs from Android and iOS to support this?

What do you mean by logs? Does Photon have its own logs or do you mean the ones from logcat/Xcode etc.? If you could clarify, I will happily provide them :)

JohnTube
2018-08-13 13:55:42

Make sure you use different UserId on each device.
Players with the same UserId cannot join the same room.

connect to the same lobby as an Android user and talk with them.
Communication between players is possible only inside rooms and not inside lobbies.
the ones from logcat/Xcode etc.?
Yes that's what I meant. Try connecting from different devices (Unity Editor, iOS, Android) and log UserId, AppId, AppVersion and Cloud Region. Then try joining same room.

Stribog10
2018-08-14 09:19:08

Hello,
Here are the logs for iOS:
https://pastebin.com/4LSj8vaF
and Android:
https://pastebin.com/YUrqs2nN

Unfortunately, since the app is AR, a log from a computer is not possible. One thing to note is that the voice client does actually connect, and voice chat does work, but the app doesn't behave as if the users are in the same room. To be more specific, it doesn't switch from a "waiting for user" UI to a "character select" UI. I would chalk it up to my own oversight in code, but the strange thing about it is that it only happens between Android and iOS. Here is the code snippet that runs in the Update method as well, for reference:
https://pastebin.com/3q0mG2u1

JohnTube
2018-08-14 11:20:44

Hi @Stribog10,

Unfortunately, the logs you have collected and shared do not tell us anything useful.
Could you try:

  • add this component to your game scenes or to a GameObject that is persistent across scenes (i.e. DontDestroyOnLoad?
  • test one of our voice demo or test scenes between Android and iOS and see if the issue can be reproduced.

Stribog10
2018-08-17 09:57:30

Thanks for your component script! No need to post the logs, I figured out the problem, but not sure how to solve it.
It seems that before a room is joined, the app's connection to the Master server times out if one waits too long before joining. I'll look into this myself, but do you know of any potential reasons this could happen?

Thanks!

JohnTube
2018-08-17 10:45:31

Hi @Stribog10,

I'm glad you found that script useful.
I will work on improving it and maybe add include it in the Voice package.

any potential reasons this could happen?
Maybe wrong region or bad network connection. Back to top