1

I'm using Kinvey db for Xamarin android and iOS. It is working fine for Android. In iOS simulator it is working fine, but in device it is not working. It gives me error Unable to find a constructor to use for type KinveyXamarin.KinveyAuthResponse. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Path 'username', line 1, position 12.

I'm trying below code

private Client myClient;
myClient = new Client.Builder ("kid_PeYFqjBcBJ","3fee066a01784e2ab32a255151ff761b").build ();
        await myClient.User ().LoginAsync ();
Harshadcse
  • 225
  • 1
  • 9
  • Hey, I'm an engineer at Kinvey working on the Xamarin library. I'm unable to reproduce this, what version of iOS are you using? Also, are you using the latest (1.5.3) version of the xamarin library? – edthethird Sep 03 '15 at 15:52
  • Thanks for reply. I have latest version 1.5.3 kinvey package use and 8.4 OS Version in IOS Device. It working fine in simulator. – Harshadcse Sep 03 '15 at 16:14

1 Answers1

1

This might be caused by a Linker issue.

Can you right click on your project in the Solution Window, -> 'Options' -> Under Build, click iOS Build

You should see Linker Behavior, can you conform this is set to Don't Link?

edthethird
  • 6,263
  • 2
  • 24
  • 34
  • Thanks for reply.I have set `Linker Behavior` options `Don't Link ` after my issue is resolved.. it's working fine. – Harshadcse Sep 03 '15 at 19:15
  • Great. The Linker will remove all unused code from your project during the build, and KinveyAuthResponse (and a handful of other classes) are not going to be called directly-- they are used by the JSON deserializer which will not be picked up by static analysis. – edthethird Sep 08 '15 at 15:02