Questions tagged [document-directory]
16 questions
3
votes
1 answer
In a react-native android project,How to copy a folder from assets to the DocumentDirectoryPath?
I am using a react-native project in which,I want to copy the contents of a certain folder in assets inside android to RNFS.DocumentDirectoryPath. How can this be performed?
I have used the attribute copyFileAssets().
copyfile() {
…

Aishwarya R M
- 123
- 1
- 10
3
votes
1 answer
how can I create and access share app group document directory?
i am using custom keyboard extension then download keyboard theme from server and save in to app document directory but app document directory can not access in custom keyboard extension so, required to share app group directory. how can i do please…

ikbal
- 1,114
- 1
- 11
- 30
3
votes
2 answers
AVAudioPlayer is no playing anything
I have a tableViewCell and i want to play a sound typically .m4a inside it.
I have Globally declared my AVAudioPlayer instance like this:
var player = AVAudioPlayer()
Then I download my sound, put it in a directory in Documents. But, when i try…

tara tandel
- 538
- 5
- 25
2
votes
1 answer
How can i copy Folder from Project to Document Directory ios swift
Here is my Folder Structure
I want to copy this Stickers folder to Document Directory for this purpose i have used following code
let fileManager = FileManager.default
let documentsUrl = fileManager.urls(for: .documentDirectory,
…

Khushbu Desai
- 1,003
- 1
- 10
- 32
2
votes
2 answers
How to view document directory in iOS emulator?
I wrote a React Native application that downloads a file and saves it to the document directory.
The application gives me a path like…

laurent
- 88,262
- 77
- 290
- 428
0
votes
0 answers
Expo React expo-file-system copyAsync not working as expected - media file copied as a directory
I'm struggling with as strange FileSystem.copyAsync behaviour. In RelocatingOption, 'from' is a media file (mp3) with SAF format and 'to' is supposed to be a same name file in FileSystem.documentDirectory.
The unexpected behaviour is that the file…

marfing
- 71
- 5
0
votes
1 answer
Swiftui Task not running in Background task
I've configured background tasks successfully on my app where a function would directly call a URL and process the data but I've recently changed this so that the function calls the URL, saves to documentsDirectory then processes the data. Since…

Al McIver
- 43
- 1
- 4
0
votes
1 answer
Swiftui FileManager/URLSession not writing to documentDirectory when running as background task
Hope you're doing well!
I've built an app that generates a view from a .csv file that I have hosted on my website. I've previously managed to get everything working as expected where I called the csv from the website and wrote the contents directly…

Al McIver
- 43
- 1
- 4
0
votes
1 answer
How do I get list of Images saved in a folder?
I have to get list of images, which i have saved in a directory as a sub-directory.
First i created a document directory, then inside i have some folders, In the folder i have saved images(like sub-directory). Now i want to get list of images to…

Abhishek K
- 15
- 7
0
votes
1 answer
How to export a text file as a PDF file (macOS Swift)?
So I'm building a macOS app and I would like it to save or export a copy of this text file the app creates as a PDF file as well. I'm a beginner and I'm not sure how to proceed.
Note: I tried to change .txt to .pdf but the PDF cannot be opened due…

Zara
- 1
- 1
0
votes
0 answers
wrong file name save in document directory in swift
When I save file in document directory as a normal text then its working proper but when I save with funcy font then my document directory path is wrong
let url = NSURL(string: path!.path)
let imagePath = url!.appendingPathComponent(imageName)
let…

ikbal
- 1,114
- 1
- 11
- 30
0
votes
1 answer
Can not get proper firebase image save in document directory in swift 4 iOS
i'm saving firebase image in document directory !! For uniqueness my Document Directory name is firebase image name ! i have check with a condition that if firebase image name is not exists in my document directory then save that image in Document…

Yogesh Patel
- 1,893
- 1
- 20
- 55
0
votes
0 answers
How I can get Image from document directory if i don't know it's name
I saved image with this func:
let image = categoryImage.image
let data = image!.jpegData(compressionQuality: 0.5)!
let name = "\(Int(Date().timeIntervalSince1970))"
do {
let documentDirectory = try…

Bogdan
- 31
- 3
0
votes
1 answer
writeToFile fails to save 4K video with 40 min recording in document directory
writeToFile fails to save 4K video with 50 min recording in document directory
BOOL videoSuccess = [[NSData dataWithContentsOfURL:videoURL] writeToFile:videoPath atomically:YES];
So videoSuccess returns false
Video…

Rachit
- 814
- 9
- 19
0
votes
1 answer
An iOS app internal size?
I have searched for an iOS app internal size but find no exact answer.
I know an iOS app size in app-store could be 2GB. But my question is, is there any limitation on iOS internal app size.
For example, I could download video or images to iPhone…

Tanvir Nayem
- 702
- 10
- 25