i have audio player plays local files.
audioplayer = [[avaudioplayer alloc] initwithcontentsofurl:url error:&error]
it works fine. if click xcode run button rebuild app, player not working. gives me error
error domain=nsosstatuserrordomain code=2003334207 "the operation couldn't completed. (nsosstatus error 2003334207.)"
the url absolutely same. checked file. says , not corrupt or anything.
edit:
[[nsfilemanager defaultmanager] fileexistsatpath:url.path]
returns false if file there means don't have access it?
likely, ios8, path have saved won't valid across launches.
the solution save filename , not complete path, , recreate url or complete path, getting path documents (or tmp) folder , appending filename it.
Comments
Post a Comment