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
We have a relatively big iOS-only project with around 80 build targets from swift packages (local features and external project dependencies) and Xcode 15.4 (originally, migrated to 16.0). Project compiles and runs great, but xcodebuild archive will fail 4 out of 5 tries with this:
ld: file cannot be open()ed, errno=2 path=/opt/builds/fLLyxmhG/0/myapp/Build/Intermediates.noindex/ArchiveIntermediates/myapp (Development Flow)/BuildProductsPath/Debug-iphonesimulator/Account.o in '/opt/builds/fLLyxmhG/0/myapp/Build/Intermediates.noindex/ArchiveIntermediates/myapp (Development Flow)/BuildProductsPath/Debug-iphonesimulator/Account.o'
Where Account.o is an end product of one of our feature packages linking to an .app itself.
This error is not tied to this concrete package/product (which should be compiling almost last relative to build graph) and could appear mid-build in between our service layer packages.
It seems (and is approved by Xcode timeline for .app archive log) that module dependency is compiled later than module itself and linker just cant find its dependency object files. The scheme is:
Module A (dependency itself)
Module B (needs module A)
And with build order expected (???) to be A (first) -> B we're getting the B -> A.
Error appears only when archiving for Debug configuration, archiving the same end-target with Release configuration results in stable passes 10 out of 10 tries. Setting identical parameters in Build Settings tab for both configurations of a target is not giving any effect.
Our current fix is choosing Manual order in scheme Build order setting. Everything works as expected, but i guess it's not optimal 🤧
Sadly can't provide test project, but anything else — welcome.
Syntax highlighting & code autocompletion is broken for Swift Packages wrapping an underlying binary target. Jump to defenition for module import shows the whole module interface and project builds & archives just fine, but any known workarounds to resurrect syntax assistant won't work without any errors/warnings.
Replacing the .binaryTarget() with plain .target() with source code in package dependency brings all assistant features back.
Steps to reproduce (project attached):
Create a local Swift Package
Add a dependency with binary target (for example — AppsFlyerFramework https://github.com/AppsFlyerSDK/AppsFlyerFramework)
Try to use dependency product with binary dependency
Attempted steps to fix:
Full DD clean
Full project clean
~15 min to index
Xcode 16.0 & Sonoma 14.6.1, problem persists with Xcode16.2 & Sequoia.
Radar #16035437
I am attempting to test my app from the command line using fastlane but am running into issues with the build due to xcodebuild not being able to find the specified simulator. I have been attempting to debug by running the xcodebuild command manually and here is what I have been able to gather:
Running xcodebuild -scheme MyAppName -destination "platform=iOS Simulator,OS=18.1,name=iPhone 16 Pro" errors with a message saying
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ platform:iOS Simulator, OS:18.1, name:iPhone 16 Pro }
If I run xcodebuild -scheme MyAppName -showdestinations, I can see
{ platform:iOS Simulator, id:7F3E4A35-E5DB-4EF4-AFAD-156EC463FEA8, OS:18.1, name:iPhone 16 Pro }
listed in the options. Specifying the destination using the id yields the same result.
However, if I run xcodebuild -scheme MyAppName -destination "platform=iOS Simulator,OS=18.1,name=iPhone 16 Pro" test (note the extra test at the end) the tests run successfully.
I have checked that my minimum deployment number is correct (iOS 16), ensured that my supported platforms is set to iOS, and followed every other suggestion I could find on this matter. What am I missing here?
I have an existing Xcode project that I am trying to add MusicKit to, but for some reason I am unable to. I have logged into my developer account, and ticked off the MusicKit checkbox under the Services tab of my app in the Certificates, Identifiers & Profiles section.
In Xcode I have Automatically manage signing set to true. But MusicKit does not show up as a Capability, neither in the list of capabilities in my app, nor when trying to add it with the +Capability button. I have done this successfully before with Game Center, so I really do not understand why this does not work with MusicKit.
Any ideas as to how this can be solved?
My macOS app includes a system extension that is activated once the app is ran. The system extension requires Full Disk Access.
When navigating to System Settings → Privacy & Security -> Full Disk Access, I can see my extension listed, but it has the default system "lego" icon, instead of my app's icon.
My app icon is working fine everywhere else. I tried to add an Asset Catalog to my extension on Xcode and include the icon, but it didn't do anything.
Is this the default behavior for extensions, or can you include an icon?
I'm having an issue with my swiftui macOS application where it is continually consuming more memory over time and after a couple of hours will grind to a halt. I've watched a few videos now on how to use Xcode Memory Graph and Instruments to identify the source of a leak (I assume it is a leak). These videos all provide very obvious issues as examples but mine seems more elusive and I don't know how to identify which part of my code is the cause of the issue.
After running instruments I see the following but the leaked objects are not always consistent:
Xcode Memory Graph shows NSSet as the culprit which is shown under CoreFoundation (not my App). I really am a beginner here and because it's not showing me somewhere in my app that I can go and investigate I'm really stuck.
I'm working on a project with several dozen targets and a Swift macro. Due to the purpose of the macro (generating Codable boilerplate), pretty much all targets depend on it. The project is generated with XcodeGen.
Since upgrading to 16.1 (I think), Xcode has basically turned into a glorified TextEdit for me: refactoring, symbol navigation and search don't work. Also, I'm getting a lot of ghost errors that keep popping up hours after I fix them, while at the same time new build errors never show up in the error navigator, so I have to check the build log to see why the build failed.
I noticed that project indexing is taking a very long time. As a troubleshooting step, I tried deleting DerivedData (which afaik includes the index) to see if this fixes the problem. Xcode started indexing the project from scratch, and if the progress indicator is to be trusted, After ~40 minutes it's only about 1/3 done. For every target Xcode seems to be spending a lot of time indexing SwiftOperators, SwiftDiagnostics, SwiftParser. I'm assuming these are related to the macro.
Does anyone else have this problem? Unfortunately, I can't confirm this is caused by the macro, removing it from the project and seeing if this fixes the issue seems infeasible.
In Xcode Version 16.1
Create a new Project, choose Multiplatform, App
For testing system, choose XCTest and UI Tests
In the project, open the newly generated template Unit test file
Click either of the diamonds in the left margin (either to run the example test or the entire file)
Expected Result: Code compiles and then Runs the test/tests
Actual Result: Code compiles, but then never completes testing (the top status bar is stuck saying "Testing..." forever.)
Am I missing something?
I saw in the Xcode 16 release notes that on-device debugging is no longer available on watchOS prior to version 7.0, but I can't even get a signed, compiled app to run on an older watch. The current version I have live in the App Store works just fine on 4.3.2. I have changed no code, I just started building the app with Xcode 16, and now it won't launch on older watches.
Is it no longer possible to update an app for older watches?
Attempting to write my first WatchOS App which builds correctly and refuses to run on my target physical watch. The code runs fine on the simulator.
IOS 18.2, Watch OS 11.2, XCode 16.1
When I run, the pop-up shows:
Connecting to Apple Watch (about 5 seconds)
Apple Watch may need to be unlocked to recover from previously reported preparation errors (less than a second)(needed to screen record to catch the error)
Waiting to reconnect to Apple Watch (lives here indefinitely)
Both the Watch and iPhone were unlocked during the build/run sequence.
The iPhone is in "Developer" Mode, but could not find the switch anywhere on the watch or watch app to enable dev mode.
Dear Experts,
I have an Xcode project that generates two iOS app targets. Most of the code is shared between the two targets. Let's call them "Project", "App1" and "App2".
I have some Swift code that is called from objC++. To make this work, in the objC++ files currently I #include "App1-Swift.h". Clearly this only works when building App1. What's the right way to set this up to work for both targets?
Looking at the build settings, currently the "Generated Header Name" is set to "$(SWIFT_MODULE_NAME)-Swift.h". Presumably, SWIFT_MODULE_NAME expands to the target name.
There are various possible ways to fix this, but which one is "right"? I bet that if I fix it in the wrong way, something else will go wrong later. I could:
Change the objC++ to #include different headers depending on the target being built.
Change the build setting to use the project name (from a variable?) instead of the SWIFT_MODULE_NAME.
Somehow cause SWIFT_MODULE_NAME to equal the project name, rather than the target name.
Any advice?
Thanks.
i don't know if the crash happened because of the system update or not but now when i try to open it its completely crash , here is the error , Translated Report (Full Report Below)
Process: Xcode [1067]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 16.1 (23503)
Build Info: IDEApplication-23503000000000000~2 (16B40)
App Item ID: 497799835
App External ID: 869932297
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
User ID: 501
Date/Time: 2024-11-30 11:10:55.9269 +0100
OS Version: macOS 15.2 (24C5089c)
Report Version: 12
Anonymous UUID: C79C335A-F74F-AE24-F4A0-C185D480C480
Time Awake Since Boot: 160 seconds
System Integrity Protection: enabled
Crashed Thread: 16
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process: Xcode [1067]
Application Specific Information:
abort() called
Application Specific Signatures:
__objc_no
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x1876def34 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x1876f15e4 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0x1876e7ad8 mach_msg_overwrite + 480
3 libsystem_kernel.dylib 0x1876df27c mach_msg + 24
4 CoreFoundation 0x187808a3c __CFRunLoopServiceMachPort + 160
5 CoreFoundation 0x18780729c __CFRunLoopRun + 1212
6 CoreFoundation 0x187806724 CFRunLoopRunSpecific + 588
7 HIToolbox 0x192d65530 RunCurrentEventLoopInMode + 292
8 HIToolbox 0x192d6b348 ReceiveNextEventCommon + 676
9 HIToolbox 0x192d6b508 _BlockUntilNextEventMatchingListInModeWithFilter + 76
10 AppKit 0x18b371034 _DPSNextEvent + 660
11 AppKit 0x18bcd52d4 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688
12 AppKit 0x18b364060 -[NSApplication run] + 480
13 IDEKit 0x10579c798 -[IDEApplication run] + 60
14 AppKit 0x18b33a854 NSApplicationMain + 888
15 dyld 0x1873a0274 start + 2840
Thread 1:: Dispatch queue: com.apple.dt.IDESourceControlTree.FileStatusQueue
0 libsystem_kernel.dylib 0x1876e0c8c __ulock_wait + 8
1 libdispatch.dylib 0x18756dfa4 _dlock_wait + 56
2 libdispatch.dylib 0x18756dca0 _dispatch_wait_on_address + 140
3 libdispatch.dylib 0x18756e374 _dispatch_group_wait_slow + 56
4 IDEFoundation 0x109fe90c8 -[IDESourceControlWorkingTreeUpdater _fileStatusQueue_fetchStatusForEntireWorkingCopyWithRemoteStatus:error:] + 384
5 IDEFoundation 0x109fe8ef8 __97-[IDESourceControlWorkingTreeUpdater fetchStatusForEntireWorkingCopyWithRemoteStatus:completion:]_block_invoke + 116
6 libdispatch.dylib 0x18756b854 _dispatch_call_block_and_release + 32
7 libdispatch.dylib 0x18756d5b4 _dispatch_client_callout + 20
8 libdispatch.dylib 0x187574bd8 _dispatch_lane_serial_drain + 768
9 libdispatch.dylib 0x187575730 _dispatch_lane_invoke + 380
10 libdispatch.dylib 0x1875809a0 _dispatch_root_queue_drain_deferred_wlh + 288
11 libdispatch.dylib 0x1875801ec _dispatch_workloop_worker_thread + 540
12 libsystem_pthread.dylib 0x18771c3d8 _pthread_wqthread + 288
13 libsystem_pthread.dylib 0x18771b0f0 start_wqthread + 8
Thread 2:
0 libsystem_pthread.dylib 0x18771b0e8 start_wqthread + 0
Thread 3:: Dispatch queue: SDK Loading
0 libswiftCore.dylib 0x1988ea27c swift_unknownObjectRelease + 36
1 libswiftCore.dylib 0x1986d0f58 String.init(cocoaString:) + 44
2 Foundation 0x188cdbc14 static String.unconditionallyBridgeFromObjectiveC(:) + 712
3 SymbolCacheSupport 0x1277466ec @objc Buffer.string() + 28
4 SourceModel 0x125974f40 -[SMSourceModel textOfItem:] + 56
5 SymbolCacheSupport 0x1277cdfdc SMSourceModel.splitIntoStatements(:splitOnNewLine:) + 748
6 SymbolCacheSupport 0x127707eb8 ObjCSourceModelExtractor.body(children:) + 484
7 SymbolCacheSupport 0x127878b2c ObjcToSwiftFileTranslator.init(fileInfo:symbolCache:isSystemModule:options:platformFilter:importErrorAsBridgedStoredNSError:) + 644
8 SymbolCacheSupport 0x1275ee49c ClangToSwiftModuleImporter.import(moduleData:importData:allAPINotes:directoryURL:relativeBasePath:) + 3056
9 SymbolCacheSupport 0x127761e10 ClangModuleImporter.import(dependencyRetriever:recursiveAPINotes:type:relativeBasePath:) + 3060
10 SymbolCacheSupport 0x127703020 ModuleImporter.importSystemModule(:) + 1468
11 SymbolCacheSupport 0x1277026e0 ModuleImporter.import(:) + 980
12 SymbolCacheSupport 0x127705684 ModuleImporter.importObjcDependencyImport(:) + 692
13 SymbolCacheSupport 0x12774894c specialized collectDependencies #1 (:) in SymbolCacheSDKStorage.indexedModule(type:dependencyRetriever:) + 512
14 SymbolCacheSupport 0x127747a38 specialized SymbolCacheSDKStorage.indexedModule(type:dependencyRetriever:) + 1156
15 SymbolCacheSupport 0x12770236c ModuleImporter.import(:) + 96
16 SymbolCacheSupport 0x127705684 ModuleImporter.importObjcDependencyImport(:) + 692
17 SymbolCacheSupport 0x12774894c specialized collectDependencies #1 (:) in SymbolCacheSDKStorage.indexedModule(type:dependencyRetriever:) + 512
18 SymbolCacheSupport 0x127747a38 specialized SymbolCacheSDKStorage.indexedModule(type:dependencyRetriever:) + 1156
19 SymbolCacheSupport 0x12770236c ModuleImporter.import(:) + 96
20 SymbolCacheSupport 0x127705684 ModuleImporter.importObjcDependencyImport(:) + 692
21 SymbolCacheSupport 0x12774894c specialized collectDependencies #1 (:) in
Hi,
I have recently noticed a very-very annoying thing in my CI pipeline, that I managed to reproduce locally.
Using macOS Sonoma 14.7.1 and Xcode 15.4, running a test target from Terminal, the first run produces this output:
$ xcodebuild test -workspace [redacted].xcworkspace -scheme [redacted] -quiet
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:[redacted], name:My Mac }
{ platform:macOS, arch:x86_64, id:[redacted], name:My Mac }
{ platform:macOS, name:Any Mac }
Testing started
Test suite '[redacted]' started on 'My Mac - [redacted] (75944)'
Test case '[redacted].[redacted]()' passed on 'My Mac - [redacted] (75944)' (0.001 seconds)
Test case '[redacted].[redacted]()' passed on 'My Mac - [redacted] (75944)' (0.001 seconds)
2024-11-29 19:31:02.311 xcodebuild[75908:47784216] [MT] IDETestOperationsObserverDebug: 1.380 elapsed -- Testing started completed.
2024-11-29 19:31:02.311 xcodebuild[75908:47784216] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2024-11-29 19:31:02.311 xcodebuild[75908:47784216] [MT] IDETestOperationsObserverDebug: 1.380 sec, +1.380 sec -- end
so the test actually completes, but the process does not end, because I get a popup that
“Terminal.app” would like to access data from other apps.
Removing the "App Sandbox" entitlement immediately alleviates this problem, but it would be very silly to do so because of unit tests.
This ultimately means that whenever we use a new device or include a new project or test target, this popup comes up. Very undesirable for CI servers (especially if the servers are ephemeral virtual machines created for the current job).
Is there a permanent solution that disables this popup for test runs?
I wanted to know if I could create an app that involves some AR scenes using ARKit. I have a Figma prototype and was thinking of making some AR scenes that involve object tracking on ARKit. I wanted to know if I would be able to incorporate these AR scenes into my app somehow. I want these experiences to be triggered by a button from my app design. Also would this be easy to do and involve lots of coding?
Thank you!!!
Hi Everyone,
I'm experiencing a lot of problems with AppStore Connect in the past three days. Official status page says all is well.
But when I tried to log in to the app store connect, it directly redirected to the Users and Access page. I can't go to the apps page (https://appstoreconnect.apple.com/apps)
I tried changing the size of the screen to very narrow, and then I found a hamburger menu in the upper left corner. Even in the hamburger menu, it is showing only Users and Access
I can't go to the apps page or anyother page. Anyone else have the same problems?
Thanks!
They said something like hold option or whatever but It didn't seems to work with me...
Dear Apple Team,
I hope this message finds you well. I have a query regarding the configuration of frameworks for submission to the App Store. Specifically, I would like to confirm if enabling the "Build for Distribution" setting is mandatory for frameworks that are part of an app being uploaded to the App Store.
I understand that this option ensures compatibility by embedding module stability, especially when the framework is distributed externally or used with different versions of Swift. However, I would like to know if this is a strict requirement even for private/internal frameworks included in an app's bundle.
Your guidance on this matter will be greatly appreciated.
Thank you for your support.
Best regards,
Pavan
I have inherited the maintenance of the app so I do not know much about the initial setup. Every time I try to build the app in Xcode, I get an error stating Multiple commands produce Info.plist. I fix this by removing Info.plist from Build Phases - Copy Bundle Resources. Then the build succeeds. However, every time I try to build again the Info.plist is back again in that list and the error occurs until I remove it again. Is there some setting I should adjust? Save is greyed out so how do I get Xcode to remember my change?
Hey all -
Been building my app and all has been going well with successful builds through to test flight.
However, I have just added CKSharing support into the app and therefore into the entitlements to allow collaboration within the app.
As soon as I have added this, I can no longer build due to a signing certificate error stating my provisioning profile just not allow for CKSharing...
"Provisioning profile "iOS Team Provisioning Profile: com.MyApp" doesn't include the com.apple.developer.cksharing entitlement."
However, iCloud is enabled within my app profile, and all other cloudkit features have worked up until adding that specific entitlement.
Any help or guidance to get passed this would be greatly appreciated.
Upgraded Xcode from 15.2 to 16.
App runs properly on iOS 18 Simulator for Xcode 16 but crashes on iOS 17.5, 17.4 & 17.2 immediately after build successfully.
dyld[60620]: Symbol not found: _$sSo18OS_dispatch_sourceC8DispatchE19MemoryPressureEventVs23CustomStringConvertibleACMc
Referenced from: <59369128-9EA5-3CF7-8CCF-7C754D9EE639> /Users/siddheshwarashokkathale/Library/Developer/CoreSimulator/Devices/E18F8D1F-764C-4491-B471-5BBB52A327EF/data/Containers/Bundle/Application/A257613C-3000-41F6-92EF-287E45D3A9D5/Arch.app/Arch.debug.dylib
Expected in: <5E0473C0-C3FF-3BFB-9712-1CFB1372EA49> /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswiftDispatch.dylib
Message from debugger: Terminated due to signal 6