这次搭建iOS的ProtocolBuffer编译器和把*.proto源文件编译成*.pbobjc.h 和 *.pbobjc.m文件时,碰到不少问题!

搭建pb编译器到时没有什么问题,只是在把*.proto文件编译出来后,我用cocoaPods集成ProtocolBuffers到自己项目,

cocoaPods集成的时候,我尝试了两个库,一个是:

https://github.com/google/protobuf.git,

另外一个是:

https://github.com/alexeyxo/protobuf-objc.git

但是运行时都一直报错通过:

一会报ProtocolBuffer库文件找不到;

一会报版本不对:This file was generated by a different version of protoc which is incompatible with your Protocol Buffer library sources ;

网友评论