apple / swift-protobuf

Plugin and runtime library for using protobuf with Swift
Apache License 2.0
4.55k stars 443 forks source link

Method cannot be declared public because its parameter uses an internal type #798

Closed cdoky closed 5 years ago

cdoky commented 5 years ago

Please be sure to include:

struct KyStsControl {
  // SwiftProtobuf.Message conformance is added in an extension below. See the
  // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  // methods supported on all messages.

  var eventID: Int32 = 0

  var controlName: String = String()

  var eventDes: String = String()

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}
}
wx20180919-151221 2x

Thank you!

cdoky commented 5 years ago

like this: https://github.com/grpc/grpc-swift/issues/50 With these two arguments "--swift_opt", the issue gone.

protoc --proto_path=. --swift_out=./swift/ --swift_opt=Visibility=Public