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

In the Platforms window, difference between iOS and iOS Simulator
I was just prompted in Xcode to update/download iOS 17.2. I wasn't paying attention but I think it was downloading iOS 17.2 and then iOS 17.2 Simulator. The latter failed during "Verifying iOS 17.2 simruntime". I opened Xcode > Settings > Platforms and I see iOS 17.2, but I don't see iOS 17.2 Simulator. Must I have both iOS 17.2 and iOS 17.2 Simulator? Do I always have to have iOS xyz and iOS xyz Simulator present in the Platforms window? What is the difference between the two? What's the iOS 17.2 for?
3
0
635
Dec ’23
Remove Rosetta support on Xcode simulators
I'm not sure if having once enabled Rosetta on the Xcode simulators for older builds is a performance issue or not, but it seems like installing apps on them is slower than it used to. I'm trying to completely remove Rosetta support on the simulators but can't figure it out. I've installed Xcode on top of the older version, removed Xcode, removed all the simulators and yet it still shows: iPhone 15 Pro (Rosetta) as a target. Can someone help me remove Rosetta support on the simulators please?
1
0
1.7k
Dec ’23
Can't hear CAF Audio in running app
I have an unusual situation. I'm working through some self study training and this particular project is a game similar to fruit ninja where things are flying around the screen and you slice through them by swiping your finger. Anyway the instructor provided a series of "*.caf" files for various sounds while playing the game. For some reason I can't hear any of the sounds on my personal Mac when running the app via Xcode to either an iOS iPad simulator or to a real iPad that I have attached to my mac and setup for developer use in Xcode. Yes sound is working on the mac (hear new email come in etc. and can play videos in the browser). In the iPad simulator I can play youtube videos in mobile safari. While adjusting the sound doesn't seem to raise or lower the volume I can hear the audio in the youtube videos. On the real iPad: yes the sound is on and I can hear audio while playing videos in the browser etc. Lastly, I pushed the code up to GitHub and pulled it to my work Mac. There the sound plays just find in the iOS iPad simulator on that Mac (not allowed to attach my personal iPad to my work mac so can't try the iPad there). So I fell like this confirms the code is correct for playing the sounds in the running app. Oh, and I can select the file in left nav and click the little play button icon to hear it played in Xcode. so, I feel like this is an issue on my personal Mac with Xcode etc., but I'm at a loss as to what the issue is. Can anyone suggest some things to look for on my Mac to get sound working in this app? if you want to see the code it's here and the free training i'm following is at https://www.hackingwithswift.com/100/77. TIA
3
0
627
Dec ’23
Xcode 15 (RC) - Crash settings app on simulators(iPhone 15 Pro & 15 PM)
Hi, I get anytime crash on the Settings app for iPhone 15 Pro and iPhone 15 Pro Max on Xcode 15 RC. Translated Report (Full Report Below) Incident Identifier: DE1BE6D0-4367-4203-A339-1AE20D50218A CrashReporter Key: 1A043114-8ED1-1A39-B80C-A3825853E7D7 Hardware Model: MacBookPro18,2 Process: Preferences [80787] Path: /Library/Developer/CoreSimulator/Volumes/iOS_21A328/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.0.simruntime/Contents/Resources/RuntimeRoot/Applications/Preferences.app/Preferences Identifier: com.apple.Preferences Version: 1 (1246.2) Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd_sim [80318] Coalition: com.apple.CoreSimulator.SimDevice.A989B9A5-9C97-40A3-9082-998713FB7EAB [9443] Responsible Process: SimulatorTrampoline [51087] Date/Time: 2023-09-13 16:09:55.5678 +0300 Launch Time: 2023-09-13 16:09:53.8486 +0300 OS Version: macOS 13.5.2 (22G91) Release Type: User Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: SIGNAL 6 Abort trap: 6 Terminating Process: Preferences [80787] Triggered by Thread: 10 Last Exception Backtrace: 0 CoreFoundation 0x18046589c __exceptionPreprocess + 160 1 libobjc.A.dylib 0x18005c09c objc_exception_throw + 56 2 CoreFoundation 0x180350b68 -[__NSPlaceholderArray initWithObjects:count:] + 552 3 CoreFoundation 0x1804508b8 +[NSArray arrayWithObjects:count:] + 36 4 ActionButtonSelector 0x127b6c5ac ABLoadDeviceSceneModel + 2280 5 ActionButtonSelector 0x127b677e4 -[ABDeviceSceneResourceLoader _loadResources] + 68 6 ActionButtonSelector 0x127b673f0 __59-[ABDeviceSceneResourceLoader loadResourcesWithCompletion:]_block_invoke + 40 7 libdispatch.dylib 0x1801424f4 _dispatch_call_block_and_release + 24 8 libdispatch.dylib 0x180143d3c _dispatch_client_callout + 16 9 libdispatch.dylib 0x18014be3c _dispatch_lane_serial_drain + 960 10 libdispatch.dylib 0x18014c9b4 _dispatch_lane_invoke + 388 11 libdispatch.dylib 0x180157d40 _dispatch_root_queue_drain_deferred_wlh + 276 12 libdispatch.dylib 0x18015738c _dispatch_workloop_worker_thread + 448 13 libsystem_pthread.dylib 0x1062e3878 _pthread_wqthread + 284 14 libsystem_pthread.dylib 0x1062e263c start_wqthread + 8 Thread 0:: Dispatch queue: com.apple.shortcuts.VCVoiceShortcutClient.InternalState 0 libsystem_kernel.dylib 0x1063c91d0 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x1063da298 mach_msg2_internal + 76 2 libsystem_kernel.dylib 0x1063d13d8 mach_msg_overwrite + 540 3 libsystem_kernel.dylib 0x1063c9540 mach_msg + 20 4 libxpc.dylib 0x1800a9b2c _xpc_pipe_mach_msg + 52 5 libxpc.dylib 0x1800a9028 _xpc_pipe_routine + 396 6 libxpc.dylib 0x180089e60 _xpc_interface_routine + 168 7 libxpc.dylib 0x18008a4a0 _xpc_look_up_endpoint + 264 8 libxpc.dylib 0x1800923e4 _xpc_connection_bootstrap_look_up_slow + 296 9 libxpc.dylib 0x180095174 _xpc_connection_init + 724 10 libxpc.dylib 0x180092a8c _xpc_connection_activate_if_needed + 300 11 libxpc.dylib 0x180093cd4 xpc_connection_resume + 92 12 VoiceShortcutClient 0x196b0ebf8 -[VCVoiceShortcutClient unsafeSetupXPCConnection] + 308 13 VoiceShortcutClient 0x196b10554 __81-[VCVoiceShortcutClient asynchronousRemoteDataStoreWithErrorHandler:synchronous:]_block_invoke + 200 14 libdispatch.dylib 0x180143d3c _dispatch_client_callout + 16 15 libdispatch.dylib 0x180153dc8 dispatch_sync_invoke_and_complete_recurse + 96 16 libdispatch.dylib 0x180153778 dispatch_sync_f_slow + 188 17 VoiceShortcutClient 0x196b0e584 -[VCVoiceShortcutClient asynchronousRemoteDataStoreWithErrorHandler:synchronous:] + 156 18 VoiceShortcutClient 0x196addb44 -[VCVoiceShortcutClient(Staccato) fetchAvailableStaccatoActions:] + 92 19 ActionButtonConfigurationUI 0x10549c2d0 0x105488000 + 82640 20 Combine 0x19e00dbd8 specialized Future.init(:) + 224 21 Combine 0x19e00b4a0 Future.init(:) + 20 22 ActionButtonConfigurationUI 0x1054a295c 0x105488000 + 108892 23 ActionButtonConfigurationUI 0x10549837c 0x105488000 + 66428 24 PreferencesUI 0x104bd7c3c 0x104bb0000 + 162876 25 PreferencesUI 0x104bc5b54 -[PSUIPrefsListController tableView:cellForRowAtIndexPath:] + 260 26 UIKitCore 0x114e3dfc4 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 1376 27 UIKitCore 0x114e11134 -[UITableView _updateVisibleCellsForRanges:createIfNecessary:] + 560 28 UIKitCore 0x114e1174c -[UITableView _updateVisibleCellsNow:] + 1112 29 UIKitCore 0x114e2b53c -[UITableView layoutSubviews] + 144 30 UIKitCore 0x115126b1c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1492 31 QuartzCore 0x1884d3dd4 CA::Layer::layout_if_needed(CA::Transaction*) + 440 32 QuartzCore 0x1884deb30 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 124 33 QuartzCore 0x1883fa3bc CA::Context::commit_transaction(CA::Transaction*, double, double*) + 460 34 QuartzCore 0x188429bf0 CA::Transaction::commit() + 652 35 UIKitCore 0x114c2c504 __34-[UIApplication _firstCommitBlock]_block_invoke_2 + 32 36 CoreFoundation 0x1803c6464 CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 20 37 CoreFoundation 0x1803c5bac __CFRunLoopDoBlocks + 352 38 CoreFoundation 0x1803c0450 __CFRunLoopRun + 788 39 CoreFoundation 0x1803bfd28 CFRunLoopRunSpecific + 572 40 GraphicsServices 0x18986ebc0 GSEventRunModal + 160 41 UIKitCore 0x114c13fdc -[UIApplication _run] + 868
15
10
4.5k
Dec ’23
accept incoming network connections in simulator - xcode 13.4.1
Does anyone know how to rid of this message? It is happening every time I build a project using the simulator with the following versions: xCode 13.4.1 mac Monterey 12.4. I didn't see this behavior in Xcode's previous versions. The issue seems to be because it is adding a new application every time I build the project into the firewall app list. (image below) Any tips on how to fix this?
5
4
1.9k
Dec ’23
Xcode 15 beta 8 | iOS 17 simulator RAM consumption significantly grows with each test run
When using Xcode 15 beta 8 / iOS 17 beta 8 simulator runtime, we can see in Activity Monitor that memory used by "SimRenderServer" proccess grows significantly with each UI test run. It reproduces even on an empty test, that just wait for a second without launching the application. Memory usage doesn't go down when test run finishes, so each consecutive run adds more to it. For example, create an new project with a UI test // The contents of the test don't actually matter func testExample() async throws { try await Task.sleep(for: .seconds(1)) } Run this test repeatedly 100+ times and observe the "SimRenderServer" process in the Activity Monitor. From what we observed it only reproduces when "Preferred Capture Format" in the test plan configuration is set to "Video". Setting it back to "Screenshot" does no result in growing memory usage. This was reproducible on macOS Sonoma beta / macOS Ventura 13.5.1. Feedback was submitted FB13098749.
3
7
1.6k
Dec ’23
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
Xcode Simulator iOS 17.0 Not Working
Hi dear all, I have just started working with Xcode and I am trying to download the iOS simulator to run my code on. When downloading it shows the size being 7.21GB, but when installing it it says my Disk is too full when my disk has at least 20GB available space. Here is the error message I get: Registering simulator runtime with CoreSimulator failed. Domain: DVTDownloadableErrorDomain Code: 29 User Info: { DVTErrorCreationDateKey = "2023-12-05 09:08:19 +0000"; } Cannot copy the image because the disk is almost full Domain: com.apple.CoreSimulator.simdiskimaged.SimDiskImageError Code: 14 System Information macOS Version 13.6 (Build 22G120) Xcode 15.0.1 (22266) (Build 15A507) Timestamp: 2023-12-05T17:08:19+08:00 Any help or direction is very appreciated. Thank you, Misael
0
1
761
Dec ’23
Issues with "AR not supported in Simulator"
I am trying to implement Hand Tracking in a visionOS application I am developing. Initially, I encountered errors such as "Cannot find type 'ARAnchor' in scope." Upon investigation, I realized the error arose because "import ARKit" is required, which was already in the code. Digging a bit deeper, I discovered that ARKit is not compatible with the simulator, or at least that's what I believe. My ultimate understanding is: "ARKit requires the specific hardware of an actual iOS device to operate, as it relies on features like the device's camera and motion sensors." Having reached this point, I noticed in the "HappyBeam" application documentation for visionOS there was a function "#if !targetEnvironment(simulator)". Upon researching, it turns out that this compilation conditional is used so that the application can compile in the simulator (without ARKit functionality) and on a real device. After applying "#if !targetEnvironment(simulator)" it allowed me to compile, but now when I run the application in Simulator, I receive a message on the main window stating: "AR not supported in Simulator." My current question is: Can I simulate Hand Tracking in any way without using ARKit, or is it essential to run the application on a physical device? And if Hand Tracking can be simulated in "Simulator", how is it done? I haven't been able to find a way to do it.
1
1
438
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
636
Nov ’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
569
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
626
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
1k
Nov ’23
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
594
Nov ’23
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
966
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
271
Nov ’23