Skip to content

asarazan/protobuf-objc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Protocol Buffers, 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.

Cocoa Pods Support

In testing for Cocoa Pods. It's not been submitted to the central repo yet.

Plug 'n Play

  • added pre-compiled binaries for protoc and protoc-gen-obj
  • added universal binary
  • compiled with maverick

Add the ProtocolBuffers.framework to your project. The library will work for iOS Simulator and iOS 7.0 on iPhone 4,4s,5,5s.

To generate protocol buffers model, create a .proto file, in terminal navigate to the bin/protobuf/2.5.0/bin directory and run protoc --objc_out=./ <your_folder_with_.protofiles>.

Installation

  1. Install XCode and XCode command line tools
  2. Install brew
  3. brew install autogen
  4. brew install aclocal
  5. brew install automake
  6. brew install protobuf
  7. Download source or clone repository to local machine
  8. cd into root directory of project
  9. ./autogen.sh
  10. ./configure
  11. make -B -d & make install

Usage

cd /folder/with/.proto files/ && protoc --objc_out=/my/output/folder *

Troubleshooting

Issue installing Protobufs 2.5.0 in Mavericks. Comment out the iosfwd.

#ifdef __DECCXX
// HP C++'s iosfwd doesn't work.
#include <iostream>
#else
#include <sstream>
//#include <iosfwd> // comment out this for the sstream
#endif

File locations

/usr/local/bin 
  protoc (file or symlink)
  protoc-gen-objc (file or symlink)
/usr/local/include
  needs a symlink called "protobuf" to /usr/local/Cellar/protobuf/2.5.0/include
/usr/local/opt
  needs a symlink called "protobuf" to /usr/local/Cellar/protobuf/2.5.0

Credits

Booyah Inc.

Google Protocol Buffers, Objective C

Google Protocol Buffers

  • Kenton Varda, Sanjay Ghemawat, Jeff Dean, and others

About

Protocol Buffers for Objective C

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 66.1%
  • C++ 30.1%
  • C 3.1%
  • Emacs Lisp 0.3%
  • Java 0.2%
  • Vim Script 0.1%
  • Other 0.1%