Answers for "how to read music library from iphone programmatically in swift"

0

how to read music library from iphone programmatically in swift

// All
let mediaItems = MPMediaQuery.songsQuery().items
// Or you can filter on various property
// Like the Genre for example here
var query = MPMediaQuery.songsQuery()
let predicateByGenre = MPMediaPropertyPredicate(value: "Rock", forProperty: MPMediaItemPropertyGenre)
query.filterPredicates = NSSet(object: predicateByGenre)
Posted by: Guest on June-15-2020

Code answers related to "how to read music library from iphone programmatically in swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language