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.3k
May ’24
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
63
1d
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.
0
0
68
1d
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?
0
0
110
5d
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
198
1w
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
111
1w
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
95
1w
[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
3
349
1w
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
103
3w
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
261
3w
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
186
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
5
0
234
Nov ’24
Xcode 16.x Simulators sometimes draw the screen with the wrong aspect ratio and appear distorted
Simulators sometimes draw the screen with the wrong aspect ratio and appear distorted. I'm on macOS 14.7 and using Xcode 16.1, but Xcode 16 was also sometimes doing this. This is happening in both iPhone simulator and iPad simulators. Is anyone else seeing this? It's not just the Home Screen, it happens in apps too. I have a weird bug when testing on the iPad simulators and I can't tell if it is a bug in the simulator or in my app. All my iPads are broken, so I can't actually test on device right now.
0
0
330
Nov ’24
Cannot delete iOS 18.1 Simulator
When I try to delete an iPhone 16 Pro iOS 18.1 Simulator in XCode 16.1, I get an error message "“data” couldn’t be moved because you don’t have permission to access “Deleting-8366D3CC-37EC-49C0-8674-0599BCE1DA12”.". I had that same issue with iOS 18.0 Simulator but never with previous versions (17.5). Note that I'm stuck using the iOS 18.1 Simulator because iCloud synchronization is paused (potentially due to low data mode). And I cannot use iOS 18.0 Simulator as well because unit tests run hangs for some other mysterious reason. The fallback to iOS 17.5 Simulator is not satisfactory.
2
3
583
Nov ’24
AccessibilityControlsExtension crash on Simulator
Hi there, when I run any app on the Xcode 16/16.1 with iOS/tvOS 18/18.1, it generates a crash on the AccessibilityControlsExtension process. 0x1048b8000 - 0x10493bfff dyld (*) <6beafde4-b011-3e47-8aae-4d7b6e4bb7e8> /usr/lib/dyld 0x1047fc000 - 0x104803fff com.apple.AccessibilityUIServer.AccessibilityControlsExtension (1.0) <a67e159b-253d-306c-b6fb-dd3fec38bd0f> /Volumes/VOLUME/*/AccessibilityUIServer.app/PlugIns/AccessibilityControlsExtension.appex/AccessibilityControlsExtension If run in Catalist mode - there are no crash reports. I also made a clean install of macOS 15.1 + Xcode and received that error again. Device: Mac15,13 Any suggestions on how to fix it? Full crash log in attach. AccessibilityControlsExtension-crash.log
1
4
362
Nov ’24
Simulator package issues
Hi! My simulator will not build because there is essentially a package conflict. I am adding Firebase to a Flutter application. Simulator built before trying to add firebase but now I'm getting errors telling me a package can't be found even though it's installed Output Package Loading (Xcode): Missing package product 'FirebaseCore' .../ios/Runner.xcodeproj I added target 'Runner' do use_frameworks! use_modular_headers! pod 'FirebaseDatabase' pod 'FirebaseAnalytics' pod 'FirebaseMessaging' pod 'FirebaseCore' pod 'FirebaseFunctions' pod 'FirebaseAppCheck' pod 'FirebaseFirestore' pod 'FirebaseStorage' pod 'FirebaseDynamicLinks' pod 'FirebaseAuth' flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do inherit! :search_paths end end and ran pod install with no errors. Opening the runnner.xcworkspace shows all of the named packages under "Frameworks, Libraries, and Embedded Content' I've tried manually adding through Xcode those packages but then get a conflict error, so I am out of ideas as to how to fix this. It appears to be something new with the latest MacOS update as I've seen another person with the same problem that started after he updated... I've also cleaned, re-installed, re-booted a few times because My Android emulator builds fine Any help would be appreciated! Thanks!
2
0
333
Nov ’24
iOS simulator freezes on macOS Sequoia during test execution
Hello! 👋 We are seeing a bug on macOS Sequoia related to the test running. When attempting to run tests, the iOS simulator becomes stuck indefinitely. This can occur whether we run tests for a specific module, all unit tests, or even a single test. We narrowed down the issue and is due to the OS failing to copy some named pipes (FIFO). For example: db.realm.note db.realm.management/access_control.new_commit.cv db.realm.management/access_control.pick_writer.cv We saw in the CoreSimulator log file the following error: NSCocoaErrorDomain Code=512 ""access_control.new_commit.cv" couldn't be copied The copy fails and then a new clone of the simulator is created retrying the process. And this goes on and on. What is happening? When running the tests for the iOS app on the simulator, under the hood, the OS tries to clone the simulator device. A list of folders is created, including one Shared/AppGroup. Under the AppGroup folder, the list of multiple UDIDs corresponds to the specific App Group containers created for individual app targets or extensions that are sharing data within that App Group. One of these folders contains the Realm DB files. There are a few files called named pipes which are invisible in Finder (even if you have hidden files to true). You need to list them with ls -l. So, when we select the test target and run the tests, the OS clones the permanent simulator and copies all files from its folders. All files are being copied except those pipes. When the OS attempts to copy the pipes, the operation fails with the error Code=512. Reproduction Steps Run the iOS app on a simulator (e.g. iPhone SE 3rd gen. with iOS 18.1). Quit Xcode and the iOS simulator. Reopen Xcode. Select a test target to run. Select the same simulator you previously ran the iOS app. Run the tests (CMD + U). The simulator is now stuck. Are there any workarounds available? Yes. We found that running the tests works if we first “Erase All Content and Settings” from the simulator. Another workaround is to remove all simulators and reinstall the iOS runtimes. This prevents the issue for a longer period (almost a full day), but eventually, the problem reoccurs. Alternatively, we can delete the named pipes from the App Groups directory before running the tests. Have we tried to give full disk permissions? Yes, we tried to give full disk permissions to a lot of things (Xcode, simulator, file paths, directories, etc.) but with no luck. We still get the same error. Is the issue happening on a specific version of Xcode? No, it happens for multiple Xcode versions: Xcode 15.4 Xcode 16.0 Xcode 16.1 Is the issue happening on a specific macOS Sequoia version? No, it happens on multiple macOS Sequoia versions: 15.0 Beta 8 15.0 RC 15.0 15.1 Stacktrace Oct 29 17:41:18 CoreSimulatorService[14079] <Error>: New device is stuck in creation state, deleting: Clone 712 of iPhone SE (3rd generation) (58D6DED6-2C55-4E7C-BBB4-E0D661DC41A1, iOS 18.1, Creating) Oct 29 17:41:20 CoreSimulatorService[14079] <Error>: Error Domain=NSPOSIXErrorDomain Code=22 "Invalid argument" UserInfo={NSLocalizedFailureReason=Device was allocated but was stuck in creation state. Check CoreSimulator.log for more information.} Oct 29 17:41:20 com.apple.dt.Xcode[90147] <Error>: Error Domain=NSPOSIXErrorDomain Code=22 "Invalid argument" UserInfo={NSLocalizedFailureReason=Device was allocated but was stuck in creation state. Check CoreSimulator.log for more information.} Oct 29 17:41:30 CoreSimulatorService[14079] <Warning>: Device 6C270BDB-2945-42B5-A985-884F93BFD3E1 encountered in creation state at launch. The device will be re-created. Oct 29 17:41:38 CoreSimulatorService[14079] <Error>: Failed to clone the device data path, error = Error Domain=NSCocoaErrorDomain Code=512 "“access_control.new_commit.cv” couldn’t be copied to “db.realm.management”." UserInfo={NSSourceFilePathErrorKey=[...]/db.realm.management/access_control.new_commit.cv, NSUserStringVariant=( Copy ), NSDestinationFilePath=[...]/db.realm.management/access_control.new_commit.cv, NSUnderlyingError=0x600000ffa490 {Error Domain=NSPOSIXErrorDomain Code=45 "Operation not supported"}} Oct 29 17:41:38 CoreSimulatorService[14079] <Error>: Failed to re-create device that was encountered in the creation state (Clone 713 of iPhone SE (3rd generation) (6C270BDB-2945-42B5-A985-884F93BFD3E1, iOS 18.1, Creating)): Error Domain=NSCocoaErrorDomain Code=512 "“access_control.new_commit.cv” couldn’t be copied to “db.realm.management”." UserInfo={NSSourceFilePathErrorKey=[...]/db.realm.management/access_control.new_commit.cv, NSUserStringVariant=( Copy ), NSDestinationFilePath=[...]/db.realm.management/access_control.new_commit.cv, NSUnderlyingError=0x600000ffa490 {Error Domain=NSPOSIXErrorDomain Code=45 "Operation not supported"}} Oct 29 17:41:40 CoreSimulatorService[14079] <Error>: Error Domain=NSPOSIXErrorDomain Code=22 "Invalid argument" UserInfo={NSLocalizedFailureReason=Device was allocated but was stuck in creation state. Check CoreSimulator.log for more information.} Oct 29 17:41:50 CoreSimulatorService[14079] <Warning>: Device C6DEBFBB-6EFA-4E4C-B51B-9DDA08AF9BDB encountered in creation state at launch. The device will be re-created. Oct 29 17:41:55 CoreSimulatorService[14079] <Error>: Failed to clone the device data path, error = Error Domain=NSCocoaErrorDomain Code=512 "“access_control.new_commit.cv” couldn’t be copied to “db.realm.management”." UserInfo={NSSourceFilePathErrorKey=[...]/db.realm.management/access_control.new_commit.cv, NSUserStringVariant=( Copy ), NSDestinationFilePath=[...]/db.realm.management/access_control.new_commit.cv, NSUnderlyingError=0x600000ffb000 {Error Domain=NSPOSIXErrorDomain Code=45 "Operation not supported"}} Oct 29 17:42:06 CoreSimulatorService[14079] <Warning>: Device 032BAE7E-E345-48F2-86EB-4DF1AD4D5291 encountered in creation state at launch. The device will be re-created.
0
0
316
Oct ’24