Skip to content

Commit 8e48294

Browse files
r3dbarsclaude
andcommitted
fix: microphone permission dialog hidden behind onboarding window
The app uses .accessory activation policy (no dock icon), which caused the macOS microphone permission dialog to appear behind the onboarding window. Users never saw the prompt, got auto-denied, and the "Settings" button was a dead end since the app wasn't listed in System Settings. - Add NSApp.activate() before AVCaptureDevice.requestAccess to ensure the system dialog appears in front - Add "Try Again" button in denied state so users can re-trigger the permission prompt instead of being stuck - Improve error message from "was denied" to actionable guidance Bump version to 0.5.2. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9629548 commit 8e48294

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

Transcripted.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,7 @@
12621262
"$(inherited)",
12631263
"$(SRCROOT)/fluidaudio-libs",
12641264
);
1265-
MARKETING_VERSION = 0.5.1;
1265+
MARKETING_VERSION = 0.5.2;
12661266
OTHER_LDFLAGS = (
12671267
"$(inherited)",
12681268
"-lc++",
@@ -1303,7 +1303,7 @@
13031303
"$(inherited)",
13041304
"$(SRCROOT)/fluidaudio-libs",
13051305
);
1306-
MARKETING_VERSION = 0.5.1;
1306+
MARKETING_VERSION = 0.5.2;
13071307
OTHER_LDFLAGS = (
13081308
"$(inherited)",
13091309
"-lc++",
@@ -1325,7 +1325,7 @@
13251325
DEAD_CODE_STRIPPING = YES;
13261326
DEVELOPMENT_TEAM = "";
13271327
GENERATE_INFOPLIST_FILE = YES;
1328-
MARKETING_VERSION = 0.5.1;
1328+
MARKETING_VERSION = 0.5.2;
13291329
PRODUCT_BUNDLE_IDENTIFIER = com.transcripted.app.tests;
13301330
PRODUCT_NAME = "$(TARGET_NAME)";
13311331
SWIFT_EMIT_LOC_STRINGS = NO;
@@ -1344,7 +1344,7 @@
13441344
DEAD_CODE_STRIPPING = YES;
13451345
DEVELOPMENT_TEAM = "";
13461346
GENERATE_INFOPLIST_FILE = YES;
1347-
MARKETING_VERSION = 0.5.1;
1347+
MARKETING_VERSION = 0.5.2;
13481348
PRODUCT_BUNDLE_IDENTIFIER = com.transcripted.app.tests;
13491349
PRODUCT_NAME = "$(TARGET_NAME)";
13501350
SWIFT_EMIT_LOC_STRINGS = NO;

Transcripted/Onboarding/OnboardingState.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ class OnboardingState {
156156
func requestMicrophonePermission() async {
157157
await MainActor.run {
158158
isMicrophoneRequestInProgress = true
159+
// Ensure the app is frontmost so the system permission dialog
160+
// appears above the onboarding window (app uses .accessory policy)
161+
NSApp.activate()
159162
}
160163

161164
let granted = await AVCaptureDevice.requestAccess(for: .audio)

Transcripted/Onboarding/Steps/PermissionsStep.swift

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct PermissionsStep: View {
5656
Spacer()
5757

5858
if state.microphoneStatus == .denied || state.microphoneStatus == .restricted {
59-
Text("Microphone access was denied. Enable it in System Settings to continue.")
59+
Text("Microphone access wasn't granted. Tap \"Try Again\" to see the permission prompt, or open Settings to enable it manually.")
6060
.font(.bodySmall)
6161
.foregroundColor(.panelTextSecondary)
6262
.multilineTextAlignment(.center)
@@ -181,9 +181,15 @@ private struct PermissionRow: View {
181181
.foregroundColor(.attentionGreen)
182182

183183
case .denied:
184-
Button("Settings") { onOpenSettings() }
185-
.buttonStyle(.bordered)
186-
.controlSize(.small)
184+
HStack(spacing: 6) {
185+
Button("Try Again") { onGrant() }
186+
.buttonStyle(.bordered)
187+
.tint(.recordingCoral)
188+
.controlSize(.small)
189+
Button("Settings") { onOpenSettings() }
190+
.buttonStyle(.bordered)
191+
.controlSize(.small)
192+
}
187193
}
188194
}
189195

0 commit comments

Comments
 (0)