Hi everyone,
I recently developed a Chess engine in C using Xcode on my old Mac. After purchasing a new Mac, I attempted to run my project but encountered the following error:
dyld[12498]: dyld cache '(null)' not loaded: syscall to map cache into shared region failed dyld[12498]: Library not loaded: /usr/lib/libSystem.B.dylib Referenced from: <7D3E4140-BCEC-3C04-8C77-11EB7AEEB393> /Users/simonmizrahi/Library/Developer/Xcode/DerivedData/Chesspresso_Take_2-awdtkeshpaucukgespypcbgxgsvy/Build/Products/Debug/Chesspresso Take 2 Reason: tried: '/Users/simonmizrahi/Library/Developer/Xcode/DerivedData/Chesspresso_Take_2-awdtkeshpaucukgespypcbgxgsvy/Build/Products/Debug/libSystem.B.dylib' (no such file), '/usr/lib/system/introspection/libSystem.B.dylib' (no such file, no dyld cache), '/usr/lib/libSystem.B.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/libSystem.B.dylib' (no such file), '/usr/lib/libSystem.B.dylib' (no such file, no dyld cache)'
I’ve reinstalled macOS and Xcode, but the issue persists. I’ve verified that libSystem.B.dylib is missing from /usr/lib/. I am quite anxious to find a solution, as I’ve read similar posts but do not understand how to fix the problem in my specific case.
Could anyone provide guidance on how to resolve this and get my project running on my new Mac?
Thanks in advance for your help!
Xcode
RSS for tagBuild, test, and submit your app using Xcode, Apple's integrated development environment.
Post
Replies
Boosts
Views
Activity
I'm writing a simple Command line application on macOS with code using C++, using a API called 'std::to_chars' from charconv
void foo(void)
{
if (__builtin_available(macOS 10.15, *))
{
char buffer[10];
std::to_chars_result tcr = std::to_chars( buffer, buffer+5, 5 );
#pragma unused (tcr)
}else{
return;
}
}
Since Xcode complains main.cpp:19:41: error build: 'to_chars<int, 0>' is unavailable: introduced in macOS 10.15
I wrapped the code with an availability check API in C++, __builtin_available(macOS 10.15, *))
But even with this availability check API, Xcode still failed to compile.
Anyone knows why?
I can't believe this. I am not able to remove the following garbage items:
Right clicking does not provide any menu items to remove the garbage items.
Hello,
I have a memory leak problem with Color and CGColor.
I have a project in which I need to be able to change the colors of different elements with colorPicker and while monitoring with instrument I realized that I had memory leak.
To understand, I've done much smaller test projects, and each time there are memory leaks.
And finally I tried something very basic, the code below, and it also produces memory leaks as soon as you change the color more than 2 times.
I'm running xcode 15.4, sonoma 14.5, and mac book pro 13, m1, 2020.
Is there a known bug with colorPicker and type Color?
The very simple code should not produce a memory leak:
File one :
`import SwiftUI
struct MainViewSimple: View {
@State var couleurTexte:Color = .blue
var body: some View {
Text("Hello, World!")
.foregroundStyle(couleurTexte)
SelectColor(couleurTexte: $couleurTexte)
}
}
#Preview {
MainViewSimple()
}`
File two :
`import SwiftUI
struct SelectColor: View {
@Binding var couleurTexte:Color
var body: some View {
ColorPicker("couleur du texte", selection: $couleurTexte)
}
}
#Preview {
SelectColor(couleurTexte: .constant(.blue))
}`
After trying Xcode 16.0, we encountered an issue with dependency management with SPM. Specifically, we are unable to remove libraries or frameworks through Xcode because it causes Xcode to crash. I'm not sure what is causing this issue because I tried removing them in version 15.6, and it worked fine.
after click -, Xcode will crash.
Hello, Developer team! Does anyone have an idea about the problem I'm facing with the simulator ? I'm learning how to code in SwiftUI and my simulator was working just fine but yesterday I close my laptop the other day and open today and see the code :
import SwiftUI
import SwiftData
@main
struct first_projectApp: App {
var sharedModelContainer: ModelContainer = {
let schema = Schema([
Item.self,
])
let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false)
do {
return try ModelContainer(for: schema, configurations: [modelConfiguration])
} catch {
fatalError("Could not create ModelContainer: \(error)")
}
}()
var body: some Scene {
WindowGroup {
ContentView()
}
.modelContainer(sharedModelContainer)
}
}
I don't know where it comes from . I used IOS 17.5 I try to upgrade to IOS 18 but that didn't fix the problem. Currently I'm seeing 3 errors :
Showing Recent Errors Only
Build target first project of project first project with configuration Debug
Ld /Users/amedekatamatode/Library/Developer/Xcode/DerivedData/first_project-ebsglpjmgwtgzpflkvloohzydjuf/Build/Products/Debug-iphonesimulator/first\ project.app/first\ project.debug.dylib normal (in target 'first project' from project 'first project')
cd /Users/amedekatamatode/Desktop/calculator/first\ project
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Xlinker -reproducible -target arm64-apple-ios17.5-simulator -dynamiclib -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk -O0 -L/Users/amedekatamatode/Library/Developer/Xcode/DerivedData/first_project-ebsglpjmgwtgzpflkvloohzydjuf/Build/Intermediates.noindex/EagerLinkingTBDs/Debug-iphonesimulator -L/Users/amedekatamatode/Library/Developer/Xcode/DerivedData/first_project-ebsglpjmgwtgzpflkvloohzydjuf/Build/Products/Debug-iphonesimulator -F/Users/amedekatamatode/Library/Developer/Xcode/DerivedData/first_project-ebsglpjmgwtgzpflkvloohzydjuf/Build/Intermediates.noindex/EagerLinkingTBDs/Debug-iphonesimulator -F/Users/amedekatamatode/Library/Developer/Xcode/DerivedData/first_project-ebsglpjmgwtgzpflkvloohzydjuf/Build/Products/Debug-iphonesimulator -filelist /Users/amedekatamatode/Library/Developer/Xcode/DerivedData/first_project-ebsglpjmgwtgzpflkvloohzydjuf/Build/Intermediates.noindex/first\ project.build/Debug-iphonesimulator/first\ project.build/Objects-normal/arm64/first\ project.LinkFileList -install_name @rpath/first\ project.debug.dylib -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/amedekatamatode/Library/Developer/Xcode/DerivedData/first_project-ebsglpjmgwtgzpflkvloohzydjuf/Build/Intermediates.noindex/first\ project.build/Debug-iphonesimulator/first\ project.build/Objects-normal/arm64/first\ project_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -debug_variant -fobjc-link-runtime -fprofile-instr-generate -L/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/amedekatamatode/Library/Developer/Xcode/DerivedData/first_project-ebsglpjmgwtgzpflkvloohzydjuf/Build/Intermediates.noindex/first\ project.build/Debug-iphonesimulator/first\ project.build/Objects-normal/arm64/first_project.swiftmodule -Xlinker -alias -Xlinker _main -Xlinker ___debug_main_executable_dylib_entry_point -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/amedekatamatode/Library/Developer/Xcode/DerivedData/first_project-ebsglpjmgwtgzpflkvloohzydjuf/Build/Intermediates.noindex/first\ project.build/Debug-iphonesimulator/first\ project.build/Objects-normal/arm64/first\ project_dependency_info.dat -o /Users/amedekatamatode/Library/Developer/Xcode/DerivedData/first_project-ebsglpjmgwtgzpflkvloohzydjuf/Build/Products/Debug-iphonesimulator/first\ project.app/first\ project.debug.dylib
ld: warning: Could not parse or use implicit file '/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/SwiftUICore.framework/SwiftUICore.tbd': cannot link directly with 'SwiftUICore' because product being built is not an allowed client of it
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)
Undefined symbol: _main
Linker command failed with exit code 1 (use -v to see invocation)
I hope someone helps me how to figure it out. Thank you!
Hi guys,
Background:
I'm new to xCode and I've been following tutorials to help get me started. I'm running xCode 15.4 on Sonoma 14.5 and I've installed iOS 17.5.
I currently own an iPhone 12 Pro Max also with iOS 17.5.
Issue:
I can't see the iPhone 12 Pro Max as an option in Devices. I've added the iPhone 12 Pro Max to devices by going to Window -> Devices and Simulators -> Simulators and also restarted xCode. Making a new schema for the project did resolve the issue either.
Please see below the simulator list that I have added to xCode.
Any help would be greatly appreciated.
I'm using beta 2 of Xcode 16 on an M1 MacBook with 32 GB of memory, running macOS 15 beta 2. It didn't appear that predictive code completion was working as exhibited in the developer videos, so I tried to figure out what's going on. The Xcode documentation mentions that you can disable predictive code completion in Settings, so I checked there. The checkbox to turn it on is disabled. When I click the "I" button to its right, it tells me that "Predictive code completion is not supported in this region." I am in the US with my system set to US English. What do I have to do to be able to experience this feature?
Hi, my Xcode is crashing immediately after clicking on 'Distribute' (after selecting 'Distribution Method', and regardless of the method I choose).
I've tried:
Updated Xcode
Cleared Derived Data
Updated macOS
Created new signing certificates
After all changes I created new archives but had the same result on distribute.
I recently cleaned up my mac, so I suspect I might've deleted something important. My touch bar also recently broke. Other than that, I can't think of any other variables since my last successful distribution attempt.
Please help, I've never experienced any issues like this.
I've attached snippets from the report as a text file, but the full report was too large:
xcode_crash_report.txt
when building my project with Xcode16 Beta, I came across several compile errors in c++ code, which used to be ok when building with Xcode15. It's not easy to fix them because some of them came from third part libraries. Is there a way to configure Xcode to build c++ code conforming to the Xcode 15 manner? (I know I can get back to Xcode15 temporarily, but I worry these issue can not be fixed even in the official release version)
If one would like to perform network debugging that involves toggling wireless on and off while still remaining connected to the debugger, how can one disable wireless connections of their devices to Xcode?
Xcode simulator does not show on my MacBook pro M1. I go to Applications, Xcode, right click, contents, Developer, Applications, and then double click on Simulator.
It opens the app, it appears in the dock as open, but it does not show the phone I want to.
I don't know when/why my assistant editor opened on bottom. I don't have any idea how to get it back to its original position (on right side). It's annoying.
I'm getting a runtime assertion failure like this:
"<FFRender3DView 0x616000271580> has reached dealloc but still has a super view. Super views strongly reference their children, so this is being over-released, or has been over-released in the past."
Looking at the code, I can't see any strong reference to the view except by its superview, so I can't see how it could be released other than by removal from its superview. My first instinct was to override release and set a breakpoint there, but that's not possible in ARC code.
whenever i run xcode i'm facing this error please help-
Translated Report (Full Report Below)
Process: Xcode [1652]
Path: /Users/USER/Desktop/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 10.1 (14460.46)
Build Info: IDEFrameworks_Fall2018-14460046000000000~5 (10B61)
Code Type: X86-64 (Native)
Parent Process: zsh [1646]
Responsible: Terminal [1644]
User ID: 501
Date/Time: 2024-07-04 16:40:54.0061 +0530
OS Version: macOS 12.7.5 (21H1222)
Report Version: 12
Anonymous UUID: 43ECF59E-B6E9-40C9-FB05-BD0BC3DEECF1
Sleep/Wake UUID: DCFAF1AC-F53C-4271-8CF0-B11CAB4CAAB8
Time Awake Since Boot: 6000 seconds
Time Since Wake: 157858150 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00007ff81d3bf8f1
Exception Codes: 0x0000000000000002, 0x00007ff81d3bf8f1
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SIGNAL, Code 10 Bus error: 10
Terminating Process: exc handler [1652]
VM Region Info: 0x7ff81d3bf8f1 is in 0x7ff81d200000-0x7ff81d400000; bytes after start: 1833201 bytes before end: 263950
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
__TEXT 7ff81c833000-7ff81d200000 [ 9.8M] r-x/r-x SM=COW ...ions/C/AppKit
---> __TEXT 7ff81d200000-7ff81d400000 [ 2048K] r-x/rwx SM=COW ...ions/C/AppKit
__TEXT 7ff81d400000-7ff81d6c3000 [ 2828K] r-x/r-x SM=COW ...ions/C/AppKit
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libMainThreadChecker.dylib 0x1069aa069 swizzleImplementationFast + 115
1 libMainThreadChecker.dylib 0x1069a9ef0 addSwizzler + 165
2 libMainThreadChecker.dylib 0x1069a9ae6 __library_initializer + 2939
3 dyld 0x105d79e4f invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 182
4 dyld 0x105d66db3 dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 129
5 dyld 0x105da0556 dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 292
6 dyld 0x105d79d82 dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 144
7 dyld 0x105d79f0e dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 178
8 dyld 0x105d79fb2 dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 108
9 dyld 0x105d88e00 dyld4::APIs::dlopen_from(char const*, int, void*) + 592
10 IDEFoundation 0x10460101e _IDEInitializeMainThreadChecker + 400
11 IDEFoundation 0x104601a59 IDEInitialize + 1021
12 IDEKit 0x107077e96 -[IDEApplicationController applicationWillFinishLaunching:] + 623
13 CoreFoundation 0x7ff819e2a66c CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 12
14 CoreFoundation 0x7ff819ec7a62 ___CFXRegistrationPost_block_invoke + 49
15 CoreFoundation 0x7ff819ec79e0 _CFXRegistrationPost + 496
16 CoreFoundation 0x7ff819dfc2d8 _CFXNotificationPost + 735
17 Foundation 0x7ff81ac3b59e -[NSNotificationCenter postNotificationName:object:userInfo:] + 82
18 DVTFoundation 0x1029a9c1d -[NSNotificationCenter(DVTNSNotificationCenterAdditions) _dvt_postNotificationName:object:userInfo:] + 361
19 AppKit 0x7ff81c862abe -[NSApplication finishLaunching] + 327
20 DVTKit 0x103062326 -[DVTApplication finishLaunching] + 294
21 AppKit 0x7ff81c8626c8 -[NSApplication run] + 250
22 AppKit 0x7ff81c83679a NSApplicationMain + 817
23 Xcode 0x101df682e main + 574
24 dyld 0x105d6a52e start + 462
Thread 1:
0 libsystem_pthread.dylib 0x7ff819d69f48 start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x7ff819d69f48 start_wqthread + 0
Thread 3:
0 libsystem_pthread.dylib 0x7ff819d69f48 start_wqthread + 0
Thread 4:
0 libsystem_pthread.dylib 0x7ff819d69f48 start_wqthread + 0
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000100 rbx: 0x00007ff8341cb260 rcx: 0x00007ff837627608 rdx: 0x00007ff837427608
rdi: 0x00000001069aaefe rsi: 0x0000000000000100 rbp: 0x00007ff7be107870 rsp: 0x00007ff7be107850
r8: 0x0000000000000000 r9: 0x0000000000000830 r10: 0xb656bf33267d4fd1 r11: 0x61c886a9f021f049
r12: 0x0000000106980838 r13: 0x00007ff81d3bf8e1 r14: 0x0000000106980838 r15: 0x00007ff81d3bf8e1
rip: 0x00000001069aa069 rfl: 0x0000000000010202 cr2: 0x00007ff81d3bf8f1
Hi,
I am creating an app that would be able to share information between iPhone, iPad, etc.
I created a new target and went to the Target Membership area and noticed the attachment instead of the list of files that the app can share between the current target and a new one. Is there another way to do it?
Thanks,
Dan Uff
I'm currently using Expo for a React Native project, and I am integrating Apple Pay, so I needed to use Xcode for the setup. Whenever I open Xcode and try to open my project, I get:
My Mac OS is up-to-date. I'm using Xcode version 15.3 because 15.4 from the Mac App Store won't install properly. I've used Xcode before to open projects, and for some reason it's not working. I can open individual files in my project folder but whenever I try to open a directory it gives me the error. I've been using VS code for everything so far so the permissions for the file should be all good. I've also pulled from the repo and created a new folder and still the same thing happens.
Wondering if there are any requirements that I don't know about for the development environment or something.
I have a multi-platform app with the SwiftUI code a separate Swift Package. Any Views with SwiftUI Previews break the compilation of the app. Here's the error message I get in Xcode:
Showing All Messages
ld: warning: Could not parse or use implicit file '/Applications/Xcode-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/SwiftUICore.framework/SwiftUICore.tbd': cannot link directly with 'SwiftUICore' because product being built is not an allowed client of it
Undefined symbols for architecture arm64_32:
"(extension in SwiftUI):DeveloperToolsSupport.Preview.init(_: Swift.String?, traits: DeveloperToolsSupport.PreviewTrait<DeveloperToolsSupport.Preview.ViewTraits>..., body: @Swift.MainActor @Sendable () -> SwiftUI.View) -> DeveloperToolsSupport.Preview", referenced from:
static BitnessViews.$s12BitnessViews33_ABDBADF565C741E50A2A5746CE94FCD9Ll7PreviewfMf_15PreviewRegistryfMu_.makePreview() throws -> DeveloperToolsSupport.Preview in BitnessViews.o
ld: symbol(s) not found for architecture arm64_32
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Could not parse or use implicit file '/Applications/Xcode-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/SwiftUICore.framework/SwiftUICore.tbd': cannot link directly with 'SwiftUICore' because product being built is not an allowed client of it
Undefined symbol: (extension in SwiftUI):DeveloperToolsSupport.Preview.init(_: Swift.String?, traits: DeveloperToolsSupport.PreviewTrait<DeveloperToolsSupport.Preview.ViewTraits>..., body: @Swift.MainActor @Sendable () -> SwiftUI.View) -> DeveloperToolsSupport.Preview
Linker command failed with exit code 1 (use -v to see invocation)
Any thoughts as to what might be going on here?
I am unable to add my app for review. I am using Xcode 16 beta 2. I tried downloading Xcode 15.4 and submitting a build using it but got a similar error after submitting for build The status of your app has changed to Invalid Binary.
The "Last Day" filter in the crashes section of the Xcode Organizer, never has any crashes in it. If we use the "Last Two Weeks" filter, then you can clearly see that we do have crashes every day. They even show crashes for yesterday in the little graph in the "statistics" window.
So why dont they show up in the last day filter? Is there some hidden setting we don't have enabled?
This also seems related to the fact that the number of crashes from "yesterday" is always incomplete. i.e. waiting another day makes the number go up, implying not all crashes were included in the original number.
This means we have to wait two days to get the data from one day ago. Why?