# protobuf-ios **Repository Path**: mirrors_mingchen/protobuf-ios ## Basic Information - **Project Name**: protobuf-ios - **Description**: [Deprecated] An Objective-C implementation of Google proto buffer for iOS - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-09 - **Last Updated**: 2026-01-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # protobuf-ios ## Introduction [![travis-ci build status](https://travis-ci.org/mingchen/protobuf-ios.svg?branch=master)](https://travis-ci.org/mingchen/protobuf-ios) An **Objective-C** implementation of Google **proto buffer** for **iOS**. The orignal code comes from [Booyah Inc](https://github.com/booyah/protobuf-objc). This implemenation add features to support write to / parse from delimited stream. This git repo also support [cocoapods](http://cocoapods.org). ## Supported Platform * iOS 4.0 and above * Xcode 4 and above ## Features - Support write to / parse from delimited stream (protobuf 2.3 feature). ## Examples ### Simple Usage You write a `foo.proto` file like this: message Person { required int32 id = 1; required string name = 2; optional string email = 3; } Then you compile it with `protoc` to produce code in Objective-C (see below). Serialize to protobuf format: Person* person = [[[[[Person builder] setId:123] setName:@"Bob"] setEmail:@"bob@example.com"] build]; NSData* data = [person data]; Unserialize from protobuf format data: NSData* raw_data = ...; Person* person = [Person parseFromData:raw_data]; ### Delimited encode Sometime is very useful to write multiple protobuf objects into a single file. This need use delimited format. Here is an example: // serialize NSOutputStream *ouputStream = [NSOutputStream outputStreamToFileAtPath:@"filename.dat" append:YES]; [ouputStream open]; for (int i=0; i