-
Notifications
You must be signed in to change notification settings - Fork 404
fix(dialog): do not create file copy for save file picker on iOS #2548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v2
Are you sure you want to change the base?
Conversation
Package Changes Through c887ed6There are 6 changes which include barcode-scanner with minor, barcode-scanner-js with minor, window-state with minor, window-state-js with minor, fs with patch, fs-js with patch Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
On iOS the file picker returns a security scoped resource file path on the save() file picker: https://developer.apple.com/documentation/uikit/uidocumentpickerviewcontroller?language=objc#Work-with-external-documents this means we can't directly access it without calling [startAccessingSecurityScopedResource](https://developer.apple.com/documentation/foundation/nsurl/1417051-startaccessingsecurityscopedreso?language=objc) this PR changes the plugin to not access the save file early, leaving that to the user and returning its actual path
nice catch. I think we still need some improvements here, for instance now I couldn't access the file without https://developer.apple.com/documentation/foundation/nsurl/1417051-startaccessingsecurityscopedreso?language=objc I think we should add that to the FS plugin too |
Add two methods to fs |
# Conflicts: # examples/api/src-tauri/gen/apple/api.xcodeproj/project.pbxproj
0edbafc
to
c8ab743
Compare
The open and save methods now return Path objects. These objects must be manually destroyed after use. |
On iOS the file picker returns a security scoped resource file path on the save() file picker: https://developer.apple.com/documentation/uikit/uidocumentpickerviewcontroller?language=objc#Work-with-external-documents
this means we can't directly access it without calling startAccessingSecurityScopedResource
this PR changes the plugin to not access the save file early, leaving that to the user and returning its actual path
fix #2089