Simulator

RSS for tag

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

Simulator Documentation

Pinned Posts

Posts under Simulator tag

358 Posts
Sort by:
Post not yet marked as solved
0 Replies
147 Views
Some Macs recently received a macOS system update which disabled the simulator runtimes used by Xcode 15, including the simulators for iOS, tvOS, watchOS, and visionOS. If your Mac received this update, you will receive the following error message and will be unable to use the simulator: The com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime is not available. Domain: com.apple.CoreSimulator.SimError Code: 401 Failure Reason: runtime profile not found using "System" match policy Recovery Suggestion: Download the com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime from the Xcode To resume using the simulator, please reboot your Mac. After rebooting, check Xcode Preferences → Platforms to ensure that the simulator runtime you would like to use is still installed. If it is missing, use the Get button to download it again. The Xcode 15.3 Release Notes are also updated with this information.
Posted
by edford.
Last updated
.
Post marked as Apple Recommended
577 Views
Hi all. I have a problem related to Xcode. Xcode says "iOS 17.2 simulator" is not installed, but I have been using this simulator for a long time and have installed the necessary SDKs. The problem has also been occurring for my colleagues since May 1, 2024. Restarting the Mac helps (there is no problem in Xcode after restarting Mac), but after reopening Xcode this problem repeats again. macOS 14.3.1 (23D60) Xcode 15.2 (15C500b)
Posted Last updated
.
Post not yet marked as solved
12 Replies
6.7k Views
I downloaded Xcode 15 beta 5 and I'm trying to work on my app, but it's having a problem with the simulator. It can't find the runtime I guess. This is the first time I've ran into this. When I try to run, this is what I get: The com.apple.CoreSimulator.SimRuntime.iOS-17-0 simulator runtime is not available. runtime profile not found using "System" match policy Download the com.apple.CoreSimulator.SimRuntime.iOS-17-0 simulator runtime from the Xcode Settings. Not sure what to do here. I also installed the latest iOS 17 developer beta on my device and Xcode doesn't work with that either. I can't help but think the development team forgot something here.
Posted Last updated
.
Post not yet marked as solved
3 Replies
112 Views
Hi, do you guys have any idea why this code block doesn't run properly on a designed iPad app running on a vision pro simulator? I'm trying to add a hovering effect to a view in UIKit but it just doesn't enter this if statement. if #available(iOS 17.0, visionOS 1.0, *) { someView.hoverStyle = .init(effect: .automatic) }
Posted Last updated
.
Post not yet marked as solved
1 Replies
198 Views
Simulators will not install. Run destinations all empty. Can't even run on device. XCode 15.4 beta Sonoma 14.4.1 Intel Mac 16" MBP Attached screenshot of error. iOS 17.5 beta 2 (21F5058d) "Not compatible with XCode 15.4 beta" No run destinations appear. Not even 17.4 device that is plugged in. This all worked yesterday after initial XCode upgrade to 15.4 beta. Now all destinations are missing, even though they appear as installed in the 'Platforms' window. (yes I have rebooted and restarted XCode).
Posted
by a11y.
Last updated
.
Post not yet marked as solved
0 Replies
68 Views
Hello, everyone, I have a problem I'm stuck with and have been trying to solve without success for the past 2 weeks. I am developing a SwiftUI application for Apple Watch which for now I am only running on the simulator. This application has to play sounds but unfortunately so far without success for Apple Watch simulator. When I tap the button on the application running on the Series 9 (45mm) simulator with watchOS 10.2. I cannot hear any sounds on my MacBook Pro. This happens for all Apple Watch simulators I have in my MacBook. The same exact code works on the iPhone 15 simulator with iOS 17.2 and I hear the file 1.mp3 from MacBook Pro speakers and also from bluetooth hearphones, if I connect them. The code is this import SwiftUI import AVFoundation struct ContentView: View { @State var audioPlayer:AVPlayer? @State var isPlaying : Bool = false var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Hello, world!") Button("Play"){ if let path = Bundle.main.path(forResource: "1", ofType: "mp3") { let fileUrl = URL(fileURLWithPath: path) do{ try AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.playback) try AVAudioSession.sharedInstance().setActive(true) audioPlayer = AVPlayer(url: fileUrl) guard let audioPlayer = audioPlayer else { return } audioPlayer.play() } catch { } } } } .padding() } } Thanks for your support!
Posted Last updated
.
Post not yet marked as solved
2 Replies
205 Views
Hello everyone, I'm programming my app and after a few days I opened and ran it on my iPhone. This app worked, but with one big problem. The problem is that the app doesn't show up in my settings and I don't know why. I didn't program/change anything. Thanks for the advice
Posted
by MORADENS.
Last updated
.
Post marked as solved
1 Replies
140 Views
Greetings everyone, we have a problem testing remote notifications to our app runing in an iOS simulator, which should be possible for quite a while now. (https://nilcoalescing.com/blog/TestingRemotePushOniOSSimulator/) We made sure of the following prerequisites The system requirements (recent XCode, recent MacOS, Silicone Processor) are met The app build is set to testing The app is in fact generating a devicetoken and sendig it to our backend We are sending our requests to the api.sandbox.push.app.com environment Nonetheless, we always receive a status 400, error "BadDeviceToken" response from the APNS service. Doing the same with a physical device works like a charm, ie the message is received without any problems. We also tried sending the same device token to a production environment, but got the same 400/BadDeviceToken error. Also the simulator-generated token does not look distorted, ie it's also just a HEX string with the same length as the working token of the physical device. Is there anything else we need to check for this to work?
Posted Last updated
.
Post not yet marked as solved
0 Replies
245 Views
Hello, im a new Apple developper since 2 years. I have Been working hard to learn and trying to publish my first IOS , iPad OS and Mac OS app. My app is taking form but I have few problems with the Xcode simulator to run ''on device'' for my iPad and iPhone. My devices began to disconnect and now I can't connect it anymore to run my code and debug. the are constantly in the state ''Trying to reconnect to '' and "preparing device". I have already reset all my device and deactivate developper mode etc. i have a iPad 7th gen and an iPhone 14 Pro Max . they both have iOS 17.5 beta 2 (trying to fix the problem by keeping those up to date as much as possible.) my Xcode version is 15.4 beta My Mac book air 13 inch 2018 is running Sonoma 14.4.1 and the is no new os version bus its not an apple M family chip. I think there is a Sonoma 14.5 beta version but for apple architecture. I really need your help plz
Posted Last updated
.
Post not yet marked as solved
1 Replies
171 Views
My Xcode version is 14.3(14E222b), MacOS is 13.6.4 with M1 Pro chip, according to Xcode support page, the Xcode supports iOS simulator from 13.7 to 16.4. However, there's no avaliable iOS version below iOS 16.4 can be selected, even it was installed. The command line tolls is Xcode14.1, I've also tried to change to 14.3 and 15.2, but didn't work.
Posted
by Rimbaud.
Last updated
.
Post not yet marked as solved
2 Replies
203 Views
Attempting to run my app on the simulator or device seemingly leaves it stuck on the launch screen for a long time. Slowly, the terminal will start to relay info suggesting it's past that but still displays the launch screen until eventually it goes to a black screen. No changes I am aware of were made to cause these behavior to start. And it was a sudden issue. My last OS update was a few days ago and my last Xcode update was after this started to occur in hopes it would fix the problem. Recent code changes would have nothing to do with startup. I did try to delete derived data and ~/Library/Developer/Xcode/iOS DeviceSupport/ based on solutions given to other users with similar problems. I've restarted the computer and cold restarted. When I stop the application from Xcode, I can then run the app. It's just when it's attached. It will also work if "Debug executable" is off. Other apps on this computer do not seem to have this problem. Would appreciate any help. Thanks.
Posted
by Bill3D.
Last updated
.
Post not yet marked as solved
1 Replies
185 Views
I'm trying to figure out how to debug this issue. I have a fairly simple program that I built using the Hello World sample code as reference. Here is my code: import SwiftUI @main struct Core_USDZ_ViewerApp: App { var body: some Scene { // Main Menu scene // WindowGroup (id: "main-menu"){ CoreUsdzMenu() } // Scene that takes data as an input // for volumetric viewing // WindowGroup (for: URL.self) { $content in CoreUsdzVolume(url: content) } defaultValue: { URL(string: "https://developer.apple.com/augmented-reality/quick-look/models/pancakes/pancakes.usdz")! } .windowStyle(.volumetric) .defaultSize(width: 0.2, height: 0.3, depth: 0.3, in: .meters) // Full surround scene /* ImmersiveSpace { // put our immersive view here } */ } } In the simulator, this launches the main menu scene, but when installed on the Vision Pro using TestFlight it skips the main menu and goes straight to the second WindowGroup. Since the data isn't populated, it uses the defaultValue and just shows pancakes. I'm having trouble logging and debugging this issue, as I don't have access to the hardware myself. I have to push the code to TestFlight and wait for a coworker to test it. Does anyone have ideas of why this could be happening? Any help is appreciated. Logging and debugging tips especially. I'm used to just putting log messages in my code to debug, but maybe there are some breakpoint techniques I should be using here or something. Oh, also, here is my CoreUsdzMenu script: import SwiftUI import RealityKit import UniformTypeIdentifiers struct CoreUsdzMenu: View { @Environment(\.openWindow) private var openWindow @Environment(\.dismissWindow) private var dismissWindow @State var entity: Entity? = nil @State var showFilePicker: Bool = false init() { NSLog("In CoreUsdzMenu") } var body: some View { VStack{ Text("Core USDZ Viewer v1.1") .font(.title) .frame(width: 500.0, height: 100.0) /* usdz list HStack(spacing: 100.0) { Spacer() // Load the UsdzList view into the window! UsdzList() Spacer() }*/ /* button test for window Button { openWindow(value: usdzData[1].url) } label: { Text("open test window") }*/ // A view for displaying the loaded asset. /* RealityView( make: { content in // Add a placeholder entity to parent the entity to. // let placeholderEntity = Entity() placeholderEntity.name = "$__placeholder" if let loadedEntity = self.entity { placeholderEntity.addChild(loadedEntity) } content.add(placeholderEntity) }, update: { content in guard let placeholderEntity = content.entities.first(where: { $0.name == "$__placeholder" }) else { preconditionFailure("Unable to find placeholder entity") } // If there is a loaded entity, remove the old child, // and add the new one. // if let loadedEntity = self.entity { placeholderEntity.children.removeAll() placeholderEntity.addChild(loadedEntity) } } )*/ // A button that displays a file picker for loading a USDZ. // Button( action: { showFilePicker = true }, label: { Text("Load USDZ") } ) .padding() } // can import usdz and realityFile UTT types .fileImporter(isPresented: $showFilePicker, allowedContentTypes: [.usdz, .realityFile]) { result in // Get the URL of the USDZ picked by the user. // Guarded for errors. // guard let url = try? result.get() else { print("Unable to get URL") return } NSLog("In CoreUsdzMenu") // add new .usdz to our data list // for later!~ // use Observables n stuff //usdzData.addUsdz(url) // This task is just an asynchronous block of code. Not linked // to the RealityView explicitly; the update parameter of the // RealityView function responds when this task updates the entity. // Task { // As the app is sandboxed, permission needs to be // requested to access the file, as it's outside of // the sandbox. // if url.startAccessingSecurityScopedResource() { defer { url.stopAccessingSecurityScopedResource() } // Load the USDZ asynchronously. // On load, triggers RealityView's update. // //self.entity = try await Entity(contentsOf: url) // Try using the Volumetric Window to display the // content: // openWindow(value: url) } } } } } Thank you for reading!
Posted
by dganim8s.
Last updated
.
Post not yet marked as solved
0 Replies
161 Views
Hello, I am currently testing microphone features on VisionOS through Unity App.

I’m stuck with a bug, related to the calling of simulated microphone device. Would you please help me to find a solution to work through this bug ? Choses are the results of the Xcode console while debugging my simulated VisionOS app. Unity functions : StartRecording() InteractionControllerScript:Update() Microphone.Start(Microphone.devices[0], false, duration, 44000); (where the line of code crash). Simulated Xcode VisionOS side : MEMixerChannel.cpp:1006 MEMixerChannel::EnableProcessor: failed to open processor type 0x726f746d AURemoteIO.cpp:1162 failed: -10851 (enable 1, outf< 2 ch, 0 Hz, Float32, deinterleaved> inf< 1 ch, 44100 Hz, Int16>) Starting microphone failed: "An error occured trying to initialize the recording device. " (70) Unity version : 2022.3.24f1 Xcode version : 15.3 Mac Version : MacBook Air M3 2024 Mac Os : 14.3 (23D2057) Thx a lot.
Posted Last updated
.
Post not yet marked as solved
0 Replies
176 Views
I am developing visionOS application with Xcode 15.3 using visionPro 1.1 simulator. Using the simulator, I can only see 1 display which I assume is monoscopic only. I want to verify my application that it works fine with left and right eye (stereoscopic) in VR and MR modes. How to use the simulator displaying stereoscopic display?
Posted
by idhis.
Last updated
.
Post not yet marked as solved
3 Replies
566 Views
I just upgraded my Macbook &amp; Xcode installation, as we are required to target the latest iOS SDK later this month. I am now unable to compile our app as the iOS runtime is not installed by default. I have tried to download the missing runtime by clicking on "iOS 17.4 Not Installed - Get" in the top title bar. I think that the initial download may have been interrupted. Now, when I click "Get", I get a popup that suggests that I can't download the Runtime because the iOS Simulator is already installed. I'm guessing that Xcode is holding a reference to a non-existent installation somewhere, but I can't figure out how to get rid of it. I have tried completely uninstalling Xcode, and deleting /Library/Developer from both my personal directory and the system directory. I can't delete the iOS Simulator installation reference from Xcode directly either. When I try to, I get this error message: Unable to remove SimulatorRuntime Domain: com.apple.DVTFoundation Code: -1 User Info: { DVTErrorCreationDateKey = "2024-04-13 14:18:22 +0000"; } -- Unable to remove SimulatorRuntime Domain: com.apple.DVTFoundation Code: -1 -- Cannot stage disk image or bundle for delete: 87947E69-C049-4950-B663-C40C3BCAAFB2 Domain: com.apple.CoreSimulator.simdiskimaged.SimDiskImageError Code: 18 -- The file “87947E69-C049-4950-B663-C40C3BCAAFB2.dmg” doesn’t exist. Domain: NSCocoaErrorDomain Code: 4 Failure Reason: The file doesn’t exist. -- The operation couldn’t be completed. No such file or directory Domain: NSPOSIXErrorDomain Code: 2 Failure Reason: No such file or directory -- System Information macOS Version 14.4.1 (Build 23E224) Xcode 15.3 (22618) (Build 15E204a) Timestamp: 2024-04-13T16:18:22+02:00
Posted Last updated
.
Post not yet marked as solved
0 Replies
376 Views
Hi, I'm a total beginner in programmation. I'm learning Unreal Engine by developing an iPhone game with the engine. I do not own an Apple Developper Subscription, so for testing my game on a real iPhone and/or on a simulator, I use the "quick launch" option in Unreal. Then, I open the Xcode Project created by the engine while attempting to quick launch directly on the device, and run the app from Xcode. Running it on my personal iPhone failed, so while trying to figure out why I've decided to try running it on the iOS simulator, and it failed. I got this message : Details : Simulator device failed to launch com.***.***. Domain: FBSOpenApplicationServiceErrorDomain Code: 1 Failure Reason: The request was denied by service delegate (SBMainWorkspace). User Info: { BSErrorCodeDescription = RequestDenied; DVTErrorCreationDateKey = "2024-04-14 15:25:10 +0000"; FBSOpenApplicationRequestID = 0x8a2a; IDERunOperationFailingWorker = IDELaunchiPhoneSimulatorLauncher; SimCallingSelector = "launchApplicationWithID:options:pid:error:"; } -- Simulator device failed to launch com.***.XXXXX. Domain: FBSOpenApplicationServiceErrorDomain Code: 1 Failure Reason: The request was denied by service delegate (SBMainWorkspace). User Info: { BSErrorCodeDescription = RequestDenied; FBSOpenApplicationRequestID = 0x8a2a; IDERunOperationFailingWorker = IDELaunchiPhoneSimulatorLauncher; SimCallingSelector = "launchApplicationWithID:options:pid:error:"; } -- The request to open "com.***.***" failed. Domain: FBSOpenApplicationServiceErrorDomain Code: 1 Failure Reason: The request was denied by service delegate (SBMainWorkspace). User Info: { BSErrorCodeDescription = RequestDenied; FBSOpenApplicationRequestID = 0x8a2a; } -- 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: 153 -- Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : { "device_model" = "iPhone16,2"; "device_osBuild" = "17.4 (21E213)"; "device_platform" = "com.apple.platform.iphonesimulator"; "dvt_coredevice_version" = "355.24"; "dvt_mobiledevice_version" = "1643.100.58"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 314; "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.4"; "sdk_osVersion" = "17.4"; "sdk_variant" = iphonesimulator; } -- System Information macOS Version 14.2.1 (Build 23C71) Xcode 15.3 (22618) (Build 15E204a) Timestamp: 2024-04-14T17:25:10+02:00 I searched online and found out that installing Rosetta could fix my issue. I'm pretty sure that Rosetta is already installed on my system but I still tried to re-install it unsuccessfully. Here's what I get : softwareupdate --install-rosetta I have read and agree to the terms of the software license agreement. A list of Apple SLAs may be found here: https://www.apple.com/legal/sla/ Type A and press return to agree: A 2024-04-14 17:17:41.826 softwareupdate[15660:1012009] Package Authoring Error: 052-22577: Package reference com.apple.pkg.RosettaUpdateAuto is missing installKBytes attribute Install of Rosetta 2 finished successfully I tried other command lines to install Rosetta, using sudo, only to get that same result. I didn't find any way to perform a clean install of Rosetta online, only people saying that I shouldn't try to do anything with rosetta as it is supposed to be an automatic process or something. Maybe Rosetta wasn't the problem after all ? Or it is and I've just messed up the installation when I got it installed before ? (I installed GamePortToolkit previously, and I remember updating Rosetta while doing so). I tried to explain clearly the whole situation, don't hesitate to ask me any information if you need so. Thanks for your attention 🙏
Posted Last updated
.
Post not yet marked as solved
0 Replies
176 Views
When I try to list paired devices(like iphone with developer mode enabled and paired/connected with Xcode) using this command, I don't see it listed. xcrun simctl list pairs Can't see the paired devices in xcrun simctl list as well. I am on Sonoma 14.41 and the paired iphone is on ios17.2.1. Please advise.
Posted
by vjani13.
Last updated
.
Post not yet marked as solved
0 Replies
170 Views
Hello, I'm trying to test a call in the Simulator using CallKit. However, after the CXStartCallAction of CallKit is called, the CXEndCallAction is immediately invoked. I conducted the test using Xcode 15.2 and iOS 17.2 Simulator. When I searched because I couldn't test it on the Simulator, I found a similar issue on the following link. https://stackoverflow.com/questions/78291725/callkit-invokes-cxendcallaction-after-starting-the-call-resulting-in-hangup-on The person who asked the question in the link tested it with the previous version iOS 15.5 Simulator and it worked fine. Why isn't it working in the latest version? Is it a bug? Or has the policy been updated? If there are any documents available to check regarding this matter, please share them.
Posted Last updated
.