In my app people can download some audio-lessons from my server. After a file is saved i move it to app's document directory. Now i want my app to have the first file downloaded with the app, so user have one lesson out of the box. I've added that file to main app directory (from xcode), and at the app startup i copy it to app's document directory. That all works fine, and now the problem: when i try to delete the copy of my audio file from main app directory i get the following error "The operation couldn’t be completed. Operation not permitted". How that can be solved?
Asked
Active
Viewed 500 times
-1
-
3Not possible. On iOS the content of the app bundle can't be changed. – Matthias Bauch Oct 27 '14 at 12:41
-
So if that is not possible, what other options do i have to achieve the same goal? – serg_ov Oct 27 '14 at 13:36
1 Answers
1
The task you are trying to achieve is not possible with iOS or any hacks that I know of. Even if it were, your app would be rejected by Apple since they do not allow an app to change contents of the main bundle in an app directory.

Akshay Bhalotia
- 799
- 4
- 11
-
So if that is not possible, what other options do i have to achieve the same goal? – serg_ov Oct 27 '14 at 13:34
-
@serg_ov You can simply play that audio from main bundle. No need to copy it to the documents directory. – Akshay Bhalotia Oct 27 '14 at 13:38
-
but if the user already went through it and don't want it to waste the space? – serg_ov Oct 27 '14 at 13:40
-
1Then there is no option for that. You can not have all the facilities at one place. Either if you want to make your app space friendly, you will have to make the user download it, or else the second option is to let him have one 'out of the box' audio in which you save user's download efforts but waste storage space. A difficult choice, but you'll have to make one here. – Akshay Bhalotia Oct 27 '14 at 13:43