Generate Protocol Buffers files for iOS
Stay organized with collections
Save and categorize content based on your preferences.
This guide shows you how to generate the Protocol Buffers source files for iOS from scratch.
Generate C++ source files from the proto file
Download the Protocol Buffers Compiler v3.18.0 on your local machine.
Unzip it.
Check its version:
./bin/protoc --version
You should have libprotoc 3.18.0
.
In the Cardboard repository, locate the proto
folder and save its path.
Generate the Protocol Buffers source files in C++:
./bin/protoc --proto_path=$PROTO_FOLDER_PATH --cpp_out=$PROTO_FOLDER_PATH cardboard_device.proto
You should now have cardboard_device.pb.cc and cardboard_device.pb.h.
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-08-06 UTC."}