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

Posts under Xcode tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

WidgetKit keep crashing and widgets not displaying
So I have a MacOS application that was working just fine before Xcode 16. The Widgets are not working anymore. The main application and the widgets share a file in a common App Group. The widget app now get a permission error when accessing the file. Also, the Widget Kit simulator keeps crashing. I also try to start a new project in Xcode, add a target with a Widget extension with an App Intent and run it, and it also crashes. Sometimes, it doesn't crash but just display the error: "Failed to load widget. The operation couldn't be completed. (WidgetKit_Simulator.WidgetDocument.Error error 2.). Edited to attach WidgetKit error log widgetKitError.txt
8
3
1.6k
Feb ’25
Xcode 16 won't pair with iPhone, Error is: DeviceLinkListener.c:_copyMobileDeviceValue| ERROR: Attempt to copy a value from an unpaired device. Cowardly refusing to do so
Any Apple Engineers out there who wrote this error message? DeviceLinkListener.c:_copyMobileDeviceValue| ERROR: Attempt to copy a value from an unpaired device. Cowardly refusing to do so ERROR: .... Cowardly refusing to do so Any thoughts? I click on 'trust this computer' (on the iPhone) and the error is triggered. FB15285137 MacOS Sequoia iOS 18, iPhone 13 mini (previously paired happily with Xcode 15)
1
0
512
Oct ’24
Install command line tools 15 in xcode 16 on Mac OS Sequoia 15.0
I recently upgraded my Mac to Sequoia 15.0 (24A335) so I had to upgrade Xcode & command line tools to 16. I need command line tools 15 also on the mac due to some of the legacy projects depending on it. I want to install command line tools 15 and choose it in the Settings-->Location, but Xcode doesn't display "Command line tools 15" although i download & install from https://developer.apple.com/download/all/
2
0
3.2k
Sep ’24
"validate settings" missing from xcode16 ?
I’d like to migrate my watchOS app (bundled with an iOS app) from a dual-target to a single-target setup. I remember Xcode used to have a menu item (Editor -> Validate Settings) that would prompt you to initiate the migration process. However, I can’t seem to find a ‘Validate Settings’ option in the latest Xcode 16. Has "Validate Settings" been removed in xcode16 ? Thanks!
1
0
490
Sep ’24
BuildConverter: AudioConverterNew returned -50
AudioQueueObject.cpp:1580 BuildConverter: AudioConverterNew returned -50 from: 0 ch, 16000 Hz, .... (0x00000000) 0 bits/channel, 0 bytes/packet, 0 frames/packet, 0 bytes/frame to: 2 ch, 16000 Hz, Int16, interleaved AQMEIO_HAL.cpp:2773 iOSSimulatorAudioDevice-15111-0: Abandoning I/O cycle because reconfig pending (1). HALC_ProxySystem.cpp:163 HALC_ProxySystem::GetObjectInfo: got an error from the server, Error: 560947818 (!obj) HALC_ShellObject.mm:213 HALC_ShellObject::HasProperty: there is no proxy object AudioHardware-mac-imp.cpp:1224 AudioObjectRemovePropertyListener: no object with given ID 160 HALSystem.cpp:2216 AudioObjectPropertiesChanged: no such object why? Can't record on ios17. Normal recording before iOS 16.
0
0
633
Sep ’24
Xcode do not pause at breakpoints
In the latest version of Xcode, breakpoints are not displaying correctly, making it difficult to track code behavior. Previously, Xcode allowed you to step through each function, showing clear execution steps and allowing interaction to debug effectively. However, now it only shows memory addresses without providing meaningful insights, limiting the ability to interact with or test the code as it's being developed. Is anyone else experiencing this issue, or does anyone know of a workaround?
1
1
507
Sep ’24
Simulator not working
Since its update to iOS 18.0, I have not been able to use the Simulator in Xcode at all. It is stuck loading for a very long time, and then it crashes. I managed to get it to start once, but it used up all of my system's memory immediately. I have not had any problems with the Simulator before the iOS 18.0 update. Additionally, after the Simulator crashing, the StoryBoard usually stops working as well, until I restart Xcode. (I use an M1 MacBook Air with 8GB of RAM)
0
0
534
Sep ’24
App compiles but "Unable to install" on device
When I try to run my app on my iPhone, from Xcode, I get a popup that says Unable to Install "AppName". There is some text in the popup. Here's the first part of it. (I replaced the real app's name with "AppName".) Anyone know how to fix this? Unable to install "AppName" Domain: com.apple.dt.MobileDeviceErrorDomain Code: -402653103 User Info: { DVTErrorCreationDateKey = "2024-09-28 04:04:29 +0000"; IDERunOperationFailingWorker = IDEInstalliPhoneLauncher; } -- Unable to install "AppName" Domain: com.apple.dt.MobileDeviceErrorDomain Code: -402653103 -- Could not inspect the application package. Domain: com.apple.dt.MobileDeviceErrorDomain Code: -402653103 User Info: { DVTRadarComponentKey = 282703; MobileDeviceErrorCode = "(0xE8000051)"; "com.apple.dtdevicekit.stacktrace" = ( ...
1
0
360
Sep ’24
Xcode 15 & 16: macOS app suddenly stops running in simulator
I have been working on Task Management app for macOS (currently using maOS 15.0 on a M1 MacBook Pro) for a while. Nothing fancy, it uses SwiftUI and Core Data. My problem: I make changes to the app, then run it in the simulator and see if everything works as expected. This works fine for maybe three weeks, until at one point it suddenly stops working – I make a minor change, click "Run" in Xcode (this happens in Xcode 15.x and now Xcode 16), the app icon bounces in the dock, but then no window opens. The app is built and I can see in the console that there are the usual notifications, but I cannot use the simulator anymore. I tried cleaning the Build Folder, resetting the Computer, reinstalling Xcode – nothing helps. What occasionally helps is renaming the Bundle Identifier, but now I only got it to run the simulator once more, then it stopped working. The only solution I have is to manually rebuild the whole app under a new name – that is, recreating the Core Data model and all files, which I have done three times. And now it stopped working again. Does anyone know why this could be? I think Xcode 16 gives me a notification I did not get from Xcode 15: "NSBundle file:///System/Library/PrivateFrameworks/MetalTools.framework/ principal class is nil because all fallbacks have failed" I could not find anything on this. Any ideas are greatly appreciated.
2
0
485
Sep ’24
#Preview a Widget placeholder?
While I am able to use #Preview to preview a Widget, it seems to be not possible to easily preview a Widget placeholder. With a "classic" preview I can use .redacted(reason: .placeholder), but this has limitation e.g. it will ignore .contentMarginsDisabled() struct MyWidget_Previews: PreviewProvider { static var previews: some View { Group { MyWidgetView(entry: SimpleEntry(date: .now, emoji: "😀")) MyWidgetView(entry: SimpleEntry(date: .now, emoji: "😀")) .redacted(reason: .placeholder) } .previewContext(WidgetPreviewContext(family: .systemMedium)) .containerBackground(.white, for: .widget) } } If I use #Preview, the .redacted modifier won't work, and I seem to have to put it in the MyWidget implementation. #Preview(as: .systemMedium) { MyWidget() } timeline: { SimpleEntry(date: .now, emoji: "😀") SimpleEntry(date: .now, emoji: "🤩") } Am I missing something?
1
0
569
Sep ’24
Password autofill not working on iPhone simulator
When tapping on "password" in the accessory view above the keyboard, no password manger is opened. The keyboard just closes and re-opens. I have made sure a password exists and is available to be used. I have replicated this within my own app, but also from within the Settings app on the simulator (see attached gif) so I am confident it is not a coding issue on my side. I have replicated it on both iOS 17 and iOS 18 I am using Xcode Version 16.0 (16A242d) I am running macOS Sonoma Version 14.7 (23H124) I am fairly confident I have not experienced this when working on another clients app. I was using Xcode 15 for that so not sure if this is something introduced with Xcode 16.
1
1
711
Dec ’24
Continuous Devicectl Errors: CoreDeviceError 3002, 12010, and 1000 with iOS 18.1/iPadOS18.0
Hello, I’ve been experiencing repeated errors when trying to install my app via flutter run --release on iOS devices using Xcode 16.1 (build 16B5014f) on macOS 15.1. When running the app in debug mode, it sometimes works but takes a long time to install. However, the installation in release mode fails consistently. This issue occurs on both my iPhone and iPad, both running iOS 18.1 and iPadOS 18, respectively. The errors keep rotating between three variations: Error 1: CoreDeviceError 3002 Error executing devicectl: ProcessException: Process exited abnormally with exit code 1: ERROR: Failed to install the app on the device. (com.apple.dt.CoreDeviceError error 3002 (0xBBA)) Connection with the remote side was unexpectedly closed : "XPCErrorDescription" => "Connection interrupted" Error 2: CoreDeviceError 12010 Error executing devicectl: ProcessException: Process exited abnormally with exit code 1: ERROR: The developer disk image could not be unmounted on this device. (com.apple.dt.CoreDeviceError error 12010 (0x2EEA)) Could not read from the device. (com.apple.dt.CoreDeviceError error -402653180 (0xE8000004)) Error 3: CoreDeviceError 1000 Error executing devicectl: ProcessException: Process exited abnormally with exit code 1: ERROR: The specified device was not found. (com.apple.dt.CoreDeviceError error 1000 (0x3E8)) What I've Tried So Far: Reinstalled Xcode, cleaned the build folder, and cleared DerivedData. Tried using both an iPhone and an iPad running iOS 18.1 and iPadOS 18.0. Ensured that Developer Mode is enabled on both devices. Disabled VPNs (Bitdefender) and firewall settings. Manually mounted the developer disk image via Xcode. Restarted the Mac, Xcode, and devices multiple times. Despite these steps, the errors persist, and I’m unable to install the app on either device. I would appreciate any guidance or suggestions on how to resolve this issue. System Information: macOS Version: 15.1 (Build 24B5055e) Xcode Version: 16.1 (Build 16B5014f) Devices: iPhone 14 running iOS 18.1, iPad running iPadOS 18.0 Thank you in advance!
0
1
998
Sep ’24
Can't disable "Connect via Network"
I've upgrade my macbook m3 pro to macOS 15, I have 2 iPhones (12 Pro and 16 Pro) - both on iOS 18 and have 3 versions of Xcode installed (15.4, 16.0, 16.1-2 beta) For the past week I'm unable to develop on my physical device and checked all the threads in this forum for a workaround to disable the "Connect via Network". If I'm not connected to VPN on any of my devices, I get the process attached via network after ~20 minutes, but if I try to do it while on VPN it takes forever (not even sure, can't spend 1 hour waiting to be attached or not) What can I do to disable the "Connect via Network" and why is enabled by default and greyed out?
3
5
606
Oct ’24
[Xcode Instruments][Allocations] Chart not showing any data
Hi there, In a project that I am working on, whenever I try running instruments for allocations to see the memory allocations that are happening under the hood, I see the statistics, and the traces updating, however the chart never updates. I have made new projects on the machine, and I have tried different Xcode versions, and they all show the chart just fine. I have tried running the project on other machines with no success. I have double checked the arguments and options on the active schema I am trying to profile with the schema of a new project and they are identical. Here is a picture of how it looks: My questions are as follows: What properties and settings can disable the chart from showing up? What diagnostic steps recommended that I should take? I can not share a reproducible as this is the only project I have with this problem and it is not mine, but please tell me if there is anything else I can provide in order to debug this. All the best Parsa
1
0
651
Sep ’24
Issue with SKAdNetwork 4.0 for Web Ads
I have an issue with web ads not working in Safari versions earlier than 16.4. While debugging Safari Web Ads I found out that I don't get postbacks from versions 16.4 or below from Safari, although there are no technical limitations and the documentation says that web ads should work starting from versions 16.1 https://developer.apple.com/documentation/storekit/skadnetwork/skadnetwork_release_notes/skadnetwork_4_release_notes For ads that appear in an app, the app is built with iOS 16.1 SDK or later. For web ads, the ad appears in Safari 16.1 or later.`` Maybe I missed something and Apple didn't update the documentation, is that normal? Maybe it's related to this release and there was a technical problem with Apple? https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-16_4-release-notes/#SKAdNetwork Has anyone encountered the same problem and how did you fix it? Thanks!
0
0
421
Sep ’24