How to Encrypt mp3 Files in iOS
问题 I have an app that downloads MP3 files from our web server and momentarily stores them in an NSData object. This object is then written to a .mp3 file stored to the /Library/Cache folder in the app's sandbox. When it is time to play the file, I load it into an AVPlayerItem like so: NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.mp3", trackID]]; NSURL *fileURL =