xcodebuild does not produce module map for MacOS, does for iOS

I'm converting my iOS framework to build for MacOS as well as iOS. Same project, different targets. I use a build script to build each frameworks, which are identical except for the target names. I've checked all the build settings to see that they are identical re:modules, and double-checked the search paths for frameworks and headers. What could I be doing wrong?

(The framework successfully builds for MacOS. My app can't load it, however, I get the dreaded "Module 'LUXforMac' not found" message...

The error message "Module 'LUXforMac' not found" suggests that the Xcode build process is not generating a module map for the macOS target of your framework. The module map is used to define the mapping between the Objective-C module name and the framework's headers. It's possible that the build script for your macOS target is not generating the module map file correctly or that it's not being included in the final product. To fix this issue, you should check that the MODULEMAP_FILE build setting is properly set for the macOS target in your Xcode project. The value of this setting should point to the location of the module map file, relative to the project's source directory. If the MODULEMAP_FILE build setting is correctly set and the module map is still not being generated, you can try to manually create the module map file for the macOS target. To do this, create a new file named "module.modulemap" in the same directory as your framework's headers. The contents of the file should be similar to the module map file used for the iOS target.

module LUXforMac {
  header "LUX.h"
  export *
}

Make sure that the HEADER_SEARCH_PATHS build setting is correctly set to include the directory that contains the module map file. If you're still having trouble, you may need to provide more context or code snippets so that I can provide more specific guidance.

I had all the settings correct. Ultimately fixed the issue by creating a new project and moving all the existing code over there. It's possible that it was caused by having one target for iOS, and a second for Mac, and trying to share the same umbrella header file between the two. But it's fixed now, so I'm not going to bother with verifying the problem ;-)

xcodebuild does not produce module map for MacOS, does for iOS
 
 
Q