Category Archives: Protobuf

Writing a PHP Script that Takes One Protobuf and Returns Another Protobuf

After we’ve generated the PHP classes from the Protocol Buffers, we can now use those classes in a PHP script. The PHP script will take a StoryRequest Protobuf from the iOS client, and respond with a StoryResponse Protobuf. We’ll call … Continue reading

Posted in Protobuf | Leave a comment

Generating PHP Classes from Protocol Buffer

Just like we need to compile our Protocol Buffers using the Protocol Buffer Compiler (protoc) into Objective-C classes before we can use it in an iOS project, we also need to compile the Protocol Buffer into PHP classes before we … Continue reading

Posted in Protobuf | 1 Comment

How to Send a Protobuf from iPhone Client to Server

After linking the protocol buffer static library into the XCode project, we can finally use it! If you recall from the generating Objective-C classes from protocol buffer post, we had a StoryRequest that takes two character names and an object … Continue reading

Posted in Protobuf | 7 Comments

Linking the Protocol Buffer Static Library into the Xcode Project

Last time we talked about how to compile proto files into Objective-C files, now let’s actually use them in a project! So create a new Xcode project, or use an existing one that will use these new files. Now add … Continue reading

Posted in Protobuf | 7 Comments

Generating Objective-C Classes from Protocol Buffer

Once you have the Protocol Buffer Compiler (protoc) built, you can use it to compile proto files into headers and implementations in the language of your choice. For example, I have this pair of proto files defined. This is a … Continue reading

Posted in Protobuf | 4 Comments

Compiling the Protocol Buffer Compiler for Objective-C

Recently, I looked into Protocol Buffers as a format of communicating between the iPhone client and the server. I didn’t find a lot of writing on this topic when it comes to Objective-C, so I figured I will write down … Continue reading

Posted in Protobuf | 1 Comment