2017-08-09 1 views
0

Ich verwende github.com/apple/swift-protobuf tag 0.9.904 und github.com/grpc/grpc-swift tag 0.1.12 mit Xcode in meiner iOS App. Ich benutze auch die gleichen Versionen mit Protoc, um meine .proto Datei zu kompilieren.Protokollpuffercode kompiliert für iOS-Simulator aber nicht Gerät

Die App arbeitet im iOS Simulator gut, aber wenn ich versuche, die App auf meinem Gerät zu laufen bekomme ich in myapp.pb.swift Fehler auf dem folgenden Bit des generierten Code kompilieren:

// If the compiler emits an error on this type, it is because this file 
// was generated by a version of the `protoc` Swift plug-in that is 
// incompatible with the version of SwiftProtobuf to which you are linking. 
// Please ensure that your are building against the same version of the API 
// that was used to generate this file. 
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { 
    struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} 
    typealias Version = _2 
} 

Die Fehler sind

No type named 'ProtobufAPIVersion_2' in module 'SwiftProtobuf' 

und

Type '_GeneratedWithProtocGenSwiftVersion' does not conform to protocol 'ProtobufAPIVersionCheck' 

der Kommentar auf dem Stück Code verursacht Die Fehler sprechen für sich. Wenn dies jedoch der Fall ist, warum wird die App im Simulator kompiliert und ausgeführt? Wie kann ich es auf meinem Gerät kompilieren und ausführen lassen?

Antwort

0

Wenn dies immer noch ein Problem für Sie ist, reichen Sie ein GitHub Problem auf dem swift-protobuf Projekt.

Verwandte Themen