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.
Xcode
RSS for tagBuild, test, and submit your app using Xcode, Apple's integrated development environment.
Posts under Xcode tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Hi,
Our team uses Xcode Cloud to run unit tests, and since around November, we’ve been frequently experiencing timeouts with the following type of process:
@Test func hogeTest() async {
// do something
hoge.do()
// wait until done
await wait(condition: { hoge.isDone })
// test result
#expect(hoge.isSucceeded)
}
private func wait(condition: () async -> Bool, timeout: TimeInterval = 0.5, pollingInterval: TimeInterval = 0.01) async throws {
let deadline = Date().addingTimeInterval(timeout)
while Date() < deadline {
if await condition() { return }
try await Task.sleep(nanoseconds: UInt64(round(pollingInterval * TimeInterval(NSEC_PER_SEC))))
}
Issue.record("timeout")
}
Although sleep is supposed to wait for only a few milliseconds, there are cases where it takes more than 10 seconds, leading to a timeout.
What could be causing this instability in the sleep duration? Additionally, if there are other recommended ways to implement polling and waiting in Swift Testing, I would appreciate it if you could share them.
A feedback report (FB15899163) has already been submitted.
Best regards,
Our use case is that we need to run a CLI script (on Mac) to set up backend configuration before each test case (UI test on real iOS device). The setup logic is test specific, so using pre-build scripts is not an option.
Is this support in any way or what are best practices around such a setup?
Ideally, we would still be able to execute the tests from within Xcode.
We've encountered a critical issue with the new linker of CLT16 (version 16.1.0.0.1.1729049160) that prevents proper initialization of BLOCK DATA.
BLOCK DATA are used to initialize global variables in our Fortran code, and its failure to initialize those variables leads to a program crash. This affects our community of more that thousand scientists worldwide.
The current workaround is using the -ld_classic linker option. However, this option is deprecated and will be removed in a future release, as described in the Xcode release note.
I've attached a minimal example that reproduces the problem using GNU gfortran with the following instructions (the attached main.f.txt and bd.f.txt need to be rename to main.f and bd.f, respectively):
gfortran -c bd.f
gfortran -c main.f
ar rv libtest.a bd.o main.o
gfortran -ld_classic -o good.x -L. libtest.a
gfortran -o bad.x -L. libtest.a
Running the two programs, one can see that the BLOCK DATA are not initialised without the option ld_classic,
$ > ./good.x
3.7273802569289098 2.8083922366048202
$ > ./bad.x
0.0000000000000000 0.0000000000000000
We kindly request your attention to this matter and a prompt solution or alternative workaround.
Best regards
main.f.txt
bd.f.txt
part.txt
Hi, so i'm trying to use Activity.update but XCode throws an error if I don't use the ios 16 syntax, only to throw a warning that it's deprecated if I do. Screenshots below. Should I bug report or is there a known workaround?
Hi everyone,
I'm working on a macOS authorization plugin (NameAndPassword) to enable users to log into their system using only MFA, effectively making it passwordless. To achieve this, I'm attempting to store the user's password securely in the Keychain so it can be used when necessary without user input.
However, when I attempt to store the password, I encounter error code -25308. Below is the code I'm using to save the password to the Keychain:
objc code
(void)storePasswordInKeychain:(NSString *)password forAccount:(NSString *)accountName {
NSData *passwordData = [password dataUsingEncoding:NSUTF8StringEncoding];
NSDictionary *query = @{
(__bridge id)kSecClass: (__bridge id)kSecClassGenericPassword,
(__bridge id)kSecAttrService: @"com.miniOrange.nameandpassword",
(__bridge id)kSecAttrAccount: accountName,
(__bridge id)kSecValueData: passwordData,
(__bridge id)kSecAttrAccessible: (__bridge id)kSecAttrAccessibleAfterFirstUnlock
};
// Delete any existing password for the account
OSStatus deleteStatus = SecItemDelete((__bridge CFDictionaryRef)query);
if (deleteStatus == errSecSuccess || deleteStatus == errSecItemNotFound) {
[Logger debug:@"Old password entry deleted or not found."];
} else {
[Logger error:@"Failed to delete existing password: %d", (int)deleteStatus];
}
// Add the new password
OSStatus addStatus = SecItemAdd((__bridge CFDictionaryRef)query, NULL);
if (addStatus == errSecSuccess) {
[Logger debug:@"Password successfully saved to the Keychain."];
} else {
[Logger error:@"Failed to save password: %d", (int)addStatus];
}
}
Any insights or suggestions would be greatly appreciated!
Hi team,
We're using CocoaPods in our project and we noticed the compiler fails to build certain targets saying it's "Missing required module 'x'" when trying to build them in Swift 6:
We realized the modules the compiler is complaining about are pod dependencies required by the other target dependencies, and that this error will only appear when building with Swift 6 unless such dependencies are described on the Podfile as direct dependencies of the target, or we include them in the framework search paths. For example, the error in the image above will show if module 'X' import 'Y' and 'Y' imports 'CocoaLumberJack' and we don't specify a direct dependency between 'X' and 'CocoaLumberJack'.
Regardless of the fact that we can manually add the missing module location to the target search paths, we'd like to understand why we're facing this issue in the first place, what changed between Swift 5 and Swift 6 that's requiring us now to explicitly describe these dependencies. I'd appreciate if someone could tell us more about this. We're particularly interested on knowing if this is an intentional change and how to handle it properly.
Thanks
Hi the app crashes with message: **thunk for @escaping @callee_guaranteed (@guaranteed NSURLSessionTask) -> () + 48 (:0) ** and I am unable to understand what it means or why is it happening. Want to understand the reason for the message.
Thank you.
The app gets stuck after login on an iOS 18 device. It works in Xcode, but the simulator shows the following console error: IntegrationApp(769,0x1f0094c00) malloc: xzm: failed to initialize deferred reclamation buffer (46).
Hi,
I tried to make a new branch of my project and upon doing so, all of my old files disappeared. They are no longer in my folder directory or available in Xcode. Please let me know if there is any way to recover these files. I don't see the files in my trash either.
Xcode is adding un-wanted menu items to the Edit menu in a Mac Application. There is an automatically generated separator bar and an AutoFill menu item with two sub-menu items. Looking at the source code I see that two other items were suppressed in the initialize method of the AppController like this:
NSMutableDictionary *defaultValues = [NSMutableDictionary dictionary];
//Get rid of Special characters menu item in edit menu:
[defaultValues setObject: [NSNumber numberWithBool: YES] forKey: @"NSDisabledCharacterPaletteMenuItem"];
//Get rid of Start Dictation... menu item in edit menu:
[defaultValues setObject: [NSNumber numberWithBool: YES] forKey: @"NSDisabledDictationMenuItem"];
[[NSUserDefaults standardUserDefaults] registerDefaults: defaultValues];
I guessed that there would also be a key like this: @"NSDisabledAutoFillMenuItem" but adding this to the code does nothing so apparently not.
I searched programming forums and posters say that you can fix this by changing the name of the Edit menu to something like (space)Edit but this doesn't work.
I searcher the Developer documentation and the Archives extensively for info about these keys but of course found nothing. Control-clicking on these pops up a menu of ways to search for these but none of them find anything. Control, option and command clicking on these keys results in ”?”.
I can probably get a pointer to the menu and use NSMenu’s methods to delete these but something like the above would be better. Is there any documentation about this anywhere?
In WWDC23: Fix failures faster with Xcode test reports, the presenter showed off an Xcode feature called Automation Explorer, that allows playback of a screen recording corresponding to an XCUITest.
For the life of me, I have not been able to find out how to enable/use this feature in Xcode 16. I am using Test Plans and have set the UI Testing configuration settings for Automatic Screen Capture to On, and keep all and Preferred Capture Format to Video, but am not seeing any screen recordings being produced after running the tests. Am I doing something wrong?
Hello, I'm kinda new to Xcode and I was trying to get back to programming while I follow a course.
There seemed to be a problem with the preview and it looks like there was nothing wrong with the code, at least from what I know. I can say this because the code is the default one that Xcode gives you when you start a new project.
here is the error log.
== PREVIEW UPDATE ERROR:
SchemeBuildError: Failed to build the scheme “App”
linker command failed with exit code 1 (use -v to see invocation)
Link App.debug.dylib (arm64):
Undefined symbols for architecture arm64:
"_main", referenced from:
___debug_main_executable_dylib_entry_point in command-line-aliases-file
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
== PREVIEW UPDATE ERROR:
SchemeBuildError: Failed to build the scheme “App”
linker command failed with exit code 1 (use -v to see invocation)
Link App.debug.dylib (arm64):
Undefined symbols for architecture arm64:
"_main", referenced from:
___debug_main_executable_dylib_entry_point in command-line-aliases-file
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
After using backup to setup my new Mac Mini my xCode App projects run ok in the Simulator but fail to Archive or Analyze with the error: "The specified item could not be found in the keychain." The item is a provisioning profile.
I was able to Run, Archive and Validate these projects on my old Mac Mini just before the final backup. Are there known problems in backup of provisioning profiles or keychains?
I have tried creating new profiles etc without success for several days. I'm not an expert developer so I'm hoping there is a simple solution.
Please suggest the best way to resolve and/or clarify this problem.
Hi everyone,
I’m planning to develop a cross-platform PDF viewer app for iOS and macOS that will read PDFs from local storage and cloud services (Google Drive, iCloud, WorkDrive, etc.). The app should be read-only and display both the PDF content and its metadata (author, title, creation date, etc.).
Key Features:
View PDFs: Local and remote (cloud storage integration).
Display metadata: Title, author, page count, etc.
Cloud integration: Google Drive, iCloud, Zoho WorkDrive, etc.
Read-only mode: No editing features, just viewing.
Questions:
Xcode Template: Should I use the Document App or Generic App template for this?
PDF Metadata: Any built-in libraries for extracting PDF metadata in a read-only app?
Performance: Any advice or documentation on handling large PDFs or cloud fetching efficiently?
Thanks in advance for any advice or resources!
Hello,
I am experiencing a problem where I am unable to build my app using the command - npx eas build --platform ios --profile development, although I have Admin rights in my team in the AppStore Connect. I read that here - https://forums.developer.apple.com/forums/thread/737541 someone already experience the same issue and it was resolved after reporting on the forum, so that's what i decided to do as well. I am attaching few screenshots as well. Thanks!
I developed a watchOS app to capture gyro data, save it in real-time as a CSV file, and send it to an iOS app. However, when I start writing with the watch on, the screen dims, and it stops working. It only resumes operation when I tap the screen again.
Is there a way to let it run in the background and transmit files in real-time, even when the screen is off?
The problem is that when building the application with Debug mode on Xcode 16.1, the dSYM files fail to upload to Crashlytics.
It worked in latest Xcode 15 version.
The workaround is to disable Debug Dylib Support in the target's Build Settings. However, this causes SwiftUI previews to stop working.
Reproducing the issue
Set ENABLE_DEBUG_DYLIB=YES for build options
Build the application in Xcode 16.1
Firebase SDK Version
11.4.0
Xcode Version
16.1
Installation Method
Swift Package Manager
Firebase Version 11.5.0
Relevant Log Output
warning: (arm64) /Users/dustin/Library/Developer/Xcode/DerivedData/MyAppName-cicejndcecececfe/Build/Products/Debug-iphonesimulator/MyAppName.app/ MyAppName empty dSYM file detected, dSYM was created with an executable with no debug info.
The warning seems like is from XCode/lldb compiler rather than Crashlytics (https://lldb.llvm.org/cpp_reference/SymbolFileDWARF_8cpp_source.html line655).
This is probably something on Apple side, Crashlytics only consumes dSYM which is generated from Xcode. (ref:https://github.com/firebase/firebase-ios-sdk/issues/14054#issuecomment-2477235548)
This is related to:
Firebase Issue
I'm confused by documentation and information I found regarding compatibility between versions of Xcode and macOS.
The site https://developer.apple.com/support/xcode/ is listing "Minimum OS required".
To my understanding it means "this particular version of macOS and all later/newer versions".
Also release notes for Xcode are consistently stating "Xcode xx.x. requires a Mac running macOS yy.yy.y or later."
But I also found statements like " In general, new versions of macOS will not run old versions of Xcode." in this forum, see https://forums.developer.apple.com/forums/thread/760737, which is the opposite to "requires macOS version X or later".
I'm also experiencing issues when trying to run Xcode 12.4 on macOS 14.5 (Sonoma), means XCode is not running.
It would be great if some of Apple Engineers here would shed some light on it :-)
Many thanks in advance!
Cheers,
Elena
Hi,
I need to pass the launch arguments through xcodebuild command. Is there a way to do it?
I know we can edit scheme and add launch argument but it needs to be added to through command line.
P.S: I'm using azure devops @Xcode5 to build and sign the .ipa
xcodebuild -sdk iphoneos -configuration Debug -workspace my.xcworkspace -scheme myScheme clean CODE_SIGNING_ALLOWED=NO -launchArgument "MyLaunchArguments"
dyld[1472]: Symbol not found: __ZN5swift34swift50override_conformsToProtocolEPKNS_14TargetMetadataINS_9InProcessEEEPKNS_24TargetProtocolDescriptorIS1_EEPFPKNS_18TargetWitnessTableIS1_EES4_S8_E
Referenced from: <821B1759-9915-33D1-B140-D718775DFA97> /private/var/containers/Bundle/Application/EE9AE8CE-9635-4A97-AFC2-F577B888FA5A/FoxyApp.app/Frameworks/PayUUPICoreKit.framework/PayUUPICoreKit
Expected in: <7D840427-6CBD-37E8-8C87-3445FFF34AE7> /private/var/containers/Bundle/Application/EE9AE8CE-9635-4A97-AFC2-F577B888FA5A/FoxyApp.app/Frameworks/Starscream.framework/Starscream
app is installed on mobile but it crashes when i try to open it