I am developing an iOS app which uses swift-gRPC services.
Following the official xcode documentation, I imported the swift-gRPC package from its github repository.
When creating tests for the gRPC code in view model, I realised the moment I write @testable import ViewModel
in a blank XCTest file, and build the unit test target, I get an error Missing required module "CNIOAtomics"
.
I checked the missing module is from the swift-gRPC package. I also checked the Unit Tests are correctly pointing to the main app target.
It is very strange that this dependency problem does not happen in my main app target and all the code builds correctly.
Is this a bug? How do I fix it?