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

Xcode Documentation

Post

Replies

Boosts

Views

Activity

Empty dSYMs folder since Xcode 15
Since I updated to Xcode 15.3, my archives have an empty dSYMs folder. I have not changed any project settings since Xcode 14. My build settings have: Debug Information Format: DWARF with dSYM File Generate Debug Symbols: Yes From my archives, if I navigate to the .xcarchive, Show Package Contents, there is a dSYMs folder. For all my archives built in Xcode 15, this folder is empty. For previous archives (Xcode 14), this folder contains a .app.dSYM file. When I distribute my app via App Store Connect and receive crash reports from TestFlight, these are symbolicated. So I'm confused why I don't see a local .dSYM file. Can you explain this? What do I need to change to generate this? (And does it matter if I'm getting symbolicated crash reports??)
0
0
52
1d
A developer disk image could not be mounted on this device. Network error occurred.
Using Xcode 15.4, iPhone 11 in iOS 17.5.1. Mac OS is Sonoma 14.5. Not able to debug on my device. When I try to run my application on the device from Xcode it is always showing Waiting to reconnect to phone. Previous preparation error: The developer disk image could not be mounted on this device. A networking error occurred. Tried below steps Unpairing the device Restarting phone, xcode and Mac Renamed the Library/Developer and ~/Library/Developer folder untrusting the computer and trusting it again Nothing seems to be working. How to resolve this?
0
0
28
1d
Unable to Debug macOS Action Extension: "Attach failed" Error
Hello everyone, I'm encountering an issue while trying to debug a macOS Action Extension. I created a completely fresh project with an Action Extension target. When I select the Action Extension scheme and run it, choosing Finder as the host app (app to launch it in), I receive the following error: Attach failed: Could not attach to pid : “647”. (Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries, when the attach failed. The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.) This is in Console.app: macOSTaskPolicy: (com.apple.debugserver) may not get the task control port of (Finder) (pid: 647): (Finder) is hardened, (Finder) doesn't have get-task-allow, (com.apple.debugserver) is a declared debugger(com.apple.debugserver) is not a declared read-only debugger. I am pretty sure it worked before on my project that I am developing. It stopped working and now it doesn't even work on a fresh new project. Any ideas? I tried cleaning derived data, restarting my mac, nothing helps. As per the documentation it should work normally using the Build & Run button.
8
0
465
May ’24
NSHostingView Not Working With Swift 6.0
I recently compiled my macOS App with Swift 6 in Xcode 16 (was using Swift 5 previously) and noticed that AppKit Integration doesn't appear to be working as before. All my instances of NSHostingView which allow me to add a SwiftUI View to an AppKit NSWindow view controller no longer respond to mouse input anymore. All my NSHostingView instances display but refuse to accept any user interaction. Has anyone else noticed this and is there a workaround to get NSHostingView to once again be able to accept user/mouse events with Swift 6?
4
0
183
1w
iOS dark mode app icon
the application icon turns black in iOS 18's dark mode, resembling a ghost. Therefore, we would like to understand how Apple processes the background of app icons to turn them black in dark mode. My request is as follows: I would like to understand the color change principle of app icons in dark mode. Without using Xcode 16, how can we ensure compatibility so that users with iOS 18 can see the normal icon?
0
0
131
1d
Xcode Version 15.4 (15F31d) is consistently changing "class" and "struct" to "enum"
While coding, Xcode Version 15.4 (15F31d) is consistently breaking builds by changing both struct and class declarations in areas of code other than where I'm currently editing. Suddenly, code that was compiling a minute ago breaks with multiple "Type 'Xxxx' has no member 'getYyyy'. For example, I'm writing code in a subclass, and suddenly calls to the superclass's methods are unrecognized by the compiler (e.g., "Type 'MeetInfoSheetReader' has no member 'getDateValue'"). Command-click on the method name takes me to the method in the superclass, and nothing is wrong at that point: I have the correct method signature, yet the code doesn't compile. I scroll up to the class declaration only to find that Xcode has changed "class" to "enum". This can happen regardless of whether the superclass or the reference struct is in the same or a different file. Also, this happens frequently, and it's not because I have bouts of narcolepsy and changed class or struct to enum while out. My dog doesn't even get near the laptop while I'm away from it, and I don't have a cat who types let alone a cat. Because I cannot associate this aggravating Xcode behavior with any particular thing I'm doing (e.g., name refactoring a variable or class name, deleting commented sections of exploratory code, or anything else) I'm sure that if I file a bug with the Feedback Assistant (a really ****** bug reporting system), it will be marked closed without the slightest bit of interest in exploring the problem. Hopefully someone else has seen this behavior and has a solution. Because it's really counterproductive.
2
0
119
3d
Simulator Edit Home Screen
How does one drag app icons to rearrange them on the iOS Simulator home screen? If I click and hold on an icon, the popover menu will appear and I can click Edit Home Screen, which will put the home screen into edit mode. But I can't find a way to drag the app icons. I've followed the instructions for dragging on this page, but while holding the control key shows a finger pointer, I still can't figure out how to move the app icon. I'm using a trackpad, not a mouse. I don't have a mouse to test with, but I get the same results with both the MacBook Pro internal trackpad and an external Magic Trackpad. https://help.apple.com/simulator/mac/11.0/#/deva6cdf367f
1
1
515
Mar ’24
Why is Xcode taking forever to install/launch app?
Ever since Xcode 15 and iOS 17 came out development has quite often been a nightmare of waiting and waiting -Xcode displaying endless circles saying preparing the device, connecting to the device, installing the device. But recently to add to this, installation and launching is just taking really forever. I'm currently running Xcode 15.1 and various versions of iOS 17 (I have several phones) and installing the app from Xcode takes about 7 - 10 minutes (compared to the same app installing in seconds with Xcode 14 for example). Then once its finally installed, it then takes further minutes to launch, Xcode often actually displays a dialog saying its taking longer than expected to launch the app, adding the footnote "LLDB is likely reading from device memory to resolve symbols." What could be reasons, and solutions, for the excruciatingly slow installation time, and launch time? I really need to find a solution to this please - making a code change tweak, running, making another, running, making another, running, just isn't possible given the length of time it takes to install and launch each time. The iPhone is connected via physical cable to the Mac, and the Mac and iPhone are both on the same Wifi network. Xcode 15.1 M1 Macbook Pro Sonomo 14.0 iOS 17.2
10
7
2.1k
Jan ’24
TextView Data Detectors : Flight Information
I have a textView in the Main storyboard where I've enabled the data detector for Flight Number and disabled editing. When the textView is presented, the user can tap the flight number link. It displays a dialog with a map and a UIMenu for Preview Flight. However, when I select Preview Flight, it shows nothing but 'Flight information unavailable'. I tried the same flight number on Apple Notes, and it works fine.
0
0
98
4d
Mac UI Tests Failing to Detect Out-of-Hierarchy Elements
Overview macOS test application is unable to detect elements beyond a certain length during UI testing after an Xcode(14/15) update. Issue Description We have a test app for both iOS and macOS, sharing the same code except for different UI implementations. During UI tests, the app opens a webpage in WKWebView. This is a long webpage with multiple sections, approximately 200 for the sake of clarity. The app screen can show 4 elements at a time. Our UI tests navigate to each section and perform various tasks. Since upgrading from Xcode 13 to 15, we've encountered an issue specifically on macOS (unsure if it's related to Swift or Xcode). Our Mac UI test i.e. XCUIApplication() is unable to find elements beyond a certain length, which appear to be out of the view hierarchy. When we use app.debugDescription, it only returns 180 sections, missing the last 20. The HTML code of the webpage is consistent, with all sections structured similarly. Troubleshooting Steps Accessibility Inspector: Using Xcode’s Accessibility Inspector yields the same result, detecting only 180 sections. Manual Scrolling: We tried manually scrolling to the missing sections. Although we can see these sections on the screen, app.debugDescription still only reports 180 sections, causing the UI test to fail in recognizing the last 20 sections. Deleting Sections: If we delete the top 20 sections of the webpage, it can then find the 200th element. This suggests we might be hitting some limit or restriction we are not aware of. However, on iOS, the same webpage returns all 200 sections without issue. Additional Information This issue is causing a problem only on the Mac app. In our Cocoa Mac application, we are using NSTabView, if that information helps with the investigation. We are wondering if there are any settings or flags we might have missed? Request for Assistance Any help would be greatly appreciated, as this issue is currently blocking us and it was working fine in the previous version. Question Is there any way we can bring those 20 elements into the hierarchy?
2
0
156
Jun ’24
Using Older version of Xcode
Hi, I have a 2017 iMac that works perfectly, and I am trying to use it to make applications using Swift with Xcode. However, I cannot use Xcode because the last update my iMac supported was Ventura, and now, Xcode requires macOS Sonoma. Is there any way to get around this? Thanks
4
0
103
4d
PacketLogger not logging packets on a MacBook.
I am a developer working on macOS Sonoma version 14.5 using a MacBook Pro with an M3 Pro chip. I have been trying to utilize PacketLogger, included with Xcode 15.4 extensions, to monitor Bluetooth traffic between my MacBook and my Sony WH-1000XM4 headphones. Issue Description: Despite my device being correctly paired and connected, PacketLogger does not display any Bluetooth packet data. The expected Bluetooth packets are not shown in the PacketLogger interface, even when no filters are applied, and PacketLogger settings are configured to capture all traffic. Troubleshooting Steps Taken: • I have ensured all PacketLogger filters are deactivated to capture all types of Bluetooth traffic. • I have started the PacketLogger before connecting my Bluetooth devices to capture the initial exchanges. • Reinstallation of PacketLogger and verification of Bluetooth module functionality have been performed, with no resolution to the issue. Request for Assistance: Could you provide guidance or troubleshooting steps that might address this issue? Are there known compatibility issues with PacketLogger on macOS Sonoma or with the MacBook Pro M3 Pro model that might affect its functionality? Any specific settings or configurations that I might be overlooking would also be greatly appreciated. I can provide additional information, including screenshots of my PacketLogger settings and logs, upon request. Your assistance in resolving this issue would be invaluable.
2
1
87
4d
The developer disk image could not be mounted on this device.
Error mounting image: 0xe8000105 (kAMDMobileImageMounterTATSUDeclinedAuthorization: The server declined to authorize this image on this device for this user.) Here is what the detailed error message shows: The developer disk image could not be mounted on this device. Domain: com.apple.dt.CoreDeviceError Code: 12040 Failure Reason: Error mounting image: 0xe8000105 (kAMDMobileImageMounterTATSUDeclinedAuthorization: The server declined to authorize this image on this device for this user.) User Info: { DDIPath = "/Library/Developer/DeveloperDiskImages/iOS_DDI.dmg"; DVTErrorCreationDateKey = "2024-07-12 19:06:25 +0000"; DeviceIdentifier = "94430B68-BA12-4F63-9EE5-48EE865738D6"; IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker; NSURL = "file:///Library/Developer/DeveloperDiskImages/iOS_DDI.dmg"; Options = { MountedBundlePath = "file:///private/var/tmp/CoreDevice_DDI_Staging_501/94430B68-BA12-4F63-9EE5-48EE865738D6/"; UseCredentials = 0; }; "com.apple.dt.DVTCoreDevice.operationName" = enablePersonalizedDDI; } Error mounting image: 0xe8000105 (kAMDMobileImageMounterTATSUDeclinedAuthorization: The server declined to authorize this image on this device for this user.) Domain: com.apple.mobiledevice Code: -402652923 User Info: { FunctionName = AMDeviceRemoteMountPersonalizedBundle; LineNumber = 2135; } AMAuthInstallRequestSendSync failed: 3194 (kAMAuthInstallTATSUDeclinedAuthorization) Domain: com.apple.mobiledevice Code: -402652923 User Info: { FunctionName = "-[PersonalizedImage mountImage:]"; LineNumber = 2032; } Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : { "device_identifier" = "00008027-000164500AE2402E"; "device_isCoreDevice" = 1; "device_model" = "iPad8,12"; "device_osBuild" = "18.0 (22A5307f)"; "device_platform" = "com.apple.platform.iphoneos"; "device_thinningType" = "iPad8,12"; "dvt_coredevice_version" = "397.3.5.2"; "dvt_coresimulator_version" = 980; "dvt_mobiledevice_version" = "1757.0.0.101.1"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 1332838; "operation_errorCode" = "-402652923"; "operation_errorDomain" = "com.apple.dt.CoreDeviceError.12040.com.apple.mobiledevice"; "operation_errorWorker" = IDEInstallCoreDeviceWorker; "operation_name" = IDERunOperationWorkerGroup; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 3; "param_destination_isProxy" = 0; "param_destination_platform" = "com.apple.platform.iphoneos"; "param_diag_113575882_enable" = 0; "param_diag_MainThreadChecker_stopOnIssue" = 0; "param_diag_MallocStackLogging_enableDuringAttach" = 0; "param_diag_MallocStackLogging_enableForXPC" = 1; "param_diag_allowLocationSimulation" = 1; "param_diag_checker_tpc_enable" = 1; "param_diag_gpu_frameCapture_enable" = 0; "param_diag_gpu_shaderValidation_enable" = 0; "param_diag_gpu_validation_enable" = 0; "param_diag_memoryGraphOnResourceException" = 0; "param_diag_queueDebugging_enable" = 1; "param_diag_runtimeProfile_generate" = 0; "param_diag_sanitizer_asan_enable" = 0; "param_diag_sanitizer_tsan_enable" = 0; "param_diag_sanitizer_tsan_stopOnIssue" = 0; "param_diag_sanitizer_ubsan_stopOnIssue" = 0; "param_diag_showNonLocalizedStrings" = 0; "param_diag_viewDebugging_enabled" = 1; "param_diag_viewDebugging_insertDylibOnLaunch" = 1; "param_install_style" = 2; "param_launcher_UID" = 2; "param_launcher_allowDeviceSensorReplayData" = 0; "param_launcher_kind" = 0; "param_launcher_style" = 99; "param_launcher_substyle" = 0; "param_runnable_appExtensionHostRunMode" = 0; "param_runnable_productType" = "com.apple.product-type.application"; "param_structuredConsoleMode" = 1; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "iphoneos18.0"; "sdk_osVersion" = "18.0"; "sdk_variant" = iphoneos; } System Information macOS Version 14.5 (Build 23F79) Xcode 16.0 (23037.4) (Build 16A5171r) Timestamp: 2024-07-12T12:06:25-07:00
0
0
92
4d
Regarding Reading NFC Core Information
I am developing an APP, scan and read NFC Tag information. I can only get the message in the NFC tag, but I cannot get the chip information. Or rather, the information obtained is incomplete. Look at the code: NFCNDEFReaderSession *session; - (void)readerSession:(NFCNDEFReaderSession *)session didDetectTags:(NSArray<__kindof id<NFCNDEFTag>> *)tags API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(watchos, macos, tvos) { NSLog(@"call back ios13"); if (tags.count > 1) { session.alertMessage = LocalizedString(@"ErrorTips4"); [session restartPolling]; return; } id firstTag = tags.firstObject; HBNFCNDEFTag *ndefTag = firstTag; NSLog(@"ndefTag == %@", [ndefTag valueForKey:@"_tag"]); dispatch_async(dispatch_get_main_queue(), ^{ [self invalidateSession]; }); } Obtain datas: ndefTag == <NFTagInternal: 0x283db5c00>-BA5A89060AA01FAB { Tech=Unknown Type=Unknown ID=(null), NDEF=4, capacity=137, messageSize=45 } An Other: NFCTagReaderSession *tagSession; - (void)tagReaderSession:(NFCTagReaderSession *)session didDetectTags:(NSArray<__kindof id<NFCTag>> *)tags API_AVAILABLE(ios(13.0)) { NSLog(@"call back ios13 tag"); if (tags.count > 1) { session.alertMessage = LocalizedString(@"ErrorTips4"); [session restartPolling]; return; } id <NFCTag> firstTag = tags.firstObject; HBNFCTag *nfcTag = firstTag; NSLog(@"nfcTag == %@", [nfcTag valueForKey:@"_tag"]); dispatch_async(dispatch_get_main_queue(), ^{ [self invalidateTagSession]; }); } Obtain datas: nfcTag == <NFTagInternal: 0x283dac900>-BA5A890699350585 { Tech=A Type=MiFare UL ID=0426226AB37381 silentType=0 SAK=(null) ATQA=(null) sfgi=0x0 } I need datas: Tech、Type、ID、capacity、messageSize、SAK、ATQA What shall I do?
1
0
74
5d
Thread 1: breakpoint 1.1 2.1 (1)
i am using Xcode to code some cpp functions, but these days I found a weird error occurring in my codes: when it comes to error, the main function concludes: int orderedC[11] = {3, 4, 7, 10, 15, 19, 25, 30, 41, 50, 70}; BiLink BC(orderedC,11); //BiTreeLink class BC.function1(); return 0; i don't know why even when function1() is totally blank like : void function1(){ //nothing here!!!! }; sometime i just cut the function1 codes and just paste it , the error (Thread 1: breakpoint 1.1 2.1 (1) )is fixed.
0
0
58
4d
How to handle “Try Again” alert in biometrics UI testing?
I’m writing UI tests for biometrics in iOS. For a failing case, I encounter an alert that needs to be dismissed by the user. How can I tap a button in this alert? XCTest has the addUIInterruptionMonitor method (https://developer.apple.com/documentation/xctest/xctestcase/1496273-adduiinterruptionmonitor). Is this what I need? If so, what description should I use? Or do I need some other functionality? For Touch ID, I can simply simulate a failure twice, and the alert will be dismissed. However, for Face ID and Optic ID, this approach is not suitable—the alert buttons need to be tapped. Additionally, there is an old method to handle the alert using the Springboard app (with the bundle ID “com.apple.springboard”). However, this only works for iOS and iPadOS, while VisionOS does not have this bundle ID.
0
1
68
4d
can not create framework for ealiear code?
I want to create framework for this repo:https://github.com/BradLarson/GPUImage but failed. 1.I downloaded this repo and run below: xcodebuild archive -project GPUImage.xcodeproj -scheme GPUImage -destination "generic/platform=iOS" -archivePath "archives/GPUImage" xcodebuild archive -project GPUImage.xcodeproj -scheme GPUImage -destination "generic/platform=iOS Simulator" -archivePath "archivessimulator/GPUImage" xcodebuild -create-xcframework -archive archives/GPUImage.xcarchive -framework GPUImage.framework -archive archivessimulator/GPUImage.xcarchive -framework GPUImage.framework -output xcframeworks/GPUImage.xcframework there is error :cryptexDiskImage' is an unknown content type and com.apple.platform.xros' is an unknown platform identifier
0
0
82
5d
Xcode's Vim Mode - further development?
It was fantastic news to hear, last year, that Xcode was getting a Vim mode. Apple's implementation of it was a great first step, but it was missing a bunch of key features. Most importantly the dot command (and by, extension, macros) and creating marks in files, which are functions that I use/rely on on a daily basis. I thought I would finally be able to stop having to self-sign Xcode (which causes problems) in order to use XVim2 plugin, but no such luck. Will these features get added in for Xcode 14 (they don't seem to be in the beta) or are they far out on the roadmap?
9
13
4.2k
Jun ’22