ios - Is it possible to store a music file in iPhone local storage? -


i making iphone app in user can listen stories present on web server.

now want download audio story file local iphone memory on download button click.

i downloading file webserver file saving somewhere else, not in phone memory. 1 know how can store file in iphone memory, not in application document memory?

i think links idea document directory

link1

link 2

here sample code snippet

nsstring *filepath = [[self applicationdocumentsdirectory].path                         stringbyappendingpathcomponent:@"filename.caf"]; [filedata writetofile:filepath atomically:yes ];  - (nsurl *)applicationdocumentsdirectory {     return [[[nsfilemanager defaultmanager] urlsfordirectory:nsdocumentdirectory           indomains:nsuserdomainmask] lastobject]; } 

Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -