Skip to content
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

Error while handling nonexisting token #12

Open
hackjedi opened this issue May 6, 2018 · 2 comments
Open

Error while handling nonexisting token #12

hackjedi opened this issue May 6, 2018 · 2 comments

Comments

@hackjedi
Copy link

hackjedi commented May 6, 2018

 if let token = sb.unarchive(objectForKey: "token") as? String {
      .. if correct token segue to logged in screen
} else{
     segue to non-logged in screen
}
            

I have a issue while using strongbox when launching my app for the first time. When there is no token found, I cannot segue to another screen. The problem is not that the segue is not initiated (I even override the prepare(for segue ..) function and code inside this is even executed. The next viewcontroller however is never displayed.

This problem is solved when I manually add a valid token, or when I add a random string (E.G. " " ) to the archive.

How can I resolve this issue?

@granoff
Copy link
Owner

granoff commented May 6, 2018

Can you post the complete if/else code? If the only thing that is different is that there is something in the archive for the key, then perhaps there is something about the code in the "then" block that is different than the "else" block. Is everything correctly setup in your storyboard to allow the "else" block code to work? What happens when things don't work? Does the app crash, or does it simply not show the screen you are expecting to see (from the "else" block)? The Strongbox code is pretty simple and it is hard to imagine that the absence of a value in the keychain would prevent the UI from doing it's thing normally.

@granoff
Copy link
Owner

granoff commented Mar 24, 2019

Can you pull v0.5.2 and see if this is still an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants