In the last step of implementing face ID, I'm getting an error that says "Unable to load saved data."
I'm not sure if this is related to this issue but, when clicking the button to authenticate, the face ID detection is not getting triggered either.
A similar issue was reported by @Quindownunder, to which I've already looked into but his solution of tweaking the CodableMKPointAnnotation class didn't seem to work for me.
Here's my code:
Any help on this would be very appreciated!
It's awesome to see you extend an app's capabilities with new functions.
Your faceID code looks very similar to Paul's code in this video: Local Authentication
This video talks about updating the plist to include faceId message. You've done this step? Yes?
But please be clear. You say you're getting an "Unable to load saved data." error. This message is not in your faceId validation code. This error is in your loadData() function.
Which line is failing?
You could be getting data from the file, but not decoding the data into JSON. or You have a filename, but cannot get the data from the file.
Have you verified this yet?
@Obelix, thank you for your reply, you're absolutely right. This is strange as I must not have noticed this issue until after I implemented the face ID.
I went ahead and tried to investigate which line was failing. From what I gathered, getting data from the file seems to be the issue - although keep in mind I'm quite new to Swift and could be wrong. Nonetheless, this brings me to the question of how could I go about handling this issue as I don't know how else to change this line of code...
PS. Thanks for noticing the new functions! With the new updates coming, I find that a lot of functions are being changed and introduced so I try to make an effort and start familiarizing myself with some them now, although most 100 days of SwiftUI lessons still have some older code (for now, since the lessons are beingn updated).
I couldn't figure out what went wrong in the code so instead I decided to run the code and monitor it in the simulator. The code wouldn't launch and left the screen black, so I deleted the app from the home screen hoping to remove any previously saved data, and upon relaunching the program it seemed to fix the issue. Additionally, the face ID worked without any problem now.
Thank you @Obelix for your help, although there was no problem in the code you helped me understand the real root of the problem at hand so thank you for spending the time of your day to help me out!
SPONSORED Learn the most up-to-date techniques and strategies for testing new and legacy Swift code in this free practical course for iOS devs who want to become complete Senior iOS Developers.
You need to create an account or log in to reply.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.