Questions tagged [documentsdirectory]

22 questions
11
votes
1 answer

Swift 3 - Copy Folder w/ contents from Main Bundle to Documents Directory

I have folders with files inside them in my main bundle, and I want to copy/cut them to the Documents Directory at first launch of the application to access them from there. I've seen examples but they're all in Obj-C and I'm using Swift 3. How can…
SergeH
  • 608
  • 1
  • 5
  • 20
4
votes
0 answers

Access Documents directory contents in files app in ios 15

In my app, I want to expose the documents directory of the app in files app. I have set UIFileSharingEnabled and LSSupportsOpeningDocumentsInPlace to YES in info.plist. This works perfectly while using iOS 14 simulator. But the same does not work on…
Mayu
  • 41
  • 1
4
votes
1 answer

Error: "unable to open database file" & "Too many open files"

I have checked many questions available on SO such as this & this, related to these errors but let me tell you my scenario. I am loading images on a view & after clicking assets in collection view 18 times my code returns this error. I am not doing…
iYoung
  • 3,596
  • 3
  • 32
  • 59
4
votes
1 answer

Can't access the Documents directory when iPhone is getting locked?

Scenario 1. I used this code for downloading files from Dropbox using Dropbox SDK. -(void)downloadFile:(DBMetadata*)file { if (!file.isDirectory) { NSString *documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,…
iTag
  • 409
  • 3
  • 19
3
votes
1 answer

Saving data in Documents Directory in iOS, SwiftUI

I cannot figure out how to save data (multiple properties) in Documents Directory with SwiftUI. I know two variants, 1st - when you have one array property and that works great, the problem here - I don't know how to add additional properties to it.…
Valerika
  • 366
  • 1
  • 3
  • 8
3
votes
2 answers

UWP save file in Documents and Pictures Library

I'm trying to make a UWP app which can export a file saved in his own storage into the document library. In Package.appxmanifest I've inserted the following lines:
lukemols
  • 71
  • 2
  • 11
2
votes
1 answer

Any other ways to access Documents Directory on iDevice Locked State?

I am implementing Music Player application in iOS platform. Here I am storing and retrieving the media contents using Documents directory. So I can't able to access the 'Documents Directory' when iPhone is getting locked with passcode. I referred…
iTag
  • 409
  • 3
  • 19
1
vote
2 answers

Deleting a folder from the documentsDirectory with Swift

I have created a VideoAssets folder within documentsDirectory as below, which can contain one or more video…
user1162328
1
vote
0 answers

How to add or import multiple items to a file which saved in Documents Directory with Swift?

As you can see, here is how to add a word "hello" to a Test.txt (saved in Documents Directory of an app): let documentsDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first! let archiveURL =…
Vincent
  • 486
  • 6
  • 20
1
vote
1 answer

Binary to pdf convert without store in documentsDirectory in obj c

Have a Binary code convert it to nsdata using dataFromBase64String. And load it web view successfully. But Want the pdf file do not store in documentsDirectory.Need to add one button click user click the button, then Binary to pdf convert will…
saravanar
  • 639
  • 2
  • 11
  • 25
1
vote
2 answers

Error writing to plist in documents directory

I use the following code to copy a Resources plist file into the documents directory: BOOL success; NSError *error; NSFileManager *fileManager = [NSFileManager defaultManager]; NSArray *paths =…
gotnull
  • 26,454
  • 22
  • 137
  • 203
0
votes
1 answer

access documents directory on physical device

I created some text files contains the logs of my app but I can't access those files from my physical device I can only access them on the simulator using this path : ~/Library/Developer/CoreSimulator/Devices/ is there a way to view the documents…
aoe
  • 87
  • 1
  • 1
  • 10
0
votes
0 answers

Read and write data from & to text file in Documents Directory incrementally with Swift

Swift 4: As you know, here is how to read or write data from & to text file in Documents Directory with Swift: let DocumentDirURL = try! FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create:…
Vincent
  • 486
  • 6
  • 20
0
votes
2 answers

How to read string from Text which saved in Documents Directory with Swift?

I have a Test.txt file saved in Documents Directory of an app. There are several names saved one by one in each line in the Test.txt file, like this: Tom Jack Jerry Jennifer Lynn I would like to add these names to an array, like this: var nameList…
Vincent
  • 486
  • 6
  • 20
0
votes
1 answer

How to access images stored in Documents Directory in ios8

In ios7 we can write images to documents directory and access it without any problem. In IOs8 i am able to write imagesdata to documents directory and access it. The location of images folder changes every time i run the app on the Simulator.I went…
skkrish
  • 287
  • 4
  • 23
1
2