ObjC GPB crashing when nanopb looks for file 'GBPFileOptions'

19 views
Skip to first unread message

Andre

unread,
Feb 16, 2021, 10:25:21 AM2/16/21
to Protocol Buffers
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? If not, why is a message that was generated with the same version of GPB looking for a file that's not there?


Call Stack
(Items 28 & 29 are ours, initiating a message.)
Screen Shot 2021-02-16 at 7.17.49 AM.png

All help is appreciated :)
Cheers

Andre

unread,
Feb 16, 2021, 10:46:34 AM2/16/21
to Protocol Buffers
UPDATE 1

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?

Reply all
Reply to author
Forward
0 new messages