Hi,
I would like to be able to create a playlist from my app or add songs to an existing selected playlist in the user music library, How can I do that ?
Is there an API in MusicKit to do that?
The Shazam app is doing something similar with the My Shazam Songs playlist...
Thanks
Post
Replies
Boosts
Views
Activity
Hi,
let's say I have a struct like the following:
struct Item {
var text = ""
}
I want to access the field by string and then set its value to some other string.
I was able to access the property value through a Mirror:
let item = Item()
let mirroredObject = Mirror(reflecting: item)
for (_, var attr) in mirroredObject.children.enumerated() {
attr.value = "Hello World!"
}
The problem is that setting the value of the struct field with attr.value doesn't really change its value...
In python I was used to do something like:
setattr(item, "text", "Hello World!")
Is there any way to achieve the same result with Apple Swift?
Thanks.