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

Resolving a "Simulator runtime is not available" error
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.
0
0
2.6k
May ’24
Xcode/iOS Simulator running with x86_64 instead of arm64 architecture
Hi, Can anyone please share some information on why my Mac with apple silicon still using iOS simulator with x86_64 architecture instead of arm64 architecture. The problem arises when I use FFMPEG frameworks, these frameworks are working on arm64, so they should work on iOS Simulator, but I get error saying these frameworks are for arm64 and Xcode/iOS simulator needs x86_64 based frameworks. why Xcode still expects frameworks with x86_64 architecture. Thanks,
1
1
120
2d
Expo crash on iOS simulator
I've been working on my mobile app project using Expo. Yesterday, when I tried to run the app again, the Expo Go in the iOS simulator got stuck on the screen showing "New update available, downloading..." and then crashed. I'm not sure what went wrong. It only provides a long error report. I ran an EAS build, which completed successfully, so I suspect the issue might be with the iOS simulator or Expo Go itself. Please help me out :(
2
0
205
1w
Preview Start Problem
Hello Apple Developer Community. I have a Problem with Xcode Preview. The Problem is that when I try to start the Preview in Xcode (Not Simulator) It crashes and when I try to click Reopen, it says that I must Update my Mac OS, but my Mac OS is Up-to-Date. Can you help me with this? Thank you :D
2
0
141
3w
Problem with simulator (Asked again)
I already asked this, although I want to ask again so it boots and gets more people; When I try to run my project on the simulator, it tells me there is a bug. It is not in the code I wrote, but I believe in the compiler. It would work perfectly, say the build succeeded, but the phone turns white and stops there. I don't know how to debunk it, what to do! Picture of what happens with the phone: Picture of the debugging area: Picture of my code: If I need to add more things, please let me know. Have a great day!
0
0
179
3w
Problem with simulator
When I try to run my project on the simulator, it tells me there is a bug. It is not in the code I wrote, but I believe in the compiler. It would work perfectly, say the build succeeded, but the phone turns white and stops there. I don't know how to debunk it, what to do! Picture of what happens with the phone: Picture of the debugging area:
1
0
175
Dec ’24
Unable to preview on latest Xcode
I'm new to Xcode and decided to give it a try, however, I'm unable to preview even the default "hello, world" message. I've tried downloading Xcode on the App Store on Mac and from the official website, but I couldn't go pass the "Preparing (Automatic) iPhone Simulator." I've also tried the following line of code on Terminal, but nada: xcrun simctl erase all Here's what I see for almost two hours now (it makes no sense): My system specs: iMac Retina 4K, 21.5-inch, 2019, 3 GHz Intel Core i5 6-Core, Radeon Pro 560X 4 GB, 8 GB 2667 MHz DDR4 (two 4gb core each), 1TB SSD. I've coded way bigger web projects using various applications, but Xcode can't even preview the sample file? Please, help. I would really like to code using Swift. :)
5
0
383
2w
Can't transfer CSV file to iPhone simulator
I'm trying to transfer a CSV file to my iPhone 16 simulator to use for testing my application, but it keeps failing. See the image below. That occurs when I try to drag the file into the simulator. I also tried to use the Share option for the file, but nothing happens with that. It doesn't transfer but it also doesn't fail. I'm assuming it's failing in the background. Anyone know what I can do?
0
0
152
Dec ’24
Issue with page.selectionForWord(at:) in Mac Designed for iPad Mode
I’m encountering an issue with the page.selectionForWord(at:) method in my application. This method has stopped working in Mac Designed for iPad mode. The functionality works fine on physical devices such as iPhone and iPad, as well as on Mac, but in this specific mode, the method no longer works, and the application crashes. It is crucial for me that this functionality works in Mac Designed for iPad mode, as rewriting the entire code for Mac would be too time-consuming, especially considering the size of the application. Interestingly, a similar method, page.selectionForLine(at:), works perfectly with the same parameters in all environments, including the Mac Designed for iPad mode. This makes the issue even more puzzling. The issue began after the latest update. The app no longer responds to the page.selectionForWord(at:) method, which causes the application to crash. I have attached a test app to reproduce the error.
1
0
163
Dec ’24
Has `xcodebuild -showdestinations` been changed since macOS Sequoia?
Hi, I just upgraded MBP M3 Pro and mac mini M1/M2 to macOS 15.1 Sequoia and these macs not showing its available destination candidates after update. DEVELOPER_DIR=`xcode-select -p` xcodebuild -scheme myapp -derivedDataPath ./derived_data -showdestinations Command line invocation: /Applications/Xcode/Xcode_16.2.app/Contents/Developer/usr/bin/xcodebuild -scheme myapp -derivedDataPath derived_data -showdestinations User defaults from command line: IDEDerivedDataPathOverride = /path/to/myapp/derived_data IDEPackageSupportUseBuiltinSCM = YES Available destinations for the "approduce_calc_v2" scheme: { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00006020-001971C422C3C01E, name:My Mac } { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device } { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device } While my macs got all the simulator runtimes/devices installed and available. $ DEVELOPER_DIR=/Applications/Xcode/Xcode_16.2.app xcrun simctl list devices == Devices == -- iOS 17.5 -- iPhone 15 Pro (48C3EFC6-2B93-4C9D-8C7B-F841CE09E901) (Shutdown) iPhone 15 Pro Max (E2C4D8AA-BF0A-42B4-9D83-70F0CFD21934) (Shutdown) iPhone 15 (350882E2-5A78-47E7-879F-E548F8810386) (Shutdown) iPhone 15 Plus (9FE3F7F6-FAC0-4ACA-96A6-0E8DBBA17068) (Shutdown) ... and in my other macs, still in Sonoma 14.5, xcodebuild -showdestinations command still works well(shows the entire list of available simulator devices). My question is: Did you change the specs of xcodebuild -showdestinations command from the ones working in macOS Sequoia, not to show all the destinations available?
1
0
275
Dec ’24
iOS app fails to run with Xcode 16 & less than iOS17.0 no issue with Xocde 15
When I build and rum my iOS app with xocde 16.0 or higher version with my 16.0 iOS, 17.0 iOS, if fails to run with error. (Library not loaded: /System/Library/Frameworks/SwiftUICore.framework/SwiftUICore) I found this error after update my macOS and xcode (Ventura -> Sequoia, Xcode 15.2 -> 16.2). I try to setting '-weak_framework SwiftUI' for solve this error with this post (https://forums.developer.apple.com/forums/thread/126506). But when applied, an error occurred in modify on all swiftUI. If a project is built with a simulator over 18 versions, it runs smoothly. *issue project is with tac or tuist. There are two projects in question, and each configuration is (1.17.0 tca + 4.37.0) / (tuist 3.4.0). Does anyone have any pointers as where I even start to debug this issue and narrow down on what's going on with Xcode 16?
1
0
454
Dec ’24
Issues with Safari dev tools + WKWebView + local URL + iOS 18 simulator
When I'm inspecting a WKWebView in a simulator and the WKWebView loads a local URL with a port number, I've found that most features of Safari dev tools that worked in iOS 17 are broken in iOS 18. Here are the steps I'm taking: Set up a WKWebView with isInspectable = true that loads a local URL, e.g. https://www.local.mydomain.com:3000 Install a self-signed SSL certificate on a simulator for www.local.mydomain.com Run my app on the simulator The WKWebView loads successfully In Safari on my Mac, I can select the WKWebView and open dev tools to inspect it If the simulator is on iOS 17, this works fine, no issues. But if the simulator is on iOS 18, Safari dev tools are mostly broken. I can tell that there is a connection to the WKWebView because the Network tab logs the requests that I expect. But I cannot use any of the other dev tools features: Elements, Sources, Console, etc. Has anyone else encountered this? Is there a workaround?
1
0
245
Dec ’24
SimpleWatchConnectivity sample - TransferFile fails
When launching the SimpleWatchConnectivity sample in a simulator (iOS 18.2 + watchOS 11.2), almost all the functionality works, but TransferFile does not work. The error is the following: -[WCFileStorage persistOutgoingFileTransfer:] error serializing file transfer <WCSessionFileTransfer: ...> due to Error Domain=NSCocoaErrorDomain Code=4866 "Caught exception during archival: This object may only be encoded by an NSXPCCoder." How can it be fixed or worked around?
1
0
236
Dec ’24
[azure devops and Github runners] AVPIdentity: AppleVirtualPlatformHostKey.mm:234: Assert: platformExpert, value: 0
Description When starting the iOS simulators on macOS-15 intel image, the following assertion happens: The same issue not showing for macOS 15-arm64 image. Here is the issue details: https://github.com/actions/runner-images/issues/10925 raised by multiple users. AVPIdentity: AppleVirtualPlatformHostKey.mm:234: Assert: platformExpert, value: 0 AVPIdentity: AppleVirtualPlatformHostKey.mm:234: Failed to get AppleVirtualPlatformARMPE service. The Simulators worked fine the day before the above issue was posted. What changed? Did something update?
3
4
596
Dec ’24
IOS18 simulator not auto show visual keyboard when start with hardware connect disabled
Hello, I found in IOS18 preset iphone 16PM simulator, when I set as not connect to hardware keyboard, after the simulator restart, the visual keyboard no longer shows. The input from Mac keyboard also not work. I must open hardware keyboard connection and disable it again to show the keyboard. This is not happen on IOS17 iphone15PM simulator. Is anyone know why or how to set it as always show the visual keyboard? Thanks
0
0
167
Nov ’24
I get this Issue : ContentView.swift:3016:25 The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions. But I don´t know what I have to do. I am a noob. Can anybody help me.
// Füge OrderRow hinzu struct OrderRow: View { let order: Order var body: some View { VStack(alignment: .leading, spacing: 8) { HStack { Text("Tisch \(order.tableNumber)") .font(.headline) Spacer() Text(order.status.rawValue) .font(.caption) .padding(.horizontal, 8) .padding(.vertical, 4) .background(order.status.color.opacity(0.2)) .foregroundColor(order.status.color) .cornerRadius(8) } Text(order.timestamp, style: .time) .font(.caption) .foregroundColor(.gray) ForEach(order.items) { item in Text("\(item.quantity)x \(item.item.name)") .font(.subheadline) } HStack { Spacer() Text(String(format: "%.2f €", order.totalAmount)) .bold() } } .padding() .background(Color.white) .cornerRadius(12) .shadow(radius: 2) } } struct MenuItemRow: View { let item: MenuItem var body: some View { HStack { Text(item.name) .font(.headline) Spacer() Text(String(format: "%.2f €", item.price)) .font(.subheadline) } .padding() } } struct MenuItemsView: View { @Binding var selectedItems: [OrderItem] @Environment(.dismiss) private var dismiss func filteredItems(for category: MenuCategory) -&gt; [MenuItem] { return sampleMenuItems.filter { $0.category == category } } func addItemToOrder(_ item: MenuItem) { if let index = selectedItems.firstIndex(where: { $0.item.id == item.id }) { selectedItems[index].quantity += 1 } else { selectedItems.append(OrderItem(item: item, quantity: 1)) } } var body: some View { NavigationView { List { ForEach(MenuCategory) { category in Section(header: Text(category.rawValue)) { let filteredItems = sampleMenuItems.filter ForEach(filteredItems) { item in } MenuItemRow(item: sampleMenuItems.filter) { addItemToOrder } } } } } .navigationTitle("Menü") .toolbar { ToolbarItem(placement: .navigationBarTrailing) { Button("Fertig") { dismiss() } } } } } } // Sample Menü-Items let sampleMenuItems: [MenuItem] = [ MenuItem(name: "Cola", description: "0,33l", price: 3.50, category: .drinks, image: "cola"), MenuItem(name: "Sprite", description: "0,33l", price: 3.50, category: .drinks, image: "sprite"), MenuItem(name: "Bier", description: "0,5l", price: 4.00, category: .drinks, image: "beer"), MenuItem(name: "Nachos", description: "mit Käsesauce", price: 5.50, category: .snacks, image: "nachos"), MenuItem(name: "Pommes", description: "mit Ketchup", price: 4.50, category: .food, image: "fries"), MenuItem(name: "********", description: "alkoholfrei", price: 6.50, category: .specials, image: "********") ] struct NewEventView: View { var body: some View { Text("New Event") } } struct EventManagementView: View { var body: some View { Text("Event Management") } } struct OrderRow: View { var order: String var body: some View { Text("Order: (order)") } } #Preview { ContentView() }
4
0
350
Dec ’24
Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000020
I have built an iOS app using flutter. The app (debug and release build) works fine on real devices. But when trying to run integration tests on this app using appium on an emulator, the app keepas crashing randomly with these error logs: https://docs.google.com/document/d/1Z1f7hudmpHUATnFvoSZeAAoi8-NyVn6P9BFHNOZkzyA/edit?tab=t.0 Any help would be appreciated
1
0
253
Nov ’24
Sign in with Apple credential always revoked on iOS18/18.1 Simulator
Hi there - I maintain the react-native-apple-authentication module which allows react native developers to implement sign in with Apple When testing we noticed that code working perfectly in iOS17 Simulators now fails on iOS18/18.1 Simulators. Specifically, the credential status is always revoked when testing on an iOS18+ Simulator. The same code works perfectly on a real device running iOS18 or 18.1 so this appears to be a Simulator bug. This is problematic because App review is frequently performed on a Simulator, so there are false-negative test results for Sign In With Apple from reviewers when they use iOS18 emulators, resulting in App submission rejections. We're tracking this here, with some results posted and an example app in-repo that demonstrates the issue: https://github.com/invertase/react-native-apple-authentication/issues/356 It would be great to see the Simulator fixed so that it works correctly with Sign In With Apple again. Thanks
6
1
396
Nov ’24