ServiceStack and Portable Class Libraries  Topic is solved

Discussions relating to the REST API of Jiwa 7.

ServiceStack and Portable Class Libraries  Topic is solved

Postby SBarnes » Mon Jun 19, 2017 4:48 pm

Hi

If you are going to attempt to use ServiceStack with a Portable Class Library (PCL) which would more than likely be the case with mobile development in Xamarin then these are the steps required:

1. Firstly install ServiceStack.Client into the solution, don't use the PCL version its been deprecated, but should this produce an error about incorrect frameworks then you will need to edit the setting called TargetFrameworkProfile in the project file and change its value to Profile7, after doing this nuget should install the relevant packages into the relevant projects.

2. In the IOS project add the line of code IosPclExportClient.Configure(); to main.cs

3. In the droid project add the line AndroidPclExportClient.Configure(); to MainActivity.cs

failing to do steps 2 and 3 will cause any attempt to instantiate the JsonServiceClient to throw an exception

Hope this is of help to someone
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Return to REST API

Who is online

Users browsing this forum: No registered users and 1 guest

cron