24 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
Advice
0
votes
2
replies
52
views
Where during SwiftUI file opening is on the main thread?
When I read up on FileDocument or similar, it says that it could use a background thread. There’s something I want to do with a main-thread-only API. Is there another part of the process where I can ...
4
votes
0
answers
183
views
Create Xcode-like GUI using SwiftUI?
I'm trying to learn SwiftUI by rewriting an old AppKit-based editor of mine. I'm currently stuck on something that is (fairly) straightforward using AppKit but seems almost impossible in SwiftUI (...
0
votes
0
answers
57
views
How to rename an open document in a SwiftUI DocumentGroup app with custom navigation?
I'm building a document-based SwiftUI app following Apple's Building a Document-Based App with SwiftUI guide. The app uses DocumentGroup and stores documents in iCloud Drive.
Important context: We're ...
0
votes
0
answers
45
views
SwiftUI DocumentGroup + ReferenceFileDocument not saving changes after rename in iCloud Drive
I'm building a document-based app using SwiftUI's DocumentGroup with a custom ReferenceFileDocument. Everything works well when documents are created in the "On My iPhone" directory — they ...
0
votes
1
answer
23
views
Two DocumentGroups with viewing: giving "Extra argument in call" build error
In my SwiftUI app, I have a number of DocumentGroups with a number of them set up for editing using the newDocument: variant of DocumentGroup's init that build and run fine.
I also have two ...
1
vote
0
answers
170
views
How to programmatically show a DocumentGroup?
WindowGroups have ids, like this: WindowGroup(id: "window_id"), but DocumentGroups do not have an id. So opening like this does not work: openWindow(id: "window_id").
The problem ...
2
votes
0
answers
110
views
Can DocumentGroup open file that type of is package?
I am trying to open a xcloc file, the file is a folder and the type in macOS called package. However, I could not open it as the init(configuration: ReadConfiguration) throws never called.
struct ...
2
votes
0
answers
80
views
SwiftUI make transition with document-base image brower app how?
I just follow some example to build my first document-base app.
The UTType is image.The code is below,this do work properly,but there is not transition when you select the
image item.
import SwiftUI
...
0
votes
1
answer
865
views
How to connect Help menu in SwiftUI MacOS DocumentGroup app to application logic?
SwiftUI DocumentGroup apps provide standard menu items including Help.
By default, when we run the app, and click Help / "MyApp help" we see "Help isn't available for MyApp".
Here'...
0
votes
1
answer
751
views
SwiftUI FileDocument using Class instead of Struct
I've started a document-base macOS app in SwiftUI and am using a FileDocument (not a Reference FileDocument) as the type of document. In every tutorial I've seen, even in Apple's own WWDC video ...
0
votes
1
answer
378
views
Airdrop custom document type to SwiftUI DocumentGroup app
I am trying to get a simple SwiftUI iOS custom document app work with Airdrop. The app successfully opens a document when opened from Files or a Mail attachment. However when sending a document of the ...
0
votes
1
answer
324
views
Prevent or clear app state persistence for MacOS SwiftUI Document Based App
I am developing a MacOS Document based app using SwitfUI on MacOS 12.0.1 using Xcode 13.1 on a MacbookPro M1 Pro. I am encountering an issue that the app is always re-opening the document browser at ...
2
votes
0
answers
299
views
Is it possible to use DocumentGroup in a SwiftUI iOS app along side WindowsGroup?
I am developing an iOS app and want one separate view to manage document interaction. Is it possible to integrate DocumentGroup in my app that uses WindowGroup?
6
votes
1
answer
1k
views
Is it possible to combine WindowGroup and DocumentGroup in a SwiftUI iOS app?
I am developing a SwiftUI iOS app which originally started out with A WindowGroup. In another view, I have decided that I need to present that view as a DocumentGroup scene to take advantage of all ...
2
votes
1
answer
2k
views
How to read large files using SwiftUI DocumentGroup without making a temporary copy?
I have made a SwiftUI DocumentApp that reads large media files but doesn't need to write them. In my document, I just want to store the file's URL, so that I can load it using e.g. AVAudioFile. I can'...