8ad4be459b
* feat(ios): add `showNotificationControls` prop * feat(android): add `showNotificationControls` prop * add docs * feat!: add `metadata` property to srouce This is breaking change for iOS/tvOS as we are moving some properties, but I believe that this will more readable and more user friendly * chore(ios): remove UI blocking function * code review changes for android * update example * fix readme * fix typos * update docs * fix typo * chore: improve sample metadata notification * update codegen types * rename properties * update tvOS example * reset metadata on source change * update docs --------- Co-authored-by: Olivier Bouillet <freeboub@gmail.com>
29 lines
731 B
Swift
29 lines
731 B
Swift
struct CustomMetadata {
|
|
let title: String?
|
|
let subtitle: String?
|
|
let artist: String?
|
|
let description: String?
|
|
let imageUri: String?
|
|
|
|
let json: NSDictionary?
|
|
|
|
init(_ json: NSDictionary?) {
|
|
guard let json else {
|
|
self.json = nil
|
|
title = nil
|
|
subtitle = nil
|
|
artist = nil
|
|
description = nil
|
|
imageUri = nil
|
|
return
|
|
}
|
|
|
|
self.json = json
|
|
title = json["title"] as? String ?? ""
|
|
subtitle = json["subtitle"] as? String ?? ""
|
|
artist = json["artist"] as? String ?? ""
|
|
description = json["description"] as? String ?? ""
|
|
imageUri = json["imageUri"] as? String ?? ""
|
|
}
|
|
}
|