Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

Debugging

RSS for tag

Discover and resolve issues with your app.

Posts under Debugging tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Uikit : -[UIApplication _terminateWithStatus:] + 136 (UIApplication.m:7539)
I have a few crash report from TestFlight with this context and nothing else. No symbols of my application. Crash report is attached. crashlog.crash It crashes at 16H25 (local time paris) and a few minutes after (8) I see the same user doing task in background (they download data with a particular URL in BGtasks) with a Delay that is consistant with a background wait of 5 or 7 minutes. I have no more information on this crash and by the way Xcode refuses to load it and shows an error. ( I did a report via Xcode for this).
0
0
26
Mar ’25
NavigationLink and ScrollView gestures collide
When the following structure: NavigationStack { ScrollView { NavigationLink(...) } } is presented inside a sheet in SwiftUI, the scroll drag gesture and the link tap gesture collide. If the user happens to begin a scroll gesture on a link, the link will open the moment the finger is lifted, no matter how far it is from its initial touchdown. The issue has already been found (this stack overflow post from 2019), but no solution was provided. I've already filed a report (FB17034020). In the meantime, is there any way to override the touch gesture detection in any manner? This issue is quite inconvenient from a user perspective.
1
1
37
Mar ’25
Interpreting crash log assertionFailure
Hello, I am experiencing crash on TopShelf and I checked all the crashlogs, but I don't know how to interpret it. I see only addresses in the trace logs, so it's really hard to understand what's going on. Is there a way how to symbolicate frames 5 - 17? Does anybody have an idea, what can be wrong? Thanks in advance. 0 libswiftCore.dylib 0x000000019bd33a88 _assertionFailure(_:_:file:line:flags:) + 264 (AssertCommon.swift:147) 1 TopShelf 0x00000001048b998c 0x1045ac000 + 3201420 2 TopShelf 0x0000000104cc04a8 0x1045ac000 + 7423144 3 libdispatch.dylib 0x000000019ab89294 _dispatch_client_callout + 20 (object.m:576) 4 libdispatch.dylib 0x000000019ab8aae0 _dispatch_once_callout + 32 (once.c:52) 5 TopShelf 0x00000001048f4098 0x1045ac000 + 3440792 6 TopShelf 0x00000001048f4930 0x1045ac000 + 3442992 7 TopShelf 0x00000001048cc8bc 0x1045ac000 + 3279036 8 TopShelf 0x00000001045b5a61 0x1045ac000 + 39521 9 TopShelf 0x0000000104ca8841 0x1045ac000 + 7325761 10 TopShelf 0x00000001049e5cc5 0x1045ac000 + 4431045 11 TopShelf 0x0000000104cc0dfd 0x1045ac000 + 7425533 12 TopShelf 0x00000001045b4b95 0x1045ac000 + 35733 13 TopShelf 0x00000001045b4e81 0x1045ac000 + 36481 14 TopShelf 0x00000001045b50e5 0x1045ac000 + 37093 15 TopShelf 0x00000001045b5a61 0x1045ac000 + 39521 16 TopShelf 0x00000001045b54b5 0x1045ac000 + 38069 17 TopShelf 0x00000001045b50e5 0x1045ac000 + 37093 18 libswift_Concurrency.dylib 0x000000019c30aedd completeTaskWithClosure(swift::AsyncContext*, swift::SwiftError*) + 1 (Task.cpp:497)
5
0
59
Apr ’25
The Xcode project keeps crashing on launch
Hello, I need a little bit of help. My game keeps crashing on launch no matter what I do. I’ve tried running it in Xcode on my Mac, on my iPhone, and through TestFlight, but I get the same result every time. I’ve tried everything I could find on the internet, and nothing worked. Asking here is my last resort because I’m completely stuck. The game runs fine in Unity, but not so much in Xcode. Can someone help me figure out what I’m doing wrong?Any help would be greatly appreciated. Here is the error log I found by connecting my iPhone to my Mac. To view the logs, I used the Console in the Devices and Simulators section of Xcode. ➤ SecKeyVerifySignature failed: Error Domain=NSOSStatusErrorDomain Code=-50 "rsa_pub_crypt failed" [10:27:36.034791+0200] kernel ➤ Sandbox: [App] deny(1) sysctl-read kern.bootargs [10:27:36.043389+0200] SpringBoard ➤ Live host view super view[(null)] not matching container view ➤ Frame not updated [10:27:36.050473+0200] backboardd ➤ Cycle detected [10:27:36.100799+0200] SpringBoard ➤ Live host view super view[(null)] not matching container view [10:27:36.538361+0200] akd ➤ Error fetching keychain item - Error Domain=NSOSStatusErrorDomain Code=-25300 "no matching items found" [10:27:36.545734+0200] akd ➤ Failed to set last known MID with error (Error Domain=NSOSStatusErrorDomain Code=-25300) [10:27:36.603384+0200] rtcreportingd ➤ Gap in hierarchy: [10:27:36.604536+0200] cloudd ➤ TCP input flags=[R.] state=LAST_ACK [10:27:36.613317+0200] cloudd ➤ TCP input flags=[R] state=CLOSED [10:27:36.648449+0200] kernel ➤ 1 duplicate report for Sandbox: [App] deny(1) sysctl-read kern.bootargs [10:27:36.648484+0200] kernel ➤ Sandbox: [App] deny(1) file-test-existence /private/var/Managed Preferences/mobile/com.apple.CoreMotion.plist [10:27:36.900275+0200] CommCenter ➤ Client is not entitled for request [10:27:37.131555+0200] storekitd ➤ AMSURLSession: Session decoder failed. Error = Error Domain=AMSErrorDomain Code=301 "Invalid Status Code" [10:27:37.131761+0200] storekitd ➤ AMSURLSession: Task completed with error = Error Domain=AMSErrorDomain Code=301 "Invalid Status Code" [10:27:38.137847+0200] kernel ➤ System Policy: [Process] deny(1) file-read-metadata /private/var/mobile/Library/Biome/FlexibleStorage [10:27:38.779536+0200] kernel ➤ Sandbox: [App] deny(2) file-test-existence /private/etc/localtime [10:27:38.942342+0200] mobileassetd ➤ TCP input flags=[R] state=LAST_ACK [10:27:38.963596+0200] kernel ➤ Sandbox: [App] deny(2) file-test-existence /bin/bash [10:27:40.152019+0200] mobileassetd ➤ TCP input flags=[R] state=LAST_ACK [10:27:40.280661+0200] assetsd ➤ Warning: cache_handle_memory_pressure invokedPreformatted text```
2
0
194
Mar ’25
App Crashes on TestFlight but Works in Simulator (Expo React Native App)
Hi, I’m experiencing an issue where my React Native (Expo) app crashes immediately in TestFlight after launching, but it works fine in Expo Go and the iOS Simulator. This is my first time building an IOS app, so I'm not sure where I'm going wrong. Are there known issues with JS bundle loading, native module compatibility, or API entitlements that could be causing this? What tools or logs should I use to track the exact source of failure? Any guidance would be greatly appreciated! Thank you. Steps Taken: The app runs fine in Expo Go (npx expo start --no-dev --minify) and in the iOS Simulator (npx expo run:ios --clean). I also did (npx expo-doctor) and it passed all 15 checks. After building with EAS (eas build --platform ios --profile production), the TestFlight build crashes on launch. I checked Xcode logs (Devices & Simulators > View Device Logs) and found this error: `Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: SIGNAL 6 Abort trap: 6 Terminating Process: LoungeNavigator [4666] Triggered by Thread: 6 Thread 6 name: Thread 6 Crashed: Thread 6 crashed with ARM Thread State (64-bit): x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000 My app.json file: "expo": { "name": "appname", "slug": "app", "owner": "baint", "version": "0.5.2", "orientation": "portrait", "icon": "./assets/images/IOS-App-Icon.png", "scheme": "myapp", "userInterfaceStyle": "automatic", "newArchEnabled": true, "ios": { "supportsTablet": true, "bundleIdentifier": "bundleIdentifier", "icon": "./assets/images/IOS-App-Icon.png", "buildNumber": "7", "infoPlist": { "NSLocationAlwaysAndWhenInUseUsageDescription": "This app requires access to your location at all times.", "NSLocationAlwaysUsageDescription": "This app needs your location even when the app is in the background.", "NSLocationWhenInUseUsageDescription": "We need your location.", "ITSAppUsesNonExemptEncryption": false } }, "android": { "adaptiveIcon": { "foregroundImage": "./assets/images/IOS-App-Icon.png", "backgroundColor": "#ffffff" }, "package": "identifier" }, "web": { "bundler": "metro", "output": "static", "favicon": "./assets/images/favicon.png" }, "plugins": [ "expo-router", [ "expo-splash-screen", { "image": "./assets/images/IOS-App-Icon.png", "imageWidth": 200, "resizeMode": "contain", "backgroundColor": "#ffffff" } ], "expo-asset", [ "@rnmapbox/maps", { "RNMapboxMapsImpl": "mapbox", "ios": { "RNMapboxMapsDownloadToken": "token", "RNMapboxMapsAccessToken": "token", "NSLocationAlwaysAndWhenInUseUsageDescription": "This app requires access to your location at all times.", "NSLocationAlwaysUsageDescription": "This app needs your location even when the app is in the background.", "NSLocationWhenInUseUsageDescription": "We need your location." } } ], [ "expo-build-properties", { "ios": { "useFrameworks": "static", "useModularHeaders": true } } ] ], "experiments": { "typedRoutes": true }, "extra": { "router": { "origin": false }, "eas": { "projectId": "projectid" } } } } My eas.json file: "cli": { "version": ">= 14.7.1", "appVersionSource": "remote" }, "build": { "development": { "developmentClient": true, "distribution": "internal" }, "preview": { "distribution": "internal" }, "internal": { "distribution": "store", "ios": { "credentialsSource": "remote" }, "autoIncrement": true, "env": { "EXPO_PUBLIC_NODE_ENV": "production" } }, "production": { "autoIncrement": true, "distribution": "store", "env": { "EXPO_PUBLIC_NODE_ENV": "production" } } }, "submit": { "production": { "ios": { "ascAppId": "ascAppId", "appleId": "appleId", "ascApiKeyPath": "ascApiKeyPath" } } } }
4
0
143
Mar ’25
NSString initWithFormat crash on ios18
var format = "%7B%22sign%22%3Anull%2C%22company%22%3A%22%E5%85%84%E5%BC%9F%E6%B5%B7%E6%B4%8B%E7%A7%91%E6%8A%80%E6%9C%89%E9%99%90%E5%85%AC%E5%8F%B8%22%2C%22businessNo%22%3Anull%2C%22scene%22%3Anull%2C%22interviewCode%22%3A%22767676%22%7D" let message = withVaList([]) { args in let msg = NSString(format: format, arguments: args) print(msg) }
6
0
96
Mar ’25
Unable to open mach-O at path - metallib Error:2
When I toggle a panel like navigationsidebar, I get a message in the console. I guess it's not a big issue, but is there a way to fix this message? because it appears in every project. Unable to open mach-O at path: /AppleInternal/Library/BuildRoots/d187757d-b9a3-11ef-83e5-aabfac210453/Library/Caches/com.apple.xbs/Binaries/RenderBox/install/TempContent/Root/System/Library/PrivateFrameworks/RenderBox.framework/Versions/A/Resources/default.metallib Error:2
1
0
368
Mar ’25
A static lib/framework with dwarf info. Will leaking your private info?
When you build a static library that includes DWARF information, you may encounter error messages in the binary package generated by Xcodebuild. Upon examining the DWARF information with dwarfdump, you will find that any entries containing keywords like dir are all absolute paths specific to the publisher's computer. This is quite alarming, as it poses a risk of leaking private information. Additionally, when debugging an app, you can encounter consistent warning notes indicating that the referenced path addresses cannot be found. This is because the absolute path addresses generated during the 'xcodebuild' process reflect the paths from the computer used to build it. When distributing this to others, how can anyone access these paths? Has the design of the secondary linking process for DWARF considered the issues related to binary distribution? Are there existing solutions to address and handle privacy concerns? Is there a solution to allow the distributed DWARF files to be correctly recognized during compilation and debugging of the app? BTW: Incorrect paths can indeed affect LLDB's ability to load and debug the application effectively?
1
0
190
Mar ’25
Using ARKit Replay hangs forever on "Attaching to App"...
Hello, I'm trying to use Xcode's ARKit Session replay functionality. I have a capture I made using Reality Composer and when trying to use it with Xcode's replay functionality the installation and debugging process seems stalled forever. I've gotten it to work once so I know the capture file is functional but I have never gotten it to work a second time, even though I didn't change any settings. No amount of restarting Xcode, the Mac, or the iPhone seem to work. I have also tried cleaning build folders, reinstalling the app, and clearing DerivedData. I can confirm from the Xcode logs that the app installs correctly but the app never launches. If I unselect the checkbox for "ARKit Replay Data", the app launches and debugs nearly instantly. I have tried letting it "attach" for up to 10 minutes to no avail.
2
0
285
Mar ’25
TestFlight app crashes on launch when minimum supported iOS version is set to iOS 14
Hi All, I have an App on AppStore, recently the minimum supported version of the app was changed from iOS 12 to iOS 14. Post that the TestFlight builds are crashing on launch. If we revert the minimum supported iOS version to 12, the crash no longer happens. This project is using cocoapods, and from the crash logs it seems the issue with with PLCrashReporter framework. "EXC_CRASH" Termination reason: DYLD 9 weak-def symbol not found '__ZN7plcrash3PL_5async15dwarf_cfa_stateljiE10push_stateEv'. This issue is happening only on TestFlight builds where the minimum supported version is 14.0 Any pointer to a solution is welcome.
1
0
316
Mar ’25
Crash reports downloaded by Xcode contain impossible call hierarchy
I was just having a look at some crash reports downloaded by Xcode, and I noticed the same wrong pattern I already mentioned here: the crash reports indicate that method A calls method B, which is impossible. In the first crash report below, method MainViewController.showSettings seems to be called by ConfirmMoveViewController.openSourceInFinder, which is impossible. ConfirmMoveViewController.openSourceInFinder is a context menu action in a modal window, and MainViewController.showSettings is in a completely different window and the two methods have no relation whatsoever. In the second crash report below, MainViewController.setSortMode is triggered by the press of a button (and nothing else) but seems to be called by OtherViewController.copy that can be triggered by a context menu (or keyboard shortcut). The two methods have no relation whatsoever. The rest of the stack trace confirm that it's indeed the button that was pressed. This seems to me like a quite serious bug in how macOS creates crash reports. 1.crash 2.crash
6
0
240
Mar ’25
Question about using @Previewable
This is an issue that occurred while using SwiftUI. Cannot find '$state' in scope The other view finds properties normally. May I know why the error is occurring? The following code is the full text of the code that causes problems. import SwiftUI @Observable class HomeState { var title: String = "Home" } struct HomeView: View { @Binding var state: HomeState var body: some View { Text(state.title) } } #Preview { @Previewable @State var state: HomeState = .init() HomeView(state: $state) /// Error: Cannot find '$state' in scope } The same error occurs when using the String type rather than the object. What did I do wrong?
2
1
209
Mar ’25
App Freezing at Launch and Unexpected Termination
We are experiencing an issue where our app gets stuck during launch. The splash screen appears for some time, and then the app either becomes unresponsive or closes unexpectedly. However, there are no crash logs captured in Xcode or Firebase Crashlytics, indicating that the app is not crashing but rather being terminated. This issue is preventing affected users from properly launching the app. Additionally, some users have reported occasional lag and slow performance when using the app. The issue occurs only for a specific subset of users and appears to be related to other Electronic Logging Device (ELD) apps running in the background. When these apps are active, our app struggles to launch and sometimes becomes unresponsive. We suspect that this behavior could be related to system resource allocation, such as high memory consumption by background apps, which might be affecting our app's ability to launch correctly. However, we have been unable to reproduce the issue on our end despite multiple attempts. Actions Performed During App Launch: Firebase configuration API requests, including: Fetching account details Registering the FCM token with the server Asynchronous background requests to fetch POI details Creating a local database and storing POI data in local storage We would like guidance from Apple regarding potential causes and debugging strategies, especially in scenarios where the app does not produce crash logs but still fails to launch properly. Any insights into memory management, conflicts with background applications, or system resource constraints would be highly appreciated. Steps to Reproduce: Install and launch the app on an affected device. Observe that the app gets stuck on the launch screen. After some time, the app terminates unexpectedly. Issue is inconsistent and occurs only for certain users. Presence of other ELD apps running in the background appears to influence the issue.
3
0
218
Mar ’25
Memory leak in WebKit caused by KVO and @StateObject
Hi! My SwiftUI app is a rather complex browser app. Starting with iOS 18, the app crashes due to repeted reloads of the WkWebView. I’ve tracked the issue as far as I can, but I still haven’t found the root cause. My app is structured like this: MainView holds a cuple of subviews. It also holds a @StateObject called viewModel that holds a lot of @Published vars. The viewModel is passed as a enivormentObject. Example from ViewModel: @MainActor class ViewModel: NSObject, ObservableObject { @Published public var isLoading: Bool = false @Published public var loadProgress: Double? = 0 public func setIsLoading(_ value: Bool) async { self.isLoading = value } public func setLoadProgress(_ value: Double?) async { self.loadProgress = value } } WebView is a subview of MainView, which holds a navigation bar, and a UIViewRepresentable, which is a WkWebView. The WkWebView pushes some states to the ViewModel as the underlying values of the WkWebView changes, i.e. estimaedProgress, and isLoading. This is done via KVO and works like this: estimatedProgressObservation = self.parent.webView.observe(\.estimatedProgress) { webView, progress in Task { await parent.viewModel.setLoadProgress(webView.estimatedProgress) } } isLoadingObservation = self.parent.webView.observe(\.isLoading) { webView, value in Task { await parent.viewModel.setIsLoading(webView.isLoading) } } By using a timer in WkWebViews Coordinator, i trigger a load after a configurable amount of time :
 func loadUrl(url: URL) { DispatchQueue.main.async { console.info("Load URL: ...", sensitive: "Load URL: \(url.absoluteString)") let policy: NSURLRequest.CachePolicy if self.parent.settings.noCache { policy = .reloadIgnoringLocalAndRemoteCacheData } else { policy = .useProtocolCachePolicy } let request = URLRequest(url: url, cachePolicy: policy) self.parent.webView.load(request) } } Running the app with the automatic reload enabled freezes the app after a couple of hours. It also seems to freeze Safari on the device. The device needs to be rebooted. If I inspect the device's running processes, hundreds of ”com.apple.webkit. web content " processes are running. Removing await parent.viewModel.setLoadProgress(webView.estimatedProgress) and await parent.viewModel.setIsLoading(webView.isLoading) fixes the issue, but it is necessary for other app functions. Therefore, is suspect that the viewModel somehow causes the bug. The issue arises after a couple of loads 5-10. The debugger shows a message when the processes start to pile up. I suspect its related. Failed to terminate process: Error Domain=com.apple.extensionKit.errorDomain Code=18 "(null)" UserInfo={NSUnderlyingError=0x12d0e7f60 {Error Domain=RBSServiceErrorDomain Code=1 "Client not entitled" UserInfo={RBSEntitlement=com.apple.runningboard.terminateprocess, NSLocalizedFailureReason=Client not entitled, RBSPermanent=true}}} How can I find out what causes the suspected memory leak? Instruments gives me nothing of value. The memory leak wasn't present in iOS 17. Is this a bug in iOS 18, or was something intentionally changed?
0
0
355
Mar ’25
Instrument Recording Failure - CPU counter failed
Hi, I’m encountering an issue while using xctrace & instruments to profile an application on macOS. Specifically, when trying to record a trace using the CPU Profiler template, I get the following errors: Failed to start the recording: configureHardwareCounters: Failed set kpc configuration: Operation not permitted. Unexpected failure: Couriers have returned unexpectedly. macOS Version: 15.3.1 Chip: Apple M4 Pro Xcode Version: Xcode 16.2
4
2
516
Mar ’25