grpc-swift
grpc-swift copied to clipboard
Could not find module 'SwiftProtobuf' for target 'arm64-apple-ios-simulator' & 'i386-apple-ios-simulator'
What are you trying to achieve?
To install the GRPC library into my current project which also uses Firebase.
What have you tried so far?
- Installed both using pods and it failed because of name conflicts.
- Tried adding Architectures of the above in build settings
- Tried opening using Rosetta.
I also get this error. The repro steps are
1.) Create new Xcode project. 2.) File -> Add Packages 3.) Enter the gRPC URL and click Add Package 4.) Try to build and get the above error.
Help would me much appreciated.
Xcode 13.3.1 on Intel Chip
Could you provide the complete build logs for this?
I resolved that error by adding grpc-swift as a pod with 1.0.0 version and my Firebase packages as SPM.
Here's my pod version
pod 'gRPC-Swift', '~> 1.0.0'
I generate the pb and grpc files using the following commands.
protoc --grpc-swift_out=. presence.proto
protoc --swift_out=. presence.proto
The generated files throw multiple errors for missing types in scope in the presence.grpc.swift file.
Adding the screenshot below. Any help would be appreciated!
You have a version mismatch between the library version (from cocoapods) and the plugin version. The plugin version is newer and is generating code that the library doesn't know about.
FWIW: Cocoapods is no longer supported and the last version published there was 1.8.0.
What got swift package manager working for me was not importing the proto executable
