dialog icon indicating copy to clipboard operation
dialog copied to clipboard

MacOS deprecation warnings: setAllowedFileTypes

Open frytacz opened this issue 3 years ago • 4 comments

Hello,

While building app on macos I get warnings specified below:

# github.com/sqweek/dialog/cocoa dlg.m:96:10: warning: 'setAllowedFileTypes:' is deprecated: first deprecated in macOS 12.0 - Use -allowedContentTypes instead [-Wdeprecated-declarations] /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:215:49: note: property 'allowedFileTypes' is declared deprecated here /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:215:49: note: 'setAllowedFileTypes:' has been explicitly marked deprecated here

App builds itself, however it doesn't work properly.

frytacz avatar Feb 03 '22 10:02 frytacz

OSX has a bunch of loud warnings which it's unclear how to suppress, especially as I care more about compatibility with older OS releases than using whatever API was rolled out this week. See also #24 and #30.

"Doesn't work properly" is not an actionable bug report; check if your symptoms match the known issue #15 otherwise you're gonna have to elaborate.

sqweek avatar May 04 '22 15:05 sqweek

I am now getting this error, not sure why it started or what it means but my app will not run and exits with: error status 1. Any help would be greatly appreciated. If I can supply any more information please let me know. I am running MacOS 13.2.1 (22D68) on an M1 MacBook Air. My app backend is written in Golang and uses the Wails framework.

Regards,

Daryl

daryl-williams avatar Feb 25 '23 01:02 daryl-williams

I am seeing this issue too. The goroutine is hanging with this trace:

1 @ 0x104fa9be8 0x105432b08 0x105433084 0x105432fb8 0x105432fb9 0x106faecc8 0x106faec91 0x106faec15 0x106facbc4 0x106fb1600 0x104fe09ec 0x105017a74
#	0x105432b07	github.com/sqweek/dialog/cocoa._Cfunc_alertDlg+0x47			_cgo_gotypes.go:148
#	0x105433083	github.com/sqweek/dialog/cocoa.YesNoDlg.(*AlertParams).run.func1+0x53	/Users/anacrolix/go/pkg/mod/github.com/sqweek/[email protected]/cocoa/dlg_darwin.go:28
#	0x105432fb7	github.com/sqweek/dialog/cocoa.(*AlertParams).run+0x87			/Users/anacrolix/go/pkg/mod/github.com/sqweek/[email protected]/cocoa/dlg_darwin.go:28
#	0x105432fb8	github.com/sqweek/dialog/cocoa.YesNoDlg+0x88				/Users/anacrolix/go/pkg/mod/github.com/sqweek/[email protected]/cocoa/dlg_darwin.go:45
#	0x106faecc7	github.com/sqweek/dialog.(*MsgBuilder).yesNo+0x1f17			/Users/anacrolix/go/pkg/mod/github.com/sqweek/[email protected]/dlgs_darwin.go:8
#	0x106faec90	github.com/sqweek/dialog.(*MsgBuilder).YesNo+0x1ee0			/Users/anacrolix/go/pkg/mod/github.com/sqweek/[email protected]/dlgs.go:51

I don't see any dialog.

anacrolix avatar Aug 14 '23 08:08 anacrolix

@anacrolix thanks for the report! The hang is unrelated to the deprecation warning (YesNoDlg doesn't use any file types) so I've split it into a separate issue #79

sqweek avatar Aug 14 '23 13:08 sqweek