In TestFlight crash reports, all I see is the stack trace.
Is there any other information hidden in there, such as the specific signal (etc) that caused the app to terminate?
Thanks.
Debugging
RSS for tagDiscover and resolve issues with your app.
Posts under Debugging tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I am using ScreenCaptureKit to create a screenshot software,
but I found that the screenshot captured by the new API, SCScreenshotManager.captureImage, is very blurry.
This is my screenshot. It is so blurry.
But I hope it's like this.
My code is as follows.
func captureScreen(windows: [SCWindow], display: SCDisplay) async throws -> CGImage? {
let availableWindows = windows.filter { window in
Bundle.main.bundleIdentifier != window.owningApplication?.bundleIdentifier
}
let filter = SCContentFilter(display: display, including: availableWindows)
if #available(macOS 14.0, *) {
let image = try? await SCScreenshotManager.captureImage(
contentFilter: filter,
configuration: SCStreamConfiguration.defaultConfig(
width: display.width,
height: display.height
)
)
return image
} else {
return nil
}
}
extension SCStreamConfiguration {
static func defaultConfig(width: Int, height: Int) -> SCStreamConfiguration {
let config = SCStreamConfiguration()
config.width = width
config.height = height
config.showsCursor = false
if #available(macOS 14.0, *) {
config.captureResolution = .best
}
return config
}
}
Hi Team,
I am using Xcode 15. When my app crashes, Xcode does not show at which point of the code the app crashes when in preview mode using SwiftUI.
Is there a setting I need to enable in order to show the position of compile error in the code when the app crashes?
Breakpoints are not working as well.
Thanks!
I have Xcode 15 installed on 2 MacBooks. Both MacBooks are running macOS Sonoma 14.0.
I am trying to debug an iOS app wirelessly on an iPhone 7 with iOS 15.7.9.
Under Window -> Devices and Simulators in Xcode I can see the iPhone under Disconnected and the message: "iPhone is disconnected" "Xcode will continue when iPhone is connected and unlocked"
I have the "Connect via Network" checked.
The iPhone is found when I connect it with a USB cable to both MacBooks. However I need to debug wirelessly without connecting through USB.
Here is some troubleshooting that I did:
Made sure iPhone 7 and both MacBooks are on the same WiFi
Restarted iPhone 7 and both MacBooks
Restored iPhone 7 to factory settings
Pinged iPhone 7 through Terminal with its IP address on both MacBooks: ping 192.168.1.164 - it finds the iPhone 7 and I receive packages back over the network on both MacBooks
Tried "Connect via IP address" under Devices and Simulators - it does not find the iPhone and does not connect
On one of the 2 MacBooks I have a proxy. On the other MacBook there is no VPN nor proxy set up. Still both MacBooks can not connect to iPhone 7 wirelessly though Xcode.
I also have an iPhone 12 with iOS 16.6.1. I can connect to this iPhone 12 wirelessly through Xcode. It works with the iPhone 12.
Did Apple stop the support for wireless debugging with Xcode 15 on iPhone 7s?
Does anyone have the same problem?
Hi guys,
I'm delveloping an app that use HealthData. I use this data:
HKWorkoutType.workoutType(),
HKObjectType.quantityType(forIdentifier: .heartRate)!,
HKObjectType.quantityType(forIdentifier: .distanceSwimming)!
I would like use Simulator to test app, but there aren't data.
How can I import data?
Now to test my app use only my iPhone, but in this way I don't test multiple device to test my app.
Could you help me?
Thank you.
Filippo
Dear Experts,
When I try to use Address Sanitizer on my iOS app, it reports "attempting free on address which was not malloc()-ed" whenever a C++ exception is caught.
If first saw it inside Apple's libFontParser and filed FB13271831, but I now see it in my own code. The Address Sanitizer stack trace always starts like this:
#1 0x215766ae8 in __cxa_decrement_exception_refcount+0x40 (/usr/lib/libc++abi.dylib:arm64e+0x13ae8)
Having looked up __cxa_decrement_exception_refcount in the C++ ABI docs, my guess is that the C++ runtime is creating and destroying the exception objects in some way that Address Sanitizer doesn't properly understand, causing it to think that they are being freed without having been allocated by malloc.
This is only really a problem because it does not seem possible to continue after ASan has reported this error; the app is terminated.
Question: is there a way to tell Address Sanitiser to ignore errors in this function? And/or, is there a way to continue after the error?
Thanks.
Debugging on iOS 17 is terribly slow in Xcode15,
Is that a solution?
I wonder if anyone else's users are experiencing a white screen when attempting to log in to your app. This issue is not widespread. Currently, it only affects around 6 of our users(that have reported) out of thousands. This is not an account issue, as I do not have this issue when I test their logins on my device. We have confirmed no accessibility settings are enabled, and they don't have any apps that should block any apps. They have also tested on wifi and device networks with the same issue. They cannot log in to any test accounts we provide either, and we are at a loss for what it could be as we can not duplicate the issue. So we are open to any advice/solutions
Hi all, today I tried to upload my first app on the App Store. he Apple team refused it saying "We were unable to review your app as it crashed on launch. We have attached detailed crash logs to help troubleshoot this issue.
Review device details:
Device type: iPad
OS version: iOS 17.0.3"
I'm trying to understand why it crashed since on the simulator and on the real device works really well. Thank you so much for the help!
crashlog-F08B1BFA-7171-43B8-8426-85A68A169280.txt
crashlog-774E8C28-5D3A-4FB5-9909-C79F284E7608.txt
crashlog-A099F0D9-94F6-4372-B058-F4AEB6C450A5.txt
crashlog-CE424B33-6E99-4E29-AA75-85FD3E5A4FAD.txt
Hi,
I have an iOS app that interacts with a USB accessory. This works fine when running on an iPhone or iPad. However, when I compile the app in Xcode to run on my M1 Mac, the app won't see any USB devices. The target I use is "My Mac (designed for iPad)" which was the path of least resistance when compared to trying Catalyst. Is it possible to give my app access to USB accessories when running on my Mac? If so, what settings do I need to change? I've tried setting the "com.apple.security.device.usb" entitlement to true to no avail. Is the issue that the app is running in some sort of sandbox?
On Xcode 15, when I launch my app on "Wait for the executable to be lauched" mode, I can't debug because Xcode simply doesn't pause at my breakpoints. They change their look and turn to dotted blue outlined.
When I hover over breakpoint Xcode shows a message:
Xcode won't pause at this breakpoint because it has not been resolved Resolving it requires that:
The line at the breakpoint is compiled.
The compiler generates debug information that is not stripped out (check the Build Settings).
The library for the breakpoint is loaded.
On the other hand, when I launch it on "Automatically" mode, everything works fine.
Does anyone have any ideas how to solve it?
Best regards.
When I upgrade to xcode15, I get an error compiling the project with the following error message
0 0x104f5f648 __assert_rtn + 72
1 0x104e87c5c ld::Fixup::applyFixup(ld::Atom const*, ld::LayoutLinkedImage const&, unsigned char*) const + 8268
2 0x104f1a7d8 ___ZN2ld16LayoutExecutable27writeContentWithoutLinkEditENSt3__14spanIhLm18446744073709551615EEEy_block_invoke + 332
3 0x18c39b950 _dispatch_client_callout2 + 20
4 0x18c3b01a4 _dispatch_apply_invoke_and_wait + 176
5 0x18c3af464 _dispatch_apply_with_attr_f + 1176
6 0x18c3af650 dispatch_apply + 96
7 0x104f1a9e4 void mapReduce<ld::Atom const*, mach_o::Error>(std::__1::span<ld::Atom const*, 18446744073709551615ul>, unsigned long, void (unsigned long, mach_o::Error&, std::__1::span<ld::Atom const*, 18446744073709551615ul>) block_pointer, void (std::__1::span<mach_o::Error, 18446744073709551615ul>) block_pointer) + 336
8 0x104f1a594 ld::LayoutExecutable::writeContentWithoutLinkEdit(std::__1::span<unsigned char, 18446744073709551615ul>, unsigned long long) + 1180
9 0x104f20020 ld::LayoutExecutable::writeToFile(char const*) + 15248
10 0x104ed22e8 main + 9424
ld: Assertion failed: (extras.otherInstrOffset != 0 && "Kind::arm64_adrp_ldr missing extra info"), function applyFixup, file Fixup.cpp, line 793.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This error only occurs when archiving, not when building.
I don't get this error when I delete the C++ code in the project.
How do I solve it?
Hey there,
I am quite new to SwiftUI and currently trying to implement a pdf file into my app. When run the app on my iPhone the pdf file opens without any problems but I always get this Error:
Unable to open mach-O at path: default.metallib Error:2
I do not actually understand the code completely I found on multiple websites, but what am I doing wrong? I attached my used code.
Thanks for your help!
Laurin
import PDFKit
struct PDFKitView: UIViewRepresentable {
let pdfDocument: PDFDocument
init(showing pdfDoc: PDFDocument) {
self.pdfDocument = pdfDoc
}
func makeUIView(context: Context) -> PDFView {
let pdfView = PDFView()
pdfView.document = pdfDocument
pdfView.autoScales = true
return pdfView
}
func updateUIView(_ pdfView: PDFView, context: Context) {
pdfView.document = pdfDocument
}
}
struct Hypoglykaemie: View {
let pdfDoc: PDFDocument
init() {
let url = Bundle.main.url(forResource: "hypoglykaemie", withExtension: "pdf")!
pdfDoc = PDFDocument(url: url)!
}
var body: some View {
PDFKitView(showing: pdfDoc)
}
}
#Preview {
Hypoglykaemie()
}
Hi,
I get multiple warnings in logs while working on my Vision app:
ABPKPersonIDTracker not supported on this device
Failed to initialize ABPK Person ID Tracker
It's not impacting my app run itself (I think), but impacting my app development.
I can't find any related topics to this on Internet.
I'll appreciate your help.
I am trying to test an application in a SANDBOX environment.
iPhone XR, iOS 17.0.3, Xcode 15.0.1
Everything works, but with every transaction or update I get
a lot of CoreServise warnings, Error messages, etc.
Initially I've been using Xcode 4.3.1 and 15 Beta with my iOS 16.5 and 16.6.1 and no issues occurred. I upgraded to Xcode 15 and now 15.0.1 and iOS to 17+, 1st Xcode was not detecting iOS that got fixed in https://developer.apple.com/forums/thread/737907?page=2 post. Now Android studio is not ready to run/debug app.
ERROR: Could not run build/ios/iphoneos/Runner.app on xxxxxxx-xxxxxxxxxxxxx Try launching Xcode and selecting Product < Run to fix the problem.
To my surprize, app works fine in Xcode but can't launch it in Android Studio, i have tried almost everything.
Invalidated cache
Complete Android Studio cache clear
Delete build
Clean flutter
Upgrade pub/tools/etc
All plugins are up to date becaause same app runs in XCODE
(My phone is directly connected to USB, its iPhone XR running on iOS 17.0.3, developer mode is fine and i can run app on Xcode)
crashlog.crash
In iOS 17 Im getting following error :
Alert
NSInternalinconsistencyException-UlViewController is missing its initial trait collection populated during initialization. This is a serious bug, likely caused by accessing properties or methods on the view controller before calling a UlViewController initializer. View controller:
<HamburgerMenuViewController:
0x11307de00>
It works on 16.7.1. It is a blocker in iOS 17
Hi there,
I am still quite new to Swift and have following problem: Many animations in my app have bugs, like you can see in the attached images. I cannot attach a video so I attached images from the video. Here is my description: When I click on a NavigationLink, the title of the following page appears after the animation and the whole content of the page moves up. What can I do against this?
This is my code from the first page:
struct Medikamente: View {
var body: some View {
NavigationStack {
List {
Group {
NavigationLink(destination: Acetylsalicylsaeure()){
Image("AcetylsalicylsaeureMediLabel")
.resizable()
.frame(width:60, height: 30)
Text("Acetylsalicylsäure")
}
NavigationLink(destination: Amiodaron()){
Image("AmiodaronMediLabel")
.resizable()
.frame(width:60, height: 30)
Text("Amiodaron")
}
NavigationLink(destination: Atropin()){
Image("AtropinMediLabel")
.resizable()
.frame(width:60, height: 30)
Text("Atropin")
}
NavigationLink(destination: Butylscopolamin()){
Image("ButylscopolaminMediLabel")
.resizable()
.frame(width:60, height: 30)
Text("Butylscopolamin")
}
// More medication
}
}
.navigationTitle("Medikamente")
.navigationBarTitleDisplayMode(.automatic)
}
}
}
#Preview {
Medikamente()
}
And this is the code from the second page.
struct Acetylsalicylsaeure: View {
var body: some View {
NavigationStack {
List {
Section {
Image("AcetylsalicylsaeureMediLabel")
.resizable()
.scaledToFit()
}
NavigationLink(destination: List {
Section {
Text("**500 mg Trockensubstanz** + 5ml Lösungsmittel")
Text("diverse orale Darreichungsformen")
} header: {
Text("**Allgemeine Informationen** \nKonzentration")
}
Section {
Text("Thrombozytenaggregationshemmer")
} header: {
Text("Arzneimittelgruppe")
}
.navigationTitle("Acetylsalicylsäure")
.navigationBarTitleDisplayMode(.inline)
}) {
Text("Allgemeine Informationen")
}
// More NavigationLinks...
NavigationLink(destination: List {
Section {
Text("Im Rettungsdienst nicht möglich")
} header: {
Text("**Erfolgsprüfung**")
}
.navigationTitle("Acetylsalicylsäure")
.navigationBarTitleDisplayMode(.inline)
}) {
Text("Erfolgsprüfung")
}
NavigationLink(destination: List {
Section {
Text("Lt. BPR „Akutes Coronarsyndrom“, Heparin 5.000 I.E. i.v.")
} header: {
Text("**Folgemaßnahmen**")
}
.navigationTitle("Acetylsalicylsäure")
.navigationBarTitleDisplayMode(.inline)
}) {
Text("Folgemaßnahmen")
}
.navigationTitle("Acetylsalicylsäure")
.navigationBarTitleDisplayMode(.inline)
}
}
}
}
#Preview {
Acetylsalicylsaeure()
}
Thank you so much for your help!
Laurin
Hey,
I write a simple console c++ program on XCODE fro mac.
The code is very simple
#include <iostream>
using namespace std;
int main() {
int a = 0;
cin >> a;
return 0;
}
Then,
1: Press command + R to debug the program.
2: The program is waiting for user input, don't input.
3: Put a breakpoint at "return 0;"
4: The program will continuing running and hit the breakpoint which was put in step.3 without input anything.
As I didn't input anything besides put a breakpoint, the "cin >> a;" should still block the program and waiting for user input. So the actual behavior is not expected.
Have any idea?
Thanks