ios 10 artwork raw value decoding issue
romansorochak opened this issue · comments
There is an issue with decoding raw value of artist name and song just on ios 10.
This workaround should work:
FRadioPlayer.swift
line 520:
case "timedMetadata": let rawValue = item.timedMetadata?.first?.value as? String timedMetadataDidChange(rawValue: rawValue)
replace with:
`case "timedMetadata":
let rawValue = item.timedMetadata?.first?.value as? String
if #available(iOS 11.0, *) {
timedMetadataDidChange(rawValue: rawValue)
} else {
guard let data = rawValue?.data(using: String.Encoding.isoLatin1),
let rawValue: String = String(data: data, encoding: String.Encoding.utf8) else { return }
timedMetadataDidChange(rawValue: rawValue)
}`
Hi @romansorochak, thanks for reporting the issue I will add your code in the next release.