Debugging

RSS for tag

Discover and resolve issues with your app.

Posts under Debugging tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Memory graph looped arrow meaning
I've gone over the memory graph debugger documentation and WWDC videos. The available documentation is sparse and does not go into any detail of what things mean. Through usage I have a fair understanding of what most symbols and reference lines mean except for the line from an object that loops back on itself in the top right corner of an object symbol. I have noticed it always appears on dictionaries, I have this on one of my own classes and want to know what it means?
3
0
263
3w
"Wait for executable to be launched" not installing app
When I debug in Xcode, there is a launch flag that is normally set to "Automatically", and after building, Xcode installs & runs the app in the simulator or device. The other setting is "Wait for executable to be launched". I don't use this feature too much, but I thought what it would do in build & install the app, but not launch. So, the idea would be that you could install the app, then take over - as a user - and tap the icon to launch the app. At this point, the Debugger would take over again, and you could debug the app from a very early spot. When I set that flag now, the app never gets installed, so I can't do this. Xcode just has this in its status bar, and it never changes: Waiting to attach on I swore that it used to install the app in the sim for this setting. I don't know how many versions ago it was, but I really thought it did this. Does it not anymore, or should I file a bug?
2
0
262
1w
Is debugging with App Data broken?
Trying to use App Data on Xcode 16.2, and failing I'm running the app with the debugger. When I run the app, I need to do a handful of things, which affects my app's cache files, and UserDefaults. What I'd like to do is store all of these settings, then have them loaded in when the app launches, so I don't need to do same, tedious work of changing settings by hand in the UI. So, I discovered that I can provide an xcappdata directory in the Run options. This seems like exactly what I'm looking for. But I can't seem to get it to work. Like, when the app runs, it looks like none of those settings are brought in. I ran the app on a device, and pulled down the application data, and then put that in the project. And you can see in the screenshot, that the value is set. So, either I'm missing something (which is totally possible) or this feature is broken. Documentation on this is not great, so maybe I'm doing something wrong. If the feature is known to be broken, I'll give up on this. But if it should work, it would be great to get some tips here.
0
0
154
Jan ’25
Failing UI Test for new floating Tabbar iOS 18+
Xcode 16.1 iOS 18.1 iPad Air 13-inch (M2) I have created a completely new Xcode project with Swift and Storyboard. In Storyboard, I only have a tabBarController with two attached UIViewControllers. The code from the base project hasn't been changed at all. I created a UITest with a very simple premise. let app = XCUIApplication() override func setupWithError() throws { continueAfterFailure = false app.launch() } func testTabBarExistence() { let tabBar = app.tabBars.element(boundBy: 0) XCTAssertTrue(tabBar.waitForExistence(timeout: 5), "Tab bar should exist") } But this test always fails for iPad on iOS 18+, but it will succeed for anything lower (e.g. 17.5)
1
1
305
3d
SwiftUI TabVIew Faulting while switching between Tabs
I'm working on a SwiftUI based application for MacOS. I have a TabView component with two child Tab components. These Tab components display a List, each derived from an array of elements. While the application is running, clicking on the tabs in the TabView should switch between the views of different Lists. What I'm experiencing is that switching between the tabs causes a FAULT. With errors: Row index 1 out of row range (numberOfRows: 1) for <SwiftUI.SwiftUIOutlineListView: 0x1299d2000> Followed by: ( 0 CoreFoundation 0x000000019e096e80 __exceptionPreprocess + 176 1 libobjc.A.dylib 0x000000019db7ecd8 objc_exception_throw + 88 2 AppKit 0x00000001a1c744e8 -[NSTableRowData _availableRowViewWhileUpdatingAtRow:] + 0 3 SwiftUI 0x00000001cd8953f4 $s7SwiftUI0A17UIOutlineListViewC11removeItems2at8inParent13withAnimationy10Foundation8IndexSetV_ypSgSo07NSTableeL7OptionsVtF + 1232 ... ... ) And finally: FAULT: NSTableViewException: Row index 1 out of row range (numberOfRows: 1) for <SwiftUI.SwiftUIOutlineListView: 0x1299d2000>; (user info absent) This error happens when switching between the two tabs, defined thusly: @main struct MyApp: App { @State var rootDirectory: URL @State var selectedItem: URL @State var projectNavItems: [NavigationItem] = [] @State var jotNavItems: [NavigationItem] = [] @State var importerIsPresented: Bool = false let fileManager = FileManager.default init() { rootDirectory = URL(string: FileManager.default.currentDirectoryPath)! selectedItem = URL(string: FileManager.default.currentDirectoryPath)!.appendingPathComponent("README.md") } var body: some Scene { WindowGroup { NavigationSplitView { TabView { Tab("Projects", systemImage: "tray.and.arrow.down.fill") { List(projectNavItems, selection: $selectedItem) { // Changing this NavigationLink line to Text($0.title) makes no difference NavigationLink($0.title, value: $0.id) } } Tab("Jots", systemImage: "tray.and.arrow.up.fill") { List(jotNavItems, selection: $selectedJot) { // Can be written as Text($0.title) with no change in behavior NavigationLink($0.title, value: $0.id) } } } } detail: { Editor(for: selectedItem) } .fileImporter( isPresented: $importerIsPresented, allowedContentTypes: [UTType.folder], allowsMultipleSelection: false ) { result in // Code that gets a security scoped resource and populates the // projectNavItems: [NavItem] and jotNavItems: [NavItem] // arrays } } .commands(content: { CommandGroup (before: .newItem) { Button("Open Journal...") { importerIsPresented.toggle() } } }) } } The error only happens when both Tab views are populated by a List. If the Tab view have different child components, say a List, and a ForEach of Text components, switching between the tabs doesn't produce this error. List views with Text child components also produce this error. Here are screenshots of the running application Once the user selects a directory, we see the first Tab > List component populated by contents from the projectNavItems array: Clicking on the 'Jots' tab switches to the appropriate tab and correctly lists the items in the jotNavItems array, except there are additional lines, seemingly showing that there's an issue. Clicking back on the 'Projects' tab switches back, but now the List shows only one of the items from the projectNavItems array. Finally, clicking on 'Jots' again causes the errors to print in the console and interactivity with the tab components ceases. Last screenshot is representative of this state as the application FAULTS. This seems like a bug in SwifUI, wondering what workarounds I might be able to implement. I can provide the full backtrace, I cropped it for content length.
2
0
242
Jan ’25
Issue with iPad app review. App crashing.
I'm receiving this error message from Apple saying that my app is crashing when they test, but I've already done the tests on the iPad version they recommended and it worked normally. Message below of the review team: Hello, Thank you for your resubmission. Upon further review, we identified additional issues that need your attention. See below for more information. If you have any questions, we are here to help. Reply to this message in App Store Connect and let us know. Review Environment Submission ID: 4f068d93-c30e-431c-b65c-6ff4c3ab1098 Review date: January 23, 2025 Version reviewed: 1.0 Guideline 2.1 - Performance Issue Description The app still crashed during review. Apps that crash negatively impact users. Steps leading to crash: The app crashed upon login attempt. Review device details: Device type: iPad Air (5th generation) OS version: iPadOS 18.2.1 I left the file below crashlog: {"app_name":"MauiApp2","timestamp":"2025-01-27 11:39:16.00 +0000","app_version":"4.0","slice_uuid":"11117a05-c930-3591-b6d9-7905912af710","adam_id":"6740661076","build_version":"4","bundleID":"com.company.MauiApp2","platform":2,"share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"iPhone OS 18.2.1 (22C161)","roots_installed":0,"incident_id":"987579BB-C332-42CF-B7AB-3F019902703A","name":"MauiApp2"} { "uptime" : 40000, "procRole" : "Foreground", "version" : 2, "userID" : 501, "deployVersion" : 210, "modelCode" : "iPad13,16", "coalitionID" : 1424, "osVersion" : { "isEmbedded" : true, "train" : "iPhone OS 18.2.1", "releaseType" : "User", "build" : "22C161" }, "captureTime" : "2025-01-27 11:39:15.7724 +0000", "codeSigningMonitor" : 1, "incident" : "987579BB-C332-42CF-B7AB-3F019902703A", "pid" : 1883, "translated" : false, "cpuType" : "ARM-64", "roots_installed" : 0, "bug_type" : "309", "procLaunch" : "2025-01-27 11:38:57.0672 +0000", "procStartAbsTime" : 979679570352, "procExitAbsTime" : 980128429544, "procName" : "MauiApp2", "procPath" : "\/private\/var\/containers\/Bundle\/Application\/240115B9-6606-406B-BD49-C24EC7F3D436\/MauiApp2.app\/MauiApp2", "bundleInfo" : {"CFBundleShortVersionString":"4.0","CFBundleVersion":"4","CFBundleIdentifier":"com.company.MauiApp2","DTAppStoreToolsBuild":"16C5031b"}, "storeInfo" : {"itemID":"6740661076","deviceIdentifierForVendor":"27BFDD21-822E-47D6-B639-199303E14913","thirdParty":true,"softwareVersionExternalIdentifier":"871814512"}, "parentProc" : "launchd", "parentPid" : 1, "coalitionName" : "com.company.MauiApp2", "crashReporterKey" : "83a5662fa3ae9a4fa99bf1f03c706f755ff38e3d", "appleIntelligenceStatus" : {"state":"unavailable","reasons":["notOptedIn","assetIsNotReady"]}, "wasUnlockedSinceBoot" : 1, "isLocked" : 0, "codeSigningID" : "com.company.MauiApp2", "codeSigningTeamID" : "ALCV75QR7M", "codeSigningFlags" : 570450689, "codeSigningValidationCategory" : 4, "codeSigningTrustLevel" : 7, "instructionByteStream" : {"beforePC":"fyMD1f17v6n9AwCRPOz\/l78DAJH9e8Go\/w9f1sADX9YQKYDSARAA1A==","atPC":"AwEAVH8jA9X9e7+p\/QMAkTHs\/5e\/AwCR\/XvBqP8PX9bAA1\/WECeA0g=="}, "bootSessionUUID" : "942643AD-6AFE-4696-ACEB-603AC2D48B4F", "exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"}, "termination" : {"flags":0,"code":6,"namespace":"SIGNAL","indicator":"Abort trap: 6","byProc":"MauiApp2","byPid":1883}, "asi" : {"libsystem_c.dylib":["abort() called"]}, "faultingThread" : 0, "threads" : [{"threadState":{"x":[{"value":0},{"value":0},{"value":0},{"value":0},{"value":18446744071913938304},{"value":8},{"value":6135065824},{"value":6135063504},{"value":2354241331284576430},{"value":2354241335696964078},{"value":1023},{"value":6135063616},{"value":0},{"value":4336219676},{"value":7128134088,"symbolLocation":7344,"symbol":"WebKit::WebPage::requestDocumentEditingContext(WebKit::DocumentEditingContextRequest&&, WTF::CompletionHandler<void (WebKit::DocumentEditingContext&&)>&&)"},{"value":7128134340,"symbolLocation":7596,"symbol":"WebKit::WebPage::requestDocumentEditingContext(WebKit::DocumentEditingContextRequest&&, WTF::CompletionHandler<void (WebKit::DocumentEditingContext&&)>&&)"},{"value":328},{"value":8506093888,"symbolLocation":0,"symbol":"_main_thread"},{"value":0},{"value":6},{"value":259},{"value":8506094112,"symbolLocation":224,"symbol":"_main_thread"},{"value":4354417664},{"value":1},{"value":12927714000},{"value":0},{"value":0},{"value":6135069717},{"value":12950787712}],"flavor":"ARM_THREAD_STATE64","lr":{"value":9082160540},"cpsr":{"value":1073745920},"fp":{"value":6135065840},"sp":{"value":6135065808},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":8120668884,"matchesCrashFrame":1},"far":{"value":0}},"id":399494,"triggered":true,"name":"tid_103","queue":"com.apple.main-thread","frames"
1
0
287
Jan ’25
App immediately crashes after re-opening with no crash report
I am trying to diagnose a very strange application crash that occurs intermittently under the following conditions App built in release and installed on iPhone App is in the background (e.g. close the app and open a different app without fully force quitting it) When these conditions are present, and I re-open the application by clicking on it's icon on the home screen, the app shows briefly on the screen and then immediately quits. This happens maybe 50% of the time when these conditions are present, but it does not create a crash report and there are no jetsam reports from the time of the crash either. I was able to capture a sysdiagnose immediately after the crash (within 3 seconds), and I have reviewed the logs to help me determine a possible cause, but none of the logs seem to be causing it. I am putting some potentially relevant log lines below, and I am attaching the logarchive. Additionally, the entire application is open source here on github, and the crashing :( version of the app is available here on the app store. Note this crash does not happen in the macOS version. Finally, I saw a previous thread that recommended adding atexit {abort()} to an app that doesn't produce a crash report, so I added that here before collecting these logs and I still don't get a crash report. Here are some log lines may be relevant, but none of them provide a reason for app termination. >>> MY APP IS OPENED default 2025-01-25 13:16:11.060118 -0500 runningboardd com.apple.runningboard monitor Calculated state for app<com.msdrigg.roam(95D1E2E9-9609-44D9-A30A-0C4AEA990A0D)>: running-active (role: UserInteractiveFocal) (endowments: <private>) default 2025-01-25 13:16:11.060132 -0500 runningboardd com.apple.runningboard process [app<com.msdrigg.roam(95D1E2E9-9609-44D9-A30A-0C4AEA990A0D)>:1758] Set jetsam priority to 100 [0] flag[1] default 2025-01-25 13:16:11.060132 -0500 runningboardd com.apple.runningboard ttl [app<com.msdrigg.roam(95D1E2E9-9609-44D9-A30A-0C4AEA990A0D)>:1758] Resuming task. default 2025-01-25 13:16:11.060185 -0500 runningboardd com.apple.runningboard ttl [app<com.msdrigg.roam(95D1E2E9-9609-44D9-A30A-0C4AEA990A0D)>:1758] Set darwin role to: UserInteractiveFocal info 2025-01-25 13:16:11.062002 -0500 CommCenter com.apple.CommCenter ul BundleID: com.msdrigg.roam is a foreground app >>> XPC says something about XPC_ERROR_CONNECTION_INTERRUPTED com.apple.mDNSResponder Default [R9386->Q40264] Question assigned DNS service 125 default 2025-01-25 13:16:11.067097 -0500 Roam com.apple.xpc connection [0x300b94900] Re-initialization successful; calling out to event handler with XPC_ERROR_CONNECTION_INTERRUPTED default 2025-01-25 13:16:11.067152 -0500 Roam com.apple.runningboard monitor Received state update for 1758 (app<com.msdrigg.roam(95D1E2E9-9609-44D9-A30A-0C4AEA990A0D)>, unknown-NotVisible info 2025-01-25 13:16:11.068357 -0500 Roam com.apple.coreaudio >>>MY APP RUNS AND STARTS LOGGING ON ITS OWN default 2025-01-25 13:16:11.109376 -0500 Roam com.msdrigg.roam ECPWebsocketClient Clearing handlers default 2025-01-25 13:16:11.109378 -0500 Roam com.msdrigg.roam ECPWebsocketClient No longer in error b/c restarting default 2025-01-25 13:16:11.109419 -0500 Roam com.msdrigg.roam ECPWebsocketClient Ignoring state change because it is the same connecting at 2025-01-25 18:16:11 +0000 >>> XPC Connection invalidated default 2025-01-25 13:16:11.146441 -0500 runningboardd com.apple.runningboard process XPC connection invalidated: [app<com.msdrigg.roam(95D1E2E9-9609-44D9-A30A-0C4AEA990A0D)>:1758] >>> Launchd reports app exit default 2025-01-25 13:16:11.150861 -0500 launchd user/501/UIKitApplication:com.msdrigg.roam[6159][rb-legacy] [1758] exited due to SIGPIPE | sent by Roam[1758], ran for 4930203ms default 2025-01-25 13:16:11.150876 -0500 launchd user/501/UIKitApplication:com.msdrigg.roam[6159][rb-legacy] [1758] service state: exited Logs split due to size being too big :( roam-crash.1.log roam-crash.2.log roam-crash.3.log roam-crash.4.log roam-crash.5.log roam-crash.6.log
2
0
543
Jan ’25
App Crashes instantly in Test Flight
Hi everyone! I recently developed an app (sort of a social media app), built in React Native Expo. I have finally after months of coding, completed the App. It works completely fine and passes all my testcases on multiple devices. It has also passed Apples review and after a few tries become stable on all their devices. However, when I released it to TestFlight, it opens and crashes immediately? I have tried numerous fixes, error boundaries etc. but to no avail. I am really struggling here, I can't seem to replicate the error at all even in Xcode. It seems to just crash on open where the splashscreen flashes, not sure why? I have attached the crash report and redacted the TEAM_ID and DEVICE_ID. Any help would be greatly appreciated. Warm regards, Hassan | Founder @ Oneforge GymBuddiesConnect-2025-01-21-013038.txt
1
0
280
Jan ’25
Any solution yet to not being able to turn off debugging via WiFI?
Debugger on Xcode 16.x is super slow and it turns out it's only this way when Xcode is connected to my iPhone via WiFi. If I disable WiFI on my iPhone everything is just fine. But that's not a solution. An engineer posted this supposed solution, https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes. Forgive me but that's not a solution, especially since we used to be able to shut off "Connect via WiFI." I've seen so many posts here and everywhere else with no one stating any clear answer. Does anyone know why has this been removed? And is anyone aware of it? I've posted in the Feedback Asst. as many others have. What gives?
0
1
177
Jan ’25
DebugDescription macro causing “String Interpolation” warnings
Using the DebugDescription macro to display an optional value produces a “String interpolation produces a debug description for an optional value” build warning. For example: @DebugDescription struct MyType: CustomDebugStringConvertible { let optionalValue: String? public var debugDescription: String { "Value: \(optionalValue)" } } The DebugDescription macro does not allow (it is an error) "Value: \(String(describing: optionalValue))" or "Value: \(optionalValue ?? "nil")" because “Only references to stored properties are allowed.” Is there a way to reconcile these? I have a build log full of these warnings, obscuring real issues.
2
0
343
1w
App versions delivered via Intune crash on my device but work on others at my organization, possibly due to being denylisted.
I have an in house application that I develop for my company. The application requires our corporate MDM profile is installed on the phone. I recently got a new phone and our corporate IT team installed the MDM profile and the Comp Portal application for me to manage our corporate applications. I installed the application through the Comp Portal. It crashes right away when I launch the application and I see this error message in the Console when connected to the phone: "SpringBoard Snapshot generation request for bundleID: com.mycompany.mygroup.appName rejected due to the app being denylisted." I see other errors from runningboardd about failing to spawn the job and SpringBoard Bootstrapping failed for &lt;FBApplicationProcess: 0x510affd80; app&lt;com.mycompany.mygroup.appName&gt;:&gt; with error: &lt;NSError: 0x301e60090; domain: RBSRequestErrorDomain; code: 5; "Launch failed."&gt; I can launch a development version of the application with no problem by connecting the USB cable from my machine to my device and running through XCode. Other people have no problems launching the application. I compared all the certificates in the management profile with another device where the application does not crash and there are identical. We checked a number of settings on the devices to see if there could be something preventing the application from running but found nothing. We reset all settings and deleted and reinstalled the application with rebooting to see if perhaps it was an incomplete installation. Our IT folks want to wipe the phone and start over but I have little confidence that will fix the issue since we don't know the root cause. I am concerned that one of my Stakeholders might have the same issue if they get a new device. This application worked fine on my old phone. Device: iPhone 16 Pro Max iOS version: 18.2.1 Any ideas on next steps to troubleshoot this issue? How can I figure out the cause of the denylisting?
2
0
443
Jan ’25
Xcode debugger seems slow
It just feels as if my debugger is running super slow when I step over each line. Each line is doing string comparison, splitting text into words, really nothing fancy. It appears that every time I hit F6, the Variables View (local variables) takes 4 seconds or more to refresh. But I don't know if that's the cause, or a symptom. Just curious if anyone can shed any light on this. Specs MacBook Pro 2019 2.6 GHz 6-Core Intel Core i7 16 GB 2667 MHz DDR4 Sequoia Version 15.1.1 (24B91) iPhone running app is 13 pro 18.1.1 Xcode Version 16.2 (16C5032a)
1
0
237
Jan ’25
Help diagnosing crash with only system code in its stack trace
Hello, I work on a video streaming app, and I have been working on this crash that we are seeing quite frequently (it is our #2 crasher at the moment). The stack trace indicates that an AVPictureInPictureController is being deallocated on a background thread. This leads to dangling AutoLayout constraints getting cleaned up, further resulting in an exception being thrown from the framework about the layout engine being accessed from a background thread. We have internal analytics which indicate that the crash occurs after the user comes back to the app after putting it in the background, and switches playback from Picture in Picture mode back to the app's regular playback UI. What has me puzzled here is that, as I'm sure you know, we have no control over the PIP UI. It is entirely system-provided, and there is none of our app's code in the stack trace. The whole process is even initiated by a KVO on an AVPlayerController property, and our app doesn't use that class directly anywhere. So how did we manage to cause this process to happen on a background thread? Add to this the fact that the bug only appeared once we switched to compiling with Xcode 16, and is overwhelmingly present only on devices running iOS 18. These factors lead me to believe that this is probably an OS issue. But before I go to file a feedback, I thought I would post here in case anyone has any ideas. I have attached an instance of the crash log to this post. 2025-01-08_17-32-45.7003_-0800-ea8d5c3323e0f1fc059cf83f6ec86377bdae1788.crash
1
0
312
Jan ’25
Type 'AVPlayer.Type' cannot conform to 'ObservableObject'
I'm having the following issue: Type 'AVPlayer.Type' cannot conform to 'ObservableObject' struct MusicEditorView: View { @ObservedObject var audioPlayer = AVPlayer and this is the class: class MusicPlayer: ObservableObject { private var audioPlayer: AVPlayer? private var timer: Timer? func playSound(named sFileName: String){ if let url = Bundle.main.url(forResource: sFileName, withExtension: "mp3"){ audioPlayer = try? AVPlayer(url: url) audioPlayer?.play() } } func pause(){ audioPlayer?.pause() } func getcurrentProgress() -&gt; Double{ guard let currentTime = audioPlayer?.currentItem?.currentTime().seconds else { return 0 } guard let duration = audioPlayer?.currentItem?.duration.seconds else { return 0 } return duration &gt; 0 ? (currentTime / duration) * 100 : 0 } func startProgressTimer(updateProgress: @escaping (Double, Double) -&gt; Void){ timer?.invalidate() timer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { _ in guard let currentTime = self.audioPlayer?.currentItem?.currentTime().seconds else { return } guard let duration = self.audioPlayer?.currentItem?.duration.seconds else { return } updateProgress(currentTime, duration) } } func stopProgressTimer(){ timer?.invalidate() } struct Sound: Identifiable, Codable { var id = UUID() var name: String var fileName: String } } }
1
0
268
Jan ’25
Cannot mimic fullscreen behavior when using custom event loop
Hi, we are developing a cross-platform library for creating desktop applications in C++: https://github.com/aseprite/laf For this reason, in macOS, we cannot rely on the default NSApplication.run() event loop, so we decided to implement our custom event loop using the nextEventMatchingMask method. Then, when a window is in fullscreen mode, for some reason the window stops receiving mouseMove events when the mouse pointer enters an area at the top of the window. You can see this issue in action by trying the following example project: https://github.com/martincapello/custom-event-loop-issue This project just opens one window and uses a custom event loop, it displays the current mouse position at every mouseMove event received, and when the aforementioned area is entered it suddenly stops updating. There is also a video showing how to reproduce it. I was able to see that when the position stops updating, we still receive mouseMove events, but for a different window, a borderless window that is added to the NSApplication.windows collection when switching to fullscreen, and which seems to be taken the mouseMove events before reaching the main window. Also, this issue doesn't happen when using the default NSApplication.run method, despite the borderless windows being added as well.
8
0
450
Jan ’25
Debug View Hierarchy not showing AVCaptureVideoPreviewLayer
I have an iOS application view that contains an AVCaptureSession, AVCaptureVideoPreviewLayer (created with the AVCaptureSession), and a UIImageView (in the backend the app takes the output of the AVCaptureSession, runs it through a Semantic Segmentation model, and displays the output in the UIImageView). When I pause the app and run the “Debug View Hierarchy”, it shows the UIImageView, the relevant buttons and labels. However, it does not seem to show AVCaptureVideoPreviewLayer that I have set up in my application. Is there some special set up that needs to be done to be able to view Camera Related features? The following is part of the view code, a component that is used to render the AVCaptureVideoPreviewLayer (not sure if this is enough, please let me know if its not): class CameraViewController: UIViewController { var session: AVCaptureSession? var frameRect: CGRect = CGRect() var rootLayer: CALayer! = nil private var previewLayer: AVCaptureVideoPreviewLayer! = nil init(session: AVCaptureSession) { self.session = session super.init(nibName: nil, bundle: nil) } required init?(coder: NSCoder) { super.init(coder: coder) } override func viewDidLoad() { super.viewDidLoad() setUp(session: session!) } private func setUp(session: AVCaptureSession) { previewLayer = AVCaptureVideoPreviewLayer(session: session) previewLayer.videoGravity = AVLayerVideoGravity.resizeAspectFill previewLayer.frame = self.frameRect DispatchQueue.main.async { [weak self] in self!.view.layer.addSublayer(self!.previewLayer) //self!.view.layer.addSublayer(self!.detectionLayer) } } } struct HostedCameraViewController: UIViewControllerRepresentable{ var session: AVCaptureSession! var frameRect: CGRect func makeUIViewController(context: Context) -> CameraViewController { let viewController = CameraViewController(session: session) viewController.frameRect = frameRect return viewController } func updateUIViewController(_ uiView: CameraViewController, context: Context) { } }
3
0
408
Jan ’25
How can I find the error in a TestFlight crash report?
I have uploaded my app to App Store Connect TestFlight. Then I have downloaded it in TestFlight on my iPad. But the app always crashes a few seconds after opening. It seems to be always the same issue. I have a few crash reports in App Store Connect--&gt;App name--&gt;TestFlight--&gt;Feedback--&gt;Crashs. I have opened a crash report in Xcode but I don´t find the error that causes the crash. How can I find the error in Xcode? Is it possible to find the class and line in the class where the crash happened? In addition, how can I export a crash report from Xcode? The crash doesn´t happen in debug mode on my iPad, it only happens when I install and open my app after downloading it from TestFlight on my iPad.
11
0
435
Jan ’25