日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

protocol_buffers简易操作

發布時間:2025/3/17 编程问答 15 豆豆
生活随笔 收集整理的這篇文章主要介紹了 protocol_buffers简易操作 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

2019獨角獸企業重金招聘Python工程師標準>>>

最近使用CocoaPods來添加第三方類庫,無論是執行pod install還是pod update都卡在了Analyzing dependencies不動
原因在于當執行以上兩個命令的時候會升級CocoaPods的spec倉庫,加一個參數可以省略這一步,然后速度就會提升不少。加參數的命令如下:
pod install --verbose --no-repo-update
pod update --verbose --no-repo-update




版本 for ios && swift


-> ProtocolBuffers (1.9.8)
? ?Protocol Buffers for Objective-C
? ?pod 'ProtocolBuffers', '~> 1.9.8'
? ?- Homepage: http://protobuf.io#objc
? ?- Source: ? https://github.com/alexeyxo/protobuf-objc.git
? ?- Versions: 1.9.8, 1.9.7, 1.9.6, 1.9.5, 1.9.4, 1.9.3, 1.9.2, 1.9.1, 1.9,
? ?1.2.2, 1.2.1, 1.2 [master repo]




-> ProtocolBuffers-Swift (2.0)
? ?Protocol Buffers for Swift
? ?pod 'ProtocolBuffers-Swift', '~> 2.0'
? ?- Homepage: http://protobuf.io#swift
? ?- Source: ? https://github.com/alexeyxo/protobuf-swift.git
? ?- Versions: 2.0, 1.6.2, 1.6.1, 1.6, 1.5.2, 1.5.1, 1.5, 1.4 [master repo]
jamie:~ jamie$








Protocol Buffers for Objective-C
? ? ?
An implementation of Protocol Buffers in Objective C.
Protocol Buffers are a way of encoding structured data in an efficient yet extensible format. This project is based on an implementation of Protocol Buffers from Google. See the Google protobuf project for more information.
This fork contains only ARC version of library.
How To Install Protobuf
Building the Objective-C Protobuf compiler
1. Check if you have Homebrew brew -v
2. If you don't already have Homebrew, then install it ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
3. Install the main Protobuf compiler and required tools brew install automake brew install libtool brew install protobuf
4. (optional) Create a symlink to your Protobuf compiler. ln -s /usr/local/Cellar/protobuf/2.6.1/bin/protoc /usr/local/bin
5. Clone this repository. git clone https://github.com/alexeyxo/protobuf-objc.git
6. Build it! ./scripts/build.sh
Adding to your project as a sub project
...
1. Add /src/runtime/ProtocolBuffers.xcodeproj in your project.
Adding to your project as a CocoaPod
...
1. cd <your .xcodeproj directory>
2. echo -e "platform :ios , 6.0 \nlink_with '<YourAppTarget>', '<YourAppTarget_Test>' \npod 'ProtocolBuffers'" > Podfile
3. pod install
Compile ".proto" files.
protoc --plugin=/usr/local/bin/protoc-gen-objc person.proto --objc_out="./"




轉載于:https://my.oschina.net/u/1244672/blog/616553

總結

以上是生活随笔為你收集整理的protocol_buffers简易操作的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。