Build, test, and submit your app using Xcode, Apple's integrated development environment.

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

Xcode 16 on macOS Sequoia Keeps Removing Apple Accounts
I've recently set up new M4 Mac Minis with macOS Sequoia and Xcode 16. After logging into my Apple account in Xcode, everything works fine initially. However, the next day—or sometimes just a few hours later—my builds fail, and when I check the Accounts tab in Xcode's Settings, my account is missing. I have to re-add and re-authenticate my account, only for the same issue to recur later. To investigate further, I upgraded an older Mac Mini from macOS Sonoma and Xcode 15.1.0 to macOS Sequoia and Xcode 16.2. Unfortunately, this machine now exhibits the same behavior, suggesting the issue is related to either macOS Sequoia or Xcode 16. Has there been a change in Xcode or macOS that causes this automatic removal of accounts? Is there a solution or workaround to prevent Xcode from removing my Apple account? Any insights or suggestions would be greatly appreciated!
4
9
887
Jan ’25
Simulator iOS 15 Can't Response touch on Xcode 15.4
I have a problem with my xcode. I try to install apps xcodes to manage multiple xcode. My xcode version on 15.2(i try to run on iOS 15 SE1 it's no problem) and after that i try to install xcode 16 beta 3 i try to run iOS 15 SE1 the simulator blank. After that, i delete xcode 16 beta 3 and use xcode 15.2 i try to run on Simulator SE1 iOS 15 the simulator can't response touch. I try to trigger with Device menu on simulator Home, lock, trigger screenshot, etc. The simulator not response touch. How to solve this problem ? how to remove all simulator if uninstall xcodes.
13
9
4.6k
Nov ’24
Error in gathering code coverage in Xcode16
Fails to gather code coverage and throws this error Showing All Messages Failed to merge raw profiles in directory /Users//Library/Developer/Xcode/DerivedData/Receiver-ekqrbpsaciuxmlfslviajhoecyat/Build/ProfileData/0B0C6B69-FD46-4801-B106-56B7FCD44370 to destination /Users//Library/Developer/Xcode/DerivedData/Receiver-ekqrbpsaciuxmlfslviajhoecyat/Build/ProfileData/0B0C6B69-FD46-4801-B106-56B7FCD44370/Coverage.profdata: Aggregation tool '/Users/shwethamugeraya/Downloads/Xcode 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/llvm-profdata' failed with exit code 1: warning: /Users/shwethamugeraya/Library/Developer/Xcode/DerivedData/Receiver-ekqrbpsaciuxmlfslviajhoecyat/Build/ProfileData/0B0C6B69-FD46-4801-B106-56B7FCD44370/2F4EFBF7-1CCF-4E9E-8FD6-482EEDB98B6C-34646.profraw: raw profile version mismatch: Profile uses raw profile format version = 4; expected version = 8 PLEASE update this tool to version in the raw profile, or regenerate raw profile with expected version. error: no profile can be merged
4
9
772
Aug ’25
App is crashing when using "withCheckedContinuation" in Xcode 15 beta 5
We are experiencing an issue with withCheckedContinuation in our Swift project. Our implementation was working perfectly in a previous version of Xcode and continues to work in the simulator. However, it fails to work on a real device. Here’s a brief description of the problem: • Environment: - Xcode Version: Xcode 16.0 Beta 5 - Swift Version: Swift 5 - OS: IOS18 beta 5 • Problem: The code using withCheckedContinuation behaves as expected in the simulator but fails on a physical device. We are receiving a “bad access to memory” error when running on a real device. • What We’ve Tried: 1. Verified that the code works in previous Xcode versions. 2. Tested on different simulators, where it runs without issues. 3. Checked for any obvious errors in memory handling or threading. Code Example: Here’s a simplified version of the problematic code: var body: some View { VStack { Text("Hello, world!") } .padding() .onAppear { Task { await self.checkTrialOrIntroductoryDiscountEligibilityAsync() } } } func checkTrialOrIntroductoryDiscountEligibilityAsync() async { return await withCheckedContinuation { continuation in checkTrialOrIntroDiscountEligibility() { continuation.resume() } } } func checkTrialOrIntroDiscountEligibility(completion: () -> Void) { completion() } }
18
9
3.8k
Sep ’24
Xcode 16 RC - Cannot add packages
When opening the package management sheet there is a loading indicator going forever preventing the button to be enabled. The window displays collections but not "Recently used" (which also loads indefinitely). Anyone else seeing this? Any way to clear Xcode preferences/caches for the manager?
8
8
2.2k
Sep ’24
Xcode16 missing dSYM in Firebase
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
0
8
2.3k
Nov ’24
Custom font doesn't appear in Interface Builder
I installed a custom font (Font awesome) into my app. I triple checked that I did everything right: the font files are included in the bundle (they appear in the "Copy Bundle Resources" build phase) and the names of the fonts appear in the Info.plist file under "Fonts provided by application". In Interface builder, I select a Label, set the font to "Custom", then I click the Family list to select the font I want. Once or twice, I was actually able to see the Font Awesome fonts in this list and select one. However, they no longer appear there when I create new labels in new views. I do not understand why. I've been limping along by copying a label from one of the views where it worked and pasting it into the new view, but this is tiresome. I know the fonts are installed correctly because I can see them when I run the app. Why are the fonts not showing up on the font list in interface builder?
4
8
829
Mar ’25
PreviewShell crashes and breaks the preview canvas
Since the first beta of Xcode 16, randomly when editing a SwiftUI view a crash report opens with the message "PreviewShell quit unexpectedly." After that, annoyingly often the canvas fails to reload correctly, and shows this broken thing: The only way to get it working again is to restart Xcode, but it happens so often that it really impacts productivity. Does this happen to anyone else? If so, have you found a solution? I've already filed a report (FB14876223)
9
8
3.3k
Sep ’24
ASWebAuthenticationSession issue on iOS 18 simulator
We have some third-party SDKs do not support arm64 simulator, so we excluded arm64 for Any iOS Simulator SDK in Excluded Architectures. But in this case, ASWebAuthenticationSession will display abnormally. We submitted FB14853757 during the beta period, but have not received any response. This issue still exists in the official version. I hope it can be resolved. Thank you!
9
8
2.1k
Sep ’24
AccessibilityControlsExtension crash on Simulator
Hi there, when I run any app on the Xcode 16/16.1 with iOS/tvOS 18/18.1, it generates a crash on the AccessibilityControlsExtension process. 0x1048b8000 - 0x10493bfff dyld (*) <6beafde4-b011-3e47-8aae-4d7b6e4bb7e8> /usr/lib/dyld 0x1047fc000 - 0x104803fff com.apple.AccessibilityUIServer.AccessibilityControlsExtension (1.0) <a67e159b-253d-306c-b6fb-dd3fec38bd0f> /Volumes/VOLUME/*/AccessibilityUIServer.app/PlugIns/AccessibilityControlsExtension.appex/AccessibilityControlsExtension If run in Catalist mode - there are no crash reports. I also made a clean install of macOS 15.1 + Xcode and received that error again. Device: Mac15,13 Any suggestions on how to fix it? Full crash log in attach. AccessibilityControlsExtension-crash.log
2
8
798
Nov ’24
Best Practices: Dependency management for local packages
I have a project which contains local packages. One of the packages has an explicit dependency on package A, but the main project also has the same dependency. Both of them are pinned to the exact version at all times. Should I manage "shared" dependencies at the project level for local packages? This seems counter intuitive at first, but this question is originating from me fighting with a "Build service could not create build operation: unable to load transferred PIF: The workspace contains multiple references with the same GUID" error in Xcode 16 (all versions). It happens when I switch branches. Closing and reopening Xcode does resolve the issue, but it's a real flow killer. The guide below doesn't mention dependency graph best practice. https://developer.apple.com/documentation/xcode/organizing-your-code-with-local-packages Thank in advance.
1
8
2k
Apr ’25
Slow incremental build times with xcodebuild command
When I compile my Xcode project using the xcodebuild command, I observe long incremental build durations. For example, compiling a new, empty project in Xcode only takes around one second. The same project takes 7 seconds to compile using the xcodebuild command. I've noticed that xcodebuild hangs at the "GatherProvisioningInputs" phase. Steps to Reproduce: Create a new Xcode project (iOS app template) Build the project in Xcode with timing summary enabled Build the same project from the command line with the following command: time xcodebuild -destination 'platform=iOS Simulator,name=iPhone 15 Pro,OS=latest' I would appreciate any insights or suggestions on how to improve the build times when using the xcodebuild command. Thank you in advance for your help!
7
7
4.7k
Oct ’24
XCode does not recognize my iPhone
I'm trying to run my app on my iPhone and XCode is unable to detect it. Versions (as of time of writing, these are all the latest versions) XCode: 15.0.1 iOS: 17.1.2 macOS: Sonoma 14.1.2 What I've tried Updating all hardware to the latest versions. Restarting all hardware. Clearing cache/derived data. Using different USBC ports/cables. Using the XCode 15.1-Beta 3 (the latest beta) Clearing trusted computers and re-trusting Disabling Multipath Networking (solution for someone else on the dev forums) Creating a brand new xcode project. Disabling all wifi/bluetooth and reconnecting Using different wifi networks Calling mac support (they directed me back here) Scouring forums What happens I start by disconnecting my phone from my computer, clear trusted computers, restart xcode, and start (basically) from a completely blank slate. First I open XCode to my project. Then I connect my iPhone via USBC. I see that XCode says "iPhone not eligible while pairing in progress" (or something like that). I see on my phone that I must trust this computer, I hit trust, I enter my phone's passcode, then that disappears on my phone, and in XCode the message about eligibility disappears. I then click on the device selector to choose between either a simulator or a hardware device and under hardware I only see a message that says "No eligible devices connected to my mac". If I open the "Manage Run Destinations" organizer I see all the simulators there in the simulators tab, but when I go to the Devices tab, I see nothing. Sometimes when I go through this process, I can get a banner to appear up top, but still no device shows up on the left. The banner will show me that it is indeed my iPhone, but it will be missing information like "Serial Number" or "Capacity". Here's a screenshot of what I see. Keep in mind, this banner up top does not always show up when I go through this process. iPhone CAN be detected on my other laptop When I do this exact same thing on my other laptop, everything works just fine. Here are the specs I'm running on that laptop. (using the same cable/wifi network/etc) XCode 15.0.1 macOS: Ventura 13.6.1 iPhone 17.1.2 (I'm using the same iPhone) The only difference here being the macOS version. However, the problem started on my "broken" computer while I was running a previous major macOS version. This problem is actually what prompted my to do a system update to Sonoma. Please for the love of god, halp!!!
17
7
22k
Sep ’24
Xcode 16 RC validate build bitcode error
I just swapped over to Xcode 16 and archived my build. I have ENABLE_BITCODE = NO in my Build settings (it's listed under user defined settings). When I go to validate the build, I get a failure "Invalid Executable, ***.framework contains bitcode". Nothing about my project settings has changed. If i swap back to Xcode 15 everything's fine when I validate. One thing I noticed though is that if I go through the process of validating, on the confirmation screen for Xcode 16 RC, the line about Bitcode: Not included does not exist like it does if I hit the confirmation screen in Xcode 15.
9
6
18k
Sep ’24
Swift Package with Demo project with Xcode 16
My current workflow to have a Swift Package with a Demo is like this: PackageFolder > DemoFolder I have a package, with a Demo folder inside. I can open the Demo project and Drag&Drop the local PackageFolder to override the remote dependency with the local one. This allows to edit the package while inside the demo project. With Xcode 16 this does no longer work because Xcode does not allow to drop an ancestor of the file path where the project is located. Xcode does not tell this while you drop, it just does not allow it. But it tells you thats the reason, when you try to add the local package as a dependency to the project: "The selected package cannot be a direct ancestor of the project.". (Dropping other local packages still works, see: https://forums.developer.apple.com/forums/thread/756824) What is the expected way to handle a package with a demo project with Xcode 16?
5
6
1.7k
Sep ’24
Icon Composer warning "Failed to parse icontool JSON output."
When the Icon Composer file is imported into the project folder, and after building, there is a warning that says: Failed to parse icontool JSON output. Parts of the warnings show this: Entity: line 1: parser error : Start tag expected, '<' not found \211PNG ^ Entity: line 1: parser error : Start tag expected, '<' not found \211PNG ^ Entity: line 1: parser error : Start tag expected, '<' not found \211PNG ^ /* com.apple.actool.notices */ warning: Failed to parse icontool JSON output. Underlying Errors: Description: The data couldn’t be read because it isn’t in the correct format. Failure Reason: The data is not in the correct format. Debug Description: Garbage at end around line 6, column 0. /* com.apple.actool.compilation-results */ I have created the icon with png files in each layer group in icon composer. However the project is able to compile, and running shows the correct icon. What is the issue with this?
4
6
156
4w
Predictive Code Completion Fails to Install (Apple Silicon M2 Max) - macOS 15 & Xcode 16
On both RC versions of macOS 15 and Xcode 16, predictive code completion fails to install with the following error message: The operation couldn’t be completed. (ModelCatalog.CatalogErrors.AssetErrors error 1.) Domain: ModelCatalog.CatalogErrors.AssetErrors Code: 1 User Info: { DVTErrorCreationDateKey = "2024-09-09 21:23:43 +0000"; } -- Failed to find asset: com.apple.fm.code.generate_small_v1.tokenizer - no asset Domain: ModelCatalog.CatalogErrors.AssetErrors Code: 1 -- System Information macOS Version 15.0 (Build 24A335) Xcode 16.0 (23050) (Build 16A242) Timestamp: 2024-09-09T17:23:43-04:00
21
6
4.4k
Sep ’24