1,457 questions
0
votes
0
answers
21
views
How to create a folder in the system documents
I want to create a folder in the system's Documents folder like the application CASRER, but it fails。
public extension URL {
static var userHome : URL {
URL(fileURLWithPath: userHomePath,...
0
votes
1
answer
51
views
Supporting Custom Files with "/" Characters in Swift
My app has a custom file type, and I'm trying to update my code so that when I export or import a file that has a "/" character in the name. Currently the app just fails to export a file ...
0
votes
1
answer
39
views
Not sure why Swift's fileExists fails on checking existence of a file which I can see in the directory
Part of my app creates files, and then a timer batches them. My problem is that using the fileExists method my app insists that the searched for app does not exist.
I see the files in the Files app, ...
1
vote
1
answer
101
views
Swift FileManager.default.copyItem(at: URL, to: URL) folder permission error
I'm writing a small Mac OS X Desktop application that copies a random sampling of files from a source folder to a destination folder, see Select-Random-Files.
The code that's giving me the most ...
0
votes
0
answers
66
views
ContentsOfDirectory for FileProvider URLs
I'm developing an iOS app.
Through a .fileImporter I get access to a directory URL which might be provided by an external service like Dropbox (using a FileProvider).
As the user picked the URL I have ...
0
votes
1
answer
210
views
swiftui photopicker video is not accessible after rerunning the application
I'm trying to pick a video with photo picker this way:
@State var selectedItem: PhotosPickerItem? = nil
@State var showPhotoPicker = false
With those 2 states i'm showing the picker:
....
3
votes
0
answers
281
views
When .fileImporter is presented the Xcode console shows: "Unknown client: App Name"
I am writing my first SwiftUI app that uses the FileManager (via .fileImporter) to read data from a saved text (.csv) file.
Although everything seems to be working OK, the Xcode console displays the ...
2
votes
1
answer
276
views
Zip files of a Directory without any root folder
I want to zip files inside a folder in my iOS application written in the Swift language. I am using ZipFoundation CocoaPod of version 0.9.5.
let fileManager = FileManager.default
guard let sourceURL ...
1
vote
0
answers
44
views
Downloading from iCloud, files truncated, fine from other sources
I'm using this code which is a mildly doctored version of an online tutorial. I understand the parts, but when I run it, the downloads happen, I get an error-free completion message. But the resulting ...
0
votes
1
answer
257
views
iOS: how to determine if a file is a bundle resource (included in IPA)
I'm building a framework, and need to differentiate between a file that is a bundle resource (included in the App Store IPA / static file defined at development time) and a file that the app creates (...
0
votes
3
answers
229
views
When we try to export CapturedRoom getting cannotCreateNode(path: "/9EE71ED0F8D6415496A7B9F0C3671DB0321") in
We are using the RoomPlan API to capture data, which is stored in the 'CapturedRoom' variable in our code (referred to as 'finalResult'). We then attempt to save a USDZ file in the file manager. ...
0
votes
2
answers
133
views
How to create model in Swift?
I am a beginner in the Swift language. I have multiple arrays in one view controller from which I am loading data in the tableview.
My code is:
let filemanager = FileManager.default
var ...
0
votes
0
answers
103
views
What does SearchPathDomainMask mean in Swift?
In swift, we use Filemanager.default.url(for:in:) to get user directories or system directories. And we pass arguments typed SearchPathDirectory and SearchPathDomainMask to specify what urls we need.
...
1
vote
0
answers
58
views
How to create a temporary file container, file system, or custom file stream for intercepting clipboard access to temporary files on macOS?
I'm developing a cross-platform clipboard sharing software and currently working on implementing file copying functionality.
On Windows, I can achieve file copy by creating an IDataObject and IStream, ...
0
votes
1
answer
226
views
I cannot access a file I have just saved to my documents directory
Here is my saving and retrieving code:
func retrieveSong(songId: String) -> URL? {
guard let pathComponent = cache[songId] else {
return nil
}
if let ...