protobuf-net v2 and Monotouch : How does it mix?

后端 未结 2 1994
长发绾君心
长发绾君心 2021-02-04 17:32

I have been trying to use protobuf-net with MonoTouch but I have no idea how, and despite having heard that it is possible, I haven\'t been able to find any tutorial or any exam

2条回答
  •  伪装坚强ぢ
    2021-02-04 18:04

    Just to bring this up to date there are a few issues with using WCF + Protobuf on MonoTouch. As you have observed the current releases of System.ServiceModel and protobuf light for ios don't include all the necessary bits.

    However if you go and get the full System.ServiceModel from the Mono repository on GitHub and build it against the full Protobuf source then you can get it to work; I have done so.

    You need to generate a serialisation assembly using the precompile tool then edit the ProtoOperationBehavior attribute to give it some way to reference your serialisation assembly. All the changes are too extensive to document here but it can be done and it is a lot faster than DatacontractSerializer which is pretty awful on iOS.

提交回复
热议问题