Hi, 

I'm new to Protocol Buffers, and I'm using gRPC within a iOS Framework 
written in Objective-C. I found the useful proto3 option, 
objc_class_prefix, for adding a 3+ character class prefix to the Objc 
generated code. What I don't understand is why this class prefix (for e.g. 
"MYRPC") isn't used to name the generated pbobjc.h & pbobjc..m files too. 

The only way I've found to get around this, unacceptably, is to append to 
the snake case name so the file named "m_y_r_p_c_service.proto" is 
converted to MYRPCService.pbobjc.h & MYRPCService.pbobjc.m. Of course, if 
you change the protobuf option objc_class_prefix in the source, you'd still 
need to rename the files. Plus, if I use these proto files to generate code 
for a different language, the file naming convention may not be the same as 
for Apple's Obj-C convention. 

Considering it's good style (and something Xcode does automatically) to 
name your objc files with the class prefix, I would have thought this would 
have applied to the generated source code files with protobufs. 

Does anyone know how to achieve this file name prefixing without the .proto 
file name hack?

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to