Closed morgz closed 8 years ago
From memory there was a pretty annoying thing in Swift where if you override a property in a protocol it needs to have the exact same type (so a non-optional won't replace an optional). Without digging into it more the first thing I'd try is changing let accessible: LocksmithAccessibleOption = .Always
to var accessible: LocksmithAccessibleOption? = { return .Always }
and see if that helps.
Thanks Mathew. This worked. Your suggestion was just missing the final parenthesis.
var accessible: LocksmithAccessibleOption? = {return .Always}()
@morgz - How/where do you use this accessible var while you are performing .updateData or .loadDataForUserAccount
?
Hi,
Firstly, thanks for the library. Apart from one issue it's proving very neat for my project.
The issue I have is with trying to set accessible on my class. It seems to be ignored, and when this code is called:
If I print accessible it's value is Locksmith.LocksmithAccessibleOption.WhenUnlocked
But in my class I have set Accessible to be .Always:
The strange thing is in the debugger I can see that it has .Always as the value... but when I print accessible it is coming through as .WhenUnlocked.
Image of value in debugger