wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
24.46k stars 1.17k forks source link

wails3 无法打开窗口选择目录 #3341

Open f1748x opened 5 months ago

f1748x commented 5 months ago

Description

v3: application.OpenDirectoryDialog() #无法打开文件夹,无法选择路径

To Reproduce

application.OpenDirectoryDialog()

Expected behaviour

没有找到相关代码案例

Screenshots

No response

Attempted Fixes

No response

System Details

wails3 doctor

          Wails Doctor          

# Build Environment
Wails CLI    | v3.0.0-alpha.4

Go Version   | go1.22.1                                
Revision     | 45b2681dfca05b6918ed04a67f36276d1f433cc6
Modified     | false                                   
-buildmode   | exe                                     
-compiler    | gc                                      
CGO_CFLAGS   |                                         
CGO_CPPFLAGS |                                         
CGO_CXXFLAGS |                                         
CGO_ENABLED  | 1                                       
CGO_LDFLAGS  |                                         
GOAMD64      | v1                                      
GOARCH       | amd64                                   
GOOS         | darwin                                  
vcs          | git                                     
vcs.modified | false                                   
vcs.revision | 45b2681dfca05b6918ed04a67f36276d1f433cc6
vcs.time     | 2024-03-22T10:18:04Z                    

# System
Name            | MacOS   
Version         | 14.3.1  
ID              | 23D60   
Branding        | Sonoma  
Platform        | darwin  
Architecture    | amd64   
Apple Silicon   | true    
CPU             | Apple M1
Xcode cli tools | 2405    
CPU             | Unknown 
GPU             | Unknown 
Memory          | Unknown 

# Diagnosis
 SUCCESS  Your system is ready for Wails development!

Additional context

No response

leaanthony commented 5 months ago

Hi! It looks like you are trying to report a bug but haven't provided enough details. Please make sure your report includes:

ibryang commented 5 months ago

The official example cannot open the folder when running on Windows, but it can be opened on Mac.

ibryang commented 5 months ago

This issue has been fixed

levinit commented 2 weeks ago

Under development mode, when opening the dialog, the Finder’s file selection window closes immediately, which I suspect may be related to macOS’s strict security controls. Compiling the program into an app makes the dialog open normally.

Perhaps granting some permissions in the system settings could solve this issue, but I haven't conducted specific tests yet. My system is macOS 14 Sonoma.