這次搭建iOS的ProtocolBuffer編譯器和把*.proto源文件編譯成*.pbobjc.h 和 *.pbobjc.m文件時(shí),碰到不少問(wèn)題!
搭建pb編譯器到時(shí)沒(méi)有什么問(wèn)題,只是在把*.proto文件編譯出來(lái)后,我用cocoaPods集成ProtocolBuffers到自己項(xiàng)目,
cocoaPods集成的時(shí)候,我嘗試了兩個(gè)庫(kù),一個(gè)是:
https://github.com/google/protobuf.git,
另外一個(gè)是:
https://github.com/alexeyxo/protobuf-objc.git
但是運(yùn)行時(shí)都一直報(bào)錯(cuò)通過(guò):
一會(huì)報(bào)ProtocolBuffer庫(kù)文件找不到;
一會(huì)報(bào)版本不對(duì):This file was generated by a different version of protoc which is incompatible with your Protocol Buffer library sources ;