GCC's shared library constructor technique has ceased working with the tool chain provided with XCode 16.4 and XCode 26. This is the GCC attribute:
__attribute__((constructor))
Example use:
void aConstructor(void) __attribute__((constructor));
void aConstructor(void)
{
printf("Called aConstructor\n");
}
In our case aConstructor() was not called.
Xcode
RSS for tagBuild, test, and submit your app using Xcode, Apple's integrated development environment.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
Hi everyone,
I am trying to generate an .ipa file for my .NET MAUI (net9.0-ios) application, but every attempt fails with the same codesigning error. I have tried multiple approaches, including building from Windows paired to macOS, and directly building through the macOS terminal, but nothing is working.
Below are the exact steps I followed:
Steps I Performed
Generated the Apple Development certificate using Keychain Access on macOS.
Added that certificate into my developer account and created the corresponding provisioning profile.
Created an App ID, attached the App ID to the provisioning profile, and downloaded it.
Added the provisioning profile into Xcode.
Verified that the certificate is correctly visible in Keychain Access (private key available).
Attempted to build/publish the MAUI app to generate the .ipa file.
Issue
Whenever I run the publish command or build via Windows/macOS, codesigning fails with the following error:
/usr/bin/codesign exited with code 1:
Frameworks/libSkiaSharp.framework: replacing existing signature
Warning: unable to build chain to self-signed root for signer "Apple Development: Created via API (8388XAA3RT)"
Frameworks/libSkiaSharp.framework: errSecInternalComponent
Failed to codesign 'PCS_EmpApp.app/Frameworks/libSkiaSharp.framework':
Warning: unable to build chain to self-signed root for signer "Apple Development: Created via API (8388XAA3RT)"
PCS_EmpApp.app: errSecInternalComponent
Build eventually fails with:
Build failed with 4 error(s) and 509 warning(s)
Environment
.NET: 9.0
MAUI: latest tools
Xcode: 26.0.1
macOS: 26.0.1
Building for ios-arm64 (device)
What I suspect
It looks like the signer certificate might not be trusted, or the certificate chain cannot connect to an Apple root CA. But the certificate was created using the Developer website and appears valid.
Need Help With
Why is codesign unable to build the certificate chain?
Do I need a different type of certificate? (App Store / Distribution vs Development?)
Is there any special configuration required for MAUI apps using native frameworks like libSkiaSharp.framework?
How can I successfully generate the .ipa file?
Any guidance will be greatly appreciated. Thank you!
Once in a while I get from Xcode a reminder to test Coding Intelligence. I am today not interested in Coding Intelligence and it's unlikely that I will be in the future. Therefore, I would like to get rid of these for me useless reminders to activate Coding Intelligence.
I have not found anywhere anything for doing so. Or do I get rid of the reminders when activating it and deactivating it immediately again (if this is possible)?
Topic:
Developer Tools & Services
SubTopic:
Xcode
Using Xcode 26.1.1 on macOS 26.1 Tahoe, I noticed the ability to add a new value seems hidden or disabled. I'm unable to scrolling horizontally to view the rest of the values in each row and notice an overlap between the target properties and document types section.
The Test target not build for not such file or directory: 'CoreGraphics'.
Not sure why I get this error, but I configured the target without forgetting the variables BUNDLE_LOADER with $(BUILT_PRODUCTS_DIR)/MyExistingApp.app/MyExistingApp value and TEST_HOST with $(BUNDLE_LOADER) value.
App target (not the test target), the Symbols Hidden by Default build setting its equal to NO, unlike the Test target that is set to YES.
Any variable more for this? I'm not sure if I should take anything into account when using Xcode 26.1.1 and Swift Testing framework.
Hi everyone,
I’m experiencing a persistent issue when trying to download the iOS Simulator Runtime 26.1 on Xcode (version 26.1). The download always fails with the following error
Download failed due to a bad URL. (Catalog download for com.apple.MobileAsset.iOSSimulatorRuntime)
Domain: com.apple.MobileAssetError.Download
Code: 49
I’m located in Brazil, so I initially thought it might be region-related, but I’ve already tried several attempts to fix it, including:
Using VPNs for the US and Europe
Installing the Xcode 26.2 beta
Downgrading Xcode to earlier versions
Reinstalling the same version of Xcode
Restarting Xcode and my Mac
Switching networks
Clearing simulator support/device files
Unfortunately, nothing has resolved the issue.
Is anyone else facing this problem?
Does anyone know a workaround or a manual way to download/install the iOS 26.1 simulator runtime?
Thanks in advance!
I am fixing bugs / extending a macOS app written by somebody else in Swift. I’ve made changes to it and debugging it, so breakpoints/rebuilding/debug print/change/rerun it isn’t a problem.
But it is a multi-threaded, async app, and when I pause the running app, it will not display source code location in each thread where it is. I only get assembly. [and, yes, "Always Show Assembly" in OFF]
It is inherent to async apps and threading that they spend most of their time waiting for the user to do something. Hence if you stop an app, you’ll almost always be in system code somewhere. But I think wanting to see the origin of completions that are pending is a legitimate question for somebody debugging (and trying to understand how the app works).
Am I not aware some feature in Xcode / LLDB to reveal this?
When using a Swift Build Plugin, the generated code definitions are available through autocomplete, but it is currently not possible to view them directly in Xcode using Option+click.
An example of such a plugin is swift-openapi-generator.
According to information from "Meet Swift Package plugins" from WWDC22
the generated code is stored with other build artifacts.
It would be immensely helpful if there was support for viewing these intermediate files in read-only mode using Option+click. Currently, I have to resort to opening these files through Finder, or opening the project in VS Code where viewing the generated files using Cmd+click works without a problem.
Am I missing something? If not, it seems like a big oversight that this is not supported to the same extent in Apple's own tools.
Hi folks,
I'm using Xcode 26.1.1 (17B100), but I don't see the ChatGPT plugin option when following the setup instructions below. Any ideas why this might be missing?
https://developer.apple.com/documentation/xcode/setting-up-coding-intelligence
Topic:
Developer Tools & Services
SubTopic:
Xcode
Hello
I'm wrapping my head around on how to properly set up xcode project to produce a static library ending up in file locations /usr/local/lib/libXXX.a and /usr/local/include/XXX/xxx.h
so it can be used Unix style in other projects.
If I put under Deployment
Deployment Location: YES
Installation Build Products Location: /
Installation Directory: /usr/local/lib
Skip Install: NO
I get errors like
warning: Stale file '/usr/local/usr/local/include/xxx.h' is located outside of the allowed root paths.
and things like
error: Cycle inside a single target; building could produce unreliable results.
Installation Build Products Location: /usr/local/lib
Installation Directory: /
I get
warning: Stale file '/usr/local/include/xxx.h' is located outside of the allowed root paths.
but the library file is not put into /usr/local/lib
(note /usr/local/lib and /usr/local/include are owned by my user and writeable)
I could write an old style Makefile and have xcode call the makefile but there must be an easier way to do this.
This is for a cross platform development so having it packaged into a Framework would not solve it neither.
Topic:
Developer Tools & Services
SubTopic:
Xcode
I’m building a React Native 0.72.10 iOS app and hitting build errors.
Environment:
macOS: Apple M4, Sequoia 15.7.2
Xcode: 26.1.1
React Native: 0.72.10
Errors:
Could not delete /Users/.../ios/build because it was not created by the build system
Unable to write file '/Users/.../ios/build/Pods.build/Debug-iphonesimulator/...': Operation not permitted
(Multiple Pods / React Native framework headers affected)
What I’ve tried:
bash
rm -rf ios/build
rm -rf ~/Library/Developer/Xcode/DerivedData
xattr -w com.apple.xcode.CreatedByBuildSystem true ios/build
pod deintegrate && pod install
sudo chown -R $(whoami) ios/build
Observations:
ios/build is recreated automatically.
Some files have com.apple.xcode.CreatedByBuildSystem: true.
3.Xcode have Full disk access authorisation.
Why does Xcode fail to delete / write to ios/build even though it’s recreated automatically by the build system?
Is this caused by Xcode itself, macOS permissions?
Any recommended fix or workaround for these “Operation not permitted” errors?
I've made my updated icon and I try to import it to Xcode but it keeps crashing even if I clean the project/delete derived data or try to add through the Naivgation Controls.
I've tried with the Xcode 26.2 beta too but it has the same issue.
I just wanted to say thank you to the team that added coding assistance (Chat-GPT) to Xcode. I'm just learning SwiftUI and I love how it made suggestions to improve my app and shows me what it does and explains why it does what it does.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Is there a way to check or be notified for new Xcode beta versions?
The only way I know is to manually keep checking the available betas web page to see if anything new is available (while also manually comparing it to the installed version).
Or am I missing something?
Y'all, can we please get some way of increasing the font size in the Intelligence side pane? That tiny 10pt font (I'm guessing? Could be 8? I dunno) is KILLING my eyes. I don't want to increase the font size of EVERYTHING on my mac, just to increase the size of this one window that I need to read very closely.
LLVM Linker Crash on ARM64 with bfloat16 Symbols (Xcode 17.0.0)
We're encountering a critical linker crash in Xcode 17.0.0 (clang-1700.4.4.1) on macOS 15.1.0 (Darwin 25.1.0) with Apple Silicon M3 Max when linking a pybind11 C++ extension against the MLX framework (v0.30.1). The linker consistently crashes with LLVM ERROR: No way to correctly truncate anything but float to bfloat during the linking phase, even though our code uses only integer types (int64, uint32) for BPE tokenization and never directly references bfloat16 types.
Error Details:
[100%] Linking CXX shared module _metal_trainer.cpython-312-darwin.so
LLVM ERROR: No way to correctly truncate anything but float to bfloat
clang++: error: unable to execute command: Abort trap: 6
clang++: error: linker command failed due to signal (use -v to see invocation)
Reproduction:
Install MLX framework: pip install mlx (any version with bfloat16 support)
Create a minimal pybind11 extension that links against MLX:
Compiler: AppleClang 17.0.0.17000404
Target: arm64-apple-darwin25.1.0
Flags: -std=c++17 -O2 -march=native
Link against: libmlx.dylib (contains bfloat16 symbols)
Run: cmake .. && make
Linker crashes during final linking phase
Root Cause: The LLVM ARM64 backend in Xcode 17.0.0 has a code generation bug when processing bfloat16 truncation operations during link-time. The crash occurs when the linker processes bfloat16 symbols from libmlx.dylib, regardless of whether the application code uses them. The error originates from LLVM's type legalization pass attempting to truncate bfloat16 values, but the ARM64 backend lacks a valid code path for this operation.
Workarounds Attempted (all failed):
Disabling LTO: INTERPROCEDURAL_OPTIMIZATION FALSE
Linker flags: -Wl,-no_compact_unwind, -fno-lto
Runtime symbol resolution: -undefined dynamic_lookup
Compiler optimizations: Changed from -O3 to -O2
Impact: This blocks any C++ extension development that links against libraries containing bfloat16 symbols on Xcode 17.0.0. The issue does not occur on Xcode 16.x.
Linker Crash Dump Location: /var/folders/gn/7_g6wy1j66b8z3lkywyrbsx00000gn/T/linker-crash-*
Expected Behavior: Linker should successfully link the extension, or at minimum, gracefully handle bfloat16 symbols without crashing.
Temporary Solution: Downgrade to Xcode 16.x or use Python-only implementations until this is fixed in a future Xcode release.
Hello ,
after last update in Xcode, now the Apple Intelligence (Chat GPT) appears only what it was “changed” but don’t apply on code!
Any solution?
Topic:
Developer Tools & Services
SubTopic:
Xcode
I'm developing in Objective C with Xcode on a Mac exclusively to run on Mac and all of a sudden when I try to run I get the message:
"a build only device cannot be used to run this target". If I go to the destination folder, the newly built app is there and runs from Finder, I just can't get it to run from within Xcode, which is inconvenient for testing.
What setting am I missing or has changed? Up to now I could build and run with no problem.
Topic:
Developer Tools & Services
SubTopic:
Xcode
I have a small, simple iOS project that doesn't use a lot of memory or libraries or anything.
If I open my iOS project in XCode and run it on the iPhone 17 simulator, my memory consumption (as seen in Activity Monitor) goes into the yellow zone.
Granted, I have some other apps open (Safari, Mail, Messages, the usual stuff that people run) but nothing especially demanding. Without XCode and the Simulator running, my memory consumption is only around 25% on the Activity Monitor graph.
Is this expected behavior with Tahoe and iOS 26?
I was able to work on my project without running out of RAM on this same computer for the past 4 years no problem. Now it seems I have a problem.
in my xcode project, i created a new package by going through File > New > Package, just like they said in https://developer.apple.com/documentation/xcode/organizing-your-code-with-local-packages
I have a package, but the problem is, whenever I made any changes in the package's source code, it never showed in the main project. I can import the package just fine, but the package does not show anything. no added apis, functions, nothing.
Im using Xcode 26.0.1