Using ios passcode in my app

Hi, I am creating simple app with ios 17. I want to authenticate via ios passcode. but I couldn't find any example about it. Where can I get some example about using ios passcode in ios 17? please help me.

Replies

I want to authenticate via ios passcode.

That’s a very broad problem spec. Can you share more details about:

  • What you want to authenticate?

  • Your expected user workflow?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

  • I am creating simple app managing credential information. so I thought someone needs authenticate for using app. and I used to passcode not Face ID or Touch ID. so I wanted to find some example code for authenticate via passcode.

    Workflow is simple. a user set preference for using authenticate. then whenever app activates, a user should authenticate for using app.

Add a Comment

Use LocalAuthentication. If your device doesn't have biometrics (Touch ID, Face ID) then you'll be asked for the iOS passcode. If you have biometrics that will be attempted first. If it fails, you're asked for the iOS passcode.

Is there some reason you want to skip biometrics and go straight for the passcode? That would be annoying for users who expect to be able to unlock an app with biometrics.

  • I hadn't even thought about it. because I used to passcode not Face ID or Touch ID. As you said, I think I'll need some example code for authenticating with Face ID and Touch ID, as well as a password.

Add a Comment