giorgiotino avatar image
giorgiotino asked

LoginFromIOSDeviceID does not trigger any callback on iOS simulator

I am trying to make an iOS simulator build with Unity 2020.1.16f1 and PlayFab Unity SDK 2.100.201207 on Mac OSX Big Sur, XCode 12.3

For some unknown reason, I can see (using Charles) that the Login request goes through and I do get a correct reply from the server, but the Login callbacks do not get triggered and I am stuck at startup forever. I don't see any specific error or warning message in my log, so I was wondering if there might be something missing n my side when it comes to testing with the iOS simulator?

(I have other internal UnityWebRequest calls that do work, and I have tried both with Http and Unity Web Request types - the only difference I see in the headers from the Unity Editor, which works, is that the simulator Connection header says close instead of keep-alive, even if that flag is set to true on my settings...)

I wonder if some network leve settings might be wrong or missing, but I have no clue...

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Sarah Zhang avatar image
Sarah Zhang answered

Could you please provide the code snippet you used in the Unity? Please notice hiding the private information.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

giorgiotino avatar image giorgiotino commented ·

So, the game has been live for months now and everything works as expected - now, we need to get Facebook approval for some permissions and they need an iOS simulator build in order to test it. That's the only reason I am actually making this build - I don't know exactly what kind of code snippet you need, I can provide something if you think it's important, but I feel it's something low level regarding the simulator build specifically more than the way I call the API, as this is working fine on any other platforms.

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang giorgiotino commented ·

Thanks for the information. We will try to test the sample code in the iOS simulator.

0 Likes 0 ·
giorgiotino avatar image giorgiotino Sarah Zhang commented ·

Looks like the problem happens on Android devices as well. Looks like the only way to actually be able to trigger the API callbacks (I am not sure it's related to the login ones only... those are just the first ones we call and then we get stuck) is to use WebRequestType.UnityWebRequest. If I switch to those and set:

CompressApiData = true
RequestKeepAlive = true

the callbacks are actually called. We were using the HttpWebRequest because the RequestTimeout is completely ignored in PlayFab code when using UnityWebRequest, and we do need to set that.

This works fine in Unity 2019.4.x, but does not seem to work anymore in Unity 2020.1.x

Did something change? Is there any other parameter/settings we must set in Unity 2020 in order to make this work with HttpWebRequest too?

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.