Post

Replies

Boosts

Views

Activity

Reply to NSDocumentController not adding "Open Recent" menu
If I manually create the Open Recent menu and add the item for the 'Clear Menu' it properly reflects the state of the list (which isn't appearing). If I clear it, the 'Clear Menu' button becomes disabled automatically - so the NSDocumentController is correctly finding the menu items, but it isn't populating the list.
Topic: UI Frameworks SubTopic: AppKit Tags:
Mar ’25
Reply to NSDocumentController not adding "Open Recent" menu
I have a done a bit more diagnosis. The "Insert failed..." error in the previous message is caused when it tries to add a recent document that is mirrored in iCloud. If I use a file from a directory not mapped to iCloud I do not get the error, and the file appears in the dock's recent items. I still cannot get the File "Open Recent" menu to populate. I am using XCode 16.2 on OSX 15.3.2
Topic: UI Frameworks SubTopic: AppKit Tags:
Mar ’25
Reply to NSDocumentController not adding "Open Recent" menu
Interestingly, the recently opened documents are appearing in the dock icon when I right-click (automatically) - and I can successfully open them from there, so I am baffled why the Open Recent menu is not working. edit: I notice though that the recent documents in the dock icon do not update - when I open a document and close it. I see the following error in the console: Insert failed for list identifier com.apple.LSSharedFileList.RecentDocuments Error: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" (Restricted by sandbox) UserInfo={NSDebugDescription=Restricted by sandbox} but I don't see any sandbox entitlements that control this.
Topic: UI Frameworks SubTopic: AppKit Tags:
Mar ’25
Reply to FB16862332 (iOS 18.3 REGRESSION: UIDocumentViewController: Placeholder icon displayed instead of document icon in share menu item of document title menu)
The sandboxing has so many issues... poorly thought out imo. Similarly, if you try to support IOS before 17, and try to use the rename delegate, it won't work, because you don't have permission to the directory containing the file.
Topic: UI Frameworks SubTopic: UIKit
Replies
Boosts
Views
Activity
16h
Reply to NSFileVersion doesn't work in IOS simulator?
That's an understandable position. Thank you.
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
1w
Reply to NSFileVersion doesn't work in IOS simulator?
Hmm, that's unfortunate - at a minimum you would think the list of things that are expected to be broken would be documented. Thank you for taking the time to respond.
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
1w
Reply to Sharing file creates new UIScene each time, how to prevent this
I encounter the same issue even when clicking on my source document in the Files app. It always seems to create a new scene even when a scene for that file is already open, with no way to prevent it
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
3w
Reply to segmented picker style causes runtime warning
I filed FB22571981
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’26
Reply to segmented picker style causes runtime warning
I can't really run the beta, because I need to build for production. Did you verify that it occurs under the latest XCode production release?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’26
Reply to segmented picker style causes runtime warning
Thanks, but I am a bit confused. Your screenshot is of an iOS app, not a MacOS one.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’26
Reply to Duplicate toolbar item and wrong document name in SwiftUI document based app
It is still broken running a SwiftUI app on OSX 15.7.2 developed using XCode 26.1
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’25
Reply to NSDocumentController not adding "Open Recent" menu
Thank you Ziqiao. One note for others, the open menu item cannot have a target set, like NSDocumentController.shared, or it won't work. Trying to set this up in applicationDidFinishLaunching was also incorrect.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Apr ’25
Reply to how to make certain undo registrations not mark the document as edited
I was able to solve this by overriding NSDocument override func updateChangeCount(_ change: NSDocument.ChangeType) { if change.rawValue & NSDocument.ChangeType.changeDiscardable.rawValue != 0 { return } super.updateChangeCount(change) }
Topic: UI Frameworks SubTopic: AppKit
Replies
Boosts
Views
Activity
Mar ’25
Reply to NSDocumentController not adding "Open Recent" menu
If I manually create the Open Recent menu and add the item for the 'Clear Menu' it properly reflects the state of the list (which isn't appearing). If I clear it, the 'Clear Menu' button becomes disabled automatically - so the NSDocumentController is correctly finding the menu items, but it isn't populating the list.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to NSDocumentController not adding "Open Recent" menu
I have a done a bit more diagnosis. The "Insert failed..." error in the previous message is caused when it tries to add a recent document that is mirrored in iCloud. If I use a file from a directory not mapped to iCloud I do not get the error, and the file appears in the dock's recent items. I still cannot get the File "Open Recent" menu to populate. I am using XCode 16.2 on OSX 15.3.2
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to NSDocumentController not adding "Open Recent" menu
Interestingly, the recently opened documents are appearing in the dock icon when I right-click (automatically) - and I can successfully open them from there, so I am baffled why the Open Recent menu is not working. edit: I notice though that the recent documents in the dock icon do not update - when I open a document and close it. I see the following error in the console: Insert failed for list identifier com.apple.LSSharedFileList.RecentDocuments Error: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" (Restricted by sandbox) UserInfo={NSDebugDescription=Restricted by sandbox} but I don't see any sandbox entitlements that control this.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to How to disable auto-save in SwiftUI document based app?
I needed to move to an NSDocument based solution to make all of this work.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to Any way to change the UI for browse previous versions?
a SwiftUI FileDocument doesn't expose the 'isBrowsingVersions' so the previous answer was the best I could manage. I had too many problems with SwiftUI DoucmentGroup that I needed to move to using a NSDocument based system.
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’25