-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unarchive(objectForKey:) should throw #17
Comments
I am not sure that making this api |
I Just re-read what you wrote. Yah, if you change the name of the class your trying to decode, that's a problem in your code. Making this api |
@granoff Another option may be to leave existing method w/o any changes and just introduce another with |
I think I'd rather add a new API that throws, instead of changing this existing API. That would not break existing implementations... |
@granoff Below is the trace.
Is there any fix for this? |
@alexeylubyanoy Can you give me a little more detail about what your code looked like before you changed the module name, and then what the code looked like after you changed the module name and you got the crash you reported? I am trying to write some unit tests to replicate the issue before I try to change any of the APIs in the library. |
So, nothing special here. Issue appears when I call following code with old target name
and then change target name to the new one and call
Please let me know if you need more details. |
A couple more thoughts. The bundle identifier is integral to storing the data in the keychain if you do not specify a key prefix yourself. So if your target changed, then the bundle identifier changed. You can get around this by initializing your Strongbox instance with a keyPrefix argument: I'm also curious about what your |
|
Could you please change
to
It allows to catch the exception in case of failure to decode
data
.In my case module name was changed (it's being used as kind of workspace) and I got crash
when trying to decode the object encoded with old module name.
Thanks in advance.
The text was updated successfully, but these errors were encountered: