I'm new to protobuf and am trying to converting the Trezor protobuf files to Swift using Swift-protobuf.
The Trezor protobuf files do not have a syntax = "proto3";
or syntax = "proto2";
line in the code. Adding syntax = "proto3";
results in an error message: Explicit 'optional' labels are disallowed in the Proto3 syntax
. Converting the files to Swift as-in (without any syntax line) works (Swift-protobuf defaults to Proto2).
Adding the files to an Xcode 9 / Swift 4.0 however, leads to the errors below. The SwiftProtobuf framework has been added to the project using Cocoapods. How do I fix this?
Use of undeclared type 'Google_Protobuf_EnumValueOptions'
Use of undeclared type 'Google_Protobuf_FileDescriptorSet'
Use of unresolved identifier 'clearExtensionValue'