Given the following two lines, XCode is showing an error for the second line saying Cannot convert value of type 'String' to expected argument type 'OSLogMessage'
.
logger.info("Device found:")
logger.info(String(describing: device))
Can someone please explain why this error is shown? In both cases, the parameter is of type String. (I guess)
Currently, I fix this by using string interpolation. But this does not feel right. Is there a better way than:
logger.info("\(String(describing: device))")