Looking for PlayFab SDK that can be used in Xamarin Forms PCL project.
https://api.playfab.com/docs/getting-started/xamarin-getting-started-guide
Example on the above link is based on Shared project and can not be used on PCL project.
Looking for PlayFab SDK that can be used in Xamarin Forms PCL project.
https://api.playfab.com/docs/getting-started/xamarin-getting-started-guide
Example on the above link is based on Shared project and can not be used on PCL project.
This sounds like a feature request, and I'm happy to add it to our backlog, but I'm going to need more details about what exactly you need, and how to set up the project you want.
If I interpret your request correctly, you're looking for a PlayFab plugin which can be integrated into a pre-compiled library for a Xamarin project. Would this come in the form of a NuGet package? If not, what is the delivery method?
If your request IS just a NuGet package, then can you test the PlayFab CSharp nuget package with your Xamarin project? It may already work.
Upto now, I haven't had any specific requests for Xamarin, and I'm not familiar at all with Xamarin in general, so I built a project that compiled and executed some basic calls successfully. Please be as specific as you can in your request, so I can build it the right way.
Thanks!
There is two types of Xamarin.Forms project that can be made in Visual Studio, one is 'Shared Project' and the other is 'Portable Class Library'.
https://developer.xamarin.com/guides/cross-platform/application_fundamentals/code-sharing/
The point is that only a subset of the .NET framework is available to use on PCL project.
Errors above occur when 'CSharpSDK-versioned\PlayFabClientSDK\source' is added to Forms PCL project. I merely guess these errors are from incompatibility on class reference between .NET framework and a subset of it. Adding SDKs to each native client project was not successful too.
I actually managed to send some API calls via native client project though.
There WAS a NuGet package called PlayFabAllSDK and worked as expected on native client project not on Forms project.
https://www.nuget.org/packages/PlayFabAllSDK/
From that, based on MVVM model, I had to make this program communicate between the code from Forms project and the code from native project. This is a kind of workaround but MessagingCenter was the answer. I had to create some event based Subscription-Sender relationship and all client APIs worked fine.
My suggestion is here.
Build NuGet PlayFabSDK based on Portable Class Library.
or
Add instruction for Xamarin.Forms PCL project on behalf of beginner at following doc.
https://api.playfab.com/docs/getting-started/xamarin-getting-started-guide
Some major benefits for using PCL here..
hundreds of plugins for PCL project exist.
https://github.com/xamarin/XamarinComponents
Thank you.
This is super helpful, thanks! I'll put this in the backlog. I don't think we can get to it right away, but I agree on the value.
Thanks!
2 People are following this question.