I currently own an Apple Watch SE2 device.
However, when I try to debug from the watch to the actual device, the connection loss issue occurs all too often.
Once the connection is lost, it continues to try to connect in the Disconnected list on the Xcode "Devices and Simulators" screen and is in a loading state.
Very often, even when the connection is established and you are trying to start debugging, it drops out.
Xcode cannot debug properly on the actual device.
I later found out that the Apple Watch SE2 does not support 5.0 Hz Wi-Fi, only 2.5 Hz.
I think that might be the cause.
Is this phenomenon less likely to occur if you debug on an actual device such as a regular Apple Watch 7/8/9 or Ultra model?
In fact, if debugging is difficult with the Apple Watch SE model, I am wondering whether I should purchase an additional Apple Watch.
Or is there another way to improve this issue?
It would be nice if the Apple Watch could be debugged by connecting it to a Mac with an actual cable like the iPhone.
I am wondering if there is a way to disable and enable network debugging in Xcode.
In the past, debugging the watch using only Bluetooth with the iPhone in Xcode seemed to be more stable.
Except for the Watch, the iPad doesn't have any major issues with Wi-Fi debugging on the iPhone.
Xcode
RSS for tagBuild, test, and submit your app using Xcode, Apple's integrated development environment.
Post
Replies
Boosts
Views
Activity
Since iOS 18.2 the simulators have been missing the content under Apps menu for Settings. We are on to iOS 18.3 and still no Apps settings.
@dts
Is it just me or does running SwiftUI apps using Xcode 16 give so many warnings and errors in the console that it's impossible to debug everything? Even the simplest gestures such as a long press generate a warning. I'm starting to ignore them, which feels negligent. Any insights/tips?
I work on an SDK, and one of the ways we distribute it is as a pre-compiled static XCFramework.
As far as I know, it’s the nature of a static framework to not contain symbols since the framework will be embedded in the final app binary, and the symbols should then be generated.
However, when testing the "Validate" function of the Xcode 16 deployment process, our users are receiving a warning that says the framework does not contain symbols.
Is my assumption about static frameworks and symbols incorrect? Could this be a bug in Xcode 16? Should we modify something in our framework to inform Xcode that symbols are not needed?
When renaming a variable in the active scheme, it's not renamed for the non active ones.
As a result when you have code that operates in both schemes (with #if os() conditions) a compile time error is introduced.
Is this an Xcode bug or expected behaviour?
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?
Hello!
I'm working on implementing SwiftUI + StoreKit2 IAP in my app, and Xcode testing has been fantastic, now I'd like to test my app with Sandbox, where I created a Sandbox account, and it works on my physical device, I can log in, make transactions, etc. (btw, feedback: please improve the UX for Sandbox testing, it's really clumsy compared to Xcode testing with Transaction Manager)
My problem is that when I'd like to log in with my Sandbox account on the simulator (Settings -> Developer -> Sandbox Apple Account (at the bottom) -> Sign in), it doesn't work, it fails silently. I know it authenticates well, because if I type in the wrong password, I get an error popup, but with the right password, it just fails silently, hides the login sheet and the "Sign in" text remains "Sign in" (on my phone when I log in, the "Sign in" is replaced with the email address of the Sandbox account).
I know many people get errors, and they recommend to go icloud.com and acccept TOS (done that), also to download the latest iOS for the simulator (also done), these are not a problem for me, as I don't get any errors. My authentication works, but for some reason the simulator still won't log in, it fails silently, and I see no errors/reason why. Tried with different simulators (latest iOS version), same result, tried to reboot the simulator, same result.
Any idea why is this happening?
Thank you,
sendai
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
I can’t view energy reports in the Xcode Organizer. I keep getting the message “An error occurred while downloading energy reports. Please provide a valid value”
Feedback ID: FB16595567
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.
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.
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
All is fine in Xcode15, no LLDB errors whatsoever, but in Xcode16 I can't get any variable displayed in the console because of the following error:
error: type for self cannot be reconstructed: type for typename "$......." was not found (cached)
error: Couldn't realize Swift AST type of self. Hint: using `v` to directly inspect variables and fields may still work.
I've checked the output of swift-healthcheck and there are several messages like this:
SwiftASTContextForExpressions(module: "ROA", cu: "ROA+ViewLayer.swift")::LoadOneModule() -- Missing Swift module or Clang module found for "UIKit", "imported" via SwiftDWARFImporterDelegate. Hint: Register Swift modules with the linker using -add_ast_path.
I added -add_ast_path to the OTHER_LDFLAGS in the faulty module's build settings but no luck.
How can I debug my project in Xcode16?
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.
I'm getting a fatal error in a preview:
fatalError in Environment+Objects.swift at line 34.
Anyone any idea how to find this file
In Xcode Version 16.2 (16C5032a) - and previous versions too, the download container in the Devices & Simulators functionality no longer works.
It will start downloading the container, however it will also:
show NO download progress
fail to download the whole container (the downloaded container is missing whole directories, eg. AppData/Library is missing - where my application stores the CoreData db)
show no errors
This was tested with the XCode version stated above (and previous versions) and with iPhone XR (18.1.1 - MR42CN/A) and with iPad (17.7.2 - MR7F2FD/A).
How can I debug this issue / make the Xcode download the whole container?
Running on Mac mini 15.1.1 (24B91).
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?
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?
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?
The 'view' and 'modifier' were displayed on my particular project, but it is no longer displayed.
I don't know which shortcut key was hidden.
What should I do to display it again?