gpt4 book ai didi

ios - 带有大写字母和扩展名 .proto.swift 与 .pb.swift 的 Protocol Buffer

转载 作者:行者123 更新时间:2023-11-30 14:06:48 26 4
gpt4 key购买 nike

当我快速编译 Protocol Buffer 时遇到问题,我编写了这个协议(protocol) *.proto --swift_out="./"并且可以工作,但问题是我的文件是 DirectionDTO.proto 而这给我的文件是 DirectionDto.proto .swift 过去何时执行此操作,这会给我这个文件 DirectionDTO.pb.swift 我的原型(prototype)文件是

message DirectionDTO
{
optional double Latitude = 1;
optional double Longitude = 2;
optional int32 Index = 3;
optional string Address = 4;
}

最佳答案

基于reading the source code ,看起来 Swift protobuf 编译器在 2.0 版本时从输出 .pb.swift 切换到 .proto.swift。这可能是有意更改,您应该更新代码以匹配。

关于ios - 带有大写字母和扩展名 .proto.swift 与 .pb.swift 的 Protocol Buffer ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32281070/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com