# Introduction to Protocol Buffers on iOS

**URL:** <https://forums.kodeco.com/t/introduction-to-protocol-buffers-on-ios/25938>\
**Category:** 🎓 Courses & Articles\
**Created:** [February 6, 2017, 2:02pm UTC](https://forums.kodeco.com/t/introduction-to-protocol-buffers-on-ios/25938 "2017-02-06T14:02:21Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![jomoka](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jomoka/32/109828_2.png) [@jomoka](https://forums.kodeco.com/u/jomoka)\
**Post date:** [February 6, 2017, 2:02pm UTC](https://forums.kodeco.com/t/introduction-to-protocol-buffers-on-ios/25938/1 "2017-02-06T14:02:21Z")

</div>

Protocol buffers are a language-agnostic method for serializing structured data that can be used as an alternative to XML or JSON in your iOS apps.

* * *
 This is a companion discussion topic for the original entry at [https://www.raywenderlich.com/749-introduction-to-protocol-buffers-on-ios](https://www.raywenderlich.com/749-introduction-to-protocol-buffers-on-ios)

---

<div class="post-metadata">

**Author:** ![tof](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/tof/32/102075_2.png) [@tof](https://forums.kodeco.com/u/tof)\
**Post date:** [February 7, 2017, 8:33am UTC](https://forums.kodeco.com/t/introduction-to-protocol-buffers-on-ios/25938/2 "2017-02-07T08:33:25Z")

</div>

Could be more interesting with a full stack Swift solution 😉  
Another solution is to use [flatbuffer](https://google.github.io/flatbuffers/index.html)

---

<div class="post-metadata">

**Author:** ![jomoka](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jomoka/32/109828_2.png) [@jomoka](https://forums.kodeco.com/u/jomoka)\
**Post date:** [February 7, 2017, 12:20pm UTC](https://forums.kodeco.com/t/introduction-to-protocol-buffers-on-ios/25938/5 "2017-02-07T12:20:34Z")

</div>

@frohmen yes haha it’s suppose to spit out all of that. I couldn’t find a way to not make the script verbose. sorry 😕

@tof yea could be cool!

---

<div class="post-metadata">

**Author:** ![akonakov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/akonakov/32/111867_2.png) [@akonakov](https://forums.kodeco.com/u/akonakov)\
**Post date:** [February 7, 2017, 12:59pm UTC](https://forums.kodeco.com/t/introduction-to-protocol-buffers-on-ios/25938/6 "2017-02-07T12:59:38Z")

</div>

I’m getting this error while running ./protoInstallation.sh :

`libtool: link: cannot find the library Buffers/Starter/protobuf-3.1.0/src/libprotobuf.la or unhandled argument Buffers/Starter/protobuf-3.1.0/src/libprotobuf.la`  
The path looks wrong to me…

As a result I don’t have `protoc` in my system.

---

<div class="post-metadata">

**Author:** ![jomoka](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jomoka/32/109828_2.png) [@jomoka](https://forums.kodeco.com/u/jomoka)\
**Post date:** [February 7, 2017, 2:27pm UTC](https://forums.kodeco.com/t/introduction-to-protocol-buffers-on-ios/25938/7 "2017-02-07T14:27:02Z")

</div>

@akonakov do you by any chance have a space in the root directory? Like the following **Starter** and **Starter 2**.  
If the root directory has a space like **Starter 2** it could be possible the script **./protoInstallation.sh** will not be able to find the path.

As shown below:

 ![](https://raywenderlich-com-v3-forums.s3.amazonaws.com/original/3X/0/c/0c267410cb9c44c2f881637bbc78b9d436dc74ce.png)

Another alternative is to try to install protoc manually with the following:

```
  cd ./protobuf-3.1.0/
  ./configure
  make
  make check
  sudo make install
  sudo ldconfig # refresh shared library cache.

```

Tried to make the script as robust as possible 😕

---

<div class="post-metadata">

**Author:** ![akonakov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/akonakov/32/111867_2.png) [@akonakov](https://forums.kodeco.com/u/akonakov)\
**Post date:** [February 7, 2017, 2:53pm UTC](https://forums.kodeco.com/t/introduction-to-protocol-buffers-on-ios/25938/8 "2017-02-07T14:53:02Z")

</div>

Yes, the root directory initially had a space in its name - now I’ve renamed it, but still getting the same error. And I can’t find `ldconfig`. No luck for me ☹

---

<div class="post-metadata">

**Author:** ![jomoka](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jomoka/32/109828_2.png) [@jomoka](https://forums.kodeco.com/u/jomoka)\
**Post date:** [February 7, 2017, 3:03pm UTC](https://forums.kodeco.com/t/introduction-to-protocol-buffers-on-ios/25938/9 "2017-02-07T15:03:43Z")

</div>

@akonakov

1. can you try deleting every single project you downloaded.
2. Clear your trash
3. Can you redownload a fresh copy.

Make sure you don’t have duplicate names in the same directory. Spaces are bad with scripts 😃

I think it’s cached.

---

<div class="post-metadata">

**Author:** ![akonakov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/akonakov/32/111867_2.png) [@akonakov](https://forums.kodeco.com/u/akonakov)\
**Post date:** [February 7, 2017, 3:12pm UTC](https://forums.kodeco.com/t/introduction-to-protocol-buffers-on-ios/25938/10 "2017-02-07T15:12:23Z")

</div>

Yeah, it was cached somewhere. Eventually deleted everything unzipped before and extracted again. Now it looks to be OK, thanks, man!

---

<div class="post-metadata">

**Author:** ![afinkel](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/afinkel/32/81494_2.png) [@afinkel](https://forums.kodeco.com/u/afinkel)\
**Post date:** [February 7, 2017, 8:13pm UTC](https://forums.kodeco.com/t/introduction-to-protocol-buffers-on-ios/25938/11 "2017-02-07T20:13:08Z")

</div>

To mention: Apple has a format called Binary Plist. Not widely used thou.

---

<div class="post-metadata">

**Author:** ![fbara](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/fbara/32/88428_2.png) [@fbara](https://forums.kodeco.com/u/fbara)\
**Post date:** [February 23, 2017, 12:58am UTC](https://forums.kodeco.com/t/introduction-to-protocol-buffers-on-ios/25938/12 "2017-02-23T00:58:24Z")

</div>

After I’m done with the tutorial, how do I remove everything I just installed? I don’t have a lot of drive space so I’m looking to reclaim it.

---

<div class="post-metadata">

**Author:** ![jomoka](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jomoka/32/109828_2.png) [@jomoka](https://forums.kodeco.com/u/jomoka)\
**Post date:** [March 1, 2017, 4:57am UTC](https://forums.kodeco.com/t/introduction-to-protocol-buffers-on-ios/25938/13 "2017-03-01T04:57:18Z")

</div>

@fbara, try looking into /usr/local/bin or /usr/local/bin to remove the protoc libs.

 ![](https://raywenderlich-com-v3-forums.s3.amazonaws.com/original/3X/a/7/a7490c2447894a68617b8ea941848c3653bd58f4.png) 

To uninstall flask you could try:

> <https://stackoverflow.com/questions/19701900/how-can-i-uninstall-flask>

Hope this helps, thanks!

---

<div class="post-metadata">

**Author:** ![fbara](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/fbara/32/88428_2.png) [@fbara](https://forums.kodeco.com/u/fbara)\
**Post date:** [March 1, 2017, 6:22pm UTC](https://forums.kodeco.com/t/introduction-to-protocol-buffers-on-ios/25938/14 "2017-03-01T18:22:53Z")

</div>

It does help, thanks for replying!

---

<div class="post-metadata">

**Author:** ![mahesh20](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/mahesh20/32/81494_2.png) [@mahesh20](https://forums.kodeco.com/u/mahesh20)\
**Post date:** [July 10, 2017, 8:55am UTC](https://forums.kodeco.com/t/introduction-to-protocol-buffers-on-ios/25938/15 "2017-07-10T08:55:44Z")

</div>

I am getting this error

Running ProtoBuf Compiler to convert .proto schema to Swift  
dyld: Symbol not found: \_\_TWPVSS13CharacterViews13IndexableBases  
Referenced from: /usr/local/bin/protoc-gen-swift  
Expected in: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib  
in /usr/local/bin/protoc-gen-swift  
–swift\_out: protoc-gen-swift: Plugin killed by signal 6.

---

<div class="post-metadata">

**Author:** ![iamchenchen](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/iamchenchen/32/98546_2.png) [@iamchenchen](https://forums.kodeco.com/u/iamchenchen)\
**Post date:** [October 12, 2017, 8:45am UTC](https://forums.kodeco.com/t/introduction-to-protocol-buffers-on-ios/25938/16 "2017-10-12T08:45:48Z")

</div>

How to make a post or put call with Protobuf object? I want to use alamofire for this call.

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [October 14, 2017, 2:50pm UTC](https://forums.kodeco.com/t/introduction-to-protocol-buffers-on-ios/25938/17 "2017-10-14T14:50:45Z")

</div>

This tutorial is more than six months old so questions regarding it are no longer supported for the moment. We will update it as soon as possible. Thank you! :]

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [October 14, 2017, 2:50pm UTC](https://forums.kodeco.com/t/introduction-to-protocol-buffers-on-ios/25938/18 "2017-10-14T14:50:49Z")

</div>

Closed on October 14, 2017, 2:50pm UTC


