I currently have 3 Embedded Frameworks in my project:
PersistenceLayer
(Swift only)TransportLayer
(Swift Only)Socket
(Objc)
Both PersistenceLayer
and Socket
don't reference anything outside themselves. However TransportLayer
imports PersistenceLayer
and Socket
. Oddly, I can use PersistenceLayer
objects after importing:
import PersistenceLayer
struct User : Model {
...
}
Model
is defined in PersistenceLayer
and Xcode lets me use it per normal. However, when I try to build TransportLayer
, I get the error: No such Modul 'Persistencelayer'
. So Xcode recognizes the module is there, but somehow "looses" it when it builds.
What's maddening is that this used to work. At some point something changed and I can't figure out what. It's important to note that I work on a project with multiple developers and I have merged
in changes. However switching to a commit prior to the merge didn't work. I've also tried:
- Adding
$(SRCROOT)
(recursive) to Framework Search Paths - Deleting everything out of
ModuleCache
directory - Clean project
- Clean Build Folder
I suspect that something changed in my project settings but I can't figure out what and I've checked the git diffs didn't help (there nothing that really changed in the project aside from the normal file additions.
Also, TransportLayer
does successfully import and use Socket
. I can build the TransportLayer if I remove references to PersistenceLayer
but keep all the references to Socket
.
Does anyone know why this might be occurring or how to fix it?
Update
Ok, so I removed the "offending" files from the target to make sure Socket
was working (it is) and then re-added the files to the target (quite literally by resetting git). It now builds... cause that makes sense. But I tried changing the Scheme from iOS Device
to a simulator and it no longer builds, but I'm getting different errors:
- in module.modulemap:
Header
PersistenceLayer-Swift.h' not found` - Also:
Could not build Objective-C module 'Persistence Layer'
This feels like I'm chasing down random errors...