I am attempting to create a framework to hold the common entity classes for an app that runs on iOS and OS X. Currently I am just including the files in each target but that requires changing the data model so it get the class from the current target (since in Swift you have to specify the module that has the class in the model file). This of course means I forget at times and things don't work.
The obvious solution is to create a shared framework that holds the entity classes so that the data model always points to the same place.
The problem is there doesn't seem to be any way to create a framework that builds on both platforms.
Has anyone found a way to create a single framework, or library, that works on both platforms?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…