I am using the Spotify iOS SDK and I am storing a session using NSKeyedUnarchiver
However the following code causes an error(some code omitted just for clarity's sake):
sptSession = NSKeyedUnarchiver.unarchiveObjectWithData(sessionData as! NSData)
let auth = SPTAuth.defaultInstance()
auth.session = sptSession as! SPTSession
The last line of code is throwing the error Could not cast value of type 'SPTSession' (0x110afab98) to 'SPTSession' (0x10f17f638).
I read that error as somehow there are two different types of SPTSession
s but I'm not sure why or how to resolve the issue.