Forum Cross Platform with Xamarin
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

How is Newtonsoft.Json shared?

I downloaded the dll's and they are OS specific with one dll being in the IOS folder and the other dll being in the Android folder.

If I have a shared Controller class that calls a webservice to parse JSON, how is this dll to be shared?

For example:

Controller - MySharedController.ParseJSON()

iOS - MyiOS_UI.MySharedController.ParseJSON()

Android - MyAndroid_UI.MySharedController.ParseJSON()

If there are two separate dll's it seems like it can't be shared. And that would mean moving the shared controller into each respective OS's project.

Is that correct or am I missing something?

Posts

  • ChrisHonselaarChrisHonselaar NLBeta ✭✭✭

    If you want one dll that you can reference from both iOS and Android, use the existing PCL dll from NewtonSoft, or use the source to create your own PCL (preferable I think).

    For more options/information on sharing code in cross-platform projects, check this Xamarin guide.

Sign In or Register to comment.