Ugh. This was annoying to figure out.
If you have a framework target in Xcode with a modulemap – e.g. because you’re wrapping a C or C++ library for use in Swift – you must keep the module verifier enabled (the
ENABLE_MODULE_VERIFIER build setting) for that framework, otherwise any Swift targets using that framework won’t see the module (attempts to
import the module will fail with the compiler claiming the module doesn’t exist).
Clearly the “verifier” does more than just verify the module. Or, perhaps Xcode is being obnoxious and silently ignoring the module if it doesn’t detect an explicit pass from the verifier.