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

Microphone not working in iOS simulators under macos Sonoma 14.1.2
Hello, I am trying to test a speech to text feature in several iPhone simulators, but microphones don't seem to work. The microphone and speech recognition permissions are correctly asked for the feature. My internal and external microphones are detected in I/O options in simulators. But nothing happens when I launch the recognition. The recognition doesn't work also for speech to text in native messages keyboard or Siri. This problem is the same for all the simulators so I believe the issue is about Xcode permissions not accessing microphone. In my settings > Privacy & Security > Microphone : can't see Xcode (Considering an other issue, I can't see Xcode Source Editor in Extensions as well) I've already tried to uninstall and reinstall Xcode. I use Xcode 15.0.1 under Sonoma 14.1.2. Any help is welcome.
4
3
1.2k
Dec ’23
iOS Simulator Performance Issues
I have noticed that, as of late, the iOS simulator has been incredibly slow. Even simple (and perhaps silly) actions like changing the wallpaper take an unreasonably long time, to the point where it is no longer clear whether the process has hanged. I tried to change the wallpaper to a photo of mine, but it simply would not appear. Even booting up takes several seconds, and home screen animations are laggy. I've given up on testing my build for now. I have tried with an iPhone Xr and an iPhone 15 Pro simulator - both running iOS 17.0. Both are extremely laggy. This is on an M1 MacBook Air running the stable version of macOS Sonoma 14.0. with Xcode version 15.0.1 and Simulator version 15.0.1. I have checked the Activity Monitor for CPU and RAM. There is nothing abnormal. I would appreciate any suggestions.
1
0
561
Nov ’23
App crash on launch using Xcode 15 and iOS 14 simulator
When use Xcode15 and iOS 14 simulator to run app, it will crash, and the crash stack is: Thread 1 Queue : com.apple.main-thread (serial) #0 0x0000000104b074a5 in __cxx_global_var_init.4 () #1 0x000000014fb6ec95 in ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) () #2 0x000000014fb6f08a in ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) () #3 0x000000014fb69bb7 in ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) () #4 0x000000014fb67ec7 in ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) () #5 0x000000014fb67f68 in ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) () #6 0x000000014fb5b26b in dyld::initializeMainExecutable() () #7 0x000000014fb5ff56 in dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) () #8 0x000000014fb5a1c2 in start_sim () #9 0x000000024760e424 in dyld4::prepareSim(dyld4::RuntimeState&, char const*) () #10 0x000000024760cabc in dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) () #11 0x000000024760c3bd in start () And I found two same issues: 1.https://issuetracker.google.com/issues/301372178; 2.https://github.com/realm/realm-swift/issues/8369 From these two issue, I know Xcode15 use new linker(ld_prime), and not support iOS <15; So if we want to support iOS 14, we only have one solution that add the -Wl,-ld_classic options to the OTHER_LDFLAGS? And for now, the crash only happened in iOS 14 simulator, but will it affect the iPhone device if we don't add the -Wl,-ld_classic options to the OTHER_LDFLAGS?
0
0
606
Nov ’23
Auto Layout Constraint Conflict in SwiftUI When Tapping TextField
I am developing an iOS app using SwiftUI and have encountered an Auto Layout constraint conflict issue that appears when tapping on a TextField within a LoginView. I've tried several troubleshooting steps but haven't been able to resolve it. Error Message: Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. ( "<NSLayoutConstraint:0x6000021298b0 'accessoryView.bottom' _UIRemoteKeyboardPlaceholderView:0x10460dd10.bottom == _UIKBCompatInputView:0x1059220e0.top (active)>", "<NSLayoutConstraint:0x60000217a620 'assistantHeight' SystemInputAssistantView.height == 45 (active, names: SystemInputAssistantView:0x10591ce60 )>", "<NSLayoutConstraint:0x60000217d090 'assistantView.bottom' SystemInputAssistantView.bottom == _UIKBCompatInputView:0x1059220e0.top (active, names: SystemInputAssistantView:0x10591ce60 )>", "<NSLayoutConstraint:0x60000217d040 'assistantView.top' V:[_UIRemoteKeyboardPlaceholderView:0x10460dd10]-(0)-[SystemInputAssistantView] (active, names: SystemInputAssistantView:0x10591ce60 )>" ) Will attempt to recover by breaking constraint <NSLayoutConstraint:0x60000217d040 'assistantView.top' V:[_UIRemoteKeyboardPlaceholderView:0x10460dd10]-(0)-[SystemInputAssistantView] (active, names: SystemInputAssistantView:0x10591ce60 )> This error appears in the console when I click on the TextField in my LoginView while running the code on a simulation. The app doesn't crash, but the console indicates there is a constraint conflict related to the keyboard. Here's my LoginView: struct LoginView: View { @StateObject var viewModel = LoginViewModel() var body: some View { NavigationStack { VStack { Spacer() Image("logo") .resizable() .scaledToFit() .frame(width: 150, height: 100) VStack { TextField("Enter your email", text: $viewModel.email) .autocapitalization(/*@START_MENU_TOKEN@*/.none/*@END_MENU_TOKEN@*/) .modifier(TextFieldModifier()) SecureField("Enter your password", text: $viewModel.password) .modifier(TextFieldModifier()) } Button { print("Show forgot password") } label: { Text("Forgot Password") .font(.footnote) .fontWeight(.semibold) .padding(.top) .padding(.trailing, 20) } .frame(maxWidth: .infinity, alignment: .trailing) Button { Task { try await viewModel.signIn() } } label: { Text("Login") .font(.subheadline) .fontWeight(.semibold) .foregroundColor(.white) .frame(width: 360, height: 44) .background(Color(.black)) .cornerRadius(8) } .padding(.vertical) HStack { Rectangle() .frame(width: (UIScreen.main.bounds.width / 2) - 40, height: 0.5) Text("OR") .font(.footnote) .fontWeight(.semibold) .foregroundColor(.gray) Rectangle() .frame(width: (UIScreen.main.bounds.width / 2) - 40, height: 0.5) } .foregroundColor(.gray) HStack { Image("facebook_logo") .resizable() .frame(width: 20, height: 20) Text("Continue with Facebook") .font(.footnote) .fontWeight(.semibold) .foregroundColor(Color(.systemBlue)) } .padding(.top, 8) Spacer() Divider() NavigationLink { AddEmailView() .navigationBarBackButtonHidden(true) } label: { HStack (spacing: 3) { Text("Don't have an account?") Text("Sign Up") .fontWeight(.semibold) } .font(.footnote) } .padding(.vertical, 16) } } } } #Preview { LoginView() } And my TextFieldModifier: struct TextFieldModifier: ViewModifier { func body(content: Content) ->some View { content .font(.subheadline) .padding(12) .background(Color(.systemGray6)) .cornerRadius(10) .padding(.horizontal, 24) .padding(.top) } } Attempts to Resolve: I've checked the TextFieldModifier for any potential issues but it seems standard. I've tried simplifying the view by removing other elements, but the issue persists. The issue seems to occur regardless of the simulator device or iOS version I use. Questions: What could be causing this Auto Layout constraint conflict in a SwiftUI app? Are there any known issues with SwiftUI's TextField and keyboard interactions that might lead to such constraints issues? Any suggestions on how to debug or resolve this constraint conflict?
2
3
979
Nov ’23
I am unable to run my iPad app on the Vision Pro simulator
My device has an M2 Max chip, and I am using Xcode version 15.1 Beta 3. My app runs normally in iOS and iPad simulators, but when I attempt to run it in the Vision Pro simulator, even though the compilation is successful, a dialog box appears stating, 'AppName's architectures (Intel 64-bit) include none that Apple Vision Pro can execute (arm64).' Consequently, the app is not successfully installed in the Vision Pro simulator. Additionally, my project uses Cocoapods for dependency management. I would appreciate any help, thank you!
5
1
2.5k
Jan ’24
Add audio files to iOS 17.0.1 simulators not working
My Xcode just updated and now I can't add audio files to the simulators. Nothing happens when sharing .wav or .mp3 files to the 17.0.1 simulators. Txt files share no problem. When a .wav or .mp3 file is dragged onto a simulator it opens Messages. Does anyone else have this problem? Is there a workaround on how to get audio files onto a 17.0.1 simulator? Is there a way to get my old simulators back? Any help greatly appreciated!
2
1
569
Nov ’23
Is this a bug or a feature?
I recently encountered a "potential bug" with SwiftData. I save my model with modelContent.insert and after that I get following error when trying to delete it with modelContent.delete: Could not cast value of type 'Swift.Optional<Any>' (0x1f5b871f8) to 'Foundation.UUID' This I mentioning the let id: UUID field marked with @Attribute(.unique). This build doesn't crash running in an iOS Sim but if it's running thought TestFlight on my iPhone it just crashes. If I try to delete elements that aren't just created, I don't get this error.
4
0
911
Jan ’24
Cannot pair watch simulator with iPhone simulator, Xcode 15
Hello, When I open Watch application on any of my IPhone simulators it says "Simulator Not Paired"... you can pair in Xcode Devices window. The problem is that there is no "PAIRED WATCHES" section there like shown in the help. when I run the xcrun simctl list command I see a lot of devices listed and even some paired. See the command output below. The problem started when I installed Xcode 15. When I had Xcode 14 the watches were paired with the devices and everything worked. I can actually only see the IPhone 15s and watches with watchOS 9.4 and 10. May be that is a part of the problem. Do I have to somehow delete them all and reinstall the latest? Thanks
1
0
923
Nov ’23
No Vision Pro Simulator available for Xcode 15.1 beta 2
Hi, I downloaded Xcode 15.1 beta 3 but my Unity project gives a tons of errors. In Unity forum one person from Unity said that the current ver. of Unity is not ready for Xcode 15.1 beta 3. So I downloaded Xcode 15.1 beta 2 but seems like Apple already took down the VisionOS Simulator compatible with the ver. of Xcode. Would you be able to allow us to download VisionOS 1.0 beta 4 again? I tried to find dmg for it but no luck.
2
2
630
Nov ’23
Xcode New Simulator Not Showing Up
Hey, I'm using Xcode 15.0. I added a new iPhone simulator for the 5.5" screenshots necessary for App Store Connect. However, the new iPhone simulator I created will not show up as an option when running the app on Xcode. I can open the simulator from the Simulator app, but that still doesn't allow it to be chosen. I have attached a few screenshots showing that Xcode knows about the new simulator (called 5.5" iPhone), but not selectable.
1
1
265
Nov ’23
iOS 17 keeps disappearing from simulator device options
I havent been able to figure out a pattern/cause, but every week or so, my simulator loses most of its available iOS version options. I should have 16.4 and 17 available, but you see I do not. When I go into xcode, iOS 17.0 has 2 entries, one allegedly available, and one awaiting download. Clicking "GET" on the grey one just pops a download windows which says its already downloaded. The only thing that sorts this is a reboot and it's back to normal again - with all my iOS versions available in the simulator. I dont want to keep having to reboot my dev machine. What is going on with XCode and how do I fix it for good?
3
3
727
Jan ’24
Verifying "iOS 17.0.simruntime" developer cannot be verified
Hey guys Ive been having this awful error “iOS 17.0.simruntime” cannot be opened because the developer cannot be verified. I can only click eject disk image, cancel, none of them solve this. What can I do to fix this? how is this Apple package not detected as verified developer? Note that this happened when I opened the iphone simulator, not that I installed or download anything. My setup: Macbook pro M1 Sonoma 14.1.1 Version 15.1 beta (15C5042i) I used the simulator without an issue a couple days before this started happening, thank you in advance.
3
4
1.1k
Nov ’23
XCUITest: Reset authorization status for Biometrics?
Hello everybody. I have a pack of UI tests for the Biometrics authentication. And in the beginning of each test I need there to be no permissions for Biometrics (granted or denied). I found the resetAuthorizationStatus(for:) method that allows resetting everything except Biometrics :( Is there any way I can reset this permission without deleting the whole app in tearDown()?
0
0
660
Nov ’23
Build setting variant for Designed for iPad
We're building one of our iPad apps for "Apple Vision Pro (Designed for iPad)" simulator and need to have certain different build settings for that simulator variant, compared to the default iOS simulator variant. It seems both variants use the iphonesimulator SDK. And in the Xcode build settings, the "Any iOS Simulator SDK" variant of any setting is what is also used, even when building for "Apple Vision Pro (Designed for iPad)". We tried adding a variant to the "Any iOS Simulator SDK" variant for one of the settings by editing the project file directly, using some possible variants we could think of. The added variant does show in the Xcode UI but it shows as "Any iOS Simulator SDK" also. But when building for "Apple Vision Pro (Designed for iPad)" Xcode still uses the original variant, as if it doesn't see that the added variant is matching the build destination. Example, where we want to exclude arm64 for iOS simulator builds, but not for "Apple Vision Pro (Designed for iPad)" builds. Original "Any iOS Simulator SDK" variant: "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64"; Added variant: "EXCLUDED_ARCHS[sdk=iphonesimulator*][variant=Apple Vision Pro]" = ""; We have tried using variant names such as 'xr', 'xors', 'vision', 'visionos' and of course 'Apple Vision Pro' to no avail. The variant shows in the UI but the build doesn't use it. Does anyone know if there is a variant (or other property or other way of distinguishing such variant) that we can use that Xcode will recognize and use when building for "Apple Vision Pro (Designed for iPad)"? Thanks.
1
5
635
Nov ’23
SBMainWorkspace - The request was denied by service delegate
Hello here ! I’m encountering a bug when launching an app on the simulator which is: The request was denied by service delegate (SBMainWorkspace). I know that there are some topic about this error, but any solution works for me. 
This is what I have already try: Clean Derived data + project Reset simulator Check empty environment variables (for all target + pod) Update Xcode Reinstall Xcode Restart the Mac (multiple time) Check for Mach-O Type build settings is set to executable Try on different simulators (iPhone 15, 15 Pro & 15 Plus) Try on different iOS versions (16, 17 & 17.0.1) Desintegrate + reinstall pod Kill simulators, restart Xcode Clear Xcode cache from storage settings Try on different Xcode versions (15, 15.0.1, 14.3.1) Many of the things mentioned above at the same time Note that this bug only occurs on one specific project. I can run any other project on simulator normally. The same project run also normally on other Mac. Here’s my configuration: Xcode 15.0.1 (15A507) MacOS Sonoma 14.0 (23A344) Here’s the full error log: Simulator device returned an error for the requested operation. Domain: FBSOpenApplicationServiceErrorDomain Code: 1 Failure Reason: The request was denied by service delegate (SBMainWorkspace). User Info: { BSErrorCodeDescription = RequestDenied; FBSOpenApplicationRequestID = 0x9ca3; IDERunOperationFailingWorker = IDELaunchiPhoneSimulatorLauncher; SimCallingSelector = "launchApplicationWithID:options:pid:error:"; } -- The request to open "com.abc.xyz" failed. Domain: FBSOpenApplicationServiceErrorDomain Code: 1 Failure Reason: The request was denied by service delegate (SBMainWorkspace). User Info: { BSErrorCodeDescription = RequestDenied; FBSOpenApplicationRequestID = 0x9ca3; } -- The operation couldn’t be completed. The process failed to launch. Domain: FBProcessExit Code: 64 Failure Reason: The process failed to launch. User Info: { BSErrorCodeDescription = "launch-failed"; } -- The operation couldn’t be completed. Launch failed. Domain: RBSRequestErrorDomain Code: 5 Failure Reason: Launch failed. -- Launchd job spawn failed Domain: NSPOSIXErrorDomain Code: 111 -- Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : { "device_model" = "iPhone16,1"; "device_osBuild" = "17.0.1 (21A342)"; "device_platform" = "com.apple.platform.iphonesimulator"; "dvt_coredevice_version" = "348.1"; "dvt_mobiledevice_version" = "1643.2.4"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 11035; "operation_errorCode" = 1; "operation_errorDomain" = FBSOpenApplicationServiceErrorDomain; "operation_errorWorker" = IDELaunchiPhoneSimulatorLauncher; "operation_name" = IDERunOperationWorkerGroup; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 3; "param_destination_isProxy" = 0; "param_destination_platform" = "com.apple.platform.iphonesimulator"; "param_diag_MainThreadChecker_stopOnIssue" = 0; "param_diag_MallocStackLogging_enableDuringAttach" = 0; "param_diag_MallocStackLogging_enableForXPC" = 1; "param_diag_allowLocationSimulation" = 1; "param_diag_checker_tpc_enable" = 1; "param_diag_gpu_frameCapture_enable" = 0; "param_diag_gpu_shaderValidation_enable" = 0; "param_diag_gpu_validation_enable" = 0; "param_diag_memoryGraphOnResourceException" = 0; "param_diag_queueDebugging_enable" = 1; "param_diag_runtimeProfile_generate" = 0; "param_diag_sanitizer_asan_enable" = 0; "param_diag_sanitizer_tsan_enable" = 0; "param_diag_sanitizer_tsan_stopOnIssue" = 0; "param_diag_sanitizer_ubsan_stopOnIssue" = 0; "param_diag_showNonLocalizedStrings" = 0; "param_diag_viewDebugging_enabled" = 1; "param_diag_viewDebugging_insertDylibOnLaunch" = 1; "param_install_style" = 0; "param_launcher_UID" = 2; "param_launcher_allowDeviceSensorReplayData" = 0; "param_launcher_kind" = 0; "param_launcher_style" = 0; "param_launcher_substyle" = 0; "param_runnable_appExtensionHostRunMode" = 0; "param_runnable_productType" = "com.apple.product-type.application"; "param_structuredConsoleMode" = 1; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "iphonesimulator17.0"; "sdk_osVersion" = "17.0"; "sdk_variant" = iphonesimulator; } -- I have a different error when running on iOS 16: Application launch for 'com.abc.xyz' did not return a process handle nor launch error. Domain: NSPOSIXErrorDomain Code: 3 Failure Reason: No such process Thanks in advance !
4
0
2.9k
Nov ’23
LLDB "unable to attach" on Xcode v10.1 (10B61)
I am running the most up to date version of Xcode (v10.1 (10B61)) on a High Sierra system (10.13.6 (17G10021)) and find that compiling for macOS will work, but not visually display in the sumulator. I get the LLDB message: "unable to attach". Advice online suggested submitting new security certificates, which I have done, but still the simulator will not show up, even though the code compiles.
0
0
270
Nov ’23
App Crash with 'EXC_CRASH (SIGABRT)' Error - Missing Symbol Issue
Hello Apple Developer Community, I'm encountering a crash issue while running my iOS application in the iOS Simulator. The crash is accompanied by the following error message: Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: DYLD 4 Symbol missing Symbol not found: _$sSo24OS_dispatch_queue_serialC8DispatchE10AttributesVMa Referenced from: /Users/USER/Library/Developer/CoreSimulator/Devices/635DF164-98FC-48BB-81FD-BDAF562695EB/data/Containers/Bundle/Application/93882CE2-9B8E-4665-BCF2-5B4E0E557734/myapp.app/myapp Expected in: /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswiftDispatch.dylib (terminated at launch; ignore backtrace) I'm currently using Xcode 15.0.1 and running the application on the iOS Simulator version 15.5.
1
2
400
Nov ’23