TextLibrary6App (App)


  • persistenceController: PersistenceController (Core Data)
  • library: LibraryModel (Model)
  • persistenceController: PersistenceController (Core Data)
  • body Scene WindowGroup with >> custom TextLibraryNavigationView (no parameters) with >> environment object library >> environment managed object context > commands modifier with >> custom MenuCommands


  • Keep app simple and focused on top level.
  • MenuCommands (Commands). Separate commands from app.
  • Xcode unit tests also initialize app and app properties persistence controller and library. Unwanted as slows tests. Option to separate model into separately tested framework, but that has other drawbacks, including complexity and required access control.