0
我想存儲一些關於從iTunes資料庫抓取的項目的信息,並想知道如何命名文件而不會產生任何問題,如覆蓋或類似的名稱等等......在我從媒體庫中獲取的媒體項目中有元數據,這可能是名稱使用最好的。如果我使用MPMediaItemPropertyPersistentID,我相信不會有任何類似的名稱,但值保證在同步/非同步/同步週期期間保持持續不變...有沒有更好的方法來做到這一點?iOS:在iTunes庫項目中存儲持久性數據時選擇文件名
MPMediaItemPropertyTitle
The title (or name) of the media item. This property is unrelated to the MPMediaItemPropertyAlbumTitle property. Value is an NSString object.
MPMediaItemPropertyPersistentID
The persistent identifier for the media item. Value is an NSNumber object containing a uint64_t (unsigned long long).
The value of the MPMediaItemPropertyPersistentID identifier persists across application launches and across syncs that do not change the sync status of the media item. The value is not guaranteed to persist across a sync/unsync/sync cycle.