Hi,
Sounds like the library you are using cannot handle the "options" syntax
of .proto files for some reason. It's part of standard protobuf so it
should, but it is a quite rarely used feature so might be missing for
that reason.
You could just remove anything nanopb-specific from your .proto file,
as they only affect nanopb and not other libraries. If you want to keep
the same .proto file in all your projects, nanopb can also read the
options from a separate .options file.
--
Petteri
On Tue, Feb 16, 2021 at 07:51:20AM -0800, André Crabb wrote:
> Hello hello,
>
> We're running into an issue instantiating our GPB commands in our iOS app.
>
> *Error*
> *** Terminating app due to uncaught exception
> 'NSInternalInconsistencyException', reason: 'Class GPBFileOptions not
> defined'
>
> *More Info*
> I received the .proto files from another of our teams, and I generated the
> ObjC files myself. We're using GPB 3.11.4
> I'm using CocoaPod "Protobuf" on version 3.11.4 (
>
https://cocoapods.org/pods/Protobuf)
>
>
> Its true, this Pod doesn't have a file `GPBFileOptions`. Should it?
>
>
> *Call Stack*
> (Items 28 & 29 are ours, initiating a message.)
> [image: Screen Shot 2021-02-16 at 7.17.49 AM.png]
>
>
> These lines are in the bottom of our `nanopb.proto` file...
>
> ```
> extend google.protobuf.FileOptions {
> optional NanoPBOptions nanopb_fileopt = 1010;
> }
>
> extend google.protobuf.MessageOptions {
> optional NanoPBOptions nanopb_msgopt = 1010;
> }
>
> extend google.protobuf.EnumOptions {
> optional NanoPBOptions nanopb_enumopt = 1010;
> }
>
> extend google.protobuf.FieldOptions {
> optional NanoPBOptions nanopb = 1010;
> }
> ```
> ...and it looks like `MessageOptions`, `EnumOptions`, and `FieldOptions`
> are NOT part of the Protobuf Pod either.
>
> Are extensions not supported in the ObjC version of GPB?
>
>
> All help is appreciated :)
> Cheers
>
> --
> You received this message because you are subscribed to the Google Groups "nanopb" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
nanopb+un...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/nanopb/8424c15f-a88a-4269-bb34-c46af3fe9b53n%40googlegroups.com.