PUN Between Android and iOS
The whole answer can be found below.
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).
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
Hi @Stribog10,
Thank you for choosing Photon!
Review our "Machmaking Checklist" to make sure nothing is wrong.
@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.
Hi @Stribog10,
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?
@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 :)
Make sure you use different UserId on each device.
Players with the same UserId cannot join the same room.
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
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.
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!
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.