I dont want to select again n again the same sound to play as background in my app. How can i copy sound file into my app assigned folders/files?
I can play file in the method mediaPicker:didPickMediaItems:
How to save that sound file?
I dont want to select again n again the same sound to play as
Share
MPMediaItemandMPMediaItemCollectionboth supportNSCoding, so you should be able to serialize it and store it usingNSKeyedArchiver, see the documentation. Ifobjis whatever object supportingNSCoding,converts it to an
NSDatainstance. Or, you can get the persistent IDMPMediaItemPropertyPersistentIDof a song byand then yo ucan save the persistentID into somewhere, like
NSUserDefaults.