In our app, we implement a document picker using FilePickerManager+available.m, selecting different APIs based on the iOS version:
if (@available(iOS 14.0, *)) {
NSMutableArray<UTType *> *contentTypes = [NSMutableArray array];
for (NSString *uti in documentTypes) {
UTType *type = [UTType typeWithIdentifier:uti];
if (type) {
[contentTypes addObject:type];
NSLog(@"iOS 14+ Adding type: %@", uti);
} else {
NSLog(@"Warning: Unable to create UTI: %@", uti);
}
}
UIDocumentPickerViewController *documentPicker =
[[UIDocumentPickerViewController alloc] initForOpeningContentTypes:contentTypes];
documentPicker.delegate = self;
documentPicker.allowsMultipleSelection = NO;
[self.presentingViewController presentViewController:documentPicker animated:YES completion:nil];
}
However, we've observed inconsistent symbol reference types to UTType in the final linked binaries:
One build results in a strong reference to UTType.
Another demo project (with seemingly identical code and build settings) results in a weak reference.
Both object files (.o) show undefined references to UTType symbols (e.g., UTTypeCreatePreferredIdentifierForTag), yet the final linked binaries differ in how these symbols are resolved.
Impact of the Issue
This inconsistency causes problems on iOS 14.0+ devices:
Strong reference version: Fails to launch on devices where the UniformTypeIdentifiers framework is not present (e.g., certain older iOS 14.x devices), due to link-time failure.
Weak reference version: Launches successfully but crashes at runtime when attempting to call UTType methods, because the implementation cannot be found.
Our Analysis
Using nm -u, both versions show an undefined symbol:
U _UTTypeCreatePreferredIdentifierForTag
However, in the final binaries:
One shows: T _UTTypeCreatePreferredIdentifierForTag (strong)
The other shows: W _UTTypeCreatePreferredIdentifierForTag (weak)
Both projects link against the framework identically in their build logs:
-framework UniformTypeIdentifiers
(no -weak_framework flag is used in either case).
Questions
Why do identical source code and linker flags result in different symbol reference strengths (T vs W) for the same framework?
Are there specific compiler or linker behaviors (e.g., deployment target, SDK version, module imports, or bitcode settings) that influence whether symbols from UniformTypeIdentifiers are treated as strong or weak?
What is the recommended best practice to ensure consistent symbol referencing when using newer APIs like UTType, especially when supporting older OS versions?
We aim to understand this behavior to guarantee stable operation across all supported iOS versions—avoiding both launch failures and runtime crashes caused by inconsistent symbol linking.
Any insights or guidance from the community or Apple engineers would be greatly appreciated!
Let me know if you'd like a shorter version or want to include additional build environment details (Xcode version, deployment target, etc.)!
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
Activity
In our app, we implement a document picker using FilePickerManager+available.m, selecting different APIs based on the iOS version:
if (@available(iOS 14.0, *)) {
NSMutableArray<UTType *> *contentTypes = [NSMutableArray array];
for (NSString *uti in documentTypes) {
UTType *type = [UTType typeWithIdentifier:uti];
if (type) {
[contentTypes addObject:type];
NSLog(@"iOS 14+ Adding type: %@", uti);
} else {
NSLog(@"Warning: Unable to create UTI: %@", uti);
}
}
UIDocumentPickerViewController *documentPicker =
[[UIDocumentPickerViewController alloc] initForOpeningContentTypes:contentTypes];
documentPicker.delegate = self;
documentPicker.allowsMultipleSelection = NO;
[self.presentingViewController presentViewController:documentPicker animated:YES completion:nil];
}
However, we've observed inconsistent symbol reference types to UTType in the final linked binaries:
One build results in a strong reference to UTType.
Another demo project (with seemingly identical code and build settings) results in a weak reference.
Both object files (.o) show undefined references to UTType symbols (e.g., UTTypeCreatePreferredIdentifierForTag), yet the final linked binaries differ in how these symbols are resolved.
Impact of the Issue
This inconsistency causes problems on iOS 14.0+ devices:
Strong reference version: Fails to launch on devices where the UniformTypeIdentifiers framework is not present (e.g., certain older iOS 14.x devices), due to link-time failure.
Weak reference version: Launches successfully but crashes at runtime when attempting to call UTType methods, because the implementation cannot be found.
Our Analysis
Using nm -u, both versions show an undefined symbol:
U _UTTypeCreatePreferredIdentifierForTag
However, in the final binaries:
One shows: T _UTTypeCreatePreferredIdentifierForTag (strong)
The other shows: W _UTTypeCreatePreferredIdentifierForTag (weak)
Both projects link against the framework identically in their build logs:
-framework UniformTypeIdentifiers
(no -weak_framework flag is used in either case).
Questions
Why do identical source code and linker flags result in different symbol reference strengths (T vs W) for the same framework?
Are there specific compiler or linker behaviors (e.g., deployment target, SDK version, module imports, or bitcode settings) that influence whether symbols from UniformTypeIdentifiers are treated as strong or weak?
What is the recommended best practice to ensure consistent symbol referencing when using newer APIs like UTType, especially when supporting older OS versions?
We aim to understand this behavior to guarantee stable operation across all supported iOS versions—avoiding both launch failures and runtime crashes caused by inconsistent symbol linking.
Any insights or guidance from the community or Apple engineers would be greatly appreciated!
Let me know if you'd like a shorter version or want to include additional build environment details (Xcode version, deployment target, etc.)!
The other day the XCode account had some error that I so that I decided to log out and in again.
But when trying to log in to my apple account I get this "Bad URL" with the description "Try signing in again or contact Apple Developer Support to resolve account access".
This only happens on the XCode on my work computer. I can log in to XCode on other computers with the same account. This happens only on this computer and with any account that I try to log in to.
Obviously there is some cache file somewhere that I need to delete. But I am not finding it.
I strugge to make the app icon appear in the simulator and on a physical test device. Currently only the placeholder icon is shown. Using Xcode 15.4 and visionOS 1.2
If configured which app icon to use under Targets/[my app]/General:
And in assets theres my visionOS app icon:
Why is the app icon not used? Am I missing something or is this an Xcode bug?
Hello,
after updating macOS to 26.2 and Xcode to 26.2 (Build 17C52), I am unable to build a Flutter iOS application for the simulator.
Environment:
macOS 26.2 (darwin-arm64)
Xcode 26.2 (17C52)
Flutter 3.38.7 (stable)
Dart 3.10.7
CocoaPods 1.16.2
Target device: iPhone 16e Simulator (iOS 26.x)
Issue:
The build fails during the Flutter Xcode build phase with this error:
Unhandled exception:
Null check operator used on a null value
#0 Context._embedNativeAssets
(file:///opt/homebrew/share/flutter/packages/flutter_tools/bin/xcode_backend.dart:341)
Command PhaseScriptExecution failed with a nonzero exit code.
Additional info:
Runner target uses Pods-Runner.debug/profile/release.xcconfig correctly
SUPPORTED_PLATFORMS = iphoneos iphonesimulator
SDKROOT resolves to iPhoneOS26.2.sdk even when building for simulator
Build Settings and Run Script phases are default Flutter-generated
Issue occurs both via flutter run and directly from Xcode
Project worked before macOS/Xcode update
It appears Xcode 26.2 may be resolving SDKROOT or build environment incorrectly for Flutter projects, causing Flutter’s xcode_backend.dart to crash.
Could you please advise whether this is a known issue or requires a workaround?
Thank you.
Best regards
David
Topic:
Developer Tools & Services
SubTopic:
Xcode
I’m currently facing a disk space limitation on my Mac.
I’ve already freed up some storage by following the suggestions shared in a previous post, which helped partially, but the issue is not fully resolved and space is still a bottleneck for my workflow.
To move forward, I’d like to ask a very concrete question:
Is it safe and supported to move Xcode to an external hard drive (SSD), use it from there, and simply connect the drive whenever I need to work with Xcode?
Specifically:
Are there known issues with performance, stability, or updates?
Are there components that must remain on the internal disk to avoid unexpected behavior?
Is this a reasonable long-term setup, or just a temporary workaround?
I want to make sure I’m not setting myself up for hidden problems down the road.
Thanks in advance for any clarification or best practices you can share.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
Files and Storage
Developer Tools
External Accessory
Xcode
Following an unexpected error message while working in Xcode, the project file xcodeproj is no longer synced in iCloud Drive.
The Finder shows a cloud icon with a ! and an error message : (NSFileProviderErrorDomain error -2005.)
If the local file is zipped, and unzipped elsewhere on iCloud Drive, then the unzipped file can still not be iCloud Synced.
Restoring the file from a Time Machine archive does not solve the issue.
Apple Care Support finds that iCloud Drive is working fine except for this xcodeproj file and says the issue is Xcode related.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
Files and Storage
Developer Tools
Xcode
iCloud Drive
for detailed
Download failed.
Domain: DVTDownloadableErrorDomain
Code: 41
User Info: {
DVTErrorCreationDateKey = "2026-01-17 08:51:49 +0000";
}
Download failed.
Domain: DVTDownloadableErrorDomain
Code: 41
Failed fetching catalog for assetType (com.apple.MobileAsset.iOSSimulatorRuntime), serverParameters ({
RequestedBuild = 23C54;
})
Domain: DVTDownloadsUtilitiesErrorDomain
Code: -1
Download failed due to not being able to connect to the host. (Catalog download for com.apple.MobileAsset.iOSSimulatorRuntime)
Domain: com.apple.MobileAssetError.Download
Code: 60
User Info: {
checkNetwork = 1;
}
System Information
macOS Version 15.7.3 (Build 24G419)
Xcode 26.2 (24553) (Build 17C52)
Timestamp: 2026-01-17T16:51:49+08:00
In my app I want to integrate a personilized Lock Screen. Does anybody know how that works?
Hi!
I have a bigger Xcode project that has multiple targets:
the main app (MainApp)
helper command line tool (HelperTool)
The project also lists multiple package dependencies via SwiftPM and these dependencies have dependencies between themselves.
One of such packages produces a dynamic library MyFramework which is a dependency for both the main app and the HelperTool which has it listed under Build Phases > Dependencies as well as under Link with Frameworks.
This builds just fine, but the issue somes when I want to add another target called AdditionalHelperTool which it has pretty much the same dependencies as HelperTool.
When I add this second target, I start running into issues like the following:
Multiple commands produce '[...]/Build/Products/Debug/Frameworks/MyFramework.framework/Versions/A'
Target 'HelperTool' (project 'MyApp') has copy command from '[...]/Build/Products/Debug/PackageFrameworks/MyFramework.framework' to '[...]/Build/Products/Debug/Frameworks/MyFramework.framework'
Target 'AdditionalHelperTool' (project 'MyApp') has copy command from '[...]/Build/Products/Debug/PackageFrameworks/MyFramework.framework' to '[...]/Build/Products/Debug/Frameworks/MyFramework.framework'`
It seems that Xcode runs the build of both targets separately and it sees a conflict given that both targets have same dependencies that it's trying to built separately.
Has anyone encountered something similar?
Can anyone suggest a solution for this?
My app start up has became horrid. It takes 1 minute to open SQLlite database for my rust core. Impossible to work...
I have Address Sanitizer, Thread Perf Checker and Thread Sanitizer disabled...
Hello, I just updated my Xcode to 26.2 and downloaded the relevant simulator for it to test how my app looks in general. I use the newest iPhone and mini version, in this case, iPhone 13 mini, and the SE (3rd generation).
Everything is working as expected, but for the iPhone mini simulator, this weird red line is showing. Is anyone having this issue?
I know this post isn't going to give a lot of details, but what I experienced tonight was so completely weird that I wanted to get it posted here in case others run into it:
FIRST: All was well until I made a trivial change to a large Objective-C++ module. I suddenly got the idea to look at that line in the code review pane, to see if that area of code had ever had recent modifications.
But, the entire module showed up as modified -- one giant change bar, with nothing on the right side of the code review pane, no matter what commit I selected.
Then I noticed that the two lines of code which had all of 4 characters edited were no longer showing any change bars.
Yet, the file showed up as "modified". Still, the exact line changes were not showing in the source code navigator, even though other files showed their changes.
Note I'm connected to our remote repo on github. I did some command line git checks of the local repo, and the changes were there (as yet unstaged).
So -- I figured, I'm gonna ask the Apple Coding Assistant what's up. And it gave some fantastic advice, especially on how to confirm the changes really were in the repo ready to stage and commit and push. Which I did.
But despite following a couple hours of wonderful suggestions, I could never get the change bars back -- for this one specific file!
(yes, the file was in the repo, and in the project -- everything seemed OK with the file itself -- nothing had changed in the project, which compiled and ran perfectly with my changes).
SECOND -- suddenly, the AI assistant seemed to crash Xcode.
When I went to re-run Xcode, it just crashed exactly the same. The crash log indicated "Xcode is crashing inside the IDEIntelligenceChat plugin while it’s trying to “apply changes” to a Source Editor buffer".
Ultimately, I needed to restart Xcode holding down the SHIFT key. I could open other projects, but not the one I had been working on.
So I turned OFF apple Intelligence (thanks, ChatGPT). That allowed me to launch.
It sounds like some sort of corrupt Apple Intelligence chat logs and/or caches, which ChatGPT has given me extensive suggestions for deleting. I don't have the energy to attack that tonight -- I did an additional Time Machine backup and hope to take a closer look tomorrow.
Ideally -- I'd rather NOT lose all my on-going coding assistant chats for this project -- I had some ongoing suggestions I was working on.
But more concerning is the weirdness with changebars affecting this one 7,000 line .mm file. It doesn't seem like there's anything that should affect those change bars for ONE FILE that is in the repo and where changes can be seen from a git diff command line operation.
If it's a bug -- I can live with it. But it's worrisome.
Other than that, Xcode 26.2 has been running great! Unlike 26.1, which insisted on re-compiling all 600 files in my project every time I ran/debugged, 26.2 just does the 2-6 modified files -- a perfect incremental compile. I've saved HOURS of wasted unnecessary compilation since 26.2 was released.
dSYM size became thrice for builds generated via xcode 26 compared to xcode 16. These are all release builds.
I'm having a strange issue with my iOS app icon rendering in the App Store - it seems to be low-res and clipping part of the image. I updated the icon in Icon Composer to apply the liquid glass overlay for the new build. It looks fine on the device and the asset itself isn't corrupted. I think it might be a resolution issue since the small icon thumbnails in App Store Connect have the same problem, but they look fine when I click through to the larger preview. Has anyone else run into this and figured out a fix?
Hi all,
I’m suddenly experiencing an old issue again and can no longer build my project to run on the local iOS simulator.
I’m using a MacBook with an M1 (ARM64) processor and Xcode for development. Until recently, everything was working as expected. However, when I opened Xcode today, I noticed new build options such as ARM64 and ARM64 + x86_64, and I’m also seeing simulator entries running under Rosetta. I don’t recall seeing these options the last time I used Xcode.
At the moment:
Building for “Any iOS Device (arm64)” succeeds.
Building for Rosetta-based simulators also succeeds (which I understand are intended for Intel-based processes).
However, when I select an ARM64 simulator, the build fails with the error:
“Framework Podd_App not found.”
It appears that simulator builds targeting ARM64 are being restricted or misconfigured, possibly due to a corrupted setting or a recent update.
Has anyone experienced this before, or can suggest which settings I should check to resolve this issue?
Thanks in advance.
Topic:
Developer Tools & Services
SubTopic:
Xcode
I am building a bundle target for macOS 12 and later using Xcode. The bundle is not a standalone app, but a plug-in that is loaded by a host app. The code is written in Swift and uses the new Span API which is available in the OS-provided standard library in macOS 26 and backdeploys to macOS 10.14.4+.
Xcode should instruct the linker to include libswiftCompatibilitySpan.dylib in the compiled bundle to provide this backdeployment, but that does not happen.
SwiftPM does this additional linking by adding an rpath.
When trying to load the bundle using the NSBundle.loadAndReturnError() API, I get the following error on macOS 15 (and no error on macOS 26):
Error Domain=NSCocoaErrorDomain Code=3588 "dlopen(.../MyBundle.someBundle/Contents/MacOS/MyBundle, 0x0109): Library not loaded: @rpath/libswiftCompatibilitySpan.dylib
Referenced from: <CE92806C-94B7-367E-895D-EF6DF66C7FC2> .../MyBundle.someBundle/Contents/MacOS/MyBundle
Reason: tried: '/usr/lib/swift/libswiftCompatibilitySpan.dylib' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/libswiftCompatibilitySpan.dylib' (no such file), '/private/Frameworks/libswiftCompatibilitySpan.dylib' (no such file), '.../MyBundle.someBundle/Contents/MacOS/../Frameworks/libswiftCompatibilitySpan.dylib' (no such file), '/usr/lib/swift/libswiftCompatibilitySpan.dylib' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/libswiftCompatibilitySpan.dylib' (no such file), '/private/Frameworks/libswiftCompatibilitySpan.dylib' (no such file), '.../MyBundle.someBundle/Contents/MacOS/../Frameworks/libswiftCompatibilitySpan.dylib' (no such file)" UserInfo={NSLocalizedFailureReason=The bundle couldn’t be loaded., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=.../MyBundle.someBundle/Contents/MacOS/MyBundle, NSDebugDescription=dlopen(.../MyBundle.someBundle/Contents/MacOS/MyBundle, 0x0109): Library not loaded: @rpath/libswiftCompatibilitySpan.dylib
Referenced from: <CE92806C-94B7-367E-895D-EF6DF66C7FC2> .../MyBundle.someBundle/Contents/MacOS/MyBundle
Reason: tried: '/usr/lib/swift/libswiftCompatibilitySpan.dylib' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/libswiftCompatibilitySpan.dylib' (no such file), '/private/Frameworks/libswiftCompatibilitySpan.dylib' (no such file), '.../MyBundle.someBundle/Contents/MacOS/../Frameworks/libswiftCompatibilitySpan.dylib' (no such file), '/usr/lib/swift/libswiftCompatibilitySpan.dylib' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/libswiftCompatibilitySpan.dylib' (no such file), '/private/Frameworks/libswiftCompatibilitySpan.dylib' (no such file), '.../MyBundle.someBundle/Contents/MacOS/../Frameworks/libswiftCompatibilitySpan.dylib' (no such file), NSBundlePath=.../MyBundle.someBundle, NSLocalizedDescription=The bundle “MyBundle” couldn’t be loaded.}
My setup:
Xcode 26.2
macOS 26.2 (25C57) SDK (Built-in)
I've downloaded Xcode 26.2 directly from Developer.Apple.com and I'm stuck here. I have deleted and redownloaded, restarted computer, tried the App Store version, tried 26.1, and maybe a couple other things. Regardless always end up stock here. I hit "Install" and it just brings me right back to this same window. Thank you.
This is my first time downloaded any version of Xcode on this machine MacBook Pro, Apple M4 Max, Tahoe 26.2.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Hi, we've been developing an XR application for Apple Vision Pro which has worked fine so far. Now that the SDKs have updated to 26.2 (for Xcode and AVP versions) we've run into an error that prevents the app from launching.
I get the following error when running the application in the AVP Simulator (building for destination Apple Vision Pro (26.2), and my colleague gets the same error when building for the device itself and launching there.
BUG IN CLIENT: For mixed reality experiences please use cp_drawable_compute_projection API
Type: Error | Timestamp: 2026-01-13 09:21:57.242191+02:00 | Process: My XR App | Library: CompositorNonUI | TID: 0x75e2c
(copied with "all metadata")
How can we debug this further? The error in the console doesn't seem to give any stack trace or clear pointer to the code which relates to it. I've tried searching for CompositorNonUI, but that doesn't yield any results in our project (nor Google nor the Apple developer forums).
There is one post in the forum that has a similar error (https://developer.apple.com/forums/thread/788500?answerId=845039022#845039022) but searching in our project and it's dependencies, we don't seem to use ".tangent" anywhere either.
Any help in either debugging to find more details on where the issue happens or pointers to fixing it much appreciated, thanks!
I am trying to upgrade my app to use Xcode 26 and I cannot get my tests to launch.
I am trying to launch tests to the simulator, and I always get this error after 300 second timeout:
"encountered an error (The test runner hung before establishing connection.)"
There are no other errors getting logged.
I can run to the same simulator just fine, and in Xcode 16 the tests launch with no issues.
The tests also run fine on an actual iPhone.
Thanks in advance.