Merge pull request #4524 from keymanapp/fix/ios/engine/cherry/file-import-security

fix(ios): now handles security-scoped files
This commit is contained in:
Joshua Horton 2021-02-25 15:09:45 +07:00 committed by GitHub
commit a3b24c8acb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -32,7 +32,12 @@ public class ResourceFileManager {
// Throws an error if the destination file already exists, and there's no
// built-in override parameter. Hence, the previous if-block.
try fileManager.copyItem(at: source, to: destination)
if source.startAccessingSecurityScopedResource() {
defer { source.stopAccessingSecurityScopedResource() }
try fileManager.copyItem(at: source, to: destination)
} else {
try fileManager.copyItem(at: source, to: destination)
}
}
/**

View file

@ -1,6 +1,9 @@
# Keyman for iPhone and iPad Version History
## 2021-02-25 13.0.117 stable
* Fixes an issue that sometimes prevented keyboard and dictionary installation (#4524)
## 2020-07-16 13.0.109 stable
* Improve performance when typing long documents with predictive text (#3302)