Simulator

RSS for tag

Rapidly prototype and test builds of your app during the development process using Simulator.

Posts under Simulator tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Does Xcode force to download latest iOS simulator after update?
I have Xcode on my mac. I am iOS Dev. I do not know what version of Xcode was before I did next steps, but I could say that I had iOS Simulator 18.3.1. So I update my Xcode to Version 16.3 (16E140). At this version is available iOS Simulator 18.4. But from some time before Xcode separate downloading components and actual Xcode itself. So i make update and do not download latest iOS simulator. What i have: in Xcode -> Settings -> Components under " Other Installed Platforms" i have iOS 18.3.1 and 17.5 in Choose Destination dropdown menu i have nothing. And Xcode say me that i need install iOS Simulator. After some time with ChatGPT I could not do nothing from this. I try go to : Window -> Device and Simulators and here create new simulator with 18.3.1 and make it appear Always. But it didn't help. Solution I did: I download latest version 18.4 because i could not wait because i need fix bug only 1 hour shift and it was this hour so i fast download the simulator. After downloading 18.4 in Choose Destination dropdown it appears all versions of simulaors and 18.3.1 and that i created and 17.5 Question: Does Xcode force to install latest version of iOS simulator? What is the sense of this upgrade that now Xcode is updating faster because it download 8 GB not 16 if eventually I need download 8 GB again ? The new what i could do download Xcode in the evening and Simulator in the morning?
0
0
102
Apr ’25
Facing "Failed to create promise" issue on ios 18 simulators
Hi, We are facing issues on ios simulators os version 18, "Simulator device failed to install the application. Failed to create promise. Underlying error (domain=IXErrorDomain, code=2):" Due to this error simulator is unable to install the application. we are facing this intermittently. xcode version : Xcode.16.0.0.16A242d.app ios simulator runtime : com.apple.CoreSimulator.SimRuntime.iOS-18-0 ios simulator : com.apple.CoreSimulator.SimDeviceType.iPhone-16 mac os version : macOS 15.4 we have tried upgrading to xcode Xcode.16.1.0.16B40.app and ios simulator runtime to 18.1 but its not working. Also we have rebooted xcode, not helping. *Exact error message : ** org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: Error running 'install': An error was encountered processing the command (domain=IXErrorDomain, code=2): Simulator device failed to install the application. Failed to create promise. Underlying error (domain=IXErrorDomain, code=2): Failed to set icon resources promise for com.yyyy.xxxx Failed to create promise. Host info: host: 'uci-macmini-019lab3b.local', ip: 'fe80:0:0:0:1caf:6627:141d:f464%en0' Build info: version: '4.30.0', revision: '509c7f17cc' System info: os.name: 'Mac OS X', os.arch: 'aarch64', os.version: '15.3.1', java.version: '11.0.25' Driver info: com.mypackage.common.drivers.CustomIosDriver$ByteBuddy$g865VfU3 Command: [null, newSession {capabilities=[{appium:webviewConnectTimeout=120000, appium:autoAcceptAlerts=true, appium:app=/Users/mobileci/.buildkite-agent/builds/uci-macmini-019lab3b/mypackage/e2e-test-ios-simulator/8155f349-18b9-413c-9d17-dcb064986154/test_artifacts/target.app, appium:includeSafariInWebviews=true, appium:locale=US, appium:mjpegServerPort=52715, appium:newCommandTimeout=600000, appium:waitForIdleTimeout=3, appium:derivedDataPath=/Users/mobileci/.buildkite-agent/builds/uci-macmini-019lab3b/mypackage/e2e-test-ios-simulator/8155f349-18b9-413c-9d17-dcb064986154/appium_wda_ios/, appium:wdaConnectionTimeout=300000, appium:wdaLaunchTimeout=300000, appium:processArguments={env={E2E_TESTING=YES, RUN_UUID=8155f349-18b9-413c-9d17-dcb064986154}}, appium:automationName=XCUITest, appium:fullReset=true, appium:udid=F266ECC3-FD23-464D-B0C3-576EB48B2FF5, appium:deviceName=E2ESimulator, appium:wdaLocalPort=52714, appium:showXcodeLog=true, appium:webkitDebugProxyPort=52716, appium:noReset=false, appium:language=en, platformName=IOS, appium:simpleIsVisibleCheck=true}], desiredCapabilities=Capabilities {app: /Users/mobileci/.buildkite-..., autoAcceptAlerts: true, automationName: XCUITest, derivedDataPath: /Users/mobileci/.buildkite-..., deviceName: E2ESimulator, fullReset: true, includeSafariInWebviews: true, language: en, locale: US, mjpegServerPort: 52715, newCommandTimeout: 600000, noReset: false, platformName: IOS, processArguments: {env: {E2E_TESTING: YES, RUN_UUID: 8155f349-18b9-413c-9d17-dcb...}}, showXcodeLog: true, simpleIsVisibleCheck: true, udid: F266ECC3-FD23-464D-B0C3-576..., waitForIdleTimeout: 3, wdaConnectionTimeout: 300000, wdaLaunchTimeout: 300000, wdaLocalPort: 52714, webkitDebugProxyPort: 52716, webviewConnectTimeout: 120000}}] Capabilities {app: /Users/mobileci/.buildkite-..., autoAcceptAlerts: true, automationName: XCUITest, derivedDataPath: /Users/mobileci/.buildkite-..., deviceName: E2ESimulator, fullReset: true, includeSafariInWebviews: true, language: en, locale: US, mjpegServerPort: 52715, newCommandTimeout: 600000, noReset: false, platformName: IOS, processArguments: {env: {E2E_TESTING: YES, RUN_UUID: 8155f349-18b9-413c-9d17-dcb...}}, showXcodeLog: true, simpleIsVisibleCheck: true, udid: F266ECC3-FD23-464D-B0C3-576..., waitForIdleTimeout: 3, wdaConnectionTimeout: 300000, wdaLaunchTimeout: 300000, wdaLocalPort: 52714, webkitDebugProxyPort: 52716, webviewConnectTimeout: 120000} at
0
0
110
Apr ’25
Simulator 18.4 Webview CORS issues
I have a very specific issue that happens only on iOS Simulator version 18.4. It does NOT happen when I run my app on a real iOS 18.4 device through Testflight. My app displays a WebView (courtesy of Capacitor, url scheme capacitor://). Inside that Webview I'm using Firebase JS API (11.2.0) and calling signInWithEmailAndPassword, which works well in all other contexts, i.e. browser, Android webview, iOS webview in all other Simulator versions, and on real devices. Only when running in Simulator 18.4, I get a failed network request: cannot parse response Fetch API cannot load https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?... due to access control checks. Failed to load resource: cannot parse reponse error: FirebaseError: (auth/network-request-failed) Everything is working correctly for both: Capacitor app webview installed on a real 18.4 device with Testflight Safari (non-webview) in the 18.4 Simulator The issue is severe for us, because we are unable to develop our app and test it in the simulator on 18.4 Simulator before pushing it through Testflight internal release. Request headers on the failed request (no response status or headers available). Request Accept: / Content-Type: application/json Origin: capacitor://localhost Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: cross-site User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 18_4 like Mac OS X) - AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 X-Client-Version: Mobile/JsCore/11.2.0/FirebaseCore-web X-Firebase-Client: (...)
0
1
242
Apr ’25
Tabbar UITest bug on tvOS
When running UITests on tvOS, tabBar viewIdentifiers (UIKit) are no longer appearing. When you run the test, accessibility identifiers for tabs are no longer locatable but all other identifiers appears except for the tabs in the tabBar. In the stack trace of the debugger, if I print application, I can see all existing viewIdentifiers except those that were set for the tabs (on tvOS only). If I force an action on the simulator after the app has launched and the view appeared ie move left or right, the identifiers appears (confirmed by stack trace) and the test will continue as expected. This was not an issue in the past (no code changes). I am not sure if this appeared after updating my mac to Sequoia. But for iOS, there is no issue. This bug only appears on tvOS and specifically the tabs. Issue persists on: Sequoia 15.4.1 Xcode 16.3
1
0
62
May ’25
EXC_BAD_ACCESS if Address or Thread Sanitizer is enabled
I'm getting EXC_BAD_ACCESS (code=2, address=0x7ff8a6e2fcce) when launching my app on the simulator with Address or Thread Sanitizer enabled. I'm running Xcode 16.3 (16E140) on macOS Sequoia 15.4.1 (24E263). The call stack looks like the following. On the device, there is no crash, but this message is printed to the console: malloc: nano zone abandoned due to inability to reserve vm space. (Not sure if it's related.) Does anybody know what is causing the crash? Thread 1 #0 0x0000000103361f5b in __sanitizer::MemoryMappingLayout::Next () #1 0x000000010336034b in __sanitizer::MemoryRangeIsAvailable () #2 0x000000010334db77 in __asan::InitializeShadowMemory () #3 0x0000000103395069 in __asan::AsanInitInternal() (.cold.1) () #4 0x000000010334d352 in __asan::AsanInitInternal () #5 0x0000000103394f65 in __asan_init.cold.1 () #6 0x000000010334d325 in __asan::AsanInitFromRtl () #7 0x0000000103343289 in wrap_malloc_default_zone () #8 0x00007ff801b15f86 in __malloc_init () #9 0x00007ffa160080be in libSystem_initializer () #10 0x000000010306eb11 in invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const () #11 0x000000010308f364 in invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const () #12 0x00000001030aad7c in invocation function for block in mach_o::Header::forEachSection(void (mach_o::Header::SectionInfo const&, bool&) block_pointer) const () #13 0x00000001030a83c9 in mach_o::Header::forEachLoadCommand () #14 0x00000001030a98c8 in mach_o::Header::forEachSection () #15 0x000000010308ef62 in dyld3::MachOAnalyzer::forEachInitializer () #16 0x000000010306e9ac in dyld4::Loader::findAndRunAllInitializers () #17 0x0000000103074da1 in dyld4::JustInTimeLoader::runInitializers () #18 0x00000001030807c5 in dyld4::APIs::runAllInitializersForMain () #19 0x000000010305efac in dyld4::prepare () #20 0x000000010305e36e in _dyld_sim_prepare () #21 0x000000010993b2a0 in dyld4::prepareSim () #22 0x0000000109939963 in dyld4::prepare () #23 0x000000010993981f in dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator()() const () #24 0x00000001099394da in start ()
8
1
314
Jun ’25
My app suddenly getting "A server with the specified hostname could not be found"
I've had no problem running my app in a simulator or on a device, but today my app is failing on a URLRequest to my local machine (in a sim). From the same simulator I can go to Safari and manually enter the URL that the app is using (and that appears in the error message), and it works fine. I think there was a recent Xcode update; did something change in this regard?
6
0
149
May ’25
Xcode Simulator Can't Boot
I am facing a recurring issue with Xcode iOS simulator. I want to preview a SwiftUI for iOS in Xcode, but the Simulator app fails to boot up. I receive the follow error in Xcode: Cannot Preview in this file. Simulator was shutdown during an update. I have tried the following: Deleting Xcode cache Reinstalling iOS Simulator runtimes Completely uninstalling Xcode and deleting all developer data, then reinstalling None of the above steps fix the problem. The only fix I have found is to completely reinstall MacOS 15.4.1. THIS IS TERRIBLE! I have already reinstalled MacOS 15.4.1 once to fix the issue, and I don't want to do it again. If there is another solution, please help me find it! Thank you!!
15
2
294
Aug ’25
Intermittent Screen Lock During Appium Tests on iOS 18 Simulator
I am running Appium tests on an iOS 18 simulator, and I am encountering an intermittent issue where the device screen gets locked unexpectedly during the tests. The Appium logs show no errors or unusual activity, and all commands appear to be executed successfully. However, upon reviewing the device logs, I see entries related to the lock event, but the exact cause remains unclear. SpringBoard: (SpringBoard) [com.apple.SpringBoard:Common] lockUIFromSource:Boot options:{ SBUILockOptionsLockAutomaticallyKey: 1, SBUILockOptionsForceLockKey: 1, SBUILockOptionsUseScreenOffModeKey: 0 } SpringBoard: (SpringBoard) [com.apple.SpringBoard:Common] -[SBTelephonyManager inCall] 0 SpringBoard: (SpringBoard) [com.apple.SpringBoard:Common] LockUI from source: Now locking Has anyone experienced similar behavior with Appium on iOS 18, or could there be a setting or configuration in the simulator that is causing this issue?
0
0
69
Apr ’25
Xcode 16.3 and IOS 18.4 Update
So I use two MacBooks for work and different levels of projects, updated MacBook 1, and I was about to download and install Predictive Code Completion Model and IOS 18.4 Runtime. But doing the same for my second MacBook isn't working... I've been searching for days now, and the deadline for submission is fast approaching. I need help on this. At first, I thought it was a network thing and had to rush to my friends, but the same issue and nothing better IOS 18.4 Error `Download failed. Domain: DVTDownloadableErrorDomain Code: 41 User Info: { DVTErrorCreationDateKey = "2025-05-07 22:41:47 +0000"; } Download failed. Domain: DVTDownloadableErrorDomain Code: 41 Failed fetching catalog for assetType (com.apple.MobileAsset.iOSSimulatorRuntime), serverParameters ({ RequestedBuild = 22E238; }) Domain: DVTDownloadsUtilitiesErrorDomain Code: -1 Download failed due to not being scheduled or the download of the whole resource was not able to complete in the time allowed. (Catalog download for com.apple.MobileAsset.iOSSimulatorRuntime) Domain: com.apple.MobileAssetError.Download Code: 53 User Info: { checkTimeoutConditions = 1; } System Information macOS Version 15.4.1 (Build 24E263) Xcode 16.3 (23785) (Build 16E140) Timestamp: 2025-05-07T23:41:47+01:00` Predictive Code Completion Model `The operation couldn’t be completed. (IDELanguageModelKit.IDEModelDownloadAdapter.(unknown context at $1545d4bd8).DownloadError error 2.) Domain: IDELanguageModelKit.IDEModelDownloadAdapter.(unknown context at $1545d4bd8).DownloadError Code: 2 User Info: { DVTErrorCreationDateKey = "2025-05-07 22:42:56 +0000"; } There was an error transferring over the network. Domain: IDELanguageModelKit.IDEModelDownloadAdapter.(unknown context at $1545d4bd8).DownloadError Code: 2 System Information macOS Version 15.4.1 (Build 24E263) Xcode 16.3 (23785) (Build 16E140) Timestamp: 2025-05-07T23:42:56+01:00`
1
1
246
May ’25
Xcode16.x+ios18.x simulator crashing and tests are failing
We are seeing crashes after upgrading to xcode16.x ( tested with 16.1 , 16.2 and 16.3) and ios 18.1, 18.2, 18.3.1 and 18.4 . when tests are running simulator is crashing with mulitple reasons. CoreSimulatorService[85444] <Error>: Failed to get a device identity for simulator device BFAD684E-A48A-4170-80E1-8FBC04744E79, error: Error Domain=com.apple.MobileActivation.ErrorDomain Code=-1 "Failed to create BAA info." UserInfo={NSLocalizedDescription=Failed to create BAA info., NSUnderlyingError=0x600002072a60 {Error Domain=com.apple.MobileActivation.ErrorDomain Code=-1 "Failed to query baa info." UserInfo={NSLocalizedDescription=Failed to query baa info., NSUnderlyingError=0x600002073390 {Error Domain=com.apple.MobileActivation.ErrorDomain Code=-1 "Failed to load cryptex1 manifest." UserInfo={NSLocalizedDescription=Failed to load cryptex1 manifest., NSUnderlyingError=0x600002071110 {Error Domain=com.apple.MobileActivation.ErrorDomain Code=-1 "Failed to load firmware data from /System/Volumes/iSCPreboot/F743DA4B-92E7-4E92-ACD2-40775DF4B5A2/cryptex1/current/apticket.j274ap.1A256C21D3001E.im4m." UserInfo=0x600003b47bc0 (not displayed)}}}}}} sometimes crashing with [02:47:24]: ▸ Tests_iOS-Runner encountered an error (Failed to prepare device 'Clone 2 of iPhone 16 Pro' for impending launch. (Underlying Error: Unable to boot the Simulator. launchd failed to respond. (Underlying Error: Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding))) sometimes with [18:44:47]: ▸ 2025-05-08 18:44:47.019 xcodebuild[75752:6252304] [MT] IDELaunchReport: a616bd895a3ee240:a616bd895a3eec00:Install Actions Finished with error: Unable to boot the Simulator. [18:44:47]: ▸ Domain: NSPOSIXErrorDomain [18:44:47]: ▸ Code: 60 [18:44:47]: ▸ Failure Reason: launchd failed to respond. [18:44:47]: ▸ User Info: { [18:44:47]: ▸ Session = "com.apple.CoreSimulator.SimDevice.BD4A5DAB-3317-44D1-AFD1-C6EED090BB20"; [18:44:47]: ▸ } [18:44:47]: ▸ -- [18:44:47]: ▸ Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding [18:44:47]: ▸ Domain: com.apple.SimLaunchHostService.RequestError [18:44:47]: ▸ Code: 4 [18:44:47]: ▸ -- [18:44:47]: ▸ 2025-05-08 18:44:47.019 xcodebuild[75752:6252304] [MT] IDELaunchReport: a616bd895a3ee240:a616bd895a3eec00:Install Actions com.apple.dt.IDERunOperationWorkerFinished { [18:44:47]: ▸ "operation_duration_ms" = 55114; [18:44:47]: ▸ "operation_errorCode" = 60; [18:44:47]: ▸ "operation_errorDomain" = NSPOSIXErrorDomain; [18:44:47]: ▸ "operation_name" = "_IDEInstalliPhoneSimulatorWorker"; [18:44:47]: ▸ } sometimes crashing with Run test suite Tests2 encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying Error: Test crashed with signal term before starting test execution.))
0
2
450
May ’25
Xcode Not Displaying Code Coverage for Main App When Using Test Plan on iOS Simulator
I am encountering an issue where code coverage data is not showing for my main app in Xcode when running tests for the iOS simulator. However, code coverage is being reported correctly for some modules. Enable Code Coverage Support: YES Xcode 16.2 macOS: 15.3.1 Macbook Pro M1 14-inch, 2021 Despite these configurations, Xcode fails to show code coverage for the main app. Can anyone suggest what might be causing this issue and how to ensure code coverage is correctly reported for the main app during simulator builds?
1
0
137
May ’25
CPGridTemplate in CPTabBarTemplate: Second Item Not Selecting in CarPlay Simulator
I am experiencing an issue while using CPGridTemplate within CPTabBarTemplate in my CarPlay app running in the simulator. On app launch, when I select the second item in the grid, it does not visually reflect as selected in the UI. This behavior is unexpected, as the grid item selection should update accordingly. Has anyone encountered this issue or found a solution to ensure proper item selection?
1
0
32
May ’25
CPTabBarTemplate in CarPlay Simulator: Tab Becomes Inactive on Re-selection
I am facing an issue in my CarPlay app using CPTabBarTemplate. The app has two tabs, and on launch, the first tab is correctly selected. However, when I tap on the first tab again, instead of staying active, it becomes inactive. This behavior is unexpected, as re-selecting the active tab should typically maintain its selected state. Has anyone else encountered this issue or found a workaround to prevent the tab from becoming inactive?
0
0
33
May ’25
Application crashes referencing callAsyncJavaScript
When referencing WebKit’s function callAsyncJavaScript, any iOS app crashes immediately on startup when running in simulator. On device, it does not crash. The error message is: dyld[9892]: Symbol not found: _$sSo9WKWebViewC6WebKitE19callAsyncJavaScript_9arguments2inAF17completionHandlerySS_SDySSypGSo11WKFrameInfoCSgSo14WKContentWorldCys6ResultOyyps5Error_pGcSgtF Furthermore, this only happens for some simulators. With Xcode 16.3, it’s simulators 18.0 and prior. With Xcode 16.4 RC1 it includes simulators iOS 18.5 and 18.4 but works correctly on earlier versions of simulator. The reproduction path is easy. Example file attached. This used to work about 3 weeks or a month ago, which is perplexing. As a workaround I replaced the function with evaluateJavaScript which does not crash, but that is not the desired method to use for us. The attached file can reproduce it easily - just refernece this view from the default ContentView in a new project. TestWebView.swift
2
2
107
May ’25
Requesting user Permission for Speech Framework crashes visionOS simulator
When a new application runs on VisionOS 2.4 simulator and tries to access the Speech Framework, prompting a request for authorisation to use Speech Recognition, the application freezes. Using Swift 6. Report Identifier: FB17666252 @MainActor func checkAvailabilityAndPermissions() async { logger.debug("Checking speech recognition availability and permissions...") // 1. Verify that the speechRecognizer instance exists guard let recognizer = speechRecognizer else { logger.error("Speech recognizer is nil - speech recognition won't be available.") reportError(.configurationError(description: "Speech recognizer could not be created."), context: "checkAvailabilityAndPermissions") self.isAvailable = false return } // 2. Check recognizer availability (might change at runtime) if !recognizer.isAvailable { logger.error("Speech recognizer is not available for the current locale.") reportError(.configurationError(description: "Speech recognizer not available."), context: "checkAvailabilityAndPermissions") self.isAvailable = false return } logger.trace("Speech recognizer exists and is available.") // 3. Request Speech Recognition Authorization // IMPORTANT: Add `NSSpeechRecognitionUsageDescription` to Info.plist let speechAuthStatus = SFSpeechRecognizer.authorizationStatus() // FAILS HERE logger.debug("Current Speech Recognition authorization status: \(speechAuthStatus.rawValue)") if speechAuthStatus == .notDetermined { logger.info("Requesting speech recognition authorization...") // Use structured concurrency to wait for permission result let authStatus = await withCheckedContinuation { continuation in SFSpeechRecognizer.requestAuthorization { status in continuation.resume(returning: status) } } logger.debug("Received authorization status: \(authStatus.rawValue)") // Now handle the authorization result let speechAuthorized = (authStatus == .authorized) handleAuthorizationStatus(status: authStatus, type: "Speech Recognition") // If speech is granted, now check microphone if speechAuthorized { await checkMicrophonePermission() } } else { let speechAuthorized = (speechAuthStatus == .authorized) handleAuthorizationStatus(status: speechAuthStatus, type: "Speech Recognition") // If speech is already authorized, check microphone if speechAuthorized { await checkMicrophonePermission() } } }
1
0
79
May ’25
Granting Microphone Access through in-app authorisation request on the VisionOS 2.4 Simulator causes it to crash
When requesting authorisation to gain access to the user's microphone in the visionOS 2.4 simulator, the simulator crashes upon the user clicking allow. Using Swift 6, code below. Bug Report: FB17667361 @MainActor private func checkMicrophonePermission() async { logger.debug("Checking microphone permissions...") // Get the current permission status let micAuthStatus = AVAudioApplication.shared.recordPermission logger.debug("Current Microphone permission status: \(micAuthStatus.rawValue)") if micAuthStatus == .undetermined { logger.info("Requesting microphone authorization...") // Use structured concurrency to wait for permission result let granted = await withCheckedContinuation { continuation in AVAudioApplication.requestRecordPermission() { allowed in continuation.resume(returning: allowed) } } logger.debug("Received microphone permission result: \(granted)") // Convert to SFSpeechRecognizerAuthorizationStatus for consistency let status: SFSpeechRecognizerAuthorizationStatus = granted ? .authorized : .denied // Handle the authorization status handleAuthorizationStatus(status: status, type: "Microphone") // If granted, configure audio session if granted { do { try await configureAudioSession() } catch { logger.error("Failed to configure audio session after microphone authorization: \(error.localizedDescription)") self.isAvailable = false self.processingError = .audioSessionError(description: "Failed to configure audio session after microphone authorization") } } } else { // Convert to SFSpeechRecognizerAuthorizationStatus for consistency let status: SFSpeechRecognizerAuthorizationStatus = (micAuthStatus == .granted) ? .authorized : .denied handleAuthorizationStatus(status: status, type: "Microphone") // If already granted, configure audio session if micAuthStatus == .granted { do { try await configureAudioSession() } catch { logger.error("Failed to configure audio session for existing microphone authorization: \(error.localizedDescription)") self.isAvailable = false self.processingError = .audioSessionError(description: "Failed to configure audio session for existing microphone authorization") } } } }
1
1
83
May ’25