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.