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

Xcode Documentation

Post

Replies

Boosts

Views

Activity

Xcode 16 simulator slow to load - unusable
I'm on version 16 of simulator and Xcode. Last Friday, starting the simulator would take 10 seconds at the most. Now, it takes at least 10 minutes. My app target is the same and nothing in my app itself has changed. There's no new software installed and it has plenty of RAM and disk. When I target my phone, it is instant. So I'm testing / debugging everything on my phone now. When I use the simulator, the initial load is about 10 minutes, then it's fine (using the app itself). But something is causing it to hang when loading. And like I said - last week it was fine. If it was slow when running on my phone, I'd think it was something with me/the app. But it's not. This is the only messages I get in the system log. Feb 24 12:54:46 MacBookAir bootlog[0]: BOOT_TIME 1740423286 329039 Feb 24 13:06:42 MacBookAir syslogd[2095]: Configuration Notice: ASL Module "com.apple.contacts.ContactsAutocomplete" claims selected messages. Those messages may not appear in standard system log files or in the ASL database. Feb 24 15:10:13 MacBookAir syslogd[8045]: --- syslogd restarted --- Feb 24 15:10:13 MacBookAir syslogd[8045]: Configuration Notice: ASL Module "com.apple.contacts.ContactsAutocomplete" claims selected messages. Those messages may not appear in standard system log files or in the ASL database.
0
0
82
13h
Proxies Simulator
I have a VPN installed (Global Protect) on my company computer, which is a MacBook Pro M2, to access the company network, internal URLs, websites, and run the app I work on. However, even with the VPN installed, I am having trouble accessing certain resources. The solution found was to manually configure the proxies for my Wi-Fi network. After configuring the proxies, I was able to access all the company's URLs and everything I needed. However, the Xcode Simulator is not picking up these network configurations, and when I try to run the project, it does not work. How can I solve this?
0
0
61
20h
Getting an error in Xcode after resting simulator
I just made clean data on simulator then started getting the below error built on Xcode ? Showing Recent Issues Entitlements file "Clinic.entitlements" was modified during the build, which is not supported. You can disable this error by setting 'CODE_SIGN_ALLOW_ENTITLEMENTS_MODIFICATION' to 'YES', however this may cause the built product's code signature or provisioning profile to contain incorrect entitlements.
0
0
61
23h
Debugging, the iPhone and Mac are no longer on the same LAN, Xcode still tries to debug using a Wifi connection
Failed to launch: 'Could not attach to pid : “17649”' -- Connection shut down by remote side while waiting for reply to initial handshake packet When connecting devices for debugging, the iPhone and Mac are no longer on the same LAN, Xcode still tries to debug using a Wifi connection. If I'm using a wired connection, please prioritize debugging using a wired connection instead of always trying to debug using a Wi-Fi connection.
1
0
115
1d
I recently received feedback from two users that they charged twice after entering their password when trying to initiate payment on the app.
Hello, I recently received feedback from two users that they charged twice after entering their password when trying to initiate payment on the app. I checked my front-end and back-end codes, both of which only initiate one order, but I don't know why the user deducts two payments after entering the password. I hope everyone can help me analyze this problem and how it came about? Additionally, I wonder if there is a possibility that the system may prompt the user to enter their password again due to network issues, resulting in the deduction of two payments. But the user told us that they only entered the password once (I don't know if the user lied). I am unable to find how the problem arose. I hope you can help me analyze how to solve this problem? If you also encounter such a problem, can you teach me how to solve it?
1
0
73
1d
Xcode 16.2 doesn't support custom SF Symbols 6
I was trying to compile an app that contains custom SF Symbols with Template 6.0 in Xcode (using Version 16.2 (16C5032a) on my Macbook running Sonoma 14.7.3 (23H417)). However, when building, I got the error The SVG file provided for the symbol image set ’(SVG file name)‘ is not suitable: Template format 6.0 is newer than the version that this software supports (5.0) for the custom symbols' SVGs. Attempting to preview the symbols in Xcode also seems to crash and force Xcode to quit. I am assuming this is something to do with the symbols not being compatible with my Xcode version, but the problem is that it should work since I am using Xcode 16.2, the latest stable version currently. The SVGs themselves even mention "Requires Xcode 16 or greater", which means they should work. Unfortunately, I could not find anything about this online (except another old post from 2023 with no answers), so I'm at a loss. The only possible cause that I can think of is because I'm running Sonoma instead of Sequoia (I'm using an ancient Intel Macbook which doesn't support Sequoia), but the official SF Symbols website says that it requires Ventura or later. Xcode error logs (my account name is replaced with "(name)" for privacy): CompileAssetCatalog /Users/(name)/Library/Developer/Xcode/DerivedData/Cork-dbcizsqhvdnuuqbnegvmgsinlavg/Build/Products/Debug/Cork.app/Contents/Resources /Users/(name)/Cork/Cork/Assets.xcassets /Users/(name)/Cork/Cork/Preview\ Content/Preview\ Assets.xcassets (in target 'Self-Compiled' from project 'Cork') cd /Users/(name)/Cork /Applications/Xcode-16.2.0.app/Contents/Developer/usr/bin/actool --output-format human-readable-text --notices --warnings --export-dependency-info /Users/(name)/Library/Developer/Xcode/DerivedData/Cork-dbcizsqhvdnuuqbnegvmgsinlavg/Build/Intermediates.noindex/Cork.build/Debug/Self-Compiled.build/assetcatalog_dependencies --output-partial-info-plist /Users/(name)/Library/Developer/Xcode/DerivedData/Cork-dbcizsqhvdnuuqbnegvmgsinlavg/Build/Intermediates.noindex/Cork.build/Debug/Self-Compiled.build/assetcatalog_generated_info.plist --app-icon AppIcon --accent-color AccentColor --enable-on-demand-resources NO --development-region en --target-device mac --minimum-deployment-target 13.0 --platform macosx --compile /Users/(name)/Library/Developer/Xcode/DerivedData/Cork-dbcizsqhvdnuuqbnegvmgsinlavg/Build/Products/Debug/Cork.app/Contents/Resources /Users/(name)/Cork/Cork/Assets.xcassets /Users/(name)/Cork/Cork/Preview\ Content/Preview\ Assets.xcassets 2025-02-23 18:53:33.073 ibtoold[8228:157676] NSFileCoordinator is doing nothing. 2025-02-23 18:53:33.107 ibtoold[8228:157676] Template format 6.0 is newer than the version that this software supports (5.0) 2025-02-23 18:53:33.112 ibtoold[8228:157676] Template format 6.0 is newer than the version that this software supports (5.0) 2025-02-23 18:53:33.137 ibtoold[8228:157676] Template format 6.0 is newer than the version that this software supports (5.0) 2025-02-23 18:53:33.141 ibtoold[8228:157676] Template format 6.0 is newer than the version that this software supports (5.0) 2025-02-23 18:53:33.280 ibtoold[8228:157676] Template format 6.0 is newer than the version that this software supports (5.0) /* com.apple.actool.errors */ error: Template format 6.0 is newer than the version that this software supports (5.0) /* com.apple.actool.document.errors */ /Users/(name)/Cork/Cork/Assets.xcassets:./custom.spigot.badge.xmark.symbolset/[universal][][][]: error: The SVG file provided for the symbol image set ’custom.spigot.badge.xmark‘ is not suitable: Template format 6.0 is newer than the version that this software supports (5.0) /Users/(name)/Cork/Cork/Assets.xcassets:./custom.terminal.badge.xmark.symbolset/[universal][][][]: error: The SVG file provided for the symbol image set ’custom.terminal.badge.xmark‘ is not suitable: Template format 6.0 is newer than the version that this software supports (5.0) /Users/(name)/Cork/Cork/Assets.xcassets:./custom.trash.triangle.fill.symbolset/[universal][][][]: error: The SVG file provided for the symbol image set ’custom.trash.triangle.fill‘ is not suitable: Template format 6.0 is newer than the version that this software supports (5.0) /Users/(name)/Cork/Cork/Assets.xcassets:./custom.macwindow.badge.xmark.symbolset/[universal][][][]: error: The SVG file provided for the symbol image set ’custom.macwindow.badge.xmark‘ is not suitable: Template format 6.0 is newer than the version that this software supports (5.0) /* com.apple.actool.compilation-results */ /Users/(name)/Library/Developer/Xcode/DerivedData/Cork-dbcizsqhvdnuuqbnegvmgsinlavg/Build/Intermediates.noindex/Cork.build/Debug/Self-Compiled.build/assetcatalog_generated_info.plist /Users/(name)/Library/Developer/Xcode/DerivedData/Cork-dbcizsqhvdnuuqbnegvmgsinlavg/Build/Products/Debug/Cork.app/Contents/Resources/AppIcon.icns
1
0
121
1d
Xcode does not see Apple Vision Pro headset
I have had my Apple Vision Pro headset working with Xcode before, but it has been a while since testing in the headset. Today, Xcode on my M1 Mac Studio could not see my Apple Vision Pro to run code on the headset. I have updated my headset to visionOS 2.4 developer beta Both Mac and headset are on the same Wi-Fi network (I am typing this on my Mac via Mac Virtual Display). Headset has developer mode turned on. Initially I tried on the latest macOS (15.3.x) an Xcode (16.2) releases, but Xcode failed to find the headset. I installed the lated Xcode beta (16.3 beta), but it still failed to find the headset. I installed the latest developer beta on my Mac (15.4), but neither Xcode (16.2) nor Xcode beta (16.3) can find the headset. When I try to manage devices in Xcode, my Apple Vision Pro headset does not appear. Any idea what I am missing?
1
0
158
1d
How to create a second target for an app with a linked App Clip?
I have a SwiftuI App which includes an App Clip. There is one target for the iOS app and one for the App Clip. All good. But I want to create a new target for the test flight app so that test users can distinguish it from the App Store app. E.g. Test Flight app has a different icon asset file in the target but is identical in all other aspects. However, when I try to build the test flight target I see the message: The com.apple.developer.parent-application-identifiers entitlement (...]') of an App Clip must match the application-identifier entitlement ('...') of its containing parent app. This implies that I’d have to change the entitlement of the app clip, which would mess up the production version so I clearly don’t want to go that route. Any ideas how to overcome this conflict?
1
0
114
2d
How to make RealityKit both parent and child entities accessible to UI tests?
I have a SwiftUI RealityKit app, and I am writing UI tests for it. The app has entities that have children. All entities have an accessibilityComponent so that they can be found by UI tests. If I set isAccessibilityElement = true for the parent, the UI tests find the parent. If I set isAccessibilityElement = false for the parent, and isAccessibilityElement = true for the child, the UI tests find the child. If I set isAccessibilityElement = true for the parent as well as for the child, the UI tests find only the parent. How can I make parent and child entities both be accessible by the UI tests?
0
0
104
2d
Xcode 16.3 beta Predictive Code Completion not working
With MacOS Sequoia 15.4 Beta (24E5206s) and Xcode 16.3 beta (16E5104o), Predictive Code Completion no longer works. Prior to the update, (as of yesterday) completion worked under Xcode 16.2 and MacOS 15.3 Beta. The models are already loaded. So far, I've found the Predictive Completion to be useful in some situations (eg multiple cases in a switch), variably reliable in others (eg code suggestions in a CoreData stack) and downright wrong & annoying in others (eg referring to functions / modules that don't exist). Regards, Michaela
4
0
169
2d
Xcode file liveness regression?
A while ago, perhaps early in v16, Xcode stopped tracking file liveness. I'd hoped the regression would be fixed, but... not yet. Is there some setting I'm missing? Is this from underlying filesystem limits? or from working with swift packages? Conversely, if/since this is a regression, is this the new normal, and not to be fixed (e.g., because the modern build system cannot be retrofitted to detect and update stale resources)? Assuming I create a Swift package and open it in Xcode... 1. New files I expect to get errors when I create a new swift file, add bad code, and build. Instead, the file doesn't seem to be added to the build. If I try to use Add Files to "{project}".. menu, the file is disabled for selection. A workaround is to close and re-open the project 2. Files updated extrinsically If outside Xcode I format the files in the package or edit them, I expect Xcode to notice and either 1) update with the new contents if there were no changes, or 2) ask what to do if there were changes. Instead, Xcode proceeds oblivious to the underlying changes. It is not a workaround to use Integrate/Refresh file status menu for SCM status. Again, a workaround is to close and re-open the project. Possible factors Swift package projects, if resource tracking is tied to metadata unused in package projects? External filesystem: these are on APFS volumes mounted via TB-4 and USB-3 Pilot error? Impact This leads me to re-open projects 10's of times a day, to create test files or maintain lint. Also, because I have to drop out of Xcode to process files before checking in, I end up using an external git workflow/UI. Also, because Xcode is not particularly extensible, I've written external tools for analyzing and generating Swift, hosted via CLI or eclipse (which support resource markers for UI navigation). I use Swift LSP in Eclipse for analysis and git-driven changes, and end up coding there because well, I'm already there. I'd take slower builds over this continuous hassle and context-switching in a heartbeat.
1
0
134
2d
Xcode editor fails to generate Swift Asset Symbol Extension if on demand resources is used
I started using on-demand resources for some data assets. After that, the Swift Asset Symbol Extension feature began to fail in the Xcode editor. Even though the app builds and runs fine, the Xcode editor shows errors, indicating that there is no extension variable for my color and image assets. I submitted feedback and updated it after each new Xcode release. However, I have not received any responses, and the problem persists. The Xcode versions I tested: 15.3, 15.4, 16.1, 16.2, 16.3 Steps to reproduce this error: Create a new app project (SwiftUI, Swift). Create a new color asset named "myBackground." In ContentView, add a background modifier to a view: .background(Color.myBackground). Auto-completion will work, and there are no issues. Create a new data asset named "myData." Add the "On Demand Resource" tag to "myData" with the tag "some_tag." Create a new color asset named "myOtherBackground" and make its color different from "myBackground." In ContentView, try to replace the background with Color.myOtherBackground. It will not be listed in auto-completion and will show the error "Type 'Color' has no member 'myOtherBackground.'" However, it will still compile and show "myOtherBackground" in the preview, simulator, or on the device. You will start to see the failed "Project Build Preparation" report in the Reports Navigator in Xcode. According to the report, the "GenerateAssetSymbols" command fails. Error message: GenerateAssetSymbols /Users/***/Projects/***/***/Assets.xcassets (in target '***' from project '***') cd /Users/***/Projects/*** /Applications/Xcode_15.3.app/Contents/Developer/usr/bin/actool --output-format human-readable-text --notices --warnings --export-dependency-info /Users/***/Library/Developer/Xcode/DerivedData/***-***/Index.noindex/Build/Intermediates.noindex/***.build/Debug-iphonesimulator/***.build/assetcatalog_dependencies --output-partial-info-plist /Users/***/Library/Developer/Xcode/DerivedData/***-***/Index.noindex/Build/Intermediates.noindex/***.build/Debug-iphonesimulator/***.build/assetcatalog_generated_info.plist --app-icon AppIcon --accent-color tint --compress-pngs --enable-on-demand-resources YES --development-region en --target-device iphone --minimum-deployment-target 15.0 --platform iphonesimulator --asset-pack-output-specifications /Users/***/Library/Developer/Xcode/DerivedData/***-***/Index.noindex/Build/Intermediates.noindex/***.build/Debug-iphonesimulator/***.build/AssetPackOutputSpecifications.plist --compile /Users/***/Library/Developer/Xcode/DerivedData/***-***/Index.noindex/Build/Products/Debug-iphonesimulator/workoutai.app /Users/***/Projects/***/***/Assets.xcassets --bundle-identifier *** --generate-swift-asset-symbols /Users/***/Library/Developer/Xcode/DerivedData/***-***/Index.noindex/Build/Intermediates.noindex/***.build/Debug-iphonesimulator/***.build/DerivedSources/GeneratedAssetSymbols.swift --generate-objc-asset-symbols /Users/***/Library/Developer/Xcode/DerivedData/***-***/Index.noindex/Build/Intermediates.noindex/***.build/Debug-iphonesimulator/***.build/DerivedSources/GeneratedAssetSymbols.h --generate-asset-symbol-index /Users/***/Library/Developer/Xcode/DerivedData/***-***/Index.noindex/Build/Intermediates.noindex/***.build/Debug-iphonesimulator/***.build/DerivedSources/GeneratedAssetSymbols-Index.plist /* com.apple.actool.errors */ : error: Could not create a NSArray from '/Users/***/Library/Developer/Xcode/DerivedData/***-***/Index.noindex/Build/Intermediates.noindex/***.build/Debug-iphonesimulator/***.build/AssetPackOutputSpecifications.plist'. : error: Not enough arguments provided; where is the input document to operate on? Command GenerateAssetSymbols failed with a nonzero exit code
1
0
154
2d
Xcode 16.3 beta: Unable to specify package traits for testing
Swift 6.1 introduces package traits, which are great. But sometimes one might want to have a trait that is not enabled by default, and in such cases you will still want to be able to unit test them. Can we get an option, perhaps in the test plan configuration, that would allow us to specify traits that should be enabled when compiling for testing, even if those traits are not enabled by default? Bonus points if we could have multiple test plans that each build with a different set of traits, and running all the tests would cause the package to be built multiple times, so that all possible combinations of traits could be properly unit tested.
0
0
112
2d
Wireless debugging
The charging port of my iPhone may be damaged due to water, and it cannot be charged and transmitted data. It can only be charged wirelessly that does not support data transmission. However, since Xcode supports wireless debugging, I can continue to test my App. However, I recently changed to a new Mac, but there is no connection record with the iPhone in the new Mac, which makes it impossible to debug wirelessly. So I want to know how to realize wireless debugging on such a device without debugging records?
0
0
129
3d
Gathering Required Information for Troubleshooting Xcode Previews or Swift Previews Issues
Hi, You're here because your project has issues related to Xcode Previews or Swift Previews. The issue you're experiencing may be the result of any of the following: An error in your SwiftUI app, Xcode previews, or on-device previews. A configuration error in your Xcode project, including any third-party dependencies or packages. A system issue in the operating system, SwiftUI, or in Xcode Previews. Based on your request, I need more information about your SwiftUI app when rendering Xcode Previews or on-device previews. Specifically, I’ll need the diagnostics Swift Previews generates to make sure I understand the error encountered by the preview system. Please create a report in Feedback Assistant to share the details requested in the instructions below. For issues with macOS, Mac Catalyst, on-device iOS, or on-device visionOS previews, perform the following steps to gather diagnostics: Download and install the Swift Previews logging profile for your device. Reproduce the error while previewing on device, taking note of the timestamp when the error occurred. Attach the Previews diagnostics, sysdiagnose from your Mac, a sysdiagnose from the previewing iOS or visionOS device. For issues with Xcode Previews, perform the following steps to gather diagnostics: Download and install the Swift Previews logging profile for your device. Reproduce the error in Xcode Previews, if you haven’t already done so. If an error banner appears in the canvas, click the "Diagnostics" button within the banner, then go to Step 5; otherwise, continue to Step 4. If the error banner is missing, navigate to the menu in Xcode: Editor > Canvas > Diagnostics In the presented sheet, click the "Generate Report" button. Attach a zip file containing the diagnostic report to your bug report (it will be named something like previews-diagnostics-0123456789.zip). Submitting your feedback Before you submit to Feedback Assistant, please confirm the following information is included in your feedback: with the Swift Previews logging profile installed, attach the sysdiagnose logs gathered after reproducing the issue the Previews diagnostics generated by Xcode timestamp identifying when the issue was reproduced focused sample Xcode project that reproduces the issue (if applicable) screenshots or videos of the error (optional) Please include all requested information to prevent delays in my investigation. After your submission to Feedback Assistant is complete, please respond to your original Forums post with the Feedback ID. Once received, I can begin my investigation and determine if this issue is caused by an error within your SwiftUI app, a configuration issue within your Xcode project, or an underlying issue in the operating system, SwiftUI, in Xcode Previews, or on-device previews. Cheers, Paris X Pinkney |  WWDR | DTS Engineer
0
0
148
3d
Broken Xcode 16 autocomplete using Tab
I've recently upgraded to Xcode 16 and noticed a change in how the Tab key functions during autocomplete. (not-replied-but-closed post: https://discussions.apple.com/thread/255762888) Previously, pressing Tab would extend the typed text up to the first point of choice. For example, we have two classes: NSViewController and NSViewCoordinator BEFORE, typing: "NSV" + Tab used to complete to NSViewCo Now, in Xcode 16, pressing Tab selects the first suggestion by default, instead of completing up to the choice point. That is very inconvenient because very often I want just see all possible cases with some prefix...without need of typing all prefix manually. Seems there is no way to restore the previous behavior and that looks very very sad. I have reverse engineered Xcode 16...and what I get? They just install new CodeCompletion handler instead of old one without any chance to configure this behaviour by settings or UserDefaults =\ Hope this thread would raise votes and attract Xcode devs here
0
1
136
3d
View previous commit
I'm missing something. I have a project in Xcode 16.2. I have made two commits. I did not tag the commits. I need to compare what is in the first commit to the current state of a file. The instructions say that when comparing files there is a button at the bottom to select the commit to compare with, but I can't find that button. It looks like I can only compare the current state of the file with the last commit.
1
0
93
3d