iOS document based app problem running on Mac (Designed for iPad)

Please can somebody help me? I have a document-based iOS in the App Store (iNetWorth). I was able to run it on my M1 Mac Mini as a Mac (Designed for iPad) app without any issues until macOS 15. So, I created a simple test app based on a TabView to try and find out why I cannot get iNetWorth to run successfully on my Mac.

The issue is that when TabViewApp.swift file looks like this:

import SwiftUI
@main
struct TabViewApp: App {
var body: some Scene {
/*WindowGroup {
ContentView()
}*/
DocumentGroup(newDocument: TextFile()) { file in
ContentView(document: file.$document)
}
}
}

TabView fails to load the ContentView() - in Xcode 16.2 running on macOS 15.3.2. On opening, the TabView app prompts the user to open a new or existing file normally but it then opens a window that is empty, apart from a Documents button and a label displaying the filename with a dropdown menu (Duplicate, Move, Rename..., Export As…).

If the @Binding var document: TextFile line is removed from the ContentView() and the TabViewApp.swift file is changed to:

import SwiftUI
@main
struct TabViewApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
/*DocumentGroup(newDocument: TextFile()) { file in
ContentView(document: file.$document)
}*/
}
}

the TabView app loads and displays the ContentView() correctly.

Both versions of TabView, when running in Xcode on My Mac (Designed for iPad), produce these warnings:

CLIENT: Failure to determine if this machine is in the process of shutting down, err=1/Operation not permitted LSPrefs: could not find untranslocated node for <FSNode 0x6000013901a0> { isDir = ?, path = '/private/var/folders/3f/8788c4dj50q050_4wg9fssbr0000gp/X/518B55E1-0EC4-5D84-9202-4E44410EB249/d/Wrapper/TabView.app' }, proceeding on the assumption it is not translocated: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" LSPrefs: could not find untranslocated node for <FSNode 0x6000013901a0> { isDir = ?, path = '/private/var/folders/3f/8788c4dj50q050_4wg9fssbr0000gp/X/518B55E1-0EC4-5D84-9202-4E44410EB249/d/Wrapper/TabView.app' }, proceeding on the assumption it is not translocated: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" LSPrefs: could not find untranslocated node for <FSNode 0x6000013901a0> { isDir = ?, path = '/private/var/folders/3f/8788c4dj50q050_4wg9fssbr0000gp/X/518B55E1-0EC4-5D84-9202-4E44410EB249/d/Wrapper/TabView.app' }, proceeding on the assumption it is not translocated: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" LSPrefs: could not find untranslocated node for <FSNode 0x6000013901a0> { isDir = ?, path = '/private/var/folders/3f/8788c4dj50q050_4wg9fssbr0000gp/X/518B55E1-0EC4-5D84-9202-4E44410EB249/d/Wrapper/TabView.app' }, proceeding on the assumption it is not translocated: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted”

However, the document-based version of TabView also displays these warnings:

cannot open file at line 49450 of [1b37c146ee] os_unix.c:49450: (2) open(/private/var/db/DetachedSignatures) - No such file or directory

I suspect that the lack of the DetachedSignatures file is the root cause of the ContentView() not being loaded but I cannot find out how to generate a DetachedSignatures file. Adding an empty DetachedSignatures file or directory to /private/var/db/ does not help.

Has anyone else experienced this problem (and maybe found a solution)? Should I raise it as a bug via Feedback or am I missing something obvious? Thanks!

Written by crizzle_co_uk in 776997021
I suspect that the lack of the DetachedSignatures file is the root cause

That’s definitely not the case. That message is most definitely log noise coming from the code signing system. It’s nothing to do with your UI issues.

Sadly, I can’t help on the UI front. I know a lot about code signing but not much about UI |-: Hopefully someone else will step in.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks, Quinn “The Eskimo!”. It's very useful to know that the message re DetachedSignatures is log noise. I will give others a little more time to comment on my problem in the hope that someone has a solution. Failing that, I will submit a bug report via Feedback.

I just thought I would also chime in here as I am experiencing the same issue. I was able to reproduce this with the default document app template running on Mac (Designed for iPad). Any updates/solutions would be much appreciated.

I also have the same issue with my app which is SwifUI documented based app. Since Xcode 16.2, it doesn't show content view (empty) when running on Mac (Designed for iPad).

iOS document based app problem running on Mac (Designed for iPad)
 
 
Q