Bukimedia / PrestaSharp

CSharp .Net client library for the PrestaShop API via web service
GNU General Public License v3.0
154 stars 151 forks source link

Impossible to use PrestaSharp with new Xamarin.Forms project... #285

Closed espritm closed 5 years ago

espritm commented 7 years ago

Hello everyone,

I would like to use PrestaSharp to create a Xamarin.Forms Android and iOS mobile app. Unfortunately, I encounter many problems and it is impossible for me to contact my prestashop website with PrestaSharp. Could you help me please ?

Here are the steps to reproduce from scratch :

And here I am, after two entire days working on that POC, I can't get carts from my prestashop website. Please I need your help :) What should I do to get it working ? What did I do wrong ?

I put the project on Github so you can get it to reproduce the exception : https://github.com/espritm/PrestaPOC

Thanks a lot for any help 👍

mowcixo commented 5 years ago

Hello @espritm, sorry for the delay.

Initially PrestaSharp was only flavored for .NET Framework so the use with Xamarin was not supported. Since v1.0.2 PrestaSharp supports .NET Standard, so it should work with Xamarin, we didn't tested though.

It would be great if you test it now and let us know.

espritm commented 5 years ago

Hey @mowcixo ! Thank you for your answer !

I tested this morning and yes, it's working as a charm ! :)

I have created a Xamarin Forms project with .NET Standard 2.0 (instead of PCL). This is the new version of Xamarin.

I installed the nuget PrestaSharp V1.0.3 (latest) on all solution's projects, and it compiles well. I instanciated a CartFactory and get a Cart from an ID, and again it is working well.

Thank you 👍

mowcixo commented 5 years ago

Hello @espritm those are great news! I'm glad you can use the library now, thanks for the feedback!

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.