question

Nykos avatar image
Nykos asked

unity login not working

Hi, me again. 

So i managed to build a trading system with your help, and thanks a lot for that. Now i am trying to build my game for IOS, but there is another problem. When i try to compile, unity will stop me just after i started, saying that there was a compile error:

Assets/PlayFabSDK/Internal/PlayFabHTTP.cs(53,50): error CS1503: Argument `#3' cannot convert `PlayFab.CallRequestContainer' expression to type `PlayFab.CallRequestContainer'

 

Assets/PlayFabSDK/Internal/PlayFabHTTP.cs(53,50): error CS1502: The best overloaded method match for `PlayFab.PlayFabiOSPlugin.Post(string, string, PlayFab.CallRequestContainer, PlayFab.PlayFabiOSPlugin.InvokeRequestDelegate)' has some invalid arguments

 

and the line of code that seems to cause this problem is this one ( line 53 in PlayFabHTTP):

 

PlayFabiOSPlugin.Post(PlayFabSettings.GetFullUrl(url), PlayFabVersion.getVersionString(), requestContainer, PlayFabSettings.InvokeRequest);

 

So at first i tried to just remove it, which allowed me to compile and build in Xcode, but i can't login in the game. I'm using LoginWithPlayFab, and it works perfectly in the editor or in a mac build. But nothing happens on IOS. So i think removing this line was a bad idea, but then how can i solve the compiling error?

 

Tanks in advance,

Nicolas.

 

10 |1200

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

marcowilliamspf avatar image
marcowilliamspf answered

Hi Nicolas, 

Our latest SDK removes the need to have a plugin to post http requests.  It sounds like you are using an older version of the SDK, and It is probably a good idea to upgrade to the latest.

When upgrading to the latest SDK here are some things to think about.

1>  We removed some files, so it is best to blow away completely the SDK and remove any PlayFab files from the Plugins folder.

2>  If you are also deploying to Android, be aware that we also have separated the "Push Notification"  into it's own Unity Package which is now located in the plugins folder, so if you are going to use the Push Notification feature on android you would need to import that .unitypackage for the push plugin.  

3>  We now use a different Serialization library ( I say this because I don't know what version of our SDK you are using ) so you might need to make some minor code changes to account for this.  We do support using your own JSON.net serialization library.  If you are just using  SerializeObject & DeserializeObject then it should upgrade fine out of the box.

Let me know if you need some additional help, but it sound to me that a simple update of the SDK would solve your issue.

 

10 |1200

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

Nykos avatar image
Nykos answered

Hi Marco, thanks a lot for your help. Everything seems to be working now. I really really really am vry thankful.

10 |1200

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

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.