I've been struggling trying to get protobufs 3 to compile/run for iOS. Everything compiles, but at runtime I get:
dyld: Library not loaded: /usr/local/lib/libprotobuf.15.dylib
Referenced from: /path/to/TheApp.app/TheApp
Reason: no suitable image found. Did find:
/usr/local/lib/libprotobuf.15.dylib: mach-o, but not built for iOS simulator
Here are my steps:
- Compile static library for all architectures using this excellent script.
- Add the static library to the
Linked Frameworks and Libraries
section under theGeneral
tab for the compile target. - Build => success