v1.6.3 release: notarization-ready macos-ui-xcode template

Scaffolded macOS app now ships audio-input entitlement + mic usage string
under Hardened Runtime (unsandboxed for performance), and compiles under
Swift 6 (NoteController/AppDelegate marked @MainActor).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-23 08:38:41 -07:00
parent 9ec92277de
commit 5e6534a615
7 changed files with 149 additions and 27 deletions
@@ -280,6 +280,7 @@ struct ProjectScaffolderTests {
"MyMac/NoteController.swift",
"MyMac/MyMacView.swift",
"MyMac/Info.plist",
"MyMac/MyMac.entitlements",
]
for rel: String in expected {
let path: String = (root as NSString).appendingPathComponent(rel)
@@ -299,6 +300,15 @@ struct ProjectScaffolderTests {
#expect(src.contains("engine.remove(synth)"))
}
@Test func macOSAppControllerAndDelegateAreMainActor() {
// Both call the engine's @MainActor `add(_:)` / a main-actor synth
// init; without @MainActor the template fails to compile under Swift 6.
let controller: String = ProjectScaffolder.macOSAppNoteControllerSwift(name: "Foo")
#expect(controller.contains("@MainActor"))
let delegate: String = ProjectScaffolder.macOSAppDelegateSwift(name: "Foo")
#expect(delegate.contains("@MainActor"))
}
@Test func macOSAppViewHasStartStopButtons() {
let src: String = ProjectScaffolder.macOSAppViewSwift(name: "Foo")
#expect(src.contains("Start Engine"))
@@ -576,6 +586,29 @@ struct ProjectScaffolderTests {
#expect(pbx.contains("/local/Lyrebird"))
}
@Test func macOSAppPBXProjWiresEntitlementsAndHardenedRuntime() {
let pbx: String = ProjectScaffolder.macOSAppPBXProj(name: "Perf")
// Hardened Runtime + entitlements are both required for a notarized,
// distributable performance app that opens the AUHAL input bus.
#expect(pbx.contains("ENABLE_HARDENED_RUNTIME = YES"))
#expect(pbx.contains("CODE_SIGN_ENTITLEMENTS = Perf/Perf.entitlements;"))
#expect(pbx.contains("Perf.entitlements */ = {isa = PBXFileReference"))
}
@Test func macOSAppEntitlementsGrantAudioInputAndAreNotSandboxed() {
let ent: String = ProjectScaffolder.macOSAppEntitlements()
#expect(ent.contains("com.apple.security.device.audio-input"))
// A live-performance app must not be sandboxed — it needs free file /
// device / MIDI / OSC access the sandbox would gate.
#expect(!ent.contains("com.apple.security.app-sandbox"))
}
@Test func macOSAppInfoPlistHasMicrophoneUsageDescription() {
let plist: String = ProjectScaffolder.macOSAppInfoPlist(name: "Perf")
// Absent, a Hardened-Runtime process crashes on audio-input access.
#expect(plist.contains("NSMicrophoneUsageDescription"))
}
@Test func iOSAppPBXProjReferencesIPhoneOS() {
let pbx: String = ProjectScaffolder.iOSAppPBXProj(name: "Foo")
#expect(pbx.contains("SDKROOT = iphoneos"))